Using a USL for sunlight (private version)
by Robert Nall · in Torque Game Engine · 04/28/2005 (3:50 pm) · 6 replies
Start here for the public history of the thread:
www.garagegames.com/mg/forums/result.thread.php?qt=29508
And continuing the discussion:
"Is this a stock Lighting Pack or did you merge it into your project? Oh, and what version are you using?"
This is a project based off Lighting Pack release 1_2_2 patched onto a clean HEAD of TGE 1.2 from 5/1/04. All the project specific engine modifications were made after patching in the lighting pack.
[edit: clarifications]
www.garagegames.com/mg/forums/result.thread.php?qt=29508
And continuing the discussion:
"Is this a stock Lighting Pack or did you merge it into your project? Oh, and what version are you using?"
This is a project based off Lighting Pack release 1_2_2 patched onto a clean HEAD of TGE 1.2 from 5/1/04. All the project specific engine modifications were made after patching in the lighting pack.
[edit: clarifications]
#2
04/28/2005 (4:30 pm)
If you're considering upgrading there are number of different options we can discuss for removing the old Lighting Pack macros and adding in the new code blocks. If you're unsure if it's necessary you can check out the latest Lighting Pack demo to try out the new features with your content before committing to an upgrade.
#3
The one I was having the problems with was a debug version of my revision 19 that I'd been using on our level builder scripts. The interesting thing is that I just tried using my latest revision (which is 21 in case you're keeping track) on the level builder scripts (I guess I haven't kept my artists as updated as I thought ; ) and I don't have that same problem anymore. I must've merged lighting pack 1.3 into revision 20 or 21 (I also got lazy at some point and failed to update my revision history, so I don't know what I did after revision 16 : / no good). I guess that's the good news, hehe.
The bad news is that I have a different problem now, it seems that the players are now getting darker lighting information from the terrain lightmap compared to interior lightmaps. So on the ground the cars are kind of dark, but once you get up onto a ramp or bridge it's lit like I'd expect it to be using the sunlight . . .
Any ideas on that?
-Rob
04/28/2005 (4:45 pm)
Okay, I was looking around at my code and I think I did an upgrade at some point between the two builds that I'm working with . . .The one I was having the problems with was a debug version of my revision 19 that I'd been using on our level builder scripts. The interesting thing is that I just tried using my latest revision (which is 21 in case you're keeping track) on the level builder scripts (I guess I haven't kept my artists as updated as I thought ; ) and I don't have that same problem anymore. I must've merged lighting pack 1.3 into revision 20 or 21 (I also got lazy at some point and failed to update my revision history, so I don't know what I did after revision 16 : / no good). I guess that's the good news, hehe.
The bad news is that I have a different problem now, it seems that the players are now getting darker lighting information from the terrain lightmap compared to interior lightmaps. So on the ground the cars are kind of dark, but once you get up onto a ramp or bridge it's lit like I'd expect it to be using the sunlight . . .
Any ideas on that?
-Rob
#4
Thanks again for the help.
-Rob
04/28/2005 (5:35 pm)
After some more playing, I'm guessing that my last post is describing the effects of the dynamic dts vector lighting variable. I noticed that with it on, I get full bright regular lighting on the interior objects and much darker but better shaded lighting on the terrain. You had mentioned previously that that option doesn't effect interior lighting, so I guess it won't be really usable unless there's a way I can adjust it's lighting level to match more closely the level it uses on interiors. Is there an easy way to do that? If not, I'll just play with the regular vector lighting as we were content with it before I started playing with USLs ; )Thanks again for the help.
-Rob
#5
It's a trade-off between higher flexibility and better directional lighting. That's why I added the pref option, so each team can choose the model that best suits their project.
04/28/2005 (7:40 pm)
With the dynamic vector lighting turned on the engine (at least in regards to dynamic dts objects on the terrain) is restored to the classic TGE lighting (stock TGE has the same rough transitions), but with overexposure still in place. The ambient style dynamic dts lighting the Lighting Pack uses works better in conjunction with Lighting Pack lights and creates a smoother transition from interiors to terrain.It's a trade-off between higher flexibility and better directional lighting. That's why I added the pref option, so each team can choose the model that best suits their project.
#6
The lighting pack is a really cool little resource and it's great that you keep working on it and are so quick to respond to problems. : )
04/29/2005 (9:48 am)
Gotcha. Well, thanks for going over all that with me. The lighting pack is a really cool little resource and it's great that you keep working on it and are so quick to respond to problems. : )
Torque Owner John Kabus (BobTheCBuilder)
Ok, that makes sense do a quick search in you source files for the string "$pref::OpenGL::sgDynamicDTSVectorLighting". Chances are the feature was added in 1.3 and the string won't exist also I can't guaranty the feature worked properly in that release if it does exist (it may be a fixed bug).