ball
ball copied to clipboard
Default light setting in 2.0-pre-alpha uses constant attenuation
Reported by odin on 11 Nov 40222179 00:00 UTC The default light in the RT version uses only constant attenuation, which makes the images over-bright and extremely ugly. Default setting should be "0 0 0.2", i.e. quadratic attenuation with 0.2 weight.
Commented by anhi on 3 Mar 40224053 23:06 UTC What would be great would be if we could somehow match the attenuation for OpenGL and RTfact. As it is, it is quite annoying because one will be too bright and the other too dark. If I remember correctly, OpenGL normalizes the scene before applying the quadratic equation while RTfact does not. Is that correct? In that case, we could either do the normalization ourselves in the dialog or maybe add an option to RTfact to do that as well?
Commented by odin on 25 Jun 40224425 18:13 UTC Hmm, interesting point.
My original problem was with the setting in the Preferences dialog itself. However, now I can see that it was due to the fact, that multiple installations of BALLView on a single machine in Windows share their settings. So when I change light attenuation in the RT version, it gets propagated to the other installation of 1.3.2. This is strange behavior in itself.
Back to your question. Yes, OpenGL normalizes the scene to <-1,1>^3 or <0,1>^3 (don't remember) box before shading. RTfact leaves it as it is.
I see two ways how to fix it:
- Immediate solution would be to have RTfact compute the scaling factor and apply it, if requested.
- Scaling the scene to <0,1>^3 is also an interesting option. On one hand, I am afraid it will cause problems with the single float precision. On the other hand, right now we do have large problems with ray epsilon, if two scenes differ in scale (as the ray epsilon is a compile-time constant). Scaling would solve it.
Commented by akdehof on 22 Mar 40936076 06:36 UTC Deferred to 2.0