Game Development Community

Problems with Portals using Constructor

by Dusty Monk · in Torque Game Engine · 04/23/2007 (6:36 am) · 9 replies

I'm just now getting my feet wet in constructor, running through some of the most basic steps, and have come across a problem early that I can't seem to get around. The basic problem is that I don't seem to be able to successfully create portals, using their standard export.

My process is as follows:

1.) Open up a new scene, create a cube, hollow it out.

2.) Create a new cube brush, use it to cut a doorway into one side of the cube. Delete my "door-cutter" brush.

3.) Create a new cube brush, place it and size it appropriately for it to be a portal brush. That is, centered in the doorway, with the sides of the brush extending slightly into the geometry around the edge of the doorway. The "thickness" of the brush is slightly less than the thickness of the walls surrounding it.

4.) I "make" that brush, and under brush settings, set it to be a "portal" brush. It turns a reassuringly bright color of pink.

5.) Save the level, and export it to dif, using the standard dif export. (My engine has undergone the process of integrating the 1.5.1 release, so all's good there).

When I place the .DIF file into a level though, 2 things are wrong. First, there seems to be some kind of arbitrary (and invisible) collision geometry in front of the doorway. I'm blocked when I try to get through the door, though some amount of jumping can usually convince the sim to let me get into the building.

Second, and more distressingly, setting "setInteriorRendingMode(7)" to view zones, my building doesn't appear to have any portal or zones. That is, the entire building, interior and exterior, is white. I have placed a stock greathall in my level, and it shows its zones correctly, the exterior being white, and the interior in green, indicating the zone creation.

Any thoughts? Suggestions -- something I'm missing? Thanks in advance..

About the author

Dusty Monk is founder and president of Windstorm Studios, an independant game studio. Formerly a sr. programmer at Ensemble Studios, Dusty has worked on AAA titles such as Age of Empires II & III, and Halo Wars.


#1
04/23/2007 (6:42 am)
I have had the same problems with portals not showing up correctly in the engine.

The only thing that is different is that I can walk into the building fine.

Have you checked to make sure that the opening is bigger then the bounding box of the player?
#2
04/23/2007 (7:05 am)
Sorry guys, but it appears portals are not supported yet in Constructor/Torque 1.5.1. Though I hear that they will be with the next version...to be out soon.
#3
04/23/2007 (8:34 am)
How did you get this information Scott? Another thread or directly from a Constructor developer?

Two quick notes I have from my Constructor usage in beta:

1. When hollowing a cube, the bottom section usually had to be decreased in height and then elevated to meet the rest of the building's geometry. The reason for this is due to the fact that when going on to the next step of creating a portal, the "floor" brush acts as a step which can sometimes block a player when it collides with the player's bounding box.

2. My method of creating a portal is much different. I switch to a side (front, back, left, right) perspective depending on which building side I want the door on. From there, I use the slicing tools to cut a door into the existing building's brush. I then select the new "square-ish" brush, and turn that into a portal. This still works fine for me, in both 1.5 and 1.5.1.
#4
04/23/2007 (8:39 am)
So in otherwards use 3DWS if you portals.
#5
04/23/2007 (9:20 am)
Hmmmm interesting.

So Michael are you saying that you have working portals from a dif made with constructor?

I will try out your method and see what shakes loose.
#6
04/23/2007 (9:46 am)
I *think* portals are supported in the current version of Constructor but you need to export with the bundled map2dif, NOT just the general export. There's another thread around here somewhere that discusses doing it...
#7
04/23/2007 (10:18 am)
Some more information and a workaround:

So I was able to get a portal exported, but Corey is correct -- I was only able to get the portal created using the integrated map2dif exporter. Furthermore, the integrated version, which uses map2dif_plus, doesn't work, because currently map2dif_plus crashes when it tries to export even the simplest of levels. I think there is a workaround for this as well, but I haven't tried that yet.

However, using the SDK, I rebuilt map2dif, and replaced the map2dif.exe in the constructor directory with my freshly built one. Then I created a new exporter configuration, that was basically a copy of the default one, but launched map2dif.exe, instead of map2dif_plus.exe. This successfully built the .dif file with a portal, and I loaded it up in the mission, turned on setInteriorRenderMode(7), and was able to see the zones. Yay!

However, this brings up other concerns. One of the main reasons I integrated the 1.5.1 stuff was to have the ability to import static meshes into my scene, and have them baked right into the .DIF when I export. In this way I could purchase stock assets like tables, chairs, office furniture, etc., export them from Max into .DTS files, import them into my scenes, and bake them into the .DIF. But I don't *think* the standard MAP2DIF exporter will support the baking of the static meshes into my .DIF. I'll futz around with it some more tonight.

Michael Perry - what you're describing sounds exactly like what is happening on my cubes. I get some sort of small blocking obstruction near the door way. I even created a ramp, and I would get blocked at the *bottom* of the ramp. I'll try your method of lowering the floor and then raising it back up to see if I can get rid of that blockage.
#8
06/08/2007 (8:42 am)
Well Portals don't seem to work in 1.0.2 either. But here's some info that might help. If I save a portal in 3DWS, then copy the code of the portal into my map file (it has to be map, not CSX) it will work fine.

It's gotta be something minor that's preventing it from becoming a Portal in Constructor.