Flexible rain/snow texture in Torque
by Frank Bignone · 01/21/2003 (12:31 pm) · 11 comments
Download Code File
This little change allow to dynamically set the texture subdivision in the precipitation code. It allows more flexible texture with texture subdivided in 4, 8, ... parts.
So a classical precipitation texture file looks like that
It has 16 subdivisions and in each there is a raindrop.
However, it is impossible to have more detailed raindrop /snowflakes which was very important in DoP. The proposed code add one variable in the Precipitation datablock named numTextures which let you define the subdivision of your texture as shown in the following code :
You can then make much detailed texture like

You just need to download the provided file and replace your files with the one in the archive + recompile torque.
This little change allow to dynamically set the texture subdivision in the precipitation code. It allows more flexible texture with texture subdivided in 4, 8, ... parts.
So a classical precipitation texture file looks like that
It has 16 subdivisions and in each there is a raindrop.However, it is impossible to have more detailed raindrop /snowflakes which was very important in DoP. The proposed code add one variable in the Precipitation datablock named numTextures which let you define the subdivision of your texture as shown in the following code :
datablock PrecipitationData(FunnyRain)
{
type = 0;
...
numTextures = 4;
};You can then make much detailed texture like

You just need to download the provided file and replace your files with the one in the archive + recompile torque.
About the author
Real programmers don't waste time recompiling; they patch the binary files... ... Real programmers don't waste time patching binary files; they patch memory.
#2
01/25/2003 (10:28 am)
Good Deal Frank!
#3
Would like to try DOP's precipitations, they seem amazing!
01/26/2003 (2:32 pm)
I have never been able to make my precipitation datablock scripts work. Any help or example code for a precipitation datablock and where to locate it in the example app?Would like to try DOP's precipitations, they seem amazing!
#4
holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/effects/
01/26/2003 (9:17 pm)
Alvaro, have a look here :holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/effects/
#6
help please.
02/08/2003 (5:13 am)
i made this mod to the engine, but i don't see any changes . the rain is horrible. It cut the texture in more than the 4 pieces i wrote in the property , making the rain very horribile.help please.
#7
Thanks!
MJ....
04/14/2003 (7:36 pm)
Has anyone had any problems with rendering raindrops? I have applied this update and it works great on my Nvidia GForce4 TI4600 but when I try and run it on an Nvidia GForce 2 or GForce4 440 all I get is white billboard squares no matter what png file I use. It acts like it can't find the png file. I have looked at the code and everything looks ok. I even displayed the png file in the GUI to make sure the alpha channel was ok. The png file looked good on all machines. I have been working on this since yesterday and can't find out why it is doing this. Any help would deeply appriciated.Thanks!
MJ....
#8
04/20/2003 (7:14 pm)
Jackie, I am getting the same. I use a ATI Card..... I cant figure out how to fix this either.
#10
mmh im new in those forrums and this seems tobe very usefull! thx! ;) (i like ure second rain its loly! ;-)
07/01/2003 (11:30 am)
Hello!mmh im new in those forrums and this seems tobe very usefull! thx! ;) (i like ure second rain its loly! ;-)
#11
11/23/2005 (6:40 am)
@Jackie @Geoff - I have the same problem, but check if Snow is working. My snow is workng, but my Rain is not. 
Torque Owner Gilles Jr Lafrance