Precipitation Effects
by Andy Smith · in Torque Game Engine · 11/07/2001 (5:52 am) · 35 replies
Hi,
I have been playing around with the precipitation system and have some nice snowflakes falling. The only problem is that they are a lovely white square snowflakes :-). I can't seem to get a snowflake texture mapped on them.
Does anyone have any working code or perhaps a suggestion?
Andy
I have been playing around with the precipitation system and have some nice snowflakes falling. The only problem is that they are a lovely white square snowflakes :-). I can't seem to get a snowflake texture mapped on them.
Does anyone have any working code or perhaps a suggestion?
Andy
About the author
#22
I suspect it's a problem with the path in my dml file but I don't know =/
12/21/2001 (12:03 pm)
same problem as the above postI suspect it's a problem with the path in my dml file but I don't know =/
#23
holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/effects/
12/21/2001 (4:28 pm)
Maybe this tutorial will help:holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/effects/
#24
Has ANYONE gotten the precipitation textures to work right?
I don't think lightning textures work either.
Dark
12/26/2001 (5:47 am)
I'm having the same problem, I think the dml files are broken.Has ANYONE gotten the precipitation textures to work right?
I don't think lightning textures work either.
Dark
#25
12/26/2001 (11:50 am)
Chris, read the link above--lightning works fine
#26
12/26/2001 (12:51 pm)
I went there, that's how I got it to work. The lightning doesn't use the textures. Try deleting the reference to the textures, the lightning won't change at all.
#27
12/26/2001 (1:45 pm)
Good catch! It looks like Lightning::processEvent(lightning.cc) is going ahead and creating the lightning bolts and ignoring the textures.
#28
:)
12/26/2001 (2:46 pm)
neither effect, lightning or precipitation is reading the textures... GG here please:)
#29
-Snowman
12/26/2001 (3:59 pm)
Precip. is reading textures. Make sure you have the latest HEAD version, there were a few lines that needed changing in the code. Also make sure that your datablocks are all correct. My snowflakes come up with the proper textures.-Snowman
#30
12/27/2001 (9:44 am)
Which lines? Maybe that's the prob with lightning too??
#31
12/27/2001 (2:18 pm)
yeah, which lines? cause the lines that i found in another forum that had to be changed arent in the HEAD revision...
#32
// Clocks out
12/27/2001 (3:21 pm)
Like the attempt made earlier to get rain and snow in the game, this try still show the rain/showw inside buildings.// Clocks out
#33
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1940
and I modified the code, rebuilt the EXE and still no textures. Also, how do I modify the lightning.cc code to use textures?
01/11/2002 (11:58 am)
I'm also having the same problems with both the Snow and Lightning textures. The snow is just a gray square and the lightning is not using my textures. I did go thru this tutorial: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=1940
and I modified the code, rebuilt the EXE and still no textures. Also, how do I modify the lightning.cc code to use textures?
#34
Good Luck!
01/11/2002 (4:08 pm)
well, if you followed my tutorial you should get textured snowflakes, maybe the texture you are using doesnt have alpha or something, try using a tribes 2 texture. If it still doesnt work re do the whole tutorial, you mite have messed it somewhere...Good Luck!
#35
Clearly doesn't match the PrecipitationData datablock in the actual compiler.. so have I got some kind of mismatched code? Is there an update for the editor or precipitation class?
11/22/2005 (6:21 am)
Has Precipitation changed recently? When I went back to an older game I was working on, the textures no longer worked, and there's a pretty obvious reason why. The datablock created by the editor:datablock PrecipitationData(Rain)
{
type = 1;
materialList = "~/data/maps/raindrops.dml";
soundProfile = "Universal_Rain_Light_1";
sizeX = 0.10;
sizeY = 0.10;
movingBoxPer = 0.35;
divHeightVal = 1.5;
sizeBigBox = 1;
topBoxSpeed = 20;
frontBoxSpeed = 30;
topBoxDrawPer = 0.5;
bottomDrawHeight = 40;
skipIfPer = -0.3;
bottomSpeedPer = 1.0;
frontSpeedPer = 1.5;
frontRadiusPer = 0.5;
};Clearly doesn't match the PrecipitationData datablock in the actual compiler.. so have I got some kind of mismatched code? Is there an update for the editor or precipitation class?
class PrecipitationData : public GameBaseData {
typedef GameBaseData Parent;
public:
AudioProfile* soundProfile;
S32 soundProfileId; ///< Ambient sound
StringTableEntry mDropName; ///< Texture filename for raindrop
StringTableEntry mSplashName; ///< Texture filename for splash
F32 mDropSize; ///< Droplet billboard size
F32 mSplashSize; ///< Splash billboard size
bool mUseTrueBillboards; ///< True to use true billboards, false for axis-aligned billboards
S32 mSplashMS; ///< How long in milliseconds a splash will last
PrecipitationData();
DECLARE_CONOBJECT(PrecipitationData);
bool onAdd();
static void initPersistFields();
virtual void packData(BitStream* stream);
virtual void unpackData(BitStream* stream);
};
Torque 3D Owner Xavier "eXoDuS" Amado
Default Studio Name
i have data/shapes/precipitations/snowflakes.dml
its content is:
textures/snowflake.png
i have the file data/shapes/precipitations/textures/snowflake.png which i copied from tribes 2...
it still wont show the textures..