Jump to content

Mantra displacement issue


Recommended Posts

Hello guys

I'm encountering a following problem:

I create a turbulent noise, that I plug into Displace Along Normals to create noisy surface, however displacement happens in relation to camera space for some reason.

1ngmiIg.gif

As you can see I'm displacing only in selected places - this is defined by vertex colour map (extracted from Vornoi Fracture depth)

geoo.jpg

The SOP in short - Vornoi Fracture, faceting, Explode View to see different parts clearly, Delete to concentrate on one piece, Point to convert __depth attribute into $CG, VOP SOP to remap the $CG slightly, Rest for shader's Rest Position (enabled on 'if' for both normal and quadric transform )

sopnetwork.jpg

And finally the shader network

network01.jpg

I'm taking Rest Position as Position attribute for Turbulent Noise, to prevent sliding. I accumulate two noises and revert them, and then add to the $P. A mix is defining where to use original $P and where to use noisy, based on bias fed through $CG from the vertex colour (surfaceColour node). Then result is fed to Displace Along Normals and through to the Displacement Output.

dannoise.jpg

As you can see the setup is pretty basic, however I'm having the issue with rendering the displacement, where it happens along the camera coordinates, not along the surface normals. I tried feeding $N position to Displace Along Normals, tried plugging in Transform nodes everywhere, only result being blowing the displacement out of the camera viewing capacity.

Can anyone help me with this issue? Or have any thoughts on the problem? I'd very appreciate any help, its for a deadline on 8th February, so please share any knowledge you have in this area

shatteredMaterial04.hipnc

Edited by Norad
Link to comment
Share on other sites

If you want to displace along the normal, your noise should be float and then you can plug that into the displace along normal node "amount" input. P and N in current space can go straight into the displace along normal node.

If you are just using the disp along normal node to recalculate the normal (never tried that before ... ) you should transform your P global into object space before the add, then back into current before it goes into the disp along normal node .... that should work.

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...