Game Development Community

What's the difference in these map2difs? Is there a wiki?

by Jeff Loveless · in Constructor · 04/19/2007 (6:21 am) · 14 replies

With the release of constructor a a new wave of interior creation seems to have begun. I see alot of people confused about which exporter to use, and I've seen some rather odd results from using different exporters. Some seem to have different strengths.

So perhaps we could all lend a little knowledge and put it all in one place so its easy to find when starting out, or dusting off. and hey if there's already a wiki for map2dif_plus that lists the different exporters and what they're best for please link me

I've mostly used this exporter
http://www.rustycode.com/matt/map2dif_plus.exe
when you run it you can see it is based off of map2dif_plus, but if you compare its size to the version of map2dif that came with your SDK, you can tell its different.
I found the map2dif plus that came with torque was giving me alot of grief and this one was suggested to me
it exports great looking dif's with no unnexpected cuts, good lightmaps, omni lights work, I wont vouch for any other types, portals, zones, detail brushes, everything seems to export correctly

An associate of mine has been using this one with success and has not yet been swayed
http://torque.smdlabs.com/content/difExAlpha1.zip

that one has more than an exporter to it, there is also a dif test that it will load you directly in a simple mission to view an exported dif quickly
but it also includes Map2DifExpress.exe an exporter that seems to have been built from Map2Dif rather than map2dif_plus

if someone could explian the differences in these, and possibly even explain the stock map2difplus that ships with torque, benifits, downfalls.. features? I think it would benefit everyone to have it all on a wiki

edit: if I'm wrong excuse my improper terminology perhaps map2dif is considered a converter rather than an exporter

#1
04/19/2007 (2:11 pm)
Anybody care to help?

edit: please?
#2
04/19/2007 (10:11 pm)
Is this even something anyone could answer, even if you only know the features of one of the versions of map2dif.

I believe the one I'm using came at one point from Matt Fairfax.

the map2dif express i think is from another knowledgeable guy who hosts smdlabs.com but I'm unsure of his name atm.

Employees, creators anyone, it would be way groovy if there was a source of definative info on these exporters maybe not say one is better than the other, but explain what they can/can't do so I (we) could know what would be best to use in which circumstance.

Like why does this old version from 2005 seem to produce better looking end results than the most recent version that supports mirrors and such
#3
04/19/2007 (11:15 pm)
This is actually a really good question, I wish I could give you some answers but it's something I would like to know more about as well.
#4
04/19/2007 (11:30 pm)
What i have found is some of the earlier version not only have BAD math, but some dont support different types of functions such as mirrors.

Im partial to 2 different versions, one with Radiosity lights, hard to use but its use of lights are unmatched to this day for BSP(I have used allot of 3D engines and never gotten such stunning results).

I also use the 2005 version, it seems to have great handling of floating point math precision, I can build BSP with the 2005 version that mess up on anything before it (and i have found unfortunately; after it..), talking about very curved shapes and very complex geometry in a VERY small space (try building a 8 point curve in 1/10 Torque Unit Space).

Im not much of a programmer, but i would LOVE to take the best from the exporters i use and mix them together to better suite my needs.
#5
04/20/2007 (12:49 pm)
@Caylo, I know what you mean, that sounds like a dream to look at merging the code from all these versions to attempt to make a Super_map2dif_plus_plus.exe

but I imagine thats what the current version would represent so you would think, unless maybe the code for the optimizations for all these different versions hasnt been shared.
#6
04/21/2007 (7:08 pm)
Which version uses radiosity?
#7
04/21/2007 (7:33 pm)
This is the Map2Diff with Radiosity. But you need to get the instructions for using it from the above thread, and it can be tricky to use.
#8
04/21/2007 (9:34 pm)
It doesn't require any code changes to TGE?
#9
04/24/2007 (8:52 pm)
Ok I have some pictures to clarify what I mean about the differences between the different versions of the exporters, im not going to post them inline because of the size needed to demonstrate the different qualities discussed, such as Brush Cutting, Light Mapping, and Working Entites.

I was unable to test Map2Dif_radiosity, apparently I did not have everything nescicary to use it. I believe I may have only been missing 2 config files to define the light on materials used in the scene, but as I had no experience in using it, nor all the files nescicary I do not have an example for it. Perhaps someone would be kind enough to lend the propper files, or create an example and post it here.

To explain what you're seeing, in Debug mode you can press f9 to change rendering modes by default you can press it 3 times and it will switch between 3 views, I added in a gui I found here that helps you select quite a few more so you can to alot more testing on interiors.

The top left picture is just an overhead view of what this scene looked like exported with its specified method.

Top right shows detail brushes in red, structure brushes in white the blocks alternate detail, structure, detail, structure to show how detail brushes can cut structure brushes, despite what you've heard.

Middle Left shows only brushes, no lightmaps, no textures, it also shows portals and zones. The portal on the door of the small hut shows up green, when it is exported. it is also easy on the eyes to look for cuts in brushes in this mode If you can't take the colors in the middle right which shows tri's every single part of the geometry broken into triangles for rendering is shown here.

The bottom two pictures show how lightmaps from that export method look on a dif up close.

Quark exporting using Map2dif_plus from RustyCode.com - Entities are working here, forgot to test if mirrors are supported. The lights are pulsing so sorry it's a little dark in this first shot, I'm trying to not spend all night at this. notice how even though details and structure 'shouldn't' cut each other, when they're alternated its almost like the structure brushes cut through the detail to each other. Lightmaps in all versions of map2dif seem to be limited to 256x256, I'd like to be able to change that from the command line but such is life. Because loweing light geometry and raising the lightmap size isnt an option light bleeding will occur in all versions of map2dif I've seen, unless you can go with a small enough light geometry, not an option on some massive structures and it becomes nescicary to seperate them into smaller parts (please correct me) the version from rustycode.com seemed to produce darker shadows which IMHO looked the best so far, ban constructor, which i only wouldnt count (yet) because of the entities.

Constructor exporting using Map2difExpress from SMDLabs.com - Much like Map2Dif_Plus except the cutting seems to have chosen another pattern

Constructor exporting using Map2dif_plus from RustyCode.com - very similar to exporting from Quark, keep in mind the lights were pulsing, in hindsight, maybe not the best choice for screenshots but I wanted to make sure something besides the omni lights were working a light export comparison may still be in order, perhaps in video.

Constructor Save As Dif - Notice how nothing is cutting anything else.. Beautifull, but...entities seem missing those stacked blocks are the same ones from the other exports, they just aren't being recognised as detail. Lets hope when the entities are all fixed the cuts are still gone ;) Beautifull lightmaps, I dont see any bleeding here

Constructor Save As Legacy Dif - Again, no cutting, no entites, but lightmaps have gone a little bonkers
#10
04/25/2007 (1:54 am)
The maximum 256x256 lightmap size is a limitation of the DIF file format and Save As Legacy doesn't force this limitation on your scene so, if you have your maximum lightmap size set to higher than that, you are likely to get "bonkers" lightmaps.

During the course of working on TGE 1.5.2 I examined some of the differences between the various map2dif_plus builds (you can see the build date in the initial info map2dif_plus prints out):

1) Builds before September 8th, 2006 worked with detail brushes but did not support mirror entities. This is the map2dif_plus you could build out of TGE 1.4.0 and TGE 1.4.1. More than likely the "2005 version" I have seen a few people mention is also one of these.

2) Apparently the map2dif_plus executable that was included with the TGE 1.5.0 launch included the fix for mirror entities but partially broke detail and portal brushes. It did not include the changes/optimizations for the Lighting Kit integration that happened with TGE 1.5.0. This led to much longer relight times for DIF's made with this version *but* it did respect the "light_geometry_scale" value on the worldspawn entity which made for much nicer lightmaps if you set that property to anything less than the default value of 32.0.

3) The map2dif_plus that you can compile with TGE 1.5.0 also had the partially broken detail and portal brushes but it does include the changes for the Lighting Kit. Unfortunately, while these changes did help to speed up the lighting of these DIF's quite a bit, it did introduce a few nasty bugs in the form of some uninitialized variables and making map2dif_plus always use 32.0 as the light_geometry_scale unless you specifically overrode it with a sgLightingScaleEntity. This version is probably the worst of the lot since it has partially broken portals and detail brushes, broken lighting scale, and random crashes from the uninitialized variables. This is also basically the version that shipped with Constructor 1.0.

4) With TGE 1.5.1 you can compile a map2dif_plus that fixes the uninitialized variables and the partially broken portal and detail brushes. It still didn't address the "light_geometry_scale". The other "drawback" with this version is that with detail brushes working properly again you can get different crashes that have long plagued map2dif with detail brushes. Detail brushes are can be very powerful but they can also cause problems. I'm not sure if the executable that shipped with TGE 1.5.1 was up-to-date so you may have to compile it.

5) With TGE 1.5.2 we fixed the "light_geometry_scale" issue and we also uncovered really, really long standing bug with mirror entities where in Release builds (as opposed to Debug) it would somewhat randomly decide how much alpha it would use for the reflective surface texture (generally bounced between 0 - full mirror and 1 - no mirror). It turned out it almost always set it to full reflective if you used my testing methodology but if you ran the exectuable from deeper in the TGE directory structure it was very easy to get it to be 1 which would make it appear that mirrors didn't work. Hopefully this version will be a *lot* more solid.
#11
04/25/2007 (10:05 am)
Wow thank you, that explains alot, the thing I'm still having trouble understanding is why the brushes cut each other at all, the people from quark, working with other engines of course, don't seem to understand what we're saying about extra cuts when brushes touch each other, Annnnd Constructor outputs dif's (they are the same difs as map2dif's difs?) and they dont cut each other???

So.. while Constructor will be the number one choice once everything is going, say I'm trying to get a demo out this week, would it be possible to make a build of map2dif that allowed for bigger lightmaps? or is the lightmap size limit of the format in TGE? I experimented with this with mixed results, I did get bigger lightmaps, but only on half of the map being exported, so I assume either it wasnt creating light info for the other half, or TGE wasnt reading the info. And I broke portals :)

If i'm reading this all correctly, the Constructor difs are almost liek a new dif format, and the 1.5.1 build has been updated to read this new info?
#12
04/25/2007 (5:33 pm)
Constructor Save As Dif, looks very good. Good enough for me to want to upgrade to 1.5#...
Perhaps when 1.52 come out, and we get to see what it looks like.
#13
04/26/2007 (5:52 am)
@Matt, come back!, heh

@Caylo, Yeah constructor makes me drool

@myself successfully built Map2Dif_plus_512x512.exe .. just need to attack torque and get it to read the larger lightmaps now. I think perhaps if this all keeps going smoothly I'll be able to churn out a resource to let your legacy difs have bigger lightmaps, and a map2dif_plus that can export possible up to 1024x1024 sized lightmaps... why did I wait untill now??? eh its keeping me form going nuts waiting for 1.5.2 and Constructor 1.01
#14
11/29/2007 (3:30 am)
Will there ever be an exporter for tgea that will support portals AND lightmaps larger than 256?

[I hope so. It is a bit odd to say: you can either have portals and horrid lightmaps or no portals and decent lightmaps.]