Let's say I have a poly sphere, converted to sdf vdb, now I'd like to edit the fields in the voxels, something like this:
if ( sdfValue < -0.2 && sdfValue > -0.3 ) sdfValue = 0;
Or some other trick so that when I convert it back to polygons I'll get certain thickness.
Some how in vops maybe ?? Thanks.
Editing volume fields ?
4658 6 0- A-OC
- Member
- 253 posts
- Joined: July 2006
- Offline
- edward
- Member
- 7734 posts
- Joined: July 2005
- Online
You can use a Volume VOP SOP to do such editing. Note once you do this, you'll get an invalid SDF, that you should renormalize to make valid again using the Volume SDF SOP.
I'm not sure that just setting them to zero works though. You might also need to set the voxels within the walls of your “thickness” to some inside value as well.
I'm not sure that just setting them to zero works though. You might also need to set the voxels within the walls of your “thickness” to some inside value as well.
- A-OC
- Member
- 253 posts
- Joined: July 2006
- Offline
Crap, the volume sop is behaving weirdly.
I managed to do it with volume mix though.
When I replicate what I'm doing with vol mix in vol vop, I get some weird boxes inside, and the vol sdf sop seems to have no effect.
In vol mix I'm setting mix method to user and an expression in the value field:
if ( $V < -1 , 0 , $V )
This is working ok, but the help says it's much faster en vops. Indeed, I checked the cook times and it's 5 times faster.
Also, how could we get rid of the “voxels” at the inside and side wall of the sphere ? Im getting these with the vol mix too.
I realize it's because of the clamping that i'm doing with the sdf but I can't figure the math needed.
Scene included.
http://s30.postimg.org/rtw90tkpt/send_a.jpg [s30.postimg.org]
http://s30.postimg.org/j6j1mt6w1/send_b.jpg [s30.postimg.org]
I managed to do it with volume mix though.
When I replicate what I'm doing with vol mix in vol vop, I get some weird boxes inside, and the vol sdf sop seems to have no effect.
In vol mix I'm setting mix method to user and an expression in the value field:
if ( $V < -1 , 0 , $V )
This is working ok, but the help says it's much faster en vops. Indeed, I checked the cook times and it's 5 times faster.
Also, how could we get rid of the “voxels” at the inside and side wall of the sphere ? Im getting these with the vol mix too.
I realize it's because of the clamping that i'm doing with the sdf but I can't figure the math needed.
Scene included.
http://s30.postimg.org/rtw90tkpt/send_a.jpg [s30.postimg.org]
http://s30.postimg.org/j6j1mt6w1/send_b.jpg [s30.postimg.org]
- edward
- Member
- 7734 posts
- Joined: July 2005
- Online
- tamte
- Member
- 8595 posts
- Joined: July 2007
- Offline
- A-OC
- Member
- 253 posts
- Joined: July 2006
- Offline
- edward
- Member
- 7734 posts
- Joined: July 2005
- Online
The problem that you're likely running into is that the Volume VOP only runs over the “active” voxels in the VDB. Unlike native volumes, VDB doesn't have a “bounding box” that dictates where the active voxels occur. For VDB, the active voxels can be anywhere in space. So you probably needed have a sufficiently large half-width when doing your VDB From Polygons so that the Volume VOP can modify it.
-
- Quick Links