diff options
author | Matt Ebb <matt@mke3.net> | 2008-09-24 06:52:47 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2008-09-24 06:52:47 +0400 |
commit | aed107cf4a31f4b07d1f065d407e6ad55935afb2 (patch) | |
tree | dbb8e5f603a63edb4a8df4c0bebbdafbd27832a3 /source/blender/render/intern/include/shading.h | |
parent | 45acf427a7352bbffffcec93d43b50220febbd04 (diff) |
* Volumetrics scene integration
Now other objects (and sky) correctly render if they're partially
inside or behind a volume. Previously all other objects were ignored,
and volumes just rendered on black. The colour of surfaces inside or
behind the volume gets correctly attenuated by the density of the
volume in between - i.e. thicker volumes will block the light coming
from behind. However, other solid objects don't receive volume shadows
yet, this is to be worked on later.
http://mke3.net/blender/devel/rendering/volumetrics/vol_inside_behind.png
Currently this uses raytracing to find intersections within the volume,
and rays are also traced from the volume, heading behind into the
scene, to see what's behind it (similar effect to ray transp with IOR
1). Because of this, objects inside or behind the volume will not be
antialiased. Perhaps I can come up with a solution for this, but until
then, for antialiasing, you can turn on Full OSA (warning, this will
incur a slowdown). Of course you can always avoid this by rendering
volumes on a separate renderlayer, and compositing in post, too.
Another idea I've started thinking about is to calculate an alpha
value, then use ztransp to overlay on top of other objects. This won't
accurately attenuate and absorb light coming from objects behind the
volume, but for some situations it may be fine, and faster too.
Diffstat (limited to 'source/blender/render/intern/include/shading.h')
-rw-r--r-- | source/blender/render/intern/include/shading.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h index 9229e612337..4e63d0f0d79 100644 --- a/source/blender/render/intern/include/shading.h +++ b/source/blender/render/intern/include/shading.h @@ -91,3 +91,6 @@ float lamp_get_visibility(struct LampRen *lar, float *co, float *lv, float *dist void lamp_get_shadow(struct LampRen *lar, ShadeInput *shi, float inp, float *shadfac, int do_real); float fresnel_fac(float *view, float *vn, float fresnel, float fac); + +/* rayshade.c */ +extern void shade_ray(struct Isect *is, struct ShadeInput *shi, struct ShadeResult *shr); |