Why does this RayMarcher doesn't work with 3D Textures?
Hi, so I try to use the RayMarcher, which is shown in here.
I use the basic code from the first sample (opacity only). The only difference is, that I don't use a 2D Flipbook, but a real Volume Texture which is available sind 4.20 (You can create it from a flipbook, but I also implemented a Factory which imports my raw 3D data, both methods show this bug). When using his flipbook approach, everything is fine. But when I use the Volume Texture I get weird artifacts.
Here is the custom Material Node Code which I use to compute the Emissive Color:
CurPos is BoundingBoxBased_0-1_UVW.
The following artifact is visible:
You can see the stripes which are emitting from the ball. Another one from the side:
I used Opaque instead of Additive blending so you can see it better. It also goes in the depth.
I have no idea what is wrong since it works with the flipbook. I think maybe it is a bug with Sampling of the new Volume Textures? This also occurs with different Volume Textures.
Most likely you are hitting volume limits and as your texture coordinates are saturated, when you are hitting a plane of the bounding box, your raymarch continues with 2 coordinates out of 3 incrementing, resulting in said artifacts. Either pre-calculate exit point and adjust step number accordingly or check if you are still inside the volume at every step.
answered Sep 25 '18 at 09:55 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here