Transparency in Volume Shader
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/12/2008 at 08:52, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10
Platform: Windows ;
Language(s) : C++ ;---------
In the end of my function
void fogShader::CalcVolumetric(PluginMaterial *mat,VolumeData *vd)
I have added the following two lines just to experiment with color and transparency.vd->col=1.0;
vd->trans=1.0;My understanding is, that the volume should be fully transparent, but I get a white screen. Foley suggests for transparency
I_k=(1-kt_1)*I_1+kt_2*I_2But that's obviously not what is used in C4d. However if you try just the values in c4d itself, it works like the formula, but not in the C function.
Thanks for any comments.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/12/2008 at 23:49, xxxxxxxx wrote:
Hi again,
you must set vd->col = 0.0f; and vd->trans = 1.0f;
You don´t have to calculate the transparency formula yourself. see it like c4d is calculating the formula itself and you only have to provide the fractional transparency information via your shader.
Hope that helps
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/12/2008 at 01:57, xxxxxxxx wrote:
Thanks again, but I have the feeling the two values become a bit mixed up, if it is done in this way, i.e. vd->trans doesn't determine the transparency alone, it also depends on the color. What's the idea behind it?
So what do I do, if I want to have a fog with color white and transparency e.g. 0.1? vd->col = 1.0f; and vd->trans = 0.1f is obviously the wrong answer, as this will give a white screen, and not something partly transparent.