Map2Dif fix? Or maybe big waste of time....
by ghuval · in Torque Game Engine · 12/15/2005 (12:53 pm) · 5 replies
We recently have been developing a new shader for TSE and noticed that our interiors have a lot of seams along areas that aren't overlapped. Aside from light leaking seams our shader also accentuated some seams in particularly long brushes along tall buildings and streets and what not. Here is one example (the green dots along the road):

Well everyone says to overlap the brushes to get rid of this, I forget why we were looking into an alternative, but after sifting through map2dif for a bit I came upon the fixTJuncs() method, which adds additional indeces to the windings of planes that intersect and line up to each other. After testing for awhile I noticed that the windings match all of the intersections necessary whether overlapping or just lined up. However, after calling convertToStrips() on the windings, once the engine had the vertices it would render most of the triangles in small (or large) zero width triangles along edges and would luckily render a couple large ones that would fill the plane (creating the illusion? that they were rendering correctly?). In the end I went through map2dif and the engine and added a method to create triangle fans out of the indeces and to split the planes when necessary to continue to make fans.
Anyhow, I'll just post the pictures I made of this fix and ask my major questions:
Am I just wasting my time?
Is this going to screw up collisions and other things used by the windings?
Original interior with brushes lining up (not pushed through each other)
The original planes it gets broken up into (I think, one of the debug modes)
The original wireframe (slightly edited to remove backfacing polys)
The new wireframe after my changes
Just so everyone knows, we are using TSE to develop our game, but I switched to TGE to test these seams, I used both map2dif and map2dif plus to generate interiors with the same results before my changes.
I also searched the forums as much as I could to find any information on this, and it doesn't seem to be a problem for anyone? Or maybe no one has noticed?
Thanks

Well everyone says to overlap the brushes to get rid of this, I forget why we were looking into an alternative, but after sifting through map2dif for a bit I came upon the fixTJuncs() method, which adds additional indeces to the windings of planes that intersect and line up to each other. After testing for awhile I noticed that the windings match all of the intersections necessary whether overlapping or just lined up. However, after calling convertToStrips() on the windings, once the engine had the vertices it would render most of the triangles in small (or large) zero width triangles along edges and would luckily render a couple large ones that would fill the plane (creating the illusion? that they were rendering correctly?). In the end I went through map2dif and the engine and added a method to create triangle fans out of the indeces and to split the planes when necessary to continue to make fans.
Anyhow, I'll just post the pictures I made of this fix and ask my major questions:
Am I just wasting my time?
Is this going to screw up collisions and other things used by the windings?
Original interior with brushes lining up (not pushed through each other)
The original planes it gets broken up into (I think, one of the debug modes)
The original wireframe (slightly edited to remove backfacing polys)
The new wireframe after my changesJust so everyone knows, we are using TSE to develop our game, but I switched to TGE to test these seams, I used both map2dif and map2dif plus to generate interiors with the same results before my changes.
I also searched the forums as much as I could to find any information on this, and it doesn't seem to be a problem for anyone? Or maybe no one has noticed?
Thanks
#2
Because I've only seen the seams in the TSE I can't even confirm that this fixes them yet as my fix is still in TGE and not TSE. Although this might be a good thing to have anyways.
12/15/2005 (2:37 pm)
Unfortunately i'm not finished yet, I haven't tested it thoroughly and it's slow, I wanted to get some feedback from people before I keep spending time on it.Because I've only seen the seams in the TSE I can't even confirm that this fixes them yet as my fix is still in TGE and not TSE. Although this might be a good thing to have anyways.
#3
12/15/2005 (3:13 pm)
Feel free to send anything my way when you are happy with it and I will see if it should go into the official map2dif.
#4
Glenn
01/06/2006 (10:07 am)
I have too many changes to post =P so I'm gonna link everyone to a text file that has the posts I was going to make. Have fun, it'll be up for a week or two, maybe longer.Glenn
#5
BTW I recommend copying it out and pasting into some editor that lets you see it wrapped somewhat. I had some comments/questions to you Matt in the text if you take a look.
Sorry for the repeated edits, I'm not a regular forum poster.
01/06/2006 (10:12 am)
Here it is >=O. Hope this helps people, and I hope we don't exceed our bandwidth....BTW I recommend copying it out and pasting into some editor that lets you see it wrapped somewhat. I had some comments/questions to you Matt in the text if you take a look.
Sorry for the repeated edits, I'm not a regular forum poster.
Associate Jaimi McEntire
King of Flapjacks