I’ve seen several postings about this topic, but none I found were answered. I thought I’d try again.
I would like to be able to calculate a volume density (or just a texture coordinate) proportional to the distance from the mesh, measured inward from the mesh surface to the mesh origin. I’ve got a good idea how the standard gradient texture works, but it is calculated from a single origin point with uniform radial scaling in all directions. In contrast, I want to be able to take into account the shape of the mesh. I’m thinking the density function would run from 0 -> 1 along each radius from the object origin outward until the mesh surface is intersected.
Alternately, if there is a way to access the vertex or face coordinates in Nodes, I think I can build a node tree to calculate the density function from scratch. I can imagine you could do this with Python queries of the vertex or face data, but I suspect that would take a long time to render. Similarly with OSL. But I’d rather than some method rather than no method at all.
I’d greatly appreciate any suggestions you all might have.
Thanks,
Kevin