← All ideas
  • Published 5 Oct 2020

Volume Displacement Implementation

Hello, I would like to propose implementing volume displacement in cycles. I would make this possible with a simple "inside mesh test" node, returning a boolean value and if possible some texture information. One could distort a given point using for example noises and feed this distorted position to the inside test node, one would basically have displaced the volume. Proof of concept is the thumbnail. (It's rendered in low res and minimal volume settings due to my machines speed)

To evaluate if a point is inside the mesh one would cast n rays in random directions from the given point and evaluate if the normal of the hit point is facing in the same direction and if the geometrys name matches the given one. In the case of a closed surface casting n=1 rays is sufficient for a noiseles result.

I implemented a "inside test" in osl but this had the significant drawback that it doesn't run on the GPU, therefore one would need to register and compile a new node to the codebase (and translate the osl version to for example OpenCL).

I am currently trying to implement this node into the current blender build, but I am not entirely sure about what I am doing so if someone has a minimal example or a good video tutorial on this topic it would accelerate the process.

Thanks in advance

volume_test.png

100%

Development Status: In Development

Upvote 26 Downvote 0
nikolaij.neitzel
5 Oct 2020

3 Comments

2
nikolaij.neitzel Author

* @grinsegold * This seems to be a voxel based approach while what I am looking forward to is completely procedural. Indeed one could use some kind of voxel cache to accelerate the shader. Since voxels have a fixed size the details in displacement are much more limited.

1

Should be changed to done status.