Dot product of vector VDB and viewing angle
3881 10 1-
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
So I am working on a project were I need to make a VDB volume more transparent were it's gradient field is aligned with the camera's viewing angle. I figured it would be easy enough to take the normalized gradient of the volume, take the camera normal, and then run a dot product of them in a volume vop, however my result looks really blocky and doesn't seem to work at all. Can anyone share ideas of how to do this?
-
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
So after playing around with it some more I found that it had to do with the size of the gradient vectors being too small and for some reason using lower resolution volumes provided larger gradient vector results that I was then able to get a better result with. Not sure why this method doesn't work very well with higher resolution volumes. Any ideas?
-
- tamte
- Member
- 9538 posts
- Joined: July 2007
- Online
-
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
-
- tamte
- Member
- 9538 posts
- Joined: July 2007
- Online
as well depends on your volume, as the gradient may be 0 for some voxels if all surrounding voxels have the same value as current one, which is less likely for SDF, but fog volumes from geometry can have that problem as usually inside of the object is 1 so you will get gradient only on borders
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
-
- jkunz07
- Member
- 76 posts
- Joined: Sept. 2011
- Online
-
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
-
- jkunz07
- Member
- 76 posts
- Joined: Sept. 2011
- Online
90ender
So that has actually been something I have been wondering about. It seems to me that if you have a high resolution fog volume that is value 1 all the way across, you would have to smooth it pretty drastically in order for the blur to have any effect on the inner most voxels. Is this right?
I'm not sure how to fix the interior, but blurring it can give more reasonable vectors for the border depending on your volume.
-
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
-
- tamte
- Member
- 9538 posts
- Joined: July 2007
- Online
-
- Quick Links


