Game Development Community

dev|Pro Game Development Curriculum

Deconstructing Constructor - Part 4

by David Wyand · 02/09/2006 (10:37 pm) · 16 comments

Welcome to the fourth in a series of frequently infrequent talks about Torque Constructor. This is a continuation of my blog/.plans:

Part 1
Part 2
Part 3

You may also want to read Matt's .plans:
Of mice and men and Constructor
When will Constructor ship?

What is Torque Constructor
Torque Constructor is a .map (as in the .map file format) editing and .dif (the Torque interior file format) producing program being developed by Matt Fairfax, John Kabus and myself under the direction of GarageGames. You may have seen the Development Snapshot of the Day posted back in March '05 where the project was first announced. If you're familiar with programs like Valve's Hammer, with a smattering of traditional 3D apps such as NewTek's LightWave or Luxology's Modo, then you'll understand Constructor.

Discussion: Object Selection
In my last .plan I mentioned that I would talk about what I've built into Constructor from my last update at IGC '05 until the end of the year. This won't be an exhaustive discussion -- just the highlights. I'll actually spread this over a couple of .plans and will start off by discussing object selection in Constructor. Specifically I'll talk about what you will find today under the Select menu.

www.gnometech.com/torque/images/constructor/2006-02-09-SelectMenu.jpgConstructor Select Menu

I've divided the Select menu into five sections of which the bottom four I'll go into detail. The top section just allows the user to choose what types of objects they'll be work on from both the Select menu and the mouse.


General Selection
This section of the Select menu is about what you'd expect. In fact, I've modeled it after Adobe Photoshop so you all should be quite familiar with it. From here you may select and deselect all objects in the scene, as well as invert your selection.

The Reselect menu command will allow you to restore the last selection you made. This is handy if you've accidentally cleared your selection and you'd like to go back to it -- something I've had a lot of personal experience with. :o) It also allows you to add a previous selection to the current one. To do so for brushes, the steps would be:

1. Select some brushes
2. Clear the selection
3. Select a different set of brushes
4. Choose the Select->Reselect menu command to add the brushes from step 1. to step 3.


Object Type Selection
Each of the Geometry, Entities, and Shapes submenus contain All, Deselect and Inverse commands.

www.gnometech.com/torque/images/constructor/2006-02-09-SelectGeometryMenu.jpgSelect->Geometry Submenu

These allow you to deal specifically with the given object types. In this context, the Geometry submenu works with the current selection type i.e.: vertices, brushes, etc. The Entities submenu works with point entities in the map, while the Shapes submenu works with scene shapes i.e.: loaded DTS stand-ins.

Another method of limiting what you're selecting is to use the checkboxes in the Selection Form.

www.gnometech.com/torque/images/constructor/2006-02-09-SelectionFormCheckboxes.jpgSelection Form Checkboxes

With both checkboxes unchecked, the General Selection commands (Select->All, Select->Deselect, etc.) will operate just like the Geometry submenu commands. The other advantage of making use of these checkboxes is that they also affect mouse selection. So if you're working on brushes, you don't need to first hide the map entities to make sure you don't accidentally select them with the mouse.


Expand Based on Properties
The Same submenu allows you to expand your current selection based on the properties of what is already selected. Here's what I've built to date (which I'm sure will continue to expand):

www.gnometech.com/torque/images/constructor/2006-02-09-SelectSameMenu.jpgSelect->Same Submenu

The Brush Faces menu command works in face selection mode. It will select all faces on a brush that has at least one face already selected.

With a map entity selected, the Entity Classname menu command will select all entities in the map that have the same class name as those currently selected. So if you want to work with all of the "light_omni" entities in the map, select one and then use this menu command.

The Entity Game Type menu command I'll gloss over here as I've not yet talked about the Game Type system I've implemented. A quick summary is that all entities belong to a particular game type to allow for both organization as well as being able to override existing entities with your game specific ones. For example, Torque is a game type. Anyway, this menu command allows you to select all entities that belong to the same game type. I'll delve further into game types in a future article when I discuss the user interface for working with entities.

Finally, the Material menu command will select all geometry whose textures match that of the currently selected geometry. Select a face that has the "floor_stone" texture and use this command to select all faces that use the "floor_stone" texture. Then feel free to change it. :o)


Selection Storage
The last two commands in the Select menu allow you to load and save selection sets. I've modeled this after a few different programs so it should be familiar to many of you. I'll talk about them in reverse order.

The Save Selection menu command allows you to save the current selection as part of the scene. It opens the following modal window:

www.gnometech.com/torque/images/constructor/2006-02-09-SelectSaveMenu.jpgWindow opened from Select->Save Selection...

At the top of the window you may either type in a name for the selection or use the popup to the right to select an already saved selection. If you're creating a new selection or want to overwrite the chosen selection, you'll use the New (replace) selection option.

If you want to add the current selection to the chosen saved selection, the Add to current selection should be highlighted. Finally if you want to remove the objects that are currently selected from the chosen saved selection, you choose Subtract from current selection. These last two are handy as they allow you to expand or contract a selection set.

Once you have some selections saved in the scene, you'll use the Load Selection menu command to bring them back into the scene:

www.gnometech.com/torque/images/constructor/2006-02-09-SelectLoadMenu.jpgWindow opened from Select->Load Selection...

At the top of the window is a popup listing all of the saved selections in the scene. After choosing one you'll need to decide how this selection will interact with the scene. The New selection choice will override the current selection in the scene with the loaded one. The Add to current selection choice will add the loaded selection to what is already selected. And as you'd expect, the Subtract from current selection choice will deselect the objects in the chosen selection set.


And thus ends another edition of Deconstructing Constructor. In the next issue I'll continue to write about what I've built into Constructor up to the end of 2005. And then we can continue with the really juicy stuff! :o)

- LightWave Dave


-----

Sidebar: What's with the Selection Form Checkboxes -OR- Why Allow Simultaneous Geometry and Entity Selections Anyway?

So really, why would we even want to be able to select geometry (i.e.: brushes, vertices, etc.) and entities at the same time? Why don't you just have another selection type of Entities at the top of the Select menu and do away with those crazy Selection Form checkboxes?

Well, I'm glad you asked. There are actually a number of cases where you'd like to work with entities and brushes at the same time. And having a separate selection mode just for entities wouldn't allow for that.

For example, maybe you've built a wall sconce out of brushes and you've created the perfect "light_omni" entity on top. Now you want to copy all of it and paste in somewhere else. Or you'd like to group the light with the brushes so you can move them together. If you can't select entities and brushes at the same time, then you can't do either of these tasks.

The checkboxes on the Selection Form allow you to decide when entities may be selected with the mouse because most of the time you will just be dealing with brushes, vertices, etc. So if you drag out a selection rectangle with the mouse, you know that you won't accidentally select an entity. But when you want to, you can.

Now maybe we can have both an Entities selection mode and keep the checkboxes for the other modes. That way we'll have the best of both worlds. Sounds like a worthwhile addition... :o)

About the author

A long time Associate of the GarageGames' community and author of the Torque 3D Game Development Cookbook. Buy it today from Packt Publishing!


#1
02/09/2006 (10:55 pm)
Can't wait to have this app!
#2
02/10/2006 (2:24 am)
Vary nice,this will make it so simplify things.

Got my money ready.
#3
02/10/2006 (5:07 am)
I may be strange but I think this is an awesome feature:

Quote:Material menu command will select all geometry whose textures match that of the currently selected geometry. Select a face that has the "floor_stone" texture and use this command to select all faces that use the "floor_stone" texture.

I always seem to find textures that I didn't want on small faces that I didn't notice before exporting it out and running around.
#4
02/10/2006 (6:00 am)
Man, throw in some duplicators and I think I'll be switching over from QuArK. ;)
#5
02/10/2006 (6:31 am)
This looks so good it's killing me to wait. :)
#6
02/10/2006 (7:41 am)
Hey guys, thanks for the comments. I feel that you can't have enough ways to select your items.

Michael
You've given me another idea for a new selection method. Thanks! :o)

Eric
We'll see how many duplicators we can get in before launch. The real trick is that I need to make sure the tool plug-in script interface is robust enough that we won't need to have everything in place to launch -- we can add functionality as optional downloads.

- LightWave Dave
#7
02/10/2006 (7:41 am)
Not to add to the to-do list, but tear off menus would be hot.

Of course adding to the heat at this point might start a small fire.
#8
02/10/2006 (8:50 am)
Very Nice Dave!
#9
02/10/2006 (8:51 am)
You had me at Welcome.
#10
02/11/2006 (11:32 am)
Curved Geometry will it be possible? ballroom halls and huge dome cities :)
#11
02/11/2006 (4:58 pm)
Now I just hate myself 'cause I was impatient and bought the brand x map editor. Ah well, you live and you learn. Seriously though I can't wait to play with the new toy/tool your making for us.
#12
02/12/2006 (7:17 pm)
Early adopter edition please!
#13
02/20/2006 (5:21 pm)
I have one question because I using CShop and one problem is the scaling, when scale it down and the texture is stay the same, which is doesn't scale the texture with it.

Is possible to have texture scale locked or free switch? For example when it locked the texture scale then can scale down with texture to smaller size, and for free switch where can pull the brick wall higher and texture will stay the same (eg 4 line bricks, when pull wall up and increase to 8 line brinks than 4).

Can have that feature in this tool?

PS: I know english arn't good, hope is clear enough to understand.
#14
02/26/2006 (12:39 pm)
Constructor seems cool, and it looks like it loads meshes exported from 3D apps, (judging by the LOW import export)

My biggest problem of late hasn't been making brushes so much as precision problems with floats, making some of my maps that load in other editors not pass through Map2Dif acurately. Does constructor use the same old map2dif (I'm guessing it doesn't need to) and does it support floats without the rounding off that map2dif_plus currently has?.

And the other thing, any clues as to when constructor is expected to be released :)

EDIT> Just loaded the sample lightwave model exported from constructor. Would be nice if the faces were kept in their individual brush shapes. THen it woudl open up a lot of opportunities for tools that allow you to create brushed from within 3d apps natively.
#15
02/26/2006 (4:11 pm)
Greetings!

Shannon:
Actually as Constructor stands today you have the opposite issue. Scaling a brush will always scale the texture with it. ie: Make the brush smaller and the texture shrinks too. I don't currently have a method to allow for scaling without affecting the texture, but it is planned.

Adrian:
First just to clear up, there isn't a LWO import feature in Constructor today -- only export. Now as far as using map2dif and map2dif_plus: Today that is the method to build your DIF files. We do plan on exporting directly to DIF from Constructor without the need to go through an external program, but that isn't currently in place. Matt's the one tasked with this and once he gets back on Constructor I'm sure he'll be able to comment more. If you have a specific concern about DIF precision, I'd recommend that you pass it along to him

And regarding your comment on the sample LWO exported model: I'm not sure that I understand what you're after with respect to the individual brush shapes. Do you mean just to group the faces by their original brush, or something else?

Thanks.

- LightWave Dave
#16
02/26/2006 (4:39 pm)
Hi David. Matt has mentioned the map2dif problem, so hopefuly it will get fixed somewhere down the road.

With the .LWO export. It's been a while since I used lightwave, so perhaps it isn't possible. I don't recall whether lightwave supports seperate meshes in a LWO file, or whether that require a lightwave scene, or a seperate layer per brush shape.

Only reason I mentioned this is that some tools like 3ds max with the GLB map exporter, and gamespace truespace. Will let you create convex hull brush shapes and export them to legal maps.

I thought I'd ask whether it might be possible to save the brush with their brush faces in groups if that can be done?. I just looked at the orc tower and it does seem like the faces are grouped by texture. Which makes breaking the tower down to it's seperate brush components possible.

Anyway, keep up the good work :). Look forward to seeing how it turns out.