I am developping a voxel raytracer for global illumination.
I have been successful in multiple aspects but there is a problem I am not sure how to solve.
The model works as most other Voxelization based algorithms work. We use rasterization to store the scene in a 3D volumetric structure and then we raytrace inside of said 3D structure.
In the "pure" model (only voxels) I can generate prety decent shadows (ignore the circular artifacts):
However when I try to create a combined scene (normal rendering for colors, voxels for shadows) I sometimes get self intersection based artifacts:
I can improve the image a bit by using an epsilon tolerance (considering that if we are too close to the original starting position we haven't collided with anything yet):
However doing this creates poor shadows by eliminating certain collissions (look at the archs for example, where the areas too close to the source should be darkened but are instead lightened).
I want to know if there is a better way to check for self intersection, other than checking the original position?
i.e I want to be able to get as close to the shadows in the first image as possible.