Map2Dif Plus
by Matt Fairfax · in Game Design and Creative Issues · 07/26/2005 (2:09 am) · 65 replies
Ok, barring any unforeseen bugs, Map2Dif Plus is now considered 1.0!
Get your goodness here:
Map2Dif Plus for TGE
Map2Dif Plus for TSE ;)
For those who will want to know: Yes, the source code for this will be in TGE 1.4 RC2. I'm not sure when it will be in the TSE CVS (as soon as Brian checks it in).
Get your goodness here:
Map2Dif Plus for TGE
Map2Dif Plus for TSE ;)
For those who will want to know: Yes, the source code for this will be in TGE 1.4 RC2. I'm not sure when it will be in the TSE CVS (as soon as Brian checks it in).
About the author
By day, I am a senior programmer at The Playforge, makers of the popular iPhone game Zombie Farm. By night, I work on my own games as Night Heron Games. I am an ex-GarageGames employee who helped ship TGE, TGEA, Torque 3D, and Constructor.
#42
i wonder, if u guys can support following 3d format (Anim8or),
quite ease to read, but not for a noob like me
(would it be possible to do a ani to dif tool ?? )
code shortened because of 4096 byte limitation ..
10/06/2005 (9:05 am)
Hi MAtt, i wonder, if u guys can support following 3d format (Anim8or),
quite ease to read, but not for a noob like me
(would it be possible to do a ani to dif tool ?? )
header {
version { "0.9" }
build { "2005.05.01" }
}
texture { "metall"
file { "C:\DOKUME~1\RRahm\Desktop\tools\metall.jpg" }
}
object { "roof"
material { "material01"
surface {
/* RGB chunk no longer used */
rgb { 224 224 224 }
ambiant {
rgb { 224 224 224 }
factor { 0.30000 }
}
diffuse {
rgb { 224 224 224 }
factor { 0.70000 }
texturename { "metall" }
textureparams {
blendmode { decal }
alphamode { none }
}
}
specular {
rgb { 255 255 255 }
factor { 0.20000 }
}
phongsize { 32 }
}
}
group {
name { "group01" }
mesh {
name { "mesh02" }
material { "material01" }
smoothangle { 45 }
/* 50 points, 96 faces, 50 uvCoords */
materiallist {
materialname { "material01" }
}
points {
(30 0.65150 -39.162) (30 1.3131 -41.049) (30 14.013 -32.895)
(30 15.042 -34.611) (30 25.834 -24.07) (30 27.187 -25.543)
(30 35.632 -13.049) (30 37.254 -14.22) (30 43.007 -0.28673)
}
texcoords {
(0.00633 0.70067) (0.00633 0.18638) (0.00633 0.23457) (0.00633 -0.33896)
(0.00633 -0.30520) (-0.48734 1.2613) (-0.48734 1.339) (-0.48734 1.0033)
(-0.48734 1.0739) (-0.48734 0.64002) (-0.48734 0.70067)
(-0.48734 0.18638) (-0.48734 0.23457) (-0.48734 -0.33896)
(-0.48734 -0.30520)
}
faces {
3 4 0 -1 ( (0 0) (10 10) (12 12) )
3 4 0 -1 ( (0 0) (12 12) (2 2) )
}
}
}
}code shortened because of 4096 byte limitation ..
#43
10/10/2005 (1:16 am)
Anim8or has no native convex/brush tools and is going to require you to be very careful and limited in how you create the mesh if you want it to be compatible with Interiors. Currently, we do not support that format but the source code for map2dif plus is now in the TGE CVS and you could add it yourself.
#44
Clipping brushes rock and IMO, should be part of any BSP-type engine out there!
I'd be stoked to get a hold of your code and/or implementation info.
Thanks,
Kevin
10/17/2005 (2:47 pm)
@Josh Ritter:Clipping brushes rock and IMO, should be part of any BSP-type engine out there!
I'd be stoked to get a hold of your code and/or implementation info.
Thanks,
Kevin
#45
10/21/2005 (1:36 pm)
Source code to compile under Linux?
#46
10/21/2005 (7:42 pm)
If you are handy with a make file then there shouldn't be anything in the code that would stop you from compiling Map2Dif Plus under Linux. Ron is working on the Linux port of TGE 1.4 so getting the "official" port is dependent on him.
#47
I am going to be testing this with the Quark duplicators. The old version created DIFs that would cause crashes when a visible object (3rd person player) came in contact with the DIF at certain locations.
Thanks for working on this,
Frank
10/22/2005 (1:54 pm)
I guess what I should have seen was that is was an employee (you) posting. So I should have guessed I could just grab it from CVS. I am going to be testing this with the Quark duplicators. The old version created DIFs that would cause crashes when a visible object (3rd person player) came in contact with the DIF at certain locations.
Thanks for working on this,
Frank
#48

You fixed the problem with using Quark duplicators. I used to get "Error, no plane possible!" errors when a visible object touched the dif at certain locations. Now it runs great. I will keep testing, but so far I can actually use the duplicators now! This will save me a ton of time.
Thanks,
Frank
10/22/2005 (2:51 pm)
Matt, you are now my hero of the week.
You fixed the problem with using Quark duplicators. I used to get "Error, no plane possible!" errors when a visible object touched the dif at certain locations. Now it runs great. I will keep testing, but so far I can actually use the duplicators now! This will save me a ton of time.
Thanks,
Frank
#49
Included in this zip file are:
testdupl.map // source map
testdupl_old.dif // produced by the map2dif
testdupl_plus.dif // produced by the new map2dif_plus
http://demolishun.com/torque/testdupl.zip
The testdupl_plus.dif has some really wierd artifacts. It seems to mess up the arches. If you want I can post the quark file too.
10/22/2005 (9:43 pm)
I have done some testing and there are some new problems. Included in this zip file are:
testdupl.map // source map
testdupl_old.dif // produced by the map2dif
testdupl_plus.dif // produced by the new map2dif_plus
http://demolishun.com/torque/testdupl.zip
The testdupl_plus.dif has some really wierd artifacts. It seems to mess up the arches. If you want I can post the quark file too.
#50
10/23/2005 (3:52 am)
You're better off always 'disassociating duplicaters' before exporting. I use just about every trick QuArK has, and as long as I convert them to 'real' objects before exporting, they work fine.
#51
I just tested creating two map files. One with the duplicators dissassociated and one without. I then ran diff on them. The only difference between the two maps was that of precision of numbers in the 4th and 5th decimal place. Also, the new problems I am seeing have nothing to do with the map produced anyway because it is the same map that is producing the differing results with the old and new map2dif. I have a hunch now that I have played some more that my original problems with path duplicators may have been related to the thickness of the dif. I will test that out now.
Whether or not you dissassociate is only going to be relative to the ability of Quark to dissassociate on the fly when creating a map versus doing so before hand. Maybe the issue with quark is how nested duplicators get dissassociated on the fly versus by hand. I usually dissassociate from the bottom up. Maybe quark does it top down.
10/23/2005 (12:07 pm)
The problem here is that the dif turns out fine if you use the old exporter versus the new. I just tested creating two map files. One with the duplicators dissassociated and one without. I then ran diff on them. The only difference between the two maps was that of precision of numbers in the 4th and 5th decimal place. Also, the new problems I am seeing have nothing to do with the map produced anyway because it is the same map that is producing the differing results with the old and new map2dif. I have a hunch now that I have played some more that my original problems with path duplicators may have been related to the thickness of the dif. I will test that out now.
Whether or not you dissassociate is only going to be relative to the ability of Quark to dissassociate on the fly when creating a map versus doing so before hand. Maybe the issue with quark is how nested duplicators get dissassociated on the fly versus by hand. I usually dissassociate from the bottom up. Maybe quark does it top down.
#52
There is a massive update on the way for map2dif as part of the work I am doing on Constructor which will totally address this problem but it is a number of months away.
10/23/2005 (7:24 pm)
Yes, a few maps will go through the old map2dif cleanly and not through the new map2dif plus. This is because I changed the floating point precision used for vertex and plane comparisons. This changed enables map2dif plus to process a lot more problem maps than its predecessor but it does cause problems on a few maps. My recommendation is to hang on to the old map2dif and use it when you run into problems like this.There is a massive update on the way for map2dif as part of the work I am doing on Constructor which will totally address this problem but it is a number of months away.
#53
10/23/2005 (8:14 pm)
@Matt: So, is the "number of months away" more for an estimate of having an update for map2dif, or can we use it to glean an approximation of when Constructor may be released? =)
#54
I put that map up so you can use it for debugging if you need to.
Thanks,
Frank
10/28/2005 (10:48 am)
Matt, I put that map up so you can use it for debugging if you need to.
Thanks,
Frank
#55
map2dif_plus (TGE SDK 1.4 release) doesn't seem to produce mirrors? But map2dif did.
Is this a known limitation (from all I can tell by the source it should work, but I haven't compared it with map2dif yet).
Btw, I'm studining mirrors at the moment for future implementation of teleporter portals (e.g. viewport for unplace to another on map
that shows the teleport destination). I'm assuming the implementation (using DIFs) would be very similare to mirrors.
12/04/2005 (2:14 pm)
Hi,map2dif_plus (TGE SDK 1.4 release) doesn't seem to produce mirrors? But map2dif did.
Is this a known limitation (from all I can tell by the source it should work, but I haven't compared it with map2dif yet).
Btw, I'm studining mirrors at the moment for future implementation of teleporter portals (e.g. viewport for unplace to another on map
that shows the teleport destination). I'm assuming the implementation (using DIFs) would be very similare to mirrors.
#56
12/05/2005 (2:02 pm)
Aye, I found this bug during the development of Marble Blast Ultra (and fixed it). I just haven't rolled the fix into an update but it is on my list.
#57
Let me know when I can get a hold of the patch (no rush for my sake, I have other stuff to do in the mean while :-)
12/06/2005 (8:34 am)
Brillant, thanks Matt. Let me know when I can get a hold of the patch (no rush for my sake, I have other stuff to do in the mean while :-)
#58
02/06/2006 (8:40 pm)
Has map2dif_plus been updated to support mirrors yet?
#59
Thanks,
-Sparkling
04/25/2006 (9:36 pm)
This Map2Difplus is dated from July 2005. Is this the most recent version? The link to the .EXE seems to be broken, it says File NOt Found. I'm trying to figure out how use it with the Greenbriar Toolkit to export my models to DIF format.Thanks,
-Sparkling
#60
David
04/26/2006 (6:57 am)
If you can't find it, email me and I'll send you a copy of the version I've been using.David
Torque Owner Laralyn McWilliams
Thanks!
(Sorry for any duplicate posts of this, btw. Having connection problems.)