Jump to content

Compute Displacement Vector


Recommended Posts

Hi

My goal is to simply use a Displacement map to displace some geometry. My understanding is that I first have to compute the displacement vector from the displacement map, and then add this value to the existing points in my original geometry.

Attached is a .hip containing a simple example and 2 corresponding screenshots. In the first screen shot you can see I am iterating over vertices on the Attribute VOP. In the 2nd screen shot inside the Attribute VOP I am trying to compute my displacement vector for all the vertices.

The Texture SOP points to my Displacement map, a greyscale image.

What am I missing to make this work? Can any VOP experts possibly help?

 

Compute_displacement_vector_1.png

Compute_displacement_vector_2.png

COmpute_displacement_vector.hiplc

Edited by art3mis
Link to comment
Share on other sites

Uv texture your grid first. Then initialize your point normals in a point wrangle, just type @N = @N; (can't remember if you even need to do this but I'm on my phone so do it anyway).  Then have your attribute vop run over points with nearly the same network you have, just plug N into N on the displace along normal vop. 

Link to comment
Share on other sites

Really? When I say N into N I actually mean N into nN, sorry. Forgot they have the little one there. 

Once you've uv textured chuck down a uv quickshade to make sure they're what you want (maybe use a uv project for a grid, just hit initialize and it will auto size and orient to your grid). If they're good it should work. Output the texture vop to your Cd to check it too. Make sure your attribute vop is set to run over points. I don't think your uvs have to be point uvs but that's another thing you could check.

You could also try a displacement texture vop too. 

Edited by adrianr
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...