Previous Blog Next Blog
Prev/Next Blog
by date

Deconstructing Constructor - Part 3

Deconstructing Constructor - Part 3
Name:David \"Fulcrum\" Wyand
Date Posted:Jan 04, 2006
Rating:Not Rated
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for David \"Fulcrum\" Wyand

Blog post
Welcome to the post-holiday and third in a series of frequently infrequent talks about Torque Constructor. This is a continuation of my blog/.plans:

Part 1
Part 2

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: Exporting to LWO
As with many programmers, I decided to take some time off over the holidays and not think about programming. But as with most programmers, there was always that itch to do some tinkering; to try out something that wasn't planned but could be cool. For me, it was adding LightWave object (LWO) exporting to Constructor.

This was surprisingly easy to do. The biggest hurdles were adding big-endian stream writing routines to the Torque platform layer (as LWO files are big-endian in nature while Torque is little-endian), and making sure I had all of the correct IFF chunks written out for the LWO file to be correct. Now with a simple File->Export as LWO... menu item, we can place the Orc Tower .map into LightWave:


Orc Tower .map exported to a LWO file and loaded into LightWave's Modeler. Full size picture here.

For those that are interested, here's how the LWO file is set up:

* All planes are exported as triangles built from the same triangles that are used to render the interior in Torque. Could have exported n-gons, but this was the quickest method -- and quick was definitely the goal of this holiday programming.

* Each texture in the .map is exported as a separate surface within the LWO.

* All triangles that make use of the same texture are part of the same uv texture map. This gives a one-to-one ratio of surfaces to uv texture maps.

Of course, once you load up your exported .map into LightWave (or any 3D application that can import a LWO), there's lots you can do with it:


LightWave rendering of the Orc Tower at dusk

And there's certainly lots of ways this could be extended: export brush faces as n-gons; have all brush faces share vertices and move over to discontinuous uv mapping; export a LightWave scene file (LWS) to also include all .map entities as lights/nulls; etc. However none of this is in the 'official' Constructor 1.0 feature list so who knows if it will go any further. I'm sure once Josh reads this blog I'll have an email waiting telling me to get back to work on the real stuff! :o)

Well, that's everything for now. I'm going to put together another blog over the next week talking about the things I've been working on for Constructor from IGC to the end of the year. So be on the look out! :o)

- LightWave Dave

PS: For those that have read this far, here's a .zip containing the exported Orc Tower in LWO format. It doesn't include any textures so you'll need to point to the ones in the Torque 'data/interiors' directory.

Recent Blog Posts
List:01/24/08 - Amazon EC2 Torque Test Follow Up
01/16/08 - Torque on Amazon's EC2. Need your help!
10/11/07 - Jeff Tunnel's Band LIVE
10/10/07 - Live Video Stream from IGC2007
10/02/07 - Come ride the rapids
04/06/07 - What's my blog doing under the GarageGames tab?
07/05/06 - LightWave DTS Exporter v06-07-04 Released
04/21/06 - Babies wait for no man

Submit ResourceSubmit your own resources!

James   (Jan 04, 2006 at 22:17 GMT)
...wow...sweet...

Logan Foster   (Jan 04, 2006 at 22:52 GMT)
It's always fun to blow apart some of the MAP files and look at them in a more traditional 3D editor to get an understanding of what is going on and how it all works so that one can take their knowledge from a 3D application and apply it into a Brush application. When this happens I find that people always take a step back and say "Whoa! That's all there is to a BSP in Torque? Why did I think it was so complicated?".

Todd Pickens   (Jan 04, 2006 at 23:20 GMT)
Fantastic! I REALLY hope it ships with this functionality.

Ramen-sama   (Jan 04, 2006 at 23:33 GMT)
Go lightwave! Hail Lightwave!!!! I'd love to be able to import LWO into constructor too... any chance? Or maybe another LW pluging to export .map. Great job.

Joseph Euan   (Jan 05, 2006 at 02:00 GMT)
wow... Constructor is going to rock!

Keep up the good work ;)

Adam deGrandis   (Jan 05, 2006 at 02:16 GMT)
Very cool, David. :)

David Montgomery-Blake   (Jan 05, 2006 at 05:32 GMT)
@Ramen Sama
The conversion from LW -> MAP is a bit more difficult not in terms of the file format but in traditional modeling techniques in polysoup applications which horribly break brushwork.

@Dave
This is a great feature. I love Matt's map23ds because it lets me compare, create, and simulate within LW or Modo for my details. This is the kind of thing that kicks my workflow into full-scheme!

Eric Forhan   (Jan 05, 2006 at 05:52 GMT)
Nice, Dave! =)

Hans   (Jan 05, 2006 at 08:14 GMT)
Any chance of a Maya,3ds importer and exporter for the constructor ?

thks

PS looking foward to the rel of this great product :)

Scott Hsu-Storaker   (Jan 05, 2006 at 08:19 GMT)
Here it is imported into Blender, sans textures:

www.bowzizzer.com/lpc_blog/images/orc_tower_map_lwo.png

I can't wait to my hands on the first really useful mapping tool for OSX.

Scott
Edited on Jan 05, 2006 08:19 GMT

Toby W. Allen   (Jan 05, 2006 at 12:40 GMT)
This looks very cool, but surely a lightwave exporter will be less used than say an exporter for max or maya, whom are the primary development suites used for modeling in Torque.

Toby.

Michael Cozzolino   (Jan 05, 2006 at 14:15 GMT)
Toby it can be imported into blender then exported. Milkshape said it had too many vertices. I'm going to give anim8tor a try. All should be able to export to a format that max can read.

Charles B   (Jan 05, 2006 at 16:06 GMT)
@Ramen Sama

did you try the lw2map?

http://www.garagegames.com/mg/forums/result.thread.php?qt=17658

Andrew Hull   (Jan 05, 2006 at 23:59 GMT)
This still doesn't answer the most important question: when will it be done?!

Haha... i know i know, it's done when it's done. Take your time, i'm in no rush.

Treb Connell (formerlyMasterTreb   (Jan 06, 2006 at 00:55 GMT)
mmm I want constructor.

Joe Bird   (Jan 06, 2006 at 05:08 GMT)
Why not export to .obj, which is supported by many apps?

M. Stolley   (Jan 06, 2006 at 13:02 GMT)
I love to see this in Contructor when i bought it.


Did i say whe when ?
:)

Ray Noolness Gebhardt   (Jan 09, 2006 at 16:01 GMT)
His name is Lightwave Dave, right? ;)

Anguel   (Jan 15, 2006 at 06:03 GMT)
Obj support would be very nice, then there wouldn't be a need for any workarounds for anybody and no one could whine about how it only supports LWO's and they need to go through a bunch of hassles.

BTW..... when will it be out and how much will it cost?
;P had to ask

Josh Williams   (Feb 04, 2006 at 17:51 GMT)
Get back to work on the real stuff!!

J/K (kinda ;). This is cool stuff, actually, and totally understandable when you're feeling burnt / need a break on regular work to go try some experimental things. Btw, sorry to use the public comments to handle internal communications, but did you get my email from Thursday? I'm going to go resend right now just in case, but please let me know (via email) if you don't receive this one either. Thanks!
Edited on Feb 04, 2006 17:51 GMT

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