Hello,
I have a grid and an SDF VDB sphere. I want to make a shader for the grid whose color is based on the sphere's SDF value.
When building a simple VOP network in SOPs that takes a volume sample and applies it as Cd onto the grid, everything works fine. However, when I take this exact same network and use it as a shader, it does not work.
I reference the volume via opobj/sphere1, and I read elsewhere that /mat/ can't handle op referencing this way. But even when wrapping the shader into a material network and feeding it the op path via an exposed parameter it still doesn't work. Mantra keeps saying something about “unable to resolve geometry opobj/sphere1. Please ensure the object is included for rendering.”
I tried using a point cloud instead: I scattered points into the volume and stored the SDF values on the point cloud. Again, colorizing the grid in SOP land by using a point cloud open and pointing it to opobj/sphere1 works fine. But the same nodes fail in MAT land. Does anybody know how to get this to work?
Read volume or point cloud in shader
3501 5 0- Digipiction
- Member
- 166 posts
- Joined: March 2014
- Offline
- kelvincai
- Member
- 74 posts
- Joined: Dec. 2009
- Offline
- Digipiction
- Member
- 166 posts
- Joined: March 2014
- Offline
- Innehavaren
- Member
- 18 posts
- Joined: June 2016
- Offline
Hi there,
the difference between point clouds in Sop and in Mat are that Sop is always aware of other existing nodes while Mat is not because you are now in shader land not in geometry land anymore.
The solution is simply to cache out the geometry you would like to use as a point cloud in Mat/Shop and refer to the file instead to a sop in the shader.
If you take that into account, it works.
Cheers
Jakob
the difference between point clouds in Sop and in Mat are that Sop is always aware of other existing nodes while Mat is not because you are now in shader land not in geometry land anymore.
The solution is simply to cache out the geometry you would like to use as a point cloud in Mat/Shop and refer to the file instead to a sop in the shader.
If you take that into account, it works.
Cheers
Jakob
- Digipiction
- Member
- 166 posts
- Joined: March 2014
- Offline
InnehavarenThank you very much for looking into it! Unfortunately, I need a live solution that doesn't require caching. This is for an HDA that has multiple parameters to tweak the look.
The solution is simply to cache out the geometry you would like to use as a point cloud in Mat/Shop and refer to the file instead to a sop in the shader.
Some of these parameters change the VDB or the point cloud, so they must be readable by the shader without caching them first.
- Innehavaren
- Member
- 18 posts
- Joined: June 2016
- Offline
-
- Quick Links