How to Export Usable DIFs in TSE?
by J.C. Smith · in Torque Game Engine Advanced · 05/23/2006 (10:29 am) · 11 replies
This is something I've been putting off for a while, but recently it's become a problem. I can't seem to find any way to export a usable DIF in TSE. Map2DIF and Map2DIFPlus don't like to compile, but using the latest one that is available for download will sometimes work, and sometimes not (it doesn't work on any of Aste's packs for example). Exporting with CShop usually will work.
No matter what way I go though (and after trying many different combinations) inevitably I wind up with a DIF that has really ghastly lighting artifacts. These are the same .map files from TGE, and they don't have the artifacts in TGE. By artifacts I mean strange black blotches, whole sides of buildings that are unlit or even worse have lines of light and dark through them.
Obviously Marble Blast Ultra has shipped and I'm assuming it's using DIFs, so how did you work around this problem? Any help would be appreciated.
No matter what way I go though (and after trying many different combinations) inevitably I wind up with a DIF that has really ghastly lighting artifacts. These are the same .map files from TGE, and they don't have the artifacts in TGE. By artifacts I mean strange black blotches, whole sides of buildings that are unlit or even worse have lines of light and dark through them.
Obviously Marble Blast Ultra has shipped and I'm assuming it's using DIFs, so how did you work around this problem? Any help would be appreciated.
#2
05/23/2006 (12:14 pm)
I have done this from the downloads here on the forums for the TSE map2dif and map2difplus. I have never gotten either of them to compile. Sometimes they work, sometimes they don't. CShop usually works if I export as TSE compatible. The problem is the graphical artifacts are awful. There has to be a way around that.
#3
05/23/2006 (12:39 pm)
Ye, their are lots of problems with TSE DIFs, they compile fine but usually crash TSE, I am just hoping that when MS4 comes out these problems will be fixed.
#4
"classname" "worldspawn"
P.S. some objects will convert but will not work in TSE. It will crash during mission load.
05/23/2006 (12:40 pm)
J.C. I was able to convert most of Tim's objects in his packs using the downloaded map2difplus found on the artists page. I did have to add this to the op of each file right after the first {"classname" "worldspawn"
P.S. some objects will convert but will not work in TSE. It will crash during mission load.
#5
For example:
- What tools are you using?
- How are you compiling the DIF?
- Are there any errors on the compile?
- How many brushes are in your Map/DIF file?
- Are you using Portals or any other special brushes?
- Any custom add-ons?
05/23/2006 (12:42 pm)
Odd I havent had any issues with any of the work that we have converted over from TGE to TSE, but there could be a few reasons for this that are likely worth tracking down.For example:
- What tools are you using?
- How are you compiling the DIF?
- Are there any errors on the compile?
- How many brushes are in your Map/DIF file?
- Are you using Portals or any other special brushes?
- Any custom add-ons?
#6
I've tried all sorts of different things L Foster. Most of Aste's packs if I convert them using map2dif won't compile at all. With Map2DifPlus they compile but usually crash when I load them into the editor. Some other DIFs (I'm a licensed content junkie, I have something like 8 gigs of licensed artwork here that I pool from when doing demos and such) such as the Arteria ones compile and work fine, but the sunlight gives awful effects on them. Importing in Cartography Shop and then exporting to DIF also works reliably, but the graphical bugs are still there.
When I've built screenshots for people I always have to sit and tweak all of the models and sunlight for hours just so I can get one where the sunlight doesn't cause the models to have artifacts or nasty black areas. Then of course it only looks good in the screenshots, if you actually explore a level you'll find lots of ugliness.
The same DIFs when exported in TGE work flawlessly. It's either a bug with the way they are rendering in TSE, a bug in the TSE versions of the exporters, or possibly that small errors that existed in TGE are now much more noticable in TSE.
05/23/2006 (8:49 pm)
Thanks Byran I will try that. I've tried all sorts of different things L Foster. Most of Aste's packs if I convert them using map2dif won't compile at all. With Map2DifPlus they compile but usually crash when I load them into the editor. Some other DIFs (I'm a licensed content junkie, I have something like 8 gigs of licensed artwork here that I pool from when doing demos and such) such as the Arteria ones compile and work fine, but the sunlight gives awful effects on them. Importing in Cartography Shop and then exporting to DIF also works reliably, but the graphical bugs are still there.
When I've built screenshots for people I always have to sit and tweak all of the models and sunlight for hours just so I can get one where the sunlight doesn't cause the models to have artifacts or nasty black areas. Then of course it only looks good in the screenshots, if you actually explore a level you'll find lots of ugliness.
The same DIFs when exported in TGE work flawlessly. It's either a bug with the way they are rendering in TSE, a bug in the TSE versions of the exporters, or possibly that small errors that existed in TGE are now much more noticable in TSE.
#7
05/23/2006 (8:58 pm)
It might seem like a really simple question, but are you using TSE's map2dif or are you using TGE's versions and loading them into TSE? I haven't tried the Aste packs and have only done some rudimentary testing, but haven't had the issues you're having (well, I had lighting issues but that was due to TSE's current lighting and not the exporter. Are all of your textures copied where they should be? I'm thinking of obvious questions because I haven't had these problems in my rudimentary testing.
#8
The thing that puzzles me is that in MBU it appears that they are using DIFs for just about everything and it doesn't have the issue. So I guess the question is was anything special done for DIFs in MBU, or perhaps is it that there is some early lighting improvements in MBU that aren't yet in MS3 yet. Or maybe there is some sort of optimization I can do to these that I am not already.

In this example the sun is clearly behind the DIF but the lighting is very odd. The top part of the roof is fully lit and then you have full black on the face,and look at the side. Sometimes it looks like radio streaks in the sides of the buildings, etc. All of these same DIFs if compiled and run under TGE look fine, with no issues.
05/24/2006 (3:01 am)
I'm using TSE's. It could be a lighting related problem, not really sure what it is. The DIF geometry is fine, the textures display and I can add shaders to them. If I align them facing the sun in the proper direction then I can make some pretty screenshots of DIFs with shaders on them. If you walk around the level though you see a lot of ugly glitches. Your probably right though in that it's probably a sunlight related bug, but I haven't seen any of these artifacts on terrain or DTS models. Perhaps the sunlight isn't playing nice with the larger polygon sizes, similar to the old gouraud lighting issues that used to plague us. The thing that puzzles me is that in MBU it appears that they are using DIFs for just about everything and it doesn't have the issue. So I guess the question is was anything special done for DIFs in MBU, or perhaps is it that there is some early lighting improvements in MBU that aren't yet in MS3 yet. Or maybe there is some sort of optimization I can do to these that I am not already.

In this example the sun is clearly behind the DIF but the lighting is very odd. The top part of the roof is fully lit and then you have full black on the face,and look at the side. Sometimes it looks like radio streaks in the sides of the buildings, etc. All of these same DIFs if compiled and run under TGE look fine, with no issues.
#9
But all this being said, I also can not get many of Tim's combo pack 2 in TSE, it always compiles great but crashes TSE on lighting phase. Most of them can add inside world editor but as soon as I relight scene it crashes.
05/24/2006 (6:47 am)
I had that weird lighting problem before, for me it was one of the textures was not registered. Also if you are using the standard function DemoMaterial to register you texures and one of the texture names has a Dash (-) in it, it will fail. To fix that just create a new function:function demoMaterial2( %name, %altname )
{
%com = "new Material(Demo_"@%altname@") {"@
"baseTex[0] = \"" @ %name @ "\";" @
"mapTo = \"" @ %name @ "\";" @
"};";
echo(%com);
eval(%com);
}
demoMaterial2("wind-owb","windowb" );But all this being said, I also can not get many of Tim's combo pack 2 in TSE, it always compiles great but crashes TSE on lighting phase. Most of them can add inside world editor but as soon as I relight scene it crashes.
#10
Thanks for the help.
05/24/2006 (10:16 am)
The one workaroud that seems to work with Combo Pack 2 is to import them in CShop and then export them in CShop. When I do that a few of them fail to compile, but most will compile and run without crashing me.Thanks for the help.
#11
05/24/2006 (12:30 pm)
I only have 3DWS, and currently .map import does not import textures correctly and Leadwerks is too busy writting their 3D engine than fix the problem. I am just hoping the BigC will be available soon and fixes the issue.
Associate Logan Foster
perPixel Studios
Logan