Lightwave to DTS Exporter: In the beginning...
by David Wyand · in Torque Game Engine · 02/16/2002 (10:15 am) · 25 replies
Greetings!
Well, I've had the Torque Engine for a couple of weeks now, and I figured it was time that I started to create some objects of my own. The thing is, I use Lightwave for modeling and animation, not those other whacked out programs. *ducks for cover*
As there isn't a Lightwave DTS exporter available, I thought I'd go ahead and write one! :o)
Announcing: The first stage of a Lightwave DTS Exporter!
Smaple image of LW model in FPS
Based on the Milkshape code included in the SDK, I've created a Master Handler plug-in for Layout. Currently, it will export all objects in the scene, minus any texturing, to a single DTS file. I've got plans for the following stages:
1. Implement all features that are available to Milkshape
2. Attempt to port to the Mac
3. Begin to add features to make full use of Lightwave and approach what is available in the MAX exporter
I'll keep plugging away on Stage 1, and hope to have it complete for the end of the month (depending on my free time, etc.).
For Stage 2, I'll need some help from you Mac users out there. To perform the testing, I'll need someone that knows their Mac compiler well enough to help me translate my Visual C++ setup to what is appropriate for you. I'll also need someone that is running Lightwave 7.0b on their Mac to test against.
For Stage 3...well, we'll see how the first two stages go :o)
Well, whadda y'all think?
-Dave from the frigid north
Well, I've had the Torque Engine for a couple of weeks now, and I figured it was time that I started to create some objects of my own. The thing is, I use Lightwave for modeling and animation, not those other whacked out programs. *ducks for cover*
As there isn't a Lightwave DTS exporter available, I thought I'd go ahead and write one! :o)
Announcing: The first stage of a Lightwave DTS Exporter!
Smaple image of LW model in FPS
Based on the Milkshape code included in the SDK, I've created a Master Handler plug-in for Layout. Currently, it will export all objects in the scene, minus any texturing, to a single DTS file. I've got plans for the following stages:
1. Implement all features that are available to Milkshape
2. Attempt to port to the Mac
3. Begin to add features to make full use of Lightwave and approach what is available in the MAX exporter
I'll keep plugging away on Stage 1, and hope to have it complete for the end of the month (depending on my free time, etc.).
For Stage 2, I'll need some help from you Mac users out there. To perform the testing, I'll need someone that knows their Mac compiler well enough to help me translate my Visual C++ setup to what is appropriate for you. I'll also need someone that is running Lightwave 7.0b on their Mac to test against.
For Stage 3...well, we'll see how the first two stages go :o)
Well, whadda y'all think?
-Dave from the frigid north
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
I am so happy to see somebody taking up the modeling on the Mac problem. Getting Lightwave to work as a modeling tool on the Mac side would be a huge win.
If we can help in any way, let me know jefft@garagegames.com.
Jeff Tunnell GG
02/18/2002 (9:13 am)
David,I am so happy to see somebody taking up the modeling on the Mac problem. Getting Lightwave to work as a modeling tool on the Mac side would be a huge win.
If we can help in any way, let me know jefft@garagegames.com.
Jeff Tunnell GG
#3
I've continued my development on the Lightwave DTS exporter and have some good news: it now exports textures!
Cube with images in FPS
The exporter supports both UV mapped textures, as well as projection (planar, cylindrical, spherical, etc.) mapped textures (with a couple of limitations with projection mapped textures). The cube above uses planar projection to place a different image on each face.
With that out of the way, it's on to the collision meshes, which should be a breeze. Gotta love that Milkshape DTS exporter code. Thanks again guys!
I'm leaving animation for last as it will require the most amount of GUI support, as well as taking bones into account. It wouldn't appear to be all that difficult, just time consuming. :o)
I'm still waiting to hear from you Mac users out there. Don't be shy. Who's using Lightwave 7.0b? Anyone? Bueller?
And Jeff, thanks for the offer. I may need to call on you guys for some Mac compiler support if no one else comes forward.
- Lightwave Dave
02/19/2002 (9:09 am)
Greetings ladies and germs!I've continued my development on the Lightwave DTS exporter and have some good news: it now exports textures!
Cube with images in FPS
The exporter supports both UV mapped textures, as well as projection (planar, cylindrical, spherical, etc.) mapped textures (with a couple of limitations with projection mapped textures). The cube above uses planar projection to place a different image on each face.
With that out of the way, it's on to the collision meshes, which should be a breeze. Gotta love that Milkshape DTS exporter code. Thanks again guys!
I'm leaving animation for last as it will require the most amount of GUI support, as well as taking bones into account. It wouldn't appear to be all that difficult, just time consuming. :o)
I'm still waiting to hear from you Mac users out there. Don't be shy. Who's using Lightwave 7.0b? Anyone? Bueller?
And Jeff, thanks for the offer. I may need to call on you guys for some Mac compiler support if no one else comes forward.
- Lightwave Dave
#4
You rock, by the way. :)
02/19/2002 (9:24 am)
You might have just tipped me over the edge to buying Lightwave. I've been holding off on that huge investment, trying to figure out if I should just break down and do it all on a PC. If I do, I'll help with porting the exporter.You rock, by the way. :)
#5
-d
02/20/2002 (6:02 pm)
Is there a lightwave demo that the exporter will work with on the Mac? if so, I can help out with the Mac side of stuff. I can also help make a CW Mac/Win project for the exporter for both platforms.-d
#6
02/21/2002 (5:33 am)
David, I have Lightwave 7 / Macintosh, and could try to do some testing for this wonderful project of yours ;-). The only restriction is, I've just moved and haven't yet reinstalled everything... e.g. the LW hardware key which is still stored somewhere in a box (oh these things are really a pain in the kat).
#7
David:
Thanks for offering to help out on this project. I'll certainly need someone to convert from my Visual C++ project to CW for the Mac.
There is a LightWave 7 demo CD that can be obtained by two ways:
1. Buy the book 'Inside LightWave 7' :o)
2. Order from NewTek's Demo CD Site
I don't know what limitations they've placed on the plug-in side of things. I think I'll go ahead and order the CD myself just to check that out.
Kid:
I'm sure we can use all the help we can get when it comes to testing. Thanks for the offer.
- LightWave Dave
02/21/2002 (2:56 pm)
Greetings!David:
Thanks for offering to help out on this project. I'll certainly need someone to convert from my Visual C++ project to CW for the Mac.
There is a LightWave 7 demo CD that can be obtained by two ways:
1. Buy the book 'Inside LightWave 7' :o)
2. Order from NewTek's Demo CD Site
I don't know what limitations they've placed on the plug-in side of things. I think I'll go ahead and order the CD myself just to check that out.
Kid:
I'm sure we can use all the help we can get when it comes to testing. Thanks for the offer.
- LightWave Dave
#8
Development on the LightWave DTS exporter is moving right along. I've now completed the code that handles the collision meshes. Just as in MilkShape, a bounding box, a bounding cylinder, or a mesh are used to define the collision boundries. Here's some pics:
Guy standing at the top of a platform
Guy standing at the top of a platform, side view
In these pictures, I've managed to run up the ramp onto the platform. The collision mesh that was used conformed to the ramp and platform, but the two pillars were left out. And, indeed, I was then able to walk through the pillars! :o)
This took quite a bit longer than I had planned. The reason was that I decided to work on the interface to allow me to really test this plug-in out. You may see it in operation here:
LightWave DTS Exporter Plug-in Interface
It has been built using the standard LW controls so that it may be ported to the Mac. The top portion allows you to fiddle with each of the meshes, while the bottom is for overall shape control.
Next Steps...
The next section that I'll be working on is animation (yay!). This is the most difficult part as it will require a lot more changes to the GUI, and I'll have to take bones and vertex weights into account. For the moment, I'm working towards duplicating MilkShape functionality rather than taking full advantage of what LW has to offer. That'll happen later... :o)
Future
Well, after I've duplicated what MilkShape can do, it'll be time to expand.
First will be to allow for multiple collision meshes. From what I can gather, the DTS format allows for this, and from our point of view it'll just be another mesh loaded into LW. Hopefully won't be too difficult to add.
LW supports multiple bone weights per vertex, and it looks like the DTS format does as well. This'll allow for much smoother-looking joint animations. I'm sure this will be a popular feature to add!
And, as always, I'll want to see about adding what the Max exporter supports. I'll have to really read those docs to determine what can and cannot be done.
- LightWave Dave
02/21/2002 (4:37 pm)
Greeting All!Development on the LightWave DTS exporter is moving right along. I've now completed the code that handles the collision meshes. Just as in MilkShape, a bounding box, a bounding cylinder, or a mesh are used to define the collision boundries. Here's some pics:
Guy standing at the top of a platform
Guy standing at the top of a platform, side view
In these pictures, I've managed to run up the ramp onto the platform. The collision mesh that was used conformed to the ramp and platform, but the two pillars were left out. And, indeed, I was then able to walk through the pillars! :o)
This took quite a bit longer than I had planned. The reason was that I decided to work on the interface to allow me to really test this plug-in out. You may see it in operation here:
LightWave DTS Exporter Plug-in Interface
It has been built using the standard LW controls so that it may be ported to the Mac. The top portion allows you to fiddle with each of the meshes, while the bottom is for overall shape control.
Next Steps...
The next section that I'll be working on is animation (yay!). This is the most difficult part as it will require a lot more changes to the GUI, and I'll have to take bones and vertex weights into account. For the moment, I'm working towards duplicating MilkShape functionality rather than taking full advantage of what LW has to offer. That'll happen later... :o)
Future
Well, after I've duplicated what MilkShape can do, it'll be time to expand.
First will be to allow for multiple collision meshes. From what I can gather, the DTS format allows for this, and from our point of view it'll just be another mesh loaded into LW. Hopefully won't be too difficult to add.
LW supports multiple bone weights per vertex, and it looks like the DTS format does as well. This'll allow for much smoother-looking joint animations. I'm sure this will be a popular feature to add!
And, as always, I'll want to see about adding what the Max exporter supports. I'll have to really read those docs to determine what can and cannot be done.
- LightWave Dave
#9
02/22/2002 (10:33 am)
I'm happy to see someone is doing this... I can't wait to see/use the finished product. I'm new to the torque engine and was very disappointed that there was no LW exporter.
#10
03/05/2002 (11:28 am)
Any more progress on this?
#11
www.kelpheavyweaponry.com/torque/dts_lightwave.jpg
Mr Wyand can say more about his overall plans for it.
03/05/2002 (11:46 am)
It's at the "untangling endian issues with the Macintosh port" stage right now. Here's a screenshot of it in action on OS X:www.kelpheavyweaponry.com/torque/dts_lightwave.jpg
Mr Wyand can say more about his overall plans for it.
#12
03/05/2002 (12:04 pm)
How about us PC Lightwave users?? Is it just an issue with OSX?
#13
www.kelpheavyweaponry.com/torque/macdts_exporter_2.jpg
The PC version is fine; I think David has his sights on animations next.
03/05/2002 (2:03 pm)
Well, actually, OS X is looking good now:www.kelpheavyweaponry.com/torque/macdts_exporter_2.jpg
The PC version is fine; I think David has his sights on animations next.
#14
Well, CJ beat me to it. Between the two of us, we've now managed to get the LightWave DTS exporter to work on the Mac (specifically OS X). One good thing that has come out of this is we found a bug with the original MilkShape exporter code that prevented Encoded Normals from ever exporting properly. Silly Visual C++...
So, to sum up: PC and Mac OS X versions are now in sync and working for static objects.
What's Next
The number one issue at the moment is that textures are being flipped on the 'v' (as in uv) axis. I'm now looking into why this is occurring. An easy fix, but I want to make sure I'm fixing it for the right reasons.
After that, I want to implement the animation side of things. To begin with, it will mirror the MilkShape exporter functionality. This means only bone-based animation and one bone per vertex will be supported.
Once I've implemented all the same features as in the MilkShape exporter and CJ tests everything for the Mac, I'll put together some documentation, and release the plug-ins.
Then it's onto the Future items mentioned above in my Feb 22 post. But now I'm getting ahead of myself... :o)
- LightWave Dave
03/05/2002 (8:58 pm)
Greetings!Well, CJ beat me to it. Between the two of us, we've now managed to get the LightWave DTS exporter to work on the Mac (specifically OS X). One good thing that has come out of this is we found a bug with the original MilkShape exporter code that prevented Encoded Normals from ever exporting properly. Silly Visual C++...
So, to sum up: PC and Mac OS X versions are now in sync and working for static objects.
What's Next
The number one issue at the moment is that textures are being flipped on the 'v' (as in uv) axis. I'm now looking into why this is occurring. An easy fix, but I want to make sure I'm fixing it for the right reasons.
After that, I want to implement the animation side of things. To begin with, it will mirror the MilkShape exporter functionality. This means only bone-based animation and one bone per vertex will be supported.
Once I've implemented all the same features as in the MilkShape exporter and CJ tests everything for the Mac, I'll put together some documentation, and release the plug-ins.
Then it's onto the Future items mentioned above in my Feb 22 post. But now I'm getting ahead of myself... :o)
- LightWave Dave
#15
Dave, you are giving wonderful news ;-).
I'd like to ask if your Lightwave plugin which works on MacOSX can be used on (or easily adapted to) OS9. I am not too sure my LW hardware dongle, which is ASB (not USB) can be used on OSX.
Thanks,
--Daniel
03/06/2002 (2:28 pm)
Hi all,Dave, you are giving wonderful news ;-).
I'd like to ask if your Lightwave plugin which works on MacOSX can be used on (or easily adapted to) OS9. I am not too sure my LW hardware dongle, which is ASB (not USB) can be used on OSX.
Thanks,
--Daniel
#16
03/06/2002 (2:30 pm)
I'll be doing some work this week to make the plugin load under the OS 9 version of Lightwave. I suspect it's a simple library change from what works under OS X.
#17
We should definitely check in off-line. I'm tracking tools & utils on the Mac side, and want to stay on top of how the LW stuff progresses.
It's obviously very critical to the Mac teams. ;)
Also, none of the cmdline apps have projects for building them on X for cmdline, or as SIOUX apps for 9/X minimal-gui apps. If the converter is coming along, I'll start pushing for some help getting the tools up and running.
-d
03/06/2002 (7:14 pm)
Hey guys -We should definitely check in off-line. I'm tracking tools & utils on the Mac side, and want to stay on top of how the LW stuff progresses.
It's obviously very critical to the Mac teams. ;)
Also, none of the cmdline apps have projects for building them on X for cmdline, or as SIOUX apps for 9/X minimal-gui apps. If the converter is coming along, I'll start pushing for some help getting the tools up and running.
-d
#18
I've modified the texture code in the exporter to orient the textures the right-way-up (or right-way-down if you're standing on your head). Have a gander here:
Ever so exciting plane and cube exported from LightWave
You'll notice on the plane on the left that I've got the LW logo texture repeated and rotated. All done with a z-projection texture within LW. Neato!
I'm glad that it's now working, but I still don't feel right about it. From everything that I have seen so far, it should have worked as it was. I've even checked out a large portion of the Torque Engine itself to find out what's going on behind the scenes, but am still stumped. However, it works in the cases I've tested, and it's time to move on. Once the plug-in is released, I'm sure I'll hear if there's a case where my fix doesn't work. :o)
So, now onto some house cleaning of the code, a little check that everything's still great at the Mac end, and on we go to animation!
CJ: Great to hear you're working on the OS9 implementation.
David: I've sent you and CJ an email to make sure we all keep in touch.
- LightWave Dave
03/07/2002 (12:39 pm)
Greetings Wavers and Waver-wanna-be's!I've modified the texture code in the exporter to orient the textures the right-way-up (or right-way-down if you're standing on your head). Have a gander here:
Ever so exciting plane and cube exported from LightWave
You'll notice on the plane on the left that I've got the LW logo texture repeated and rotated. All done with a z-projection texture within LW. Neato!
I'm glad that it's now working, but I still don't feel right about it. From everything that I have seen so far, it should have worked as it was. I've even checked out a large portion of the Torque Engine itself to find out what's going on behind the scenes, but am still stumped. However, it works in the cases I've tested, and it's time to move on. Once the plug-in is released, I'm sure I'll hear if there's a case where my fix doesn't work. :o)
So, now onto some house cleaning of the code, a little check that everything's still great at the Mac end, and on we go to animation!
CJ: Great to hear you're working on the OS9 implementation.
David: I've sent you and CJ an email to make sure we all keep in touch.
- LightWave Dave
#19
Anyone got a link? I have a guy who has LW and wants to try it :)
03/08/2002 (4:52 pm)
Is this exporter out and about anywhere?Anyone got a link? I have a guy who has LW and wants to try it :)
#20
03/08/2002 (5:08 pm)
I don't think they have finished it yet.
Torque Owner Shawn