Game Development Community

Problem with rain and snow

by Christian Weber · in Torque Game Engine · 02/07/2003 (9:00 am) · 36 replies

Hi,

well, the rain works, but all I can see are little grey blocks falling from the sky.

Any suggestions?

Thx,
Chris
Page«First 1 2 Next»
#21
08/20/2005 (6:34 am)
Ok, I've had a look at the sound as well, it wasn't working but here's one that does (TGE 1.3):


datablock AudioProfile(RainLoop1)
{
filename = "~/data/sound/environment/ambient/rain_light_1.wav";
description = AudioLooping2D; // Now if you check your audioProfiles.cs (in server/scripts) thats where the descriptions defined.
// I found that in Desmond Fletcher's tutorial AudioLooping2D was misspelled
// (AudioLooping2d, notice the lower case d.)
};


You could also add enviroment (take a AudioEnvironment object) and preload (boolean) attributes.
I haven't played around with the AudioEnvironment yet, but you can check it out (and the other audio related stuff
in the engine/audio/audioDataBlock.cc source file (look for the addField calls).

In the same way you can review the engine/game/fx/precipitation.cc for how PrecipitationData datablock works.

Well for those guys using doxygen to role their own documentation this isn't an issue but if you (as I did) read the online documentation it is not updated (august 2005) to reflect changes in these datablocks interfaces.
#22
08/20/2005 (6:56 am)
Thanks for the update Johan.

Anyone happen to have a rain png I could play with?
#23
11/18/2005 (6:44 am)
@Shawn - Have emailed you a rain.png, water_splash.png and rain.dml.

It works for me using Johan's updates above.
#24
12/01/2005 (7:47 pm)
I have white blocks and nothing is working
#25
12/01/2005 (8:32 pm)
Check your console for errors.
#26
12/01/2005 (9:51 pm)
I did...not a single one
#27
12/01/2005 (10:32 pm)
What program are you using to export .png?
#28
12/02/2005 (1:49 am)
I had this problem and it turned out to be the .png files I was using. I replaced them with the rain .png's from the Torque Demo and it was OK. It must be something to do with the format of the png's.
#29
12/02/2005 (6:10 am)
The *.png format is pretty simple really:

24bit with transparency

If you're in Photoshop make sure you turn off the background or delete it altogether so you have a transparent background. Not sure about other software but I'm thinking they must work in a similiar way.

When I first started using them (many moons ago) I had similiar problems but because I forgot to get rid of the background layer in Photoshop.

Hope this helps
#30
12/02/2005 (10:27 am)
So having it at 16 bit could be the problem?
#31
12/05/2005 (1:30 am)
I would guess so. Have you tried it at 24bit?
#32
12/05/2005 (2:04 am)
Hi,

try "export for web or save for web" with pngs , solved all my aplha issues.

Good luck!

Berndt
#33
12/05/2005 (12:13 pm)
I dont understand what i did but i got it to work...i use a mist dml but rain dml doesn't work....so i pointed straight to the png and it came out ok
#34
12/21/2006 (2:08 am)
Hi all, would anyone know here what to change to make the rain fall vertically down insted of from an angle? I have looked inside the Precipitation.cc and can't see where it gets the angle from
#35
12/21/2006 (5:44 am)
Wow, thread necro going on here. You can change that in the .mis file containing the effects.

Find the Sky object and look for this:

windVelocity = "1 1 0";
windEffectPrecipitation = "1";

Setting windEffectPrecipitation = "0" should help out. Changing the windVelocity vector will cause the rain to come down at different angles.
#36
12/21/2006 (2:24 pm)
Thanks worked perfectly ^^
Page«First 1 2 Next»