Static shape lightmaps crashes
by Adternative · in Torque Game Engine Advanced · 10/09/2007 (7:21 am) · 6 replies
Hi everybody!!
We are trying to use Constructor to build our level collisions. Later, we add the visual geometry as static shapes (dts). We then export it as .dif in order to load it in TGEA, but when trying to load this .dif (sometimes), or when relighting (others) it just crashes.
The very same .dif just works in TGE.
We have read in the "Current constructor issues" (http://www.garagegames.com/products/torque/constructor/issues/) the next thing:
"TGEA Export with baked-in static shapes and lighting is not currently supported. (Coming Soon)"
Is this the problem we are encountering? "not currently supported" means that it crashes?
Has anybody achieved getting lightmaps for static shapes in TGEA? how?
Thank u!
We are trying to use Constructor to build our level collisions. Later, we add the visual geometry as static shapes (dts). We then export it as .dif in order to load it in TGEA, but when trying to load this .dif (sometimes), or when relighting (others) it just crashes.
The very same .dif just works in TGE.
We have read in the "Current constructor issues" (http://www.garagegames.com/products/torque/constructor/issues/) the next thing:
"TGEA Export with baked-in static shapes and lighting is not currently supported. (Coming Soon)"
Is this the problem we are encountering? "not currently supported" means that it crashes?
Has anybody achieved getting lightmaps for static shapes in TGEA? how?
Thank u!
About the author
#2
10/17/2007 (10:54 am)
Make sure you are using the latest TGEA, static mesh support is relatively recent. After updating if it continues to happen post info on where the application halts in the debugger, it should help point us in the direction of the problem.
#3
Now I doesn't even seem to be able to export anything from constructor, it just crashes while exporting to DIF...
The scene I'm trying to export is just a brush and a shape.
I have made more tests and it seems that constructor has problems when calculating lighting... if I use a simpler shape (less vertices and tris), it exports fine....
For me, these kind of problems make impossible to use TGEA + static mesh lightmaping, because my shapes can't be the simplest case of a geosphere...
Anyone has got it right or knows any workarounds? It'd be very appreciated.
Thanks!!
10/18/2007 (12:55 am)
@John: Thank u very much for your reply!!Now I doesn't even seem to be able to export anything from constructor, it just crashes while exporting to DIF...
The scene I'm trying to export is just a brush and a shape.
I have made more tests and it seems that constructor has problems when calculating lighting... if I use a simpler shape (less vertices and tris), it exports fine....
For me, these kind of problems make impossible to use TGEA + static mesh lightmaping, because my shapes can't be the simplest case of a geosphere...
Anyone has got it right or knows any workarounds? It'd be very appreciated.
Thanks!!
#4
A test with two geospheres and a brush. In constructor, memory goes up from 40 Mb in idle state to 800Mb when exporting as .dif!
When I try to load this .dif in TGEA, it just crashes... memory consumption? 2GB!!
It seems that it has problems with the memory it needs to calculate lightmaps to the static shapes.
BTW, the geosphere has only 332 faces.
With just one geosphere, constructor burns 375mb and TGEA 800Mb... It doens't crash, but it's because my computer has 2Gb
does it help?
EDITED: If you set up "lightmap default size" to 32 and "lightmap max size" to 32 too, you can contain these memory problems... Does anybody know if these sizes are per-face? If yes, then it would be much better that the quality would be specified by a density setting, texels per meter for example. It'd be more controllable
10/18/2007 (1:47 am)
A bit more of information...A test with two geospheres and a brush. In constructor, memory goes up from 40 Mb in idle state to 800Mb when exporting as .dif!
When I try to load this .dif in TGEA, it just crashes... memory consumption? 2GB!!
It seems that it has problems with the memory it needs to calculate lightmaps to the static shapes.
BTW, the geosphere has only 332 faces.
With just one geosphere, constructor burns 375mb and TGEA 800Mb... It doens't crash, but it's because my computer has 2Gb
does it help?
EDITED: If you set up "lightmap default size" to 32 and "lightmap max size" to 32 too, you can contain these memory problems... Does anybody know if these sizes are per-face? If yes, then it would be much better that the quality would be specified by a density setting, texels per meter for example. It'd be more controllable
#5
After even more experiments I have come to the conclusion that all the problems are related to TGEA. For example, one .dif with one static shape of 4000 faces, one brush, lightmap default and max size of 32.... TGEA drops from 150fps to 26fps, while TGE goes from 230fps to 120fps.
Anyway, it seems like lightmaps are very performance consuming, both in TGEA and TGE.
edited: May it be that it has every lightmap per-face in one different texture resulting in a texture change for every face?
10/18/2007 (3:01 am)
Hi everybody!!After even more experiments I have come to the conclusion that all the problems are related to TGEA. For example, one .dif with one static shape of 4000 faces, one brush, lightmap default and max size of 32.... TGEA drops from 150fps to 26fps, while TGE goes from 230fps to 120fps.
Anyway, it seems like lightmaps are very performance consuming, both in TGEA and TGE.
edited: May it be that it has every lightmap per-face in one different texture resulting in a texture change for every face?
#6
I recommend reducing the polys on any light mapped meshes to < 750 (use the absolute minimum the object can be reduced to) and to use normal mapping to bake in geometry detail.
Also reduce the lighting density by increasing the lighting scale (represents the area in space each lexel represents, larger numbers lower the detail level).
11/01/2007 (3:30 am)
Make sure your dts is tri-stripped on export (load it in ShowTool for details). Tri-stripping will help, but only to a point especially with complex meshes. Light mapping a 4000 poly static mesh is going to create a TON of lighting data - many difs when all carved up are < 4000 polys and often use portals to limit rendering to only the visible polys.I recommend reducing the polys on any light mapped meshes to < 750 (use the absolute minimum the object can be reduced to) and to use normal mapping to bake in geometry detail.
Also reduce the lighting density by increasing the lighting scale (represents the area in space each lexel represents, larger numbers lower the detail level).
Torque Owner Adternative