Search - User list
Full Version: Getting volume width in surface shader
Root » Technical Discussion » Getting volume width in surface shader
danilo2
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!
danilo2
No answer equals that this is not doable?
symek
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
danilo2
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
symek
danilo2
Thank you I don't understeand the part about doing job right

It was a part of artbuzz!
danilo2
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB