Game Development Community

The Inevitable CRASH! and an idea

by J · in Constructor · 11/14/2007 (2:39 pm) · 25 replies

I've noticed that until a certain complexity that the map2dif export option works really good. It gives excelent collision detection and everything when in TGE 1.5.2

Now when I get past a certain complexity the map2dif crashs every fricken time and an 8hour project is just a day wasted. Really pisses a person off. So you have to Export as dif. Well, that just sucks, collisions are all screwed up and certain brushes are off. Light leaks absolutely terrible.

So when you go to export you can create your own export tool correct?

Does anyone have an export option/tool/plug-in that combines the goodness of the map2difplus with the never fails export of the Export to Dif?

If not...does anyone have an idea how I would go about creating such an export option?

About the author

I used to be obsessed with building my own open-ended RPG and a 3D Side Scroller RPG. But the job/house/girlfriend got in the way. I know, I know. Now I concentrate on doing architectural renderings (with the help of T3D of course) and VBA programming.

Page «Previous 1 2
#1
11/14/2007 (2:48 pm)
Well, to create such an option, you would have to become extremely intimate with the map2difplus C++ code and modify it for your particular project. It's not a pleasant undertaking.

Download the 1.0.3 patch to fix the collision issues from here.
#2
11/15/2007 (6:13 am)
Thanks for the quick replay. That little patch helped out a lot.

Is it possible that in the future we'll have a more advance version of the map2dif? I really like how it exports nice and clean. With the export to dif; when you relight in TGE it leaves a lot of little edges that you can see light on. I did notice it a little, very little, with the map2dif.

Constructor is a great program though; I really enjoy using it; can't believe you guys don't sell it. The really user friendly interface alone is with the 20 bucks I paid for milkshape.
#3
11/15/2007 (9:01 am)
I don't believe there will be future versions of map2dif, though I could be wrong.
#4
11/15/2007 (10:56 am)
Quote:...never fails export of the Export to Dif?

I used to think so, but this isn't exactly true either ... my current projects often crash not just the exporter, but the entire Constructor program. It usually has to do with complexity and portals, from what I can gather.

Quote:Download the 1.0.3 patch to fix the collision issues...

I'm using the patch too, and while it improved a ton, it still has problems, unfortunately. I love Constructor as a tool, but exporting is the key and it is extremely frustrating. I have a VERY basic 'tube'-like structure that is esentially nothing more than a half-pipe for a domed roof and a flat floor. I built it into small sections, then duplicated them to make a very long piece to export. If I rotate the entire thing (it's a tunnel to go underground), then I get serious missing faces all over the place. These faces are weird too, because the player will fall through the ones on the ground pieces, yet a vehicle just drives right over them with perfect collision. Anyway, as an alternative, I was able to export by grabbing a column of verts and creating my slope that way instead. All faces are fine, but now when I'm walking down the player is fine (a bit of a hickup at each seam), but walking up he falls through at the seams. That I believe was using the map2dif_plus.

J / David, are you using the "plus" or normal map2dif? By the way, I'm sure there won't be better versions of the exporter, because people have been complaining since 2002, and also Torque 2 will use 'polysoup' instead, eliminating the need for DIFs. WOO HOO!
#5
11/15/2007 (2:56 pm)
I use the exporter in Constructor, not map2dif or map2dif_plus. I began to get lost in the various editions of map2dif between AFX and TGE and TGEA and attempting to help people on the 3DWS forums.
#6
11/16/2007 (11:01 am)
Woody, you know, I found that out last night too after I used the new exe. It worked for some of my difs, but then, just like the map2dif, it crashed, but not only the export operation, all of constructor.

Which got me thinking about the comment I made about the light leaks to David...I read that my light maps might be off and that is causing part of my problem... well couldn't that lead to an error when exporting?

For instance....and maybe I'm wrong....but I was creating a cave dif for underground and I had pretty large floor to my dif. 45x45 units.... I built it and on export it crashed....I tried a few things...deleted some brushes and still crashed. I ended up cutting that large floor brush into quarters and it exported. So I redid some of my detail brushes and boom...crashed again...

But could the light map be causing an error there because the brush is too big? Then I get more complex and it messes with the lightmap again?
#7
11/16/2007 (11:24 am)
I forgot to mention that whenever I try to use Detail Brushes or Collision Brushes, it crashes too, if I remember right. It's been a while since trying that though because of all the problems that I've had. Anyway, it came to my mind again reading here and that could be your problem, J ... at least worth looking into. Try changing all Details and/or Collisions into normal brushes and see if that helps.

My caves have fairly small pieces ... a series of wedges interlocked with verts pulled all around. It I do have some larger rectangular brushes too, but not too large... as all of my cave pieces are modular to fit together in the engine.

You can always try to change the light_scale in the game entities options. Default I think was 32, but I've gone as low as 2 without problem on other maps. (note: 1 will crash for sure ... and I think it has to be a power of 2 number: 2, 4, 8, 16, 32, ...)
#8
11/19/2007 (8:56 am)
I'll defenitly try to change everything to a normal brush and see how it acts. I've also messed with the light scale to various different settings to see how it acts, seems to help. But still crashes sometimes...

I have my most of my caves setup that way also.

I had one question that maybe you could answer for me...probably for a different thread, but its effects could crash the export... when I'm building...say a small farm house for an RPG... when i create the small "details" like wooden borders above my stone ...ahhh... let me get a pic....

Like here
www.snakebitestudios.net/01.jpgwww.snakebitestudios.net/02.jpg
Right were the stone and other material come together, Should I put a new brush there that overlaps the two and just leave it; or, put a new brush and CSG Subtract it so the brushes don't overlap; or, cut the current brushes up and expand the faces to make the border?

I know there are proper ways of creating the brushes; maybe I'm not doing it right. And, "remove hidden faces" should get rid of the overlaps on export, but the complexity of the overlaps could be hard for the export, causing it to crash.

Now, that being said...another aspect is the CSG Subtract...that could make a lot of brushes if you aren't very careful, but could clean up the overlaping brushes quite well.

So which method, above, should be used? and what is better to have...more brushes...or less overlaps?

And which brushes are proper to use...say a wooden border like I mentioned above...should that be a detail? and should the wall itself be a structure brush? a collision brush? a normal brush? What is the exact difference? I haven't seen any detailed explanation anywhere for this stuff.

Learning to properly use the program might greatly increase my productivity on it and save a lot of time and errors.
#9
11/20/2007 (9:47 am)
I'm fairly new at BSP editing too, so I may not be the best resource. With that said, in theory the Walls would be Structural and the wood trim Detail... however, like I said, my luck with detail brushes has been pretty bad. I have had them working inside a building once, but seemed to work better when they were also structual ('normal/default' brushes).

As far as the creation method, I'm a fan of manually creating separate brushes, but I don't know that it's the best way either. I've read a lot of bad things about the specialty tools (subtract, etc) that I don't chance it. They are likely fine to use, but my person method would be to either manually create brushes where they will be broken up upon export anyway, or just intersect them and let the exporter handle it. Sometimes one way works and the other doesn't, and other times it' the opposite. Probably letting them intersect and trying to export is the easiest way ... then if it crashes, delete parts from the house and export again. If it crashes, delete and export ... keep going until you narrow things down to the problem areas. Sometimes it's something that you never even thought of.

I've yet to find any good resources about BSP editing techniques in general, let allow Constructor-specific ones.
#10
11/20/2007 (9:57 am)
Everyone should look at the TDN stuff for DIF's. Detail brushes do not split up the geometry of brushes that they touch (say a pillar breaking up the floor like in the example provided on TDN). Using them stops an insane amount of face breaking in some instances (especially if you have tubes and such). Here is an article on detail brushes.
#11
11/20/2007 (10:16 am)
Detail brushes "should" keep any brush it touches from being cut up during export which obviously ensures less draw. In a perfect world, most (but not all) brushes that do not touch the void should be detail. If the brush is being used to block VIS by way of portals, then it needs to be a structural. Also, a detail brush can not cross/intersect with a portal or crashes will ensue.

Now, I am old school, so leaving brushes overlapping is a no-no. Yes, during export the hidden faces again "should" be removed, but your asking for problems.. in my opinion. And, A brush that is huge will cause issues as well, though it would have to be fairly large.

- Since the latest patch that David linked, If I place more than one or two.. sometimes any detail brushes, it causes a crash. So, I refrain from using detail brushes instead placing many things very slightly away from other brushes, but not enough to notice. This stops the other brushes from being cut up, and keeps me from cursing at crashes. ;) The new patch though fixes many things so I can use alternative methods in reference to this.

sidenote... is your level interior or mainly exterior?


edit: bah, thats what stopping mid-post to make coffee does to ya lol, David beat me to the punch
#12
11/20/2007 (10:43 am)
That's a very good "should" there. I haven't been having problems with detail brushes crashing C'tor. I'll have to try more test cases and see. But it is definitely good practice to not overlap your brushes.

I just did a test with ten detail brushes connected to loke like a crazy Super Mario Galaxy box world and didn't have any problem exporting them. I used boxes and cylinders, though. Nothing too complex. The cylinders had 20 sides to be smooth. But that was about the only big thing. My portals also correctly exported, which I remember people having difficulties with that and the export to dif option. I enclosed my weird detail brushes in a couple of portaled rooms.
#13
11/20/2007 (1:53 pm)
Andrew, good idea on the detail and portal...all of my houses...even my caves... have detail outlining the doors and a portal covering the hole. I will change that when I get home and see how it goes....

And I won't overlap brushes...

Then like Woody said; should I not use the CSG Subtract? or have you guys had any problems with it?
#14
11/21/2007 (8:15 am)
I haven't have problems (other than prior to the collision patch) with subtracting unless it was a complex subtraction (large spheres subtracting sections of large spheres, etc).
#15
11/21/2007 (1:24 pm)
Alright...the detail brush against the portal brush was really bombing everything. Only a few of my difs won't export with the map2dif Plus now...Thanks Andrew.

I made my dif with no two brushes overlaping and changed all "wood" material to a detail. More brushes - less overlap....good to know...

Export to Dif works good too, no collision problems and I'm using the old exe. Sweetness!

www.snakebitestudios.net/03.jpg
Would you guys recommend using portals on doorways and such? I know its mainly for zone lighting. I'll do some testing on my caves and see what I come up with. Now to figure out how to make a BIG tower with a LOT of detail with no crashes on export.

Have a good Turkey Day guys!
Thanks.
#16
11/21/2007 (1:32 pm)
If you have a lot of detail that you don't want to be rendered uselessly, then I'd portal doorways...
#17
11/21/2007 (1:53 pm)
Add small changes, save as new files often, export often during the day - this is the only sane way to model with QuArk.
#18
12/06/2007 (7:38 am)
David,

Two more questions if you could.

Pertaining to portals... If I have an entity/light, I want to control where the light shines, so I made a box of six cubes and placed it around the light. I have a big complex fire place and the light was shining back on the wall(in TGE 1.5.2) I know it does in Constructor, but it was still doing it in Torque. I couldn't seem to find any gaps or anything that the light would leak through. But anyways it crashes on export now. Is there a better way to go about this? or controlling lighting in a small zone?

Also, on the light leaks or bleeding across the edges, if you change you sky settings to really dark, say 0.01 0.01 0.01 1 on sky color and fog color and make your fog distance 1, you can eliminate the light leaks. Is there any resources or known engine changes that can solve this problem? It has to be the way it renders.

Thanks,
J
#19
12/06/2007 (9:39 am)
The first thing to try would be changing the size of your lightmap under the scene menu. If you make it smaller than 256x256, you might see fewer leaks as it calculates it.
#20
12/19/2007 (9:37 am)
I have to add a couple of things about detil brushes. First, I have some VERY simple geometry... only slightly more complex than a 3-sided room. I put in some detail brush pillars (think of a "T" holding the roof up). The top of the pillar and the post of the pillar are not touching. Neither is also touching any structural brushes because it was crashing, and it still crashes as long as I have detail brushes and a portal. I have successfully done similar things and have THOUGHT that I figred out the issues, but to no avail. The second that I turn those "T" pillars into structural brushes, no problems at all.

Also, I was getting a TON of missing faces ... then I would tweak a vert and fix the face, only to have an arbitrary face disappear on the other side of my room, etc. etc. I have now just turned OFF the hidden surface removal options, and this was fixed, I believe ... so far so good at least. We'll see.
Page «Previous 1 2