You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 18, 2020. It is now read-only.
IMPORTANT CHANGES to Volumetrics for proper raytracing of volumes
Problems with volumes and transparent objects have been reported in the bug tracker several times:
http://yafaray.org/node/289http://yafaray.org/node/666
After some investigation, I believe the rendering of volumes is incorrectly designed. Currently, volumes are rendering separatedly from the normal "surface" objects, and the volume rendered image just rudimentary added to the "surface" rendering in integrator.cc. This causes that volumes are not included in the normal recursive raytracing and therefore volumes are not properly integrated with the other objects.
So, I've removed the volume rendering from integrator.cc and I've implemented it as part of the normal integrators raytracing.
The tests I've made look good for now and now transparent objects are not causing problems. In fact, this should allow to create scenes mixing mirrors, transparency, etc, and volumes that were not possible before.
However, this is a very important and structural change that could have deep repercusions in the rendering, so I would advise to test it thoroughly to make sure no new issues happen now.
colVolIntegration.A = 1.f-colVolTransmittance.A; //Fix for Volumetrics Alpha artifacts. For the Alpha of the volume itself, I will use the inverse of the Aplha calculated by the transmittance calculation. It seems to give good results for volumes rendered on top of other objects, volumes rendered on top of an opaque background and volumes rendered on top of transparent background (for later compositing).
301
-
colorA_t col = (colIntegration*colVolTransmittance)+colVolIntegration;
0 commit comments