Animated DTS shapes in maps
by Christopher Bonner · in Artist Corner · 08/09/2007 (9:50 am) · 4 replies
Hey guys,
I am making a planets map for an indie game called "Blockland". Its just for fun but I am trying to do decent job with it.
Anyway, I am having some difficulties in getting a few things working. First is that I want to have cloudmap of earth, wrapped around a sphere. I can and have done this in milkshape but the problem is that even though the texture I am using for the clouds is transparent and appears transparent in Milkshape, ingame the transparent areas turn a light blue. Any idea how to get the transparent areas to actually be transparent ingame?
My second question is, Is there a way to get the above cloud sphere to rotate automatically around its axis without any scripting? Just using animation.
Thanks in advance for all the help,
Christopher
I am making a planets map for an indie game called "Blockland". Its just for fun but I am trying to do decent job with it.
Anyway, I am having some difficulties in getting a few things working. First is that I want to have cloudmap of earth, wrapped around a sphere. I can and have done this in milkshape but the problem is that even though the texture I am using for the clouds is transparent and appears transparent in Milkshape, ingame the transparent areas turn a light blue. Any idea how to get the transparent areas to actually be transparent ingame?
My second question is, Is there a way to get the above cloud sphere to rotate automatically around its axis without any scripting? Just using animation.
Thanks in advance for all the help,
Christopher
About the author
#2
I looked at the "documentation" you sent but am unable to decipher what I am supposed to do. It seemed to discuss the topic rather than explain where the code should go.
Do i make a DSQ and add the "%myobj.playThread(0,"hammer");" line to the mission file? if so, which parts do I change?
The animated texture is a little bit too high a level for me.
08/13/2007 (5:35 pm)
It is a spherical planet and not the skybox as you assumed correctly.I looked at the "documentation" you sent but am unable to decipher what I am supposed to do. It seemed to discuss the topic rather than explain where the code should go.
Do i make a DSQ and add the "%myobj.playThread(0,"hammer");" line to the mission file? if so, which parts do I change?
The animated texture is a little bit too high a level for me.
#3
http://tdn.garagegames.com/wiki/DTS/LightWave/Creating_IFL's_%28Image_File_Lists%29_using_Lightwave
and skip to the bit "Making it all GO!"
Summary:
1. You need to make a new .cs file that contains the datablock and functions that tells the Mission Editor what to do when the shape gets loaded, i.e. copy the tutorial code into a new file "planet.cs" and change the animation from "shine" to whatever your animation is called, and change the "shapeFile=" to your planet.dts;
2. You need to add exec("./planet.cs") to game.cs ;
3. Start a demo mission and add the shape to your mission Shape>Misc>Planet;
When you place the object it will automatically animate. This is the method I've used to animate my scene objects. As I'm starting out with Torque myself, I can't tell you whether this is the most efficient method.
08/14/2007 (10:39 pm)
Take a look at the tutorial herehttp://tdn.garagegames.com/wiki/DTS/LightWave/Creating_IFL's_%28Image_File_Lists%29_using_Lightwave
and skip to the bit "Making it all GO!"
Summary:
1. You need to make a new .cs file that contains the datablock and functions that tells the Mission Editor what to do when the shape gets loaded, i.e. copy the tutorial code into a new file "planet.cs" and change the animation from "shine" to whatever your animation is called, and change the "shapeFile=" to your planet.dts;
2. You need to add exec("./planet.cs") to game.cs ;
3. Start a demo mission and add the shape to your mission Shape>Misc>Planet;
When you place the object it will automatically animate. This is the method I've used to animate my scene objects. As I'm starting out with Torque myself, I can't tell you whether this is the most efficient method.
#4
08/14/2007 (10:46 pm)
One more thought: the starter.fps example "stronghold" uses the datablock ItemData to create rotating health pots. That might be worth exploring. By the way - you can find similar posts using the Advanced Search
Torque Owner Proto
There's a few ways to get a texture moving. I'm assuming that you're looking down at a planet sphere rather than looking at a sky (i.e. Torque sky won't suffice)? All of the methods I'm aware of require a few lines of simple script to play in TGE.
* Use an animated texture. Pros: less restrictive cloud motion and doesn't require moving geometry.
Tutorial: http://tdn.garagegames.com/wiki/DTS/LightWave/Creating_IFL's_(Image_File_Lists)_using_Lightwave or search for "IFL";
* Create a simple ambient animation for a static shape. Documentation or search for "ambient animations";
Re: transparency
I don't know anything about Milkshape, have you successfully exported a transparent texture before? If you have an example file that you know works (maybe from one of the starter packs or from the exporter docs), take a look at how they have their transparent textures set up and copy that or take a look in the Milkshape forum. For Lightwave I use a 1% transparent material with a 24 bit png applied to the colour channel (the transparency is then set by the png alpha).