Precipitation
by Jermaine Morgan · in Torque Game Engine · 07/19/2007 (10:47 am) · 5 replies
This is the code I am using
datablock PrecipitationData(myRain)
{
dropTexture = "~/data/enviroment/myRainDrop.jpg";
//splashTexture = "~/data/enviroment/myRainSplash";
dropSize = 1;
splashSize = 0.1;
useTrueBillboards = false;
splashMS = 250;
};
new Precipitation(rain) {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
nameTag = "Rain";
dataBlock = "myRain";
minSpeed = "12";
maxSpeed = "19";
minMass = "0.05";
maxMass = "2";
maxTurbulence = "0.1";
turbulenceSpeed = "0.2";
rotateWithCamVel = "1";
useTurbulence = "1";
numDrops = "20";
boxWidth = "30";
boxHeight = "50";
doCollision = "1";
};
I made some very basic precippitation textures. Just basically a blue circle. I made with paint.
The size is 32x32.
But in game all i get is falling white squares.
I have searched and I see stuff about this problem and some say use transparent textures and idont know how to make transparent textures.
I also tried using the enviroment.cs from the demo, but I'm lost. Nothing will show with that.
Any help?
datablock PrecipitationData(myRain)
{
dropTexture = "~/data/enviroment/myRainDrop.jpg";
//splashTexture = "~/data/enviroment/myRainSplash";
dropSize = 1;
splashSize = 0.1;
useTrueBillboards = false;
splashMS = 250;
};
new Precipitation(rain) {
position = "0 0 0";
rotation = "1 0 0 0";
scale = "1 1 1";
nameTag = "Rain";
dataBlock = "myRain";
minSpeed = "12";
maxSpeed = "19";
minMass = "0.05";
maxMass = "2";
maxTurbulence = "0.1";
turbulenceSpeed = "0.2";
rotateWithCamVel = "1";
useTurbulence = "1";
numDrops = "20";
boxWidth = "30";
boxHeight = "50";
doCollision = "1";
};
I made some very basic precippitation textures. Just basically a blue circle. I made with paint.
The size is 32x32.
But in game all i get is falling white squares.
I have searched and I see stuff about this problem and some say use transparent textures and idont know how to make transparent textures.
I also tried using the enviroment.cs from the demo, but I'm lost. Nothing will show with that.
Any help?
About the author
#2
07/19/2007 (12:03 pm)
If I remember correctly the image should be 128 x 128, in the paint app set grid to 4x4. That will give you 16 square. Paint a rain drop in each one. Save png with transparency. I not sure why enviroment.cs is not work but it is working for me. Did you move the texture folder?
#3
i tried using gimp,
for some reason the paths were pointing to
server/data/shapes/enviroment/...
so i had to fix that.
I had to finally found out how to make it transparent using gimp. so instead of white blocks i have very ugly rain but hey it works.
thanks
07/19/2007 (12:04 pm)
Yeah thanks.i tried using gimp,
for some reason the paths were pointing to
server/data/shapes/enviroment/...
so i had to fix that.
I had to finally found out how to make it transparent using gimp. so instead of white blocks i have very ugly rain but hey it works.
thanks
#4
This may help you, somethings have changed so be carefully with this tutorial.
holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/effects/p1_rain_snow.shtml
07/19/2007 (12:56 pm)
You'r welcome!This may help you, somethings have changed so be carefully with this tutorial.
holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/effects/p1_rain_snow.shtml
#5
07/19/2007 (5:44 pm)
Does anyone know where i can find some precip textures. I know about the content packs but i'm looking for something free just to get me started.
Torque 3D Owner mb
Use .png. Not sure what graphics program you are using, so look up how to make an image transparent for that program. There might be a checkbox for making it transparent when you do file->new image. Or something like that.