displacement normal problem

   2183   4   1
User Avatar
Member
25 posts
Joined: May 2012
Offline
Hi,
I'm trying to build a displacement shader that is scaled dependent on a point attribute. So I import the variable in my material and plug it into the displacements scale. However I somehow do not get smooth normals with the shadingNormal node, resulting in ugly edges like you can see in the picture.
Do you have any ideas how to fix that?

Thanks in Advance!

Attachments:
nonSmoothDisp.jpg (32.4 KB)
minExample.hipnc (261.0 KB)

asinus humanum est
User Avatar
Member
8583 posts
Joined: July 2007
Offline
that's because your attribute is interpolated linearly within the polygon, so while your normal may be correct, the faceted look is actual shape of displaced mesh

to get smooth interpolation within polygons, you'd probably need to render your object with Render Polygons As Subdivision checked
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
25 posts
Joined: May 2012
Offline
thanks! yep the displacement itself is how i like it to be. i just thought that shadernormal would interpolate normals within the facets as the shader iterates over all surface intersections!?

unfortunately checking ‘render polys as subdivisions’ does not solve it. The displacement disappears entirely…
asinus humanum est
User Avatar
Member
8583 posts
Joined: July 2007
Offline
steff
… i just thought that shadernormal would interpolate normals within the facets…
it does that, however the facets are diced for displacement to around pixel size so if your displacement results in flat plane, the normals will be flat, which is correct

steff

unfortunately checking ‘render polys as subdivisions’ does not solve it. The displacement disappears entirely…

make sure you normalize the N before plugging to displacenml1
or just disconnect it completely
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
25 posts
Joined: May 2012
Offline
Ah I see my misconception there, that makes perfect sense. And normalizing did the trick.

Thanks for your help Tomas!
asinus humanum est
  • Quick Links