Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Object Scale & Lights

Author
Message
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 16th Sep 2009 00:47
When i scale an object ( e.g. a simple box ) it becomes darker as it gets bigger!
there is no additional adjustment to the object, no texture, no shader, just dbColorObject ( and dbScaleObject of course ).

How can i avoid this to happen?
I tried hiding light 0 and creating a new one, which i made directional, but the effect is the same!
I don't understand this, because directional lights ( the default light 0 is one too, i guess ) have no range.

They say it's better to burn out, than it is to fade away...
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 16th Sep 2009 11:49
Try using:

dbSetNormalizationOn ();

somewhere at the beginning of the code.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 16th Sep 2009 13:39
wow Morcilla, that worked perfectly!
Thanks a lot!

Just because i'm curious: what does this do exactly?
Does this make it update the normals each frame or what?

They say it's better to burn out, than it is to fade away...
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 17th Sep 2009 12:02
Well, as stated in the documentation, it normalizes the normals. Not sure of how it works internally, but perhaps it just scales the normals when scaling an object.

Login to post a reply

Server time is: 2024-10-01 12:37:55
Your offset time is: 2024-10-01 12:37:55