Game Development Community

Problem with Exported .MAP - Worldcraft

by Quest Johnny · in Torque Game Engine · 05/27/2005 (1:38 pm) · 14 replies

Hello all,

I'm having a peculiar problem with a .MAP and I'm a bit new to WorldCraft. Maybe somebody knows what this is.

When I run map2dif on it, it takes a while, but it does exit. When I place the .DIF into the level, I can see a black version of it, but when the engine tries to light it (Alt-L), I get a "program has performed illegal operation: debug/don't debug" - ie., crash. no error message. The same naturally occurs if I place it, save the mission and the reload torque -- presumably when it tries to light it again

The file is available for your perusal at www.eyesinthedark.org/castle11.map

Clues:

If I load it up in Quark, and run the tool "find microbrushes" it says: #found 0, toothin: 1 - though I don't reall know what that means. If I click "I" for inspect, nothing is selected.

The console.log output from map2dif is:

//-------------------------- 5/27/2005 -- 16:41:27 -----
Math Init:
Installing Standard C extensions
Installing Assembly extensions

Input Init:
DirectInput not enabled.

This shouldn't happen: glGenTextures
This shouldn't happen: glBindTexture
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glGenTextures
This shouldn't happen: glBindTexture
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glGenTextures
This shouldn't happen: glBindTexture
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glGenTextures
This shouldn't happen: glBindTexture
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexImage2D
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
This shouldn't happen: glTexParameteri
781 brushes

Now, there are a lot of brushes, there are stairs and ramparts.. but I find it VERY hard to believe it is past any sort of limit, given how complex Quake levels can be, or some interiors I've seen have been.

Anyone got any ideas?

#1
05/27/2005 (1:55 pm)
2 things...

1) The download isn't working (may need to zip it up first)
2) have you tried map2dif_alpha yet?
#2
05/27/2005 (3:20 pm)
No, I'll have a hunt for that, - see if I can get it

Meanwhile, you're quite right. .map is recognized by the server. I changed it to:

http://www.eyesinthedark.org/sales/castle11.zip
#3
05/27/2005 (3:25 pm)
Map2dif_alpha

there you go :)
#4
05/27/2005 (3:34 pm)
One thing I have noticed, I was able to crash torque when making maps if I had some brushes that were too large, this was easy to remedy by taking large brushes and breaking them into smaller brushes. You can test if this is the case by taking out all the really large brushes and then exporting and try to light it.
#5
05/27/2005 (3:39 pm)
I just checked out the model...

I think your find the problem is you have WAY too much stuff...

1) Get rid of all the blocks on the top of the walls and just use the carve tool to carve out the gaps.
2) Your steps up to the tower are 1 metre high, which I don't think your player will walk up.
3) It's better to split large models up in to sections.


Hope it helps.

-Joseph
#6
05/27/2005 (4:03 pm)
I cut a huge amount off the model, this is what I got....

(the little black spec is the player)
img220.echo.cx/img220/2343/screenshot032000036ur.jpg

also..
The wall on the right is one I built a while ago and it's pretty big... so it just shows how big your wall is.

img263.echo.cx/img263/6109/screenshot032000041zx.jpg
edit: also, the steps are really too high to walk up.
#7
05/27/2005 (5:48 pm)
I did try map2dif_alpha - same problem

So it's like 781 brushes and 3447 surfaces and that's too many?

I thought I'd fixed thsoe steps.. anyway.. Ok, I'll try that.. so you mean for example, split it up into towers and walls? And instead of the ramparts being made up of lots of little brushes, combine those into a single shape?

It still amazed me the size/number of brushes is the problem, when interior levels in Quake must be made up of THOUSANDS of brushes.. or can torque not handle a quake-like game (can't believe that.)
#8
05/27/2005 (5:52 pm)
Your right

www.garagegames.com/mg/snapshot/view.php?qid=927

Matt F. tested map2dif_alpha with a 28,000 brush model... and that was back when he posted that snapshot.
#9
05/27/2005 (6:45 pm)
I suspect it is a rogue brush. Quark is giving an error on one of its tests, tho it won't identify which.

This is insanity .. The file castle36 was working this afternoon, and so I built on it.. I got working models up to 43.. and then I tried pasting it twice to a level. That crashed, and now no file, even all the way back to 36, will work.
#10
05/29/2005 (7:19 am)
Hrm, I dunno if this is a clue. I ran torque in Debug mode and it died on the lighting stage of entering the level in ShadowVolumeBSP. I cannot tell which object it was working on, but the error message was:
Quote:
Stack around variable "sides" was corrupted.
As near as I can tell, the polygon it is operating on is a light.. but.. there are no lights in my map.

I've also uploaded the string of bad .difs for people to try. Maybe it's something wrong elsewhere. The files:

www.eyesinthedark.org/screenshots/castle36works.dif
www.eyesinthedark.org/screenshots/castle37.dif
www.eyesinthedark.org/screenshots/castle38.dif
www.eyesinthedark.org/screenshots/castle39.dif
www.eyesinthedark.org/screenshots/castle41.dif
www.eyesinthedark.org/screenshots/castle43.dif
www.eyesinthedark.org/screenshots/castle44.dif

and

www.eyesinthedark.org/screenshots/castle44.rmf

Are available if you want to have a look at anything. I'm new to worldcraft, so it's quite possible it's the most trivial and obvious problem, -OR- It's one of my classic "I can't believe you got that" errors.
#11
05/30/2005 (7:22 am)
Interesting update:

I broke the castle into chunks to try and import it. This was a tactic to get it INTO torque, but it seems to be giving additional clues.
The large tower exports into torque, the stairs, the rampart towers. They can be imported as often as you like into a mission, no trouble.

However, the front wall, side walls and backwalls.. it doesn't like those. Maybe...
#12
05/30/2005 (5:09 pm)
After much fiddling, and screwing-around with the answer seems to be this, which I leave for people who come after me:

I split the ramparts off from the castle, exported them separately. Works fine like that. I have NO idea why. Perhaps someday I will be able to export it as a solid :)
#13
06/12/2005 (3:19 pm)
I ran into this problem as well using Cartography shop and the torque pipeline.

In the function in scenegraph.cc /

void ShadowVolumeBSP::splitPoly(SVPoly * poly, const PlaneF & plane, SVPoly ** front, SVPoly ** back)
{
   PlaneF::Side sides[poly->mWindingCount];
   U32 i;   
   for(i = 0; i < poly->mWindingCount; i++)
      sides[i] = plane.whichSide(poly->mWinding[i]);

From what i found.. the sides[] array was set to 32.. and the poly that was submitted somehow has 33 edges.
It doesnt do sanity checking to see if the poly that is submitted has more than the max allowable edges.
So right of the bat, this poly broke the bounds of the static array.

This is probably not the "Torque Way" but it works for my needs and hasnt broken anything yet.

All i do is dynamically create the buffer to the exact size needed by the polygon.

//PlaneF::Side sides[poly->mWindingCount];
   PlaneF::Side *sides = new PlaneF::Side[poly->mWindingCount];

   ... and put a delete [] sides; at the bottom of the function.


Hope that helps.

Rick
#14
06/12/2005 (10:28 pm)
@Rick - FYI. You shouldn't see polys with more than 32 edges from Pipeline as of the 1.1 beta release.