Black artefacts with displacement map

   14813   11   1
User Avatar
Member
69 posts
Joined: July 2005
Offline
Hi,
I'm testing for the first time to make a displacement map in Houdini. The zbrush/Houdini-workflow pdf gave me a good start. But I'm getting some strange black artefacts in my renders, and I don't know what's the problem. I hope somebody can help me with this.

This is what my render looks like:


I'm using a 16BIT grayscale uncompressed TIF. The dimension are fairly big. 4500x6000 | 52MB

Here's my Vex Displacement shader:


I'm using parameter1 as a multiplier for the displacement amount. Uvxform1 is rotated 180degrees in x, so that the map got the correct position. The rest of the network is based on its default values.

And here's my very simple SOP network:


I'm using a Polygon grid.

Nothing really special I think. ops: Can it be the filesize of the image or do I miss some important node in my VEX or SOP network? :?:

cheers,
daniel
User Avatar
Member
1908 posts
Joined: Nov. 2006
Offline
It's been a while since I used any displacement maps but have you tried increasing the Displace Bound in the Render tab of the geometry object? I seem to remember having a problem like that once and increasing the displace bound fixed it as I recall.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
711 posts
Joined: July 2005
Offline
yup, that's exactly it. also you might want to try increasing the shading quality, chances are you'll see a nice improvement in the displacement (at the expense of render time).
User Avatar
Member
69 posts
Joined: July 2005
Offline
Thank you guys. That was it. I was already thinking that it has something to do with the bounding box. In Maya I just can scale in Y-axis. But this didn't work in this case. I also tried to use a box as a bounding box for the grid, but I couldn't connect the two. Now I know how to do it.

DaJuice, would you like to explain what parameters exactly I can tweak to get a nicer displacement? Is it just the Super Sample, or are there specific parameters for displacement maps? Maybe you can share some tips and tricks?

Thanks again,
daniel
User Avatar
Member
41 posts
Joined: March 2006
Offline
You have to turn on the displace bound parameter in the render tab (obj level) and increase the value. When higher, more render time.

Attachments:
dispb.JPG (15.1 KB)

User Avatar
Member
711 posts
Joined: July 2005
Offline
Hi schyzomaniac, the Shading Quality parameter is right under Displace Bound. Try setting it to 2 for example, maybe even 3. If your displacement map is high-frequency it will probably benefit from this. Also keep the Displace Bound as low as possible without getting those cracks, or you might get a nasty surprise as far as render-times.
Super-samples don't affect displacement quality, just anti-aliasing.
User Avatar
Member
69 posts
Joined: July 2005
Offline
Thank you all again for the replies. This thread helped me a lot!

Thanks,
daniel
User Avatar
Member
66 posts
Joined: July 2005
Offline
the best way is to use the “heightchannel +.1” of the map, in the displace bound parameter tab.

ch(“/obj/model/shopnet/displace/height”)+.1
Michael Fuchs -|- Owner Sparkling Design -|- Austria

Sparkling Design [sparkling-design.com]
User Avatar
Member
69 posts
Joined: July 2005
Offline
Hi michael,
where would that “heightchannel” value be stored? In my Vex Displacement shader -> Displace along Normal node -> amount?
So in my case:
ch(“/vex/map_displacement/displacenml/amount”)

When I start writing the expression I get the little tooltip help until “displacenml”. After that it stops. So I'm not sure if “amount” is the correct parameter to use.

cheers,
daniel
User Avatar
Member
12503 posts
Joined: July 2005
Offline
Hi there,

The reason for displacement bound is that when Mantra is rendering (which it does in “buckets”; the little squares your see), it needs to be told you check around the bucket to see if surfaces outside the bucket are being displaced into the bucket. You can tell your displacement shader to displace any amount you like - you are free to use any methods you like, so its up to you to help Mantra figure it out. In general, set your displacement bound to the maximum distance from the original surface you think you might be displacing the surface - and then add 10% for safety's sake.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
User Avatar
Member
69 posts
Joined: July 2005
Offline
Thanks for the explanation Jason, it helps me to understand the problem.

I have a hard time though to figure out where exactly the distance between my grid and the displacement is stored. Where can I access this data? I guess I'm overlooking something.

I would like to automate this problems with the technique that michael suggested. So therefore I need to reference to the channel that hold the value of my displacementdistance (I think). I assume that this value is stored in the “amount” parameter of my displacenm1 node (see image above - vex network). Is this the correct parameter, and therefore is my expression that I posted above correct?
ch(“/vex/map_displacement/displacenml1/amount”) + 0.1

Also, if I want to just enter a number in displacement bound, I don't know how to figure out the maximum distance. I only see my grid in the viewport, so how would I be able to know what my maximum distance is, other than just guessing and see if it works?

To bring this post to a point, my remaining questions are:
Is my expression correct, and where can I see how big my maximum displacement is?

thanks everybody,
daniel
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
The answer is in the displacement shader itself. Look for a parameter called:
Amplitude
Amount
Scale
Height
etc.

That value “should” represent the overall magnitude of the displacement. Most shader writers provide a single displacment amplitude value that you can hook in to displacement bounds.

Instead of adding an offset to the displacemnt shader's amplitude value, I usually multiply the channel reference by a small factor, say ch(“/obj/model/shopnet/displace/height”) * 1.05

I consider this to be a very safe setting. Please realize that large values for Displace Bounds will dramatically increase rendering times as you force Mantra to load in more surrounding buckets which means more memory consumed. This is especially true if you have surfaces that are flat instead of face on. Ground terrains with displacement maps are famous for generating tears in your rendered surface.

I am more agressive in setting my displace bounds values. I usually multiply the channel reference by 0.5 first then do a quick test render at a couple frames where surafces are flat to the camera. If I see artefacts, I slowly increase the displace bounds until I no longer see them.

Some users animate the displace bounds multiplier to reduce render times. Obviously this only makes sense if you are rendering large images that take very long to generate.
There's at least one school like the old school!
  • Quick Links