70/30 intensity
by Jaimi McEntire · in Torque Game Engine · 10/27/2005 (7:40 am) · 1 replies
Quote:
Instead I can show you how to setup TLK to get the 70/30 of ambient/diffuse and still adjust the intensity to the scene's lighting.
Since Rama may or may not be posting, Just thought I would since I'm interested in this as well.
Jaimi
Torque Owner John Kabus (BobTheCBuilder)
In sgSceneObject.cc lines 188 and 245 replace:
const F32 directionalFactor = 0.3f; const F32 ambientFactor = 0.7f;with:
const F32 directionalFactor = sgDynamicDTSShadingDiffuseAmount; const F32 ambientFactor = 1.0f - sgDynamicDTSShadingDiffuseAmount;And at the top of sgSceneObject.cc add:
Now you can adjust sgDynamicDTSShadingDiffuseAmount to the percentage of the lighting that should be diffuse. As an example for the following sgDynamicDTSShadingDiffuseAmount values the percentages of the lighting is shown:
You probably noticed that the default value is 0.3 which provides the 70/30 you're looking for. This was already the default in TLK, but now you can tweak the values for the perfect lighting. :)
-John