Jump to content

volume displacement based of UV


Recommended Posts

Hello everyone,

Let's say in SOP I make a vdb density volume from a sphere which have uv attribute. And in "VDB from polygon" node I inherit that UV to a VDB field.

image.png.0f8ab01e1c3fd1c5f6f4828ab56972ea.png

And then in the material, I want inherit that UV field and make volume displacement using a jpg tex based of that UV 

image.thumb.png.32141abf1a5f5f65dd488cd47e8d7547.png

when I hit render , the result looks strange (Bottom right corner) regardless I rotate the uv position

image.png.7d15be26dcb6e2e357571d0d6a7812db.png

Here is the file and tex

untitled.hip

shu.zip

Edited by qazwsdc
Link to comment
Share on other sites

It happens because the displacement is hitting the maximum bounds of your volume in that area. You'll need to add more exterior bound voxels to the volume and might have to add a "VDB activate" node after the "VDB From Polygons" node and increase the "Expand" option.

Link to comment
Share on other sites

There is something else wrong in that file as well. When I supply a simple checkerboard black and white image, the UVs only work for the top half.

Untitled-1.jpg

 

Using toNDC as a replacement for UVs kind of works. It clearly illustrates that the bind of UVs doesn't seem to work. You can get camera facing displacement that way, however.

Untitled-1.thumb.jpg.4ae7024a7ed097ee8388c6adec50d703.jpg

 

Edited by Atom
Link to comment
Share on other sites

3 hours ago, underscoreus said:

It happens because the displacement is hitting the maximum bounds of your volume in that area. You'll need to add more exterior bound voxels to the volume and might have to add a "VDB activate" node after the "VDB From Polygons" node and increase the "Expand" option.

I tried , but it doesn't work

Link to comment
Share on other sites

1 hour ago, Atom said:

There is something else wrong in that file as well. When I supply a simple checkerboard black and white image, the UVs only work for the top half.

Untitled-1.jpg

 

Using toNDC as a replacement for UVs kind of works. It clearly illustrates that the bind of UVs doesn't seem to work. You can get camera facing displacement that way, however.

Untitled-1.thumb.jpg.4ae7024a7ed097ee8388c6adec50d703.jpg

 

Yes toNDC is a good way to achieve this displacement effect BUT... it ONLY works when camera don't move, and the object must be static.

In other words the displacement will move when camera move. That's not what I need.

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