Game Development Community

Uncapping the Light Limit (moved)

by mm · in Torque Game Engine · 01/09/2004 (1:05 am) · 11 replies

Hello,

First let me say the last couple of dev shots have gotten my curiosity up. First with the Bunny Hump game and the other day with Extreme Dodge Ball. On both dev shots the topic has been brought up about uncapping the light limit in Torque. Though the question has not been answered. Could somebody explain how you go about uncapping the standard 1.0 1.0 1.0. Where do I need to make changes in the engine code? I am sure it is a simple change but really have no idea where to look. I would appreciate any help or insight that anyone is willing to share. Thanks :)

[EDIT]
Moved due to the fact that I posted in the Mac forum...? I must really be tired today. ;)

#1
01/09/2004 (1:33 pm)
As I recall the time limit is provided by a script global in serverPrefs.cs named $Server::TimeLimit. The code that handles it is in the scripts (Usually *game.cs files) so you should be able to search for that variable and change the script to handle time however you want.
#2
01/09/2004 (1:44 pm)
Martin Hoover... what?
#3
01/09/2004 (1:48 pm)
I think martin was thinking of the time limit there :)

I would also like to know more about this supposed light cap.
#4
01/09/2004 (1:59 pm)
Doh! Can I barrow a crow bar from someone?
#5
01/09/2004 (5:53 pm)
Check out Chris Weiland's posts on the subject.
#6
01/11/2004 (4:04 pm)
Could anyone post a link to Chris weiland's posts on the subject?
#7
01/12/2004 (10:50 am)
Hey thanks for all of the replies everybody :)
I looked around in what Chris had posted but I didn't see the thread that you were referring to. If somebody has an idea as to what thread Ben is talking about, could you please post a link? :) I also checked out Beffy's Tork snipits but with no luck.
#8
01/12/2004 (3:19 pm)
Hmm... Sorry, no links off hand. I'd assume that Chris had posted something on the topic. Basically, there are places where the light values are clamped to be from 0 to 1. You have to remove those clamps. That's about all there is to it. I don't know that anyone has written a resource on it.
#9
01/12/2004 (3:33 pm)
Things i have seen that relate to this (though there are probably either more or some don't matter) :

sceneGraph/lightManager.cc
F32 factor = mClampF(mVectorLightsAttenuation - ambientFactor, 0.f, 1.f);

Somewhere in the terrain lighting code :
lightScale[lsi] = mClampF(intensity, 0.f, 1.f);

One thing you don't want to declamp is the opengl colours. I believe they really do only go from 0.0 -> 1.0 .
#10
01/12/2004 (7:36 pm)
Tho you can give them larger ranges according to the datatype. No idea how badly things will break if you do. ;)
#11
01/13/2004 (12:33 am)
Hey thanks allot for all of the feedback! I really appreciate it :)
@James&Ben: Thanks for the help, I am going to give it a try.