Game Development Community

Crossing portal cause fault

by Samme Ng · in Torque Game Engine · 07/22/2004 (8:34 pm) · 7 replies

I found crossing portal, that is overlapping two interiors with portal, will cause fault at following:

void SceneGraph::treeTraverseVisit(SceneObject* obj,
                                   SceneState*  state,
                                   const U32    stateKey)
{
   if (obj->getNumCurrZones() == 0) {  <<<<

The reasons to overlapping the interior are:
1. I would like to build a complex interior, however, it is too complex and QuARK can't export.
2. So I divide the complex interior into several single interiors, then connecting them by crossing them a little bit.
3. I would like the interior's lighting not affect by outside, I seal the single interior by portal, e.g. sealing both end of a "Tunnel" interior, and sealing the entrance of a "Tower" interior.
4. Then I connect the "Tunnel" to the "Tower"'s entrance, portal may overlap. It is even more overlapping if the "Tunnel" is inclined.
5. By crossing the portal, the program fault.

Q1. How you build a large and complex interior?
Q2. Single one or make up of several smaller components?
Q3. How to keep interior lighting not affect by Scene::Lightscene while not using portal?

Can anyone give me a suggestion?

#1
07/23/2004 (3:40 pm)
Q1: Anything that can read and write a .MAP file is Torque compatible. Don't forget that the tool you need is map2dif... The rest is interchangable. If its too big for QuArK, split it into pieces and recombine it in GTK-Radiant or some other application. Then just run map2dif via command line or batch file.

Q2: Single is always better.

Q3: See Q2.

The problem in your implementation as it stands is that your portal crosses multiple zones. I *think* the problem is that the portal code you are using is not cleaning up properly, and your model is still attempting to cross zones.

Either use another mapping program, move your portal, or split your interior further away from the portal so there's no chance of it crossing zones.
#2
07/24/2004 (11:55 am)
@Samme: Actually, I thought we fixed that bug a month or two ago. Are you using the latest HEAD?

@Bryce: Except that GTKRadiant is not usable for commercial stuff without a license fee...
#3
07/25/2004 (4:59 am)
I think I have the HEAD from 12-2003. Since I have changed quite a lot of core code, I am not going to update directly. May be I will check for any minimium patch to fix the portal crossing problem.

@Bryce:A large and complex interior is not the problem of QuARK, there are errors during MAP2DIF. It is due to some maximum value reached and reject going to export DIF.

If the new patch fixed the crossing portal problem, then I think using individual interiors to build up is okay.
#4
07/25/2004 (10:03 am)
I know there is a brush limit for Map2Dif that is really low... around 1k or so. But I *have* seen a resource around here lately that allows you to increase the number of brushes to 8k.

If you have a large and very detailed interior this may be your problem. If I come across that link again I'll post it here.
#5
07/25/2004 (2:56 pm)
Here is a version of map2dif that supports 8K brushes.
#6
07/26/2004 (12:42 am)
Samme, you should very definitely consider updating to the latest HEAD if you can spare the time. You're about seven months out of date - there have been about 400 changes since just three months ago!
#7
07/26/2004 (11:08 am)
Also, you might try making the large structure all as one map in QuArK, grouping all the areas, then duplicating the file and exporting the groups one at a time.

This is good because it gives all the groups the same origin, so if you give them the same location in the mission editor, they will be perfectly aligned with no overlap and no gap.