Getting volume width in surface shader

   2436   5   1
User Avatar
Member
277 posts
Joined: July 2006
Offline
Hi! Is it possible somehow to measure the width of a volume along given axis in surface shop? I want to make shader which will colour my volume based on its width (or lets say density) along some vector.

The only problem is , that if the sum of densities equals more than 1, I do NOT want to stop computations, so it should work with really dense volumes too.

How could it be done?
Thank you!
User Avatar
Member
277 posts
Joined: July 2006
Offline
No answer equals that this is not doable?
User Avatar
Member
1390 posts
Joined: July 2005
Offline
danilo2
No answer equals that this is not doable?

If you provide to your shader… again, a file on disk, which you don't like so much, you can ray march a volume in a particular direction until you reach the border: getbounds(), volumesample(). If you convert a volume into i3d file, you have a convenient vex method it integrate volume along a vector: integrate3d()

cheers!
skk.


ps Looks like I haven't done my job right
User Avatar
Member
277 posts
Joined: July 2006
Offline
Of course! I didnt think about getting it the manual way by sampling volume by myself …
So simple ;]

Thank you I don't understeand the part about doing job right
User Avatar
Member
1390 posts
Joined: July 2005
Offline
danilo2
Thank you I don't understeand the part about doing job right

It was a part of artbuzz!
User Avatar
Member
277 posts
Joined: July 2006
Offline
Yes I remember but sometimes a ‘human beeing’ (like me) has got something, that I will call ‘brain stopper’ and don't think about the simplest solutions.

Your prelection was the best!

Ps. I like solutions, which base on files that are cached on disk, but simply not always
  • Quick Links