Previous Blog Next Blog
Prev/Next Blog
by date

Creating Portals (doorways etc) in Constructor

Creating Portals (doorways etc) in Constructor
Name:Rob Evans
Date Posted:Jul 02, 2007
Rating:5.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Rob Evans

Blog post
Having just spent about an hour trying to figure out how to do this I thought I'd type it up for anyone who's also a complete noob and might need some help...

I'm writing a space sim and after getting all the engine changes in place (phew) I thought I'd concentrate on making some simple space stations to play around with but when I hollowed out the sections where I wanted the ship docking to occur and exported the dif file, I place the station in my scene and tried to fly into the docking port... bang. My ship collided with thin air!

OK, so this is probably the point where many seasoned Torque peeps will laugh, but how was I to know I needed to actually set up where entrances are? :o)

So, all you need to do to make a VERY simple test object is this:

Create a cube primitive using the Build Cube button on the tools menu (top left). - Make sure you have the create tab selected so you can see the options I'm talking about.



Next, we're going to hollow out this cube to make a space for our ship to dock so click the modify tab in the tools box and click the hollow brush button. If you get an error about not having a brush selected, click on your box in the perspective view first, then click the hollow button.

You'll get asked how thick you want the walls, the default is 0.5 and we'll leave it like that for the moment.



As you can see, the program has created an interior area inside our box. Cool eh? Gotta love those guys at GG!

So now we have a box with an interior, how do we make an opening so that we can walk (or fly) inside?

First, go back to the create tab on the tool box and click the Build Cube button again. We're going to build another cube and use it to cut a hole in our current box by using CSG Subtract.

Once you've created your new cube, move it so that it intersects the first box where you want the "door" to be. You can move your obects by clicking the Modify tab in tools box and then clicking the Translate button.



Now click the CSG Subtract button. Once you've done that, to see your results, move the new box away from the old one and you'll see something similar to this:



Okey, so we've made the door, now lets tell Torque to actually let peeps in!

Press CTRL-Z to undo your move action so that the new box is back intersecting the old one. Now we tell the Constructor that this new box is actually a portal.

To do that, click the Object tab in the properties menu, then click Portal. Your new box will turn pink like so:



This is it... now the bit that really tripped me up was that once I'd done all of this, when I exported the dif file, it still didn't work!

The trick is to export using the export menu's map2dif plus. See here:



That's it! This is also the first tutorial I've ever written so excuse the crappy arrows in the pics!

Let me know if you need any help with it.

Recent Blog Posts
List:07/10/07 - Space Sim in the Torque Game Engine - Setting up the Gravity Mod
07/09/07 - Space Sim in the Torque Game Engine - Setting up TGE and Using Sky Spheres
07/04/07 - Space Sim in the Torque Game Engine - Introduction
07/02/07 - Creating Portals (doorways etc) in Constructor

Submit ResourceSubmit your own resources!

Andy Hawkins   (Jul 02, 2007 at 15:46 GMT)
Thanks Rob I could use this! Perhaps convert it into a true resource?

Rob Evans   (Jul 02, 2007 at 15:53 GMT)
How do I convert it into a true resource? (I'm new here!)

Ahh ok... I see... OK, I've created a proper resource from this.
Edited on Jul 02, 2007 16:10 GMT

Jay Barnson   (Jul 02, 2007 at 15:55 GMT)
Does Map2DifPlus no longer require that the portal have all its edges enclosed within other surfaces? Or was that never a requirement, but only a "best practice?"

Rob Evans   (Jul 02, 2007 at 16:02 GMT)
It certainly works without worrying about all edges enclosed. I'm not especially familiar with the tool however so you're probably right that it's best practise!

Anthony Abrams   (Jul 02, 2007 at 19:37 GMT)
Just curious but have you tried just exporting as a dif?

I do it all the time without any problems, but I do have to make the portal brush different.

Andy Hawkins   (Jul 02, 2007 at 22:30 GMT)
Resources can be created from this page...

www.garagegames.com/index.php?sec=mg&mod=resource&page=overview

Rob Evans   (Jul 03, 2007 at 19:37 GMT)
@Anthony - I have tried to export as a dif and I get the same result as if I hadn't created a portal at all. Maybe I'm doing this in an unconventional way - if there's another way to do it, could you me know... I'd be interested to hear your method!

Picasso   (Nov 27, 2007 at 12:05 GMT)   Resource Rating: 5
This is very useful for the people who have experience with difs for the first time , and answers the some of the first artist's questions. Thanks!

Rob Evans   (Nov 27, 2007 at 15:51 GMT)
@Picasso - Thanks! I haven't been doing anything with Torque recently... let me know how you get on with stuff here.

RobbieM   (Dec 09, 2007 at 03:38 GMT)   Resource Rating: 5
Small and simple resource, I love it, straight to the point, perfectly explained and I also learn some other stuff from it! Thanks!
Edited on Dec 09, 2007 03:38 GMT

RobbieM   (Dec 09, 2007 at 16:00 GMT)   Resource Rating: 5
Hey sorry for double commenting but does this work in 1.4? I tried it but Torque just closed when I loaded the map2dif exported file with a portal... Why!?

Rob Evans   (Dec 10, 2007 at 13:18 GMT)
I remember having some problems with Torque crashing with objects created in constructor but when I used the map2dif plus it solved the problems. Are you using map2dif or map2dif plus... the last step of the export is crucial.

RobbieM   (Dec 10, 2007 at 16:24 GMT)   Resource Rating: 5
There is only a map2dif plus, that's the one I'm using the one you're also highlighting above!

Lorne McIntosh   (Apr 16, 2008 at 19:20 GMT)
Hey nice tutorial Rob. I found that for this tutorial to work in TGEA 1.7.0 I had to do a little bit of modification to the tutorial steps. Hope this helps those that are having trouble:

1. Once you create the portal object, I found that insetting it slightly into the opening so that it was not flush or sticking out of the doorway was the only way that it would properly create the "zone" (green interior walls if you use the F9 zone display).

2. I also found that it would sometimes help if I increased the scaled of the portal brush slightly so it overlapped the brushes surrounding it slightly.

3. Using the default Export to DIF menu option in Constructor 1.0.4 worked just fine for me (and when I used the map2dif plus indicated above I would receive errors when placing the object in Torque)
Edited on Apr 16, 2008 19:48 GMT

Rob Evans   (Jul 09, 2008 at 12:41 GMT)
I imagine that some of the problems are due to differing versions of the software. Thanks Lorne for the update!

Dave Young   (Sep 11, 2008 at 18:18 GMT)
Is there a different exporter needed to do this with TGEA 1.7.1? I haven't seen a single portal exported yet when using the Interior Zones view mode.

You must be a member and be logged in to either append comments or rate this resource.