Macha Posted December 2, 2010 Share Posted December 2, 2010 (edited) Why does mantrasurface give me messed up displacement when the same settings on the displacement shader give good result? Is that a known bug? Edit: It seems that the Raster Space Measuring Option can get rid of this effect, at least in another scene I tried with a similar setup. displace.hip Edited December 2, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
MENOZ Posted December 2, 2010 Share Posted December 2, 2010 Why does mantrasurface give me messed up displacement when the same settings on the displacement shader give good result? Is that a known bug? Edit: It seems that the Raster Space Measuring Option can get rid of this effect, at least in another scene I tried with a similar setup. try setting the displacement bound Quote Link to comment Share on other sites More sharing options...
Macha Posted December 2, 2010 Author Share Posted December 2, 2010 Yes, I know, but the settings are the same, so why does this still happen? Quote Link to comment Share on other sites More sharing options...
petz Posted December 2, 2010 Share Posted December 2, 2010 Yes, I know, but the settings are the same, so why does this still happen? check the displacement bounds insinde your shader-builder. they are linked with the default value of the "dispScale" parameter instead of the actual scale. by relinking them to the propper channel displacements should work as expected. hth. petz Quote Link to comment Share on other sites More sharing options...
MENOZ Posted December 2, 2010 Share Posted December 2, 2010 check the displacement bounds insinde your shader-builder. they are linked with the default value of the "dispScale" parameter instead of the actual scale. by relinking them to the propper channel displacements should work as expected. hth. petz rendering from the viewport produces different results than rendering with the mplay. @petz: I noticed that too, but this don't solve the problem for me. I should only delete the reference right? I don't really understand the meaning of that reference anyways.. @Macha: setting the displacement bound on the object works, right? you want to know woy you are forced to modify that setting with apparently the same shader. I'd like to know it too. I found a trick here. so it seems that you don't have to set the displacement bound for each object Quote Link to comment Share on other sites More sharing options...
Macha Posted December 3, 2010 Author Share Posted December 3, 2010 No, I don't really understand how this works. I thought that scale controls the bounds and I can't get rid of the problem by adjusting that parameter. What am I missing? Quote Link to comment Share on other sites More sharing options...
Macha Posted December 3, 2010 Author Share Posted December 3, 2010 (edited) Hm, I start to understand... The scale parameter only scales the displacement amplitude (?). The bound parameter itself has to be added via the parameter interface. But why is it set up that way? How do these two parameters relate in practice? And how can we find the correct bound value? I am trying to do a correct setup to render HOT displacements for use inside the mantra surface shader. Edited December 3, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
MENOZ Posted December 3, 2010 Share Posted December 3, 2010 (edited) Hm, I start to understand... The scale parameter only scales the displacement amplitude (?). The bound parameter itself has to be added via the parameter interface. But why is it set up that way? How do these two parameters relate in practice? And how can we find the correct bound value? I am trying to do a correct setup to render HOT displacements for use inside the mantra surface shader. the scale parameter scale the amplitude, yes, it's like a multiplier.. I remember the displacement bound was well explained in the renderman docs. You have to think as a sort of bounding box that takes into account the displaced geometry. In this space the displacement can occur, if the scale of your displacement goes beyond that "bounding box", it will be clipped in some way, and results in rendering artifacts. you have to rise the displacement bound so that it enclose your displacement value. If you use that trick, linking the values of your displacement map to the "displacement bound" value it will follow and adapt to the geometry, so you don't have to worry about which is the correct value. Here is something from the maual http://www.sidefx.com/docs/houdini11.0/shade/properties I don't know exactly how it works the renderer, I don't know if it's because mantra is a REYES engine and works in that way, so maybe it has to store in some way some memory to make displacement computations, or if all the renderers works like that.. Another thing that I don't understand is: starting by my assumptions the displaced pixels when goes beyond the bounds should be clipped, but the result is very different from a clipping operation.. and another question: the parameter node, does it sets the bound values per pixel? or it only sets a constant offset around the geometry? Edited December 3, 2010 by MENOZ Quote Link to comment Share on other sites More sharing options...
Macha Posted December 3, 2010 Author Share Posted December 3, 2010 (edited) OK, I see. So, part of the problem may be that I use a procedural method to calculate the displacement (not a map). In my specific case I use the HOT vex -not in the above posted example file- and I don't really know by how much it displaces. There is a number of course, but I don't know what this translates to in real units... The funny thing is that even a very high bound value does not solve the problem. I would have thought that a high value might be artifact-free even if it is at the expense of rendertime, but not so! Clearly there is mystery and harrypotterly magic in those mantra algorithms that I don't know about. The other problem with HOT displacement is that since H11 the shaders work somehow differently and I still don't understand it fully (is it possible to use the old displacement shaders? They don't copy-paste into the vex networks) Edited December 3, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
petz Posted December 3, 2010 Share Posted December 3, 2010 by setting correct bounds mantra renders the displacement without problems, no matter if its a texture or a precedural. be careful when using ipr-render since mantra switches to raytrace mode. is the rop set to micropolygon-rendering the image looks therefore different. just deaktivate "preview" and mantra uses the render-engine defined in the rop. file is attached. petz displace1.hip Quote Link to comment Share on other sites More sharing options...
Macha Posted December 4, 2010 Author Share Posted December 4, 2010 (edited) Ah thanks for explaining that to me Petz. There is one more displacement problem now. It's more of a HOT problem perhaps but here it goes: At the moment I can only displace along the normals of the geometry, but I would like to vary those directions so that I can make proper wave motion and choppy movement. I can do this in VOPSOP but shops and displacement work a little differently. I attached a file and an screenshot of my "shader". In the shader I just replaced the default noise with my HOT Ocean Eval. As you can see it just gives a scalar because the displacement node doesn't accept a vector, except for the normal, but plugging that in creates a mess. displacement.hipnc Edited December 4, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.