THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/12/2010 at 04:09, xxxxxxxx wrote:
Cinema 4D Version: 10.5-12
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
I have a volumetric environement shader and I would like to know which structure I need to change to make volumetric lights react to my shader and cast volumetric shadows.
I have no surface (CalcSurface returns vd->trans = 1.0) in my shader but volumetrics and I am already casting "normal" shadows (CalcTransparency) but this does not affect the "volumetric light" part. Pyrocluster can do it so I assume it must be possible to do this in an environement object, I just see now way in the sdk how to accomplish this. This is really important and it would be great if you (sdk support) could let me knowif it´s possible or not and if so what light information to modify or which function to overload. Really appreciated.
On 06/12/2010 at 05:38, xxxxxxxx wrote:
Can you please send me a scene with Pyrocluster and a volumetric light casting shadows just so I know for sure what you mean. Thanks.
On 06/12/2010 at 06:58, xxxxxxxx wrote:
just done so. thx
On 06/12/2010 at 07:03, xxxxxxxx wrote:
Ok, checked the scene file. This is something I'll have to ask the developers.
On 06/12/2010 at 07:19, xxxxxxxx wrote:
FYI, it works fine with the ParticleVolume.cpp shader from the SDK examples.
On 06/12/2010 at 07:34, xxxxxxxx wrote:
Strange it doesn´t work for me then. Is CalcTransparency or CalcVolume the one for this? could you turn off CalcTransparency in the particlevolume example (I have no ready to build example sdk here).
On 06/12/2010 at 07:40, xxxxxxxx wrote:
It seems that CalcTransparency is crucial for the shadow calculation. In the example CalcVolumetric and CalcTransparency are used.
void ParticleVolume::CalcSurface(BaseMaterial *mat, VolumeData *vd)
vd->trans = 1.0;
void ParticleVolume::CalcVolumetric(BaseMaterial *mat, VolumeData *vd)
void ParticleVolume::CalcTransparency(BaseMaterial *mat, VolumeData *vd)
On 06/12/2010 at 07:51, xxxxxxxx wrote:
I also have both overloaded. My "normal" shadow calculations also work perfectly fine. Shadows are correctly casted but only these volumetric light shadows are not and I don´t have any constraints (like only overloading for certain raybits).
Anyway, you seem right. The RAYBIT_VOLUMETRICLIGHT is only passed in CalcTransparency so I must have something in there.
thanks, I guess I can figure out the rest myself. Seems to be my shaders fault I´d say spontaneously.
On 06/12/2010 at 08:12, xxxxxxxx wrote:
ok, got it figured out. Was indeed a shader issue. thx again