Deconstructing Constructor - Part 3
by David Wyand · 01/04/2006 (2:10 pm) · 20 comments
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.
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 duskAnd 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.
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!
#2
01/04/2006 (2:52 pm)
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?".
#3
01/04/2006 (3:20 pm)
Fantastic! I REALLY hope it ships with this functionality.
#4
01/04/2006 (3:33 pm)
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.
#6
01/04/2006 (6:16 pm)
Very cool, David. :)
#7
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!
01/04/2006 (9:32 pm)
@Ramen SamaThe 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!
#8
01/04/2006 (9:52 pm)
Nice, Dave! =)
#9
thks
PS looking foward to the rel of this great product :)
01/05/2006 (12:14 am)
Any chance of a Maya,3ds importer and exporter for the constructor ?thks
PS looking foward to the rel of this great product :)
#10
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
01/05/2006 (12:19 am)
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
#11
Toby.
01/05/2006 (4:40 am)
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.
#12
01/05/2006 (6:15 am)
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.
#13
did you try the lw2map?
http://www.garagegames.com/mg/forums/result.thread.php?qt=17658
01/05/2006 (8:06 am)
@Ramen Samadid you try the lw2map?
http://www.garagegames.com/mg/forums/result.thread.php?qt=17658
#14
Haha... i know i know, it's done when it's done. Take your time, i'm in no rush.
01/05/2006 (3:59 pm)
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.
#15
01/05/2006 (4:55 pm)
mmm I want constructor.
#16
01/05/2006 (9:08 pm)
Why not export to .obj, which is supported by many apps?
#18
01/09/2006 (8:01 am)
His name is Lightwave Dave, right? ;)
#19
BTW..... when will it be out and how much will it cost?
;P had to ask
01/14/2006 (10:03 pm)
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
#20
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!
02/04/2006 (9:51 am)
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!

Torque 3D Owner James