Jump to content
Anti-Distinctlyminty

Faceted Normals After Displacement

Recommended Posts

Damn, thought I had it, still a bit broken.. Only render time subdiv fixes it but I know that wasn't the point. Curious to know the proper solution as this would technically work in sops regarding rotating the position and normals.

 

 

Displacement_Normals_02.hipnc

Share this post


Link to post
Share on other sites

You're right that the exact same code does work at SOP level, but still gives facet artefacts. I'm really curious to see what the solution is...surely mantra can do this? Otherwise every displaced object has to be subdivided.

Share this post


Link to post
Share on other sites

That much better! There are still some artefacts on the faces that are going into shadow, but certainly better. 

Edit: it seems to be from the torus rows and columns being increased :/

Yet this raises the question of what was actually being done wrong before? As far as I can tell, wasn't what I was doing before essentially the same thing?

The results for both displacement setups are the same.

Edited by Anti-Distinctlyminty

Share this post


Link to post
Share on other sites

howdy.  the normals are smooth in the example.  the artifacting you're seeing is the self-shadowing of the individual polygons.  if you turn off raytrace shadows on your light you will see this clearly.  fiddling with the raytrace bias on your mantra rop can resolve this if you aren't wiling to have a model with more divisions.   

here's what this looks like after fiddling with the raytrace bias: 

 

normals.jpg

Share this post


Link to post
Share on other sites

Ok, I thought it may be something to do with the shadow calculation rather than the normal calculation on the mesh, and it seems that is correct! 

I changed my Raytracing Bias to 0.17 and the shadows are now smoothly interpolated.

 

Edit: You beat me to it :) thank you Brian!

Edited by Anti-Distinctlyminty

Share this post


Link to post
Share on other sites

Sooo my solution worked? ;) Just using quaternion dihedral as you had set up instead of a 3x3 matrix. Good to know about the raytracing bias. 

Regarding your latest scene pretty sure the source is the shading normal vop inside the displace vop. It creates new normals from the displaced position, rather than rotating the existing normals along with the position. You can go into the displace vop and hijack the matrix coming out of the 'get_space' subnetwork to rotate the normals and bypass the shading normal vop - Just be sure to turn off your transform after the displace normal.

Edit: I haven't checked the full subnet to see what it's making or if the normals are now technically rotated the same as the points, but I think this gives you enough to go on for further poking around. 

 

rotatenormals.PNG

Edited by adrianr

Share this post


Link to post
Share on other sites

Hi Adrian, thanks for the input. I dug around inside the other nodes as you suggested. The get_space subnetwork seemed to just be getting a rotation matrix for the purpose of converting whatever was input into object space (or whatever space was chosen). But that doesn't seem to imply I was doing anything wrong.

In an effort to try and understand the displacement better, I'm trying to apply layers of displacement. For example rotate first, then displace along normals.

The Shading Normal VOP doesn't have too much in the way of documentation (e.g. what space are the inputs expected to be in?), but it states that it will pick up the global variables of the same name if nothing is inputted. So this is the closest I have gotten, but as you can see I'm still getting artifacts here. Furthermore, if you try to make the object subdivided now then the displacement disappears.

I feel there's something essential to all this that I'm missing here. 

Displacement_Normals.hipnc

artefact.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×