TraceColor returns wrong values
On 17/07/2013 at 09:04, xxxxxxxx wrote:
Cinema 4D Version: 12-14
Platform: Windows ;
Language(s) : C++ ;
I use TraceColor to trace reflections within a Shader. I figured out, that TraceColor will return wrong values. It seems that lights always add illumination to luminant materials, no matter if the light is hidden or not.
A simple test is the following:
- You need a shader which uses TraceColor to trace reflections
- Put it onto a sphere
- Create a Sky with a luminant material
- Put a Light into a box (disable automatic lightning), put it somewhere besides the sphere
- Render when the Light is enabled and once if it is disabled
When the light is enabled, it will illuminate the Sky in the traced reflection. So the sky appears brighter than without the light in the box.
How can I fix this behavior?
In case this behavior is correct, how would I use this method properly?
Edit: It has nothing to do with Area-Lights, as I thought (updated the question now), just tested it again, it is wrong for all types.
On 24/07/2013 at 13:43, xxxxxxxx wrote:
Have you tried GetSurfaceData() instead? You can enable/disable several options there like illumination or transparency.
On 25/07/2013 at 09:28, xxxxxxxx wrote:
Unfortunately, that does not work either. It also would not work with the sky, which also shows this problem.
On 25/07/2013 at 10:15, xxxxxxxx wrote:
I just created a very simple shader, to isolate the problem (even further than I already had). Now I see, that I seem to do something wrong... I can't reproduce the problem with the simple setup.
So for now, this question is answered...