Jump to content

Displacement Trouble


Macha

Recommended Posts

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

post-4013-129127961544_thumb.jpg

Edited by Macha
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by Macha
Link to comment
Share on other sites

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 by MENOZ
Link to comment
Share on other sites

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 by Macha
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

post-4013-129142096304_thumb.jpg

displacement.hipnc

Edited by Macha
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...