BIG Problem with 1.5
by Don Weatherby · in Torque Game Engine · 10/28/2006 (10:52 pm) · 36 replies
Hi i just upgraded to 1.5 and now when i go to relight the scene after i place or move a building or any object requiring a relight now its basicly freezing up when i click relight scene also i had some small issues but im gonna just replace a few files and those should be fixed but the lighting problem is a real irritation.
any help would be great. by the way 1.5 is great ...besides this issue....k thx
any help would be great. by the way 1.5 is great ...besides this issue....k thx
About the author
#22
In our project, we have a mission file with one very large DIF structure. The structure could actually be split up into four smaller DIFs, if we wanted. But is there any particular advantage to doing that? Would the rendering engine have any less difficulty with four smaller DIFs than one really large one?
The reason I ask is because the engine spends a large amount of effort in interior lighting and rendering, based on profiling. I don't think that would change with multiple smaller DIFs, but you never know.
10/30/2006 (1:44 pm)
This brings up a point I've been meaning to ask...probably should start a new thread for it, but what the heck.In our project, we have a mission file with one very large DIF structure. The structure could actually be split up into four smaller DIFs, if we wanted. But is there any particular advantage to doing that? Would the rendering engine have any less difficulty with four smaller DIFs than one really large one?
The reason I ask is because the engine spends a large amount of effort in interior lighting and rendering, based on profiling. I don't think that would change with multiple smaller DIFs, but you never know.
#23
I use it just to make the exe and zip up for the mac version of my game. I don't even try to move from the starting point becouse it takes forever. (even with 1.4. Has nothing to do with the lighting)
I'll get you some good numbers comparing my game between 1.4 and 1.5 on windows.
tge1.4 with tlk
tge1.5 lighting time only-2min,10.58seconds
This is the same game, but ported to 1.5
(Apples to Apples) ;-)
I didn't think I needed to repost the 1.5 log. I posted the other one so that you can see what system I'm running on.
Hope this helps.
10/30/2006 (1:49 pm)
John, I have a G4 bottom of the line model. (we're talking software mode here)I use it just to make the exe and zip up for the mac version of my game. I don't even try to move from the starting point becouse it takes forever. (even with 1.4. Has nothing to do with the lighting)
I'll get you some good numbers comparing my game between 1.4 and 1.5 on windows.
tge1.4 with tlk
//-------------------------- 10/30/2006 -- 13:32:36 -----
Processor Init:
AMD (unknown), ~2.07 Ghz
(timed at roughly 2.08 Ghz)
FPU detected
MMX detected
3DNow detected
SSE detected
Math Init:
Installing Standard C extensions
Installing Assembly extensions
Installing FPU extensions
Installing MMX extensions
Installing 3DNow extensions
Installing SSE extensions
Input Init:
keyboard0 input device created.
mouse0 input device created.
DirectInput enabled.
//-----------------------------------------------
Synapse Gaming Lighting Pack for TGE - 1.4.0.0
Lighting Pack Core version: 2.2
Based on Torque version: 1.4
Compiled lighting options:
SG_LIGHTING - enabled
SG_USE_TERRAIN_COLOR_CORRECTION - enabled
SG_STATIC_LIGHT_SHADOWS_BLUR - enabled
SG_TRANSPARENT_INTERIORS - disabled
SG_ADVANCED_INTERIOR_LIGHTING - enabled
SG_ADVANCED_DYNAMIC_SHADOWS - enabled
SG_ADVANCED_DTS_DYNAMIC_LIGHTING - enabled
SG_ADVANCED_PARTICLE_LIGHTING - enabled
SG_OVEREXPOSED_SELFILLUMINATION - enabled
SG_INTERIOR_DETAILMAPPING - enabledLighting time only=20.9secondstge1.5 lighting time only-2min,10.58seconds
This is the same game, but ported to 1.5
(Apples to Apples) ;-)
I didn't think I needed to repost the 1.5 log. I posted the other one so that you can see what system I'm running on.
Hope this helps.
#24
Over a minute in release mode; a lot longer in debug mode.
To be specific, I'm talking about starter.fps/data/missions/stronghold.mis.
Note: I'm using torqueDemo built in release mode with VS2005. I wonder if that makes a difference.
10/30/2006 (2:05 pm)
Quote:I just ran the demo mission here on an AMD Athlon 2800+, and a draft relight took 4.5 seconds with shadows. What times are you seeing the are too long?
Over a minute in release mode; a lot longer in debug mode.
To be specific, I'm talking about starter.fps/data/missions/stronghold.mis.
Note: I'm using torqueDemo built in release mode with VS2005. I wonder if that makes a difference.
Starting scene lighting...
Starting TGE based scene lighting...
Lighting with light #17 (TGE vector light)...
Lighting object 1 of 11...
Object lighting complete (1.422 seconds)
Lighting interior object 2 of 11 (starter.fps/data/interiors/tower/tower.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 3 of 11 (starter.fps/data/interiors/tower/tower.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 4 of 11 (starter.fps/data/interiors/tower/tower.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 5 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 6 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 7 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 8 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 9 of 11 (starter.fps/data/interiors/cottage/cottage.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 10 of 11 (starter.fps/data/interiors/cottage/cottage.dif)...
Object lighting complete (0.000 seconds)
Lighting interior object 11 of 11 (starter.fps/data/interiors/cottage/cottage.dif)...
Object lighting complete (0.000 seconds)
TGE based scene lighting complete (1.625 seconds)
Starting Synapse Gaming Lighting Pack scene lighting...
Lighting object 1 of 11...
Object lighting complete (0.187 seconds)
Lighting interior object 2 of 11 (starter.fps/data/interiors/tower/tower.dif)...
Object lighting complete (5.875 seconds)
Lighting interior object 3 of 11 (starter.fps/data/interiors/tower/tower.dif)...
Object lighting complete (23.797 seconds)
Lighting interior object 4 of 11 (starter.fps/data/interiors/tower/tower.dif)...
Object lighting complete (6.359 seconds)
Lighting interior object 5 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (2.734 seconds)
Lighting interior object 6 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (1.172 seconds)
Lighting interior object 7 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (0.813 seconds)
Lighting interior object 8 of 11 (starter.fps/data/interiors/dock/dock.dif)...
Object lighting complete (2.296 seconds)
Lighting interior object 9 of 11 (starter.fps/data/interiors/cottage/cottage.dif)...
Object lighting complete (5.625 seconds)
Lighting interior object 10 of 11 (starter.fps/data/interiors/cottage/cottage.dif)...
Object lighting complete (5.860 seconds)
Lighting interior object 11 of 11 (starter.fps/data/interiors/cottage/cottage.dif)...
Object lighting complete (5.547 seconds)
Synapse Gaming Lighting Pack scene lighting complete (61.985 seconds)
Lighting Pack lighting system stats:
Interior Lexel Count: 10027680
Interior Lexel Time: 58132.000000
Interior Object Count: 11
Interior Object Included Count: 10
Interior Object Illumination Count: 260
Interior Surface Included Count: 58778
Interior Surface Illumination Count: 301637
Interior Surface Illuminated Count: 166163
Interior Occluder Count: 24483364
Terrain Lexel Count: 96154
Terrain Lexel Time: 110.000000
Successfully saved mission lighting file: 'starter.fps/data/missions/stronghold_9b3d85be.ml'
Scene lighting complete (63.469 seconds)
#25
Mission Lighting TGE 1.4+TLK (original dif models): 1.360 seconds
Mission Lighting TGE 1.5 (original dif models): 4.000 seconds
Mission Lighting TGE 1.4+TLK (new dif models, 1.4 map2dif): 4.125 seconds
Mission Lighting TGE 1.5 (new dif models, 1.4 map2dif): 29.734 seconds
Mission Lighting TGE 1.4+TLK (new dif models, 1.5 map2dif): 1.813 seconds
Mission Lighting TGE 1.5 (new dif models, 1.5 map2dif): 6.891 seconds
(these timings are based on whats displayed in the console for just the lighting pack part of the computation.)
10/30/2006 (2:07 pm)
John, that was a good suggestion. I forgot that map2dif might do some special things for 1.5. Using the 1.5 map2dif gets better results for the rebuilt cottages, and it improves 1.4 loading also. Here are the timings:Mission Lighting TGE 1.4+TLK (original dif models): 1.360 seconds
Mission Lighting TGE 1.5 (original dif models): 4.000 seconds
Mission Lighting TGE 1.4+TLK (new dif models, 1.4 map2dif): 4.125 seconds
Mission Lighting TGE 1.5 (new dif models, 1.4 map2dif): 29.734 seconds
Mission Lighting TGE 1.4+TLK (new dif models, 1.5 map2dif): 1.813 seconds
Mission Lighting TGE 1.5 (new dif models, 1.5 map2dif): 6.891 seconds
(these timings are based on whats displayed in the console for just the lighting pack part of the computation.)
#26
10/30/2006 (4:56 pm)
Sounds like its not just me then... well it also seems that map2dif im not familier with it but from what jeff is sayin it seems to make the lighting times much faster.
#27
I also noticed it was quicker to relight inworld after adding some new lights.
Secondly I also noticed the DIF files are smaller.. not a lot, about 75k to 71k on one of them.
I wasn't seeing quite the improvement you showed, but certainly its much better.
Regards
Graham Evans (Moria)
PS off to read some docs now :))
10/30/2006 (6:18 pm)
Hmmmmm John and Jeff, excellent idea there... I just recompiled my DIF's with 1.5 map2dif_plus and also noticed a big drop in lighting times. On the same 1.5 zone (a modified starter.fps with 5 of my own buildings in there) old 1.4 compiled DIF's 15 seconds and with the 1.5 version 8 seconds, so almost 50% faster.I also noticed it was quicker to relight inworld after adding some new lights.
Secondly I also noticed the DIF files are smaller.. not a lot, about 75k to 71k on one of them.
I wasn't seeing quite the improvement you showed, but certainly its much better.
Regards
Graham Evans (Moria)
PS off to read some docs now :))
#28
I'll take a look at the performance, but in the meantime make sure you're using map2dif 1.5. Using its lighting optimizations TGE 1.5's relight performance is on par with TGE/map2dif 1.4.
Meaning you can port your game over, recompile the difs, and see relight times similar to (and sometimes much faster than) TGE 1.4.
11/01/2006 (1:55 am)
Ah, I was running the demo mod, not starter.fps - that explains why I was seeing different relight times than reported here.I'll take a look at the performance, but in the meantime make sure you're using map2dif 1.5. Using its lighting optimizations TGE 1.5's relight performance is on par with TGE/map2dif 1.4.
Meaning you can port your game over, recompile the difs, and see relight times similar to (and sometimes much faster than) TGE 1.4.
#29
Is it backward-compatible with earlier versions, or 1.5-only?
(sorry for the threadjack)
11/01/2006 (8:16 am)
There's a map2dif 1.5?! Is it backward-compatible with earlier versions, or 1.5-only?
(sorry for the threadjack)
#30
11/01/2006 (8:30 am)
@ Eric Forhan -- I'm no authority, but I'm loading difs compiled with the 1.5 map2dif into a demo built on 1.4. It works and it appears to look the same.
#31
Just got the 1.5 and compiled. All's well except map2dif and map2difplus (out of the box). I'm getting lots of unresolved external symbols.
such as:
any ideas?
11/01/2006 (4:01 pm)
@JohnJust got the 1.5 and compiled. All's well except map2dif and map2difplus (out of the box). I'm getting lots of unresolved external symbols.
such as:
Quote:
engine.lib(terrLighting.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall LightInfo::sgAllowDiffuseZoneLighting(int)" (?sgAllowDiffuseZoneLighting@LightInfo@@QAE_NH@Z) referenced in function "public: static void __cdecl TerrainRender::buildLightArray(void)" (?buildLightArray@TerrainRender@@SAXXZ)
../tools/map2dif.exe : fatal error LNK1120: 23 unresolved externals
any ideas?
#32
Regarding re-compiling the maps: I'm lighting the .dif files that came with the 1.5 release already. I would assume that those had already been compiled with the right compiler?
11/01/2006 (7:44 pm)
I posted about this already in another thread. You need to add the sceneLighting folder to the Torque Tool Lib project, because the VC 2005 project was not updated.Regarding re-compiling the maps: I'm lighting the .dif files that came with the 1.5 release already. I would assume that those had already been compiled with the right compiler?
#33
It looks like the LightingSystem folder is missing from the VC2005 Torque Tools project. Try adding these files to that project:
Btw: I fixed this in the internal TGE 1.5 repo, and it will go out in the next code push (not sure when that is).
11/01/2006 (11:19 pm)
Hi Desmond,It looks like the LightingSystem folder is missing from the VC2005 Torque Tools project. Try adding these files to that project:
engine\lightingSystem\sgDetailMapping.cc engine\lightingSystem\sgDetailMapping.h engine\lightingSystem\sgLightingModel.cc engine\lightingSystem\sgLightingModel.h engine\lightingSystem\sgLightManager.cc engine\lightingSystem\sgLightManager.h engine\lightingSystem\sgLightMap.cc engine\lightingSystem\sgLightMap.h engine\lightingSystem\sgObjectShadows.cc engine\lightingSystem\sgObjectShadows.h engine\lightingSystem\sgSceneLighting.cc engine\lightingSystem\sgSceneLighting.h engine\lightingSystem\sgSceneLightingGlobals.h engine\lightingSystem\sgSceneLightingInterior.cc engine\lightingSystem\sgSceneLightingTerrain.cc engine\lightingSystem\sgScenePersist.cc engine\lightingSystem\sgScenePersist.h
Btw: I fixed this in the internal TGE 1.5 repo, and it will go out in the next code push (not sure when that is).
#34
11/02/2006 (11:35 am)
Thanks J and John :)
#35
When in the background, Torque tries really hard to not take up processor time.
This feature was fervently requested by many people, so it went in.
Be sure you're measuring lighting time when torque is in the foreground.
Or, modify $pref::backgroundSleepTime to a smaller number of milliseconds.
/Paul
11/03/2006 (3:21 pm)
A note on mac performance:When in the background, Torque tries really hard to not take up processor time.
This feature was fervently requested by many people, so it went in.
Be sure you're measuring lighting time when torque is in the foreground.
Or, modify $pref::backgroundSleepTime to a smaller number of milliseconds.
/Paul
#36
Nice work.
STef
11/05/2006 (4:07 pm)
@Paul: it not only tries, it does! it's even like if it was paused sometimes.Nice work.
STef
Torque Owner John Kabus (BobTheCBuilder)
Jeff, make sure you're using the 1.5 version of map2dif - there are some important light map optimizations in there (the light map border was reduced significantly, cutting down overall on the calculations).
I'll check out the performance and see whats going on.