Volume displacement is (to my knowledge) based on the idea to distort the input position and check the density at this distored (or displaced) position. Addressing this problem I gave my best at writing a node that checks If a given point in sapce is inside a given mesh/object.
The Idea is to have a bounding geometry (a cube for example) and use a "Inside Test" node to find out weather or not the input position is inside an other object.
If it is, return 1 if not 0. One can use this information to drive a volume shader and finally distort the volume.
This way volume displacement is possible.
Im aware of the volume displacement modifire but as far as I can tell it's still "locked" to a discrete grid, the shader would be entirely "procedural" and therefore more suited for details, however it should be somewhat slower.
Here a quick test render:
The object editor: (the node is used in the cubes material while the pipe material is transparent)
I implemented this using raycasting and counting the number of intersections with the given object (odd -> inside | even -> outside).
The existing concept could be improved by some kind of cache, but my blender API knowledge is way to bad to know exacly how this could be acomplished.
In addition a VDB support is not implemented by now.
(Not used anymore)
This is still like early alpha but I figured sharing the progress makes it easyer to improve the overall progress and exchange opinions and ideas.
OSL is also not working at the moment...
