Public Member Functions | |
virtual void MCCOMAPI | Initialise (I3DShScene *scene)=0 |
virtual void MCCOMAPI | DirectionFilter (const TVector3 &origin, const TVector3 &direction, real maxt, TMCColorRGBA &inOutFilter, boolean isShadowCasting)=0 |
virtual void MCCOMAPI | DirectionFilter2 (I3DExRaytracer *raytracer, const TVector3 &origin, const TVector3 &direction, real maxt, TMCColorRGBA &inOutFilter, boolean isShadowCasting)=0 |
A volumetric effect is an effect that is applied to simulate volume effects such as light cones, light spheres, volumetric aura that are attached to an object, a light or a camera...
At the beginning of the rendering of a frame, the shell go through all the data components (see I3DExDataComponent) of the lights, cameras and primitives and ask them if a volumetric effect should be created by calling GetVolumetricList().
It then creates one volumetric effect of each kind. The volumetric effects are then called for each ray to determine its effects on the light going through the ray.
virtual void MCCOMAPI I3DExVolumetricEffect::DirectionFilter | ( | const TVector3 & | origin, | |
const TVector3 & | direction, | |||
real | maxt, | |||
TMCColorRGBA & | inOutFilter, | |||
boolean | isShadowCasting | |||
) | [pure virtual] |
OBSOLETE: use DirectionFilter2 instead. Only left for compatibility between Carrara 5.0.1 and 5.1, should be removed in Carrara 6.
Implemented in TBasicVolumetricEffect.
virtual void MCCOMAPI I3DExVolumetricEffect::DirectionFilter2 | ( | I3DExRaytracer * | raytracer, | |
const TVector3 & | origin, | |||
const TVector3 & | direction, | |||
real | maxt, | |||
TMCColorRGBA & | inOutFilter, | |||
boolean | isShadowCasting | |||
) | [pure virtual] |
This function should filter a color with the volumetricEffect. When the function is called, inOutFilter contains the color of an object at the end point. When it returns inOutFilter should have been modified to include the filtering effect.
raytracer | a pointer to the current raytracer | |
origin | point from which we see | |
direction | direction in which we look | |
maxt | the parametric coordinate of the end point on the ray: endpoint = origin + maxt * direction | |
inOutFilter | color of the end point (when called), color after filtering (when returning) | |
isShadowCasting | True if this is a shadow ray |
Implemented in TBasicVolumetricEffect.
virtual void MCCOMAPI I3DExVolumetricEffect::Initialise | ( | I3DShScene * | scene | ) | [pure virtual] |
This function is called at the beginning of the rendering of a frame. It allows you to create caches for your effect
scene | A pointer to the scene to which the effect belongs |
Implemented in TBasicVolumetricEffect.