Dif format changes?
by Tom Spilman · in Torque Game Engine Advanced · 12/13/2004 (12:17 am) · 9 replies
Quick question for a GG'er. I've done a windif on the source code for map2dif for TSE and TGE. Seems there have been alot of changes, but are there any dif format changes? Can a dif exported with map2dif for TSE work in TGE? If not could you give me a hint of what actually changed?
Oh... and curses to the coder who reformatted spaces all over editgeometry.cpp. That's a source control no-no! =)
Oh... and curses to the coder who reformatted spaces all over editgeometry.cpp. That's a source control no-no! =)
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
#2
12/13/2004 (12:52 am)
I'm curious if i could just alter the code which writes the final dif data as to make it compatible with TGE again. I'm trying to avoid maintaining two different versions of my modified map2dif. I'm not gonna touch this for a day or two so i figured a GG employee would have some insight to share on the subject.
#3
12/13/2004 (5:18 am)
What stuff have u modified in your map2dif?
#4
Nothing too major yet, but it was slowing me down trying to use map2dif code unchanged. Merging in any new changes to the original is easier to do later.
12/13/2004 (11:55 am)
A few bug fixes (patches submitted). I changed all the asserts in it to my own macro which will fire an exception in release and debug. This way i can catch the exception and not have a crashed exporter (important as a crash in a dll will kill Cshop). Removed the anonymous namespace around a few functions so that they could be externed. I always reseed sRand with the same value at export start to get the same bsp generation on export (rand is used to select split planes).Nothing too major yet, but it was slowing me down trying to use map2dif code unchanged. Merging in any new changes to the original is easier to do later.
#5
- A new member per surface called 'unused'.
- A 'LightDirMap' is written for each Lightmap.
- The Subobjects vector is gone.
- mLightMapBorderSize is removed.
I'm not sure what the 'LightDirMap' is exactly, but it seems that with a little effort i could make my exporter based on TSE write a TGE compatible interior.
12/14/2004 (8:25 am)
Looking closer at InteriorIO.cpp the changes to the read/write of interiors in TSE are:- A new member per surface called 'unused'.
- A 'LightDirMap' is written for each Lightmap.
- The Subobjects vector is gone.
- mLightMapBorderSize is removed.
I'm not sure what the 'LightDirMap' is exactly, but it seems that with a little effort i could make my exporter based on TSE write a TGE compatible interior.
#6
The LightDirMaps are the normalmaps that are used for bumpmapping. They essentially give a light direction vector for every lightmap lexel - lets you do bumpmapping for multiple interior lights in one pass.
FYI it is going to be harder to maintain something that will work between TGE/TSE this year as we have a lot of changes planned for map2dif for both platforms.
12/14/2004 (11:20 am)
Yeah, you could probably do that Tom. The LightDirMaps are the normalmaps that are used for bumpmapping. They essentially give a light direction vector for every lightmap lexel - lets you do bumpmapping for multiple interior lights in one pass.
FYI it is going to be harder to maintain something that will work between TGE/TSE this year as we have a lot of changes planned for map2dif for both platforms.
#7
I guess i'm up for that challenge. =)
12/14/2004 (11:29 am)
Not only can i do it... but i did it. =)Quote:The LightDirMaps are the normalmaps that are used for bumpmapping. They essentially give a light direction vector for every lightmap lexel - lets you do bumpmapping for multiple interior lights in one pass.Good to know. I assume it's to the light which most influences that lexel. I will have to deal with this once i get lightmap export from CShop working.
Quote:FYI it is going to be harder to maintain something that will work between TGE/TSE this year as we have a lot of changes planned for map2dif for both platforms.I'm waiting on a call from Josh who will help me coordinate this with your map2dif plans. But your "both platforms" comment has me conserned... you mean map2dif code for TGE will have new changes as well?
I guess i'm up for that challenge. =)
#8
12/14/2004 (11:41 am)
Yes Map2DIF for TGE is getting some long-awaited updates at some point.
#9
12/14/2004 (2:17 pm)
I got the low down... it shouldn't be too much of a problem.
Torque Owner superdeformed
just tried a tse dif in tge and it crashes the engine . i think the main changes are to do with the new normal map stuff and shaders and the like but i dunno if that is the correct answer
regards
Eul0gy