Waterfall help
by DreamPharaoh · in Torque Game Engine · 06/23/2006 (8:53 pm) · 11 replies
I need some direction on how to get my waterfall to look normal. Right now it looks like an energy spring. It flows right, but the colors are unnaturally bright. I have WinXP with TGE and I have used both Jpeg and PNG pics for the falls. I have adjusted thier brightness in adobe and changed thier colors around. I also messed with the colors, transparancy, various time intervals, inverted the alpha, ect. Thank you for any posts.
Here is my script so far.
//-----------------------------------------------------------------------------
//Waterfalls
datablock ParticleData(WFallAParticle)
{
textureName = "~/data/particles/water_splash";
dragCoefficient = 0.0;
gravityCoefficient = 2; // rises slowly
windCoefficient = -2.0;
inheritedVelFactor = 2.00;
lifetimeMS = 12000;
lifetimeVarianceMS = 500;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.30 0.27 0.48 0.15";
colors[1] = "0.09 0.10 0.28 0.10";
colors[2] = "0.11 0.10 0.27 0.07";
//0.46 0.48 0.48 0.16
//"0.10 0.16 0.32 0.17";
sizes[0] = 07;
sizes[1] = 12;
sizes[2] = 15;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(WFallAEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 5;
ejectionVelocity = 0.55;
velocityVariance = 0.30;
thetaMin = 0.0;
thetaMax = 90.0;
particles = "WFallAParticle";
};
datablock ParticleEmitterNodeData(WFall1EmitterNode)
{
timeMultiple = 0.4;
};
//..................
datablock ParticleData(WFallBParticle)
{
textureName = "~/data/particles/water_splash";
dragCoefficient = 0.0;
gravityCoefficient = -0.1; // rises slowly
inheritedVelFactor = 2.00;
lifetimeMS = 3000;
lifetimeVarianceMS = 100;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.44 0.25 0.48 0.07";
colors[1] = "0.44 0.25 0.48 0.05";
colors[2] = "0.44 0.25 0.48 0.0";
sizes[0] = 10;
sizes[1] = 15;
sizes[2] = 20;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleData(WFallCParticle)
{
textureName = "~/data/particles/water_splash";
dragCoefficient = 0.0;
gravityCoefficient = -0.1; // rises slowly
inheritedVelFactor = 2.00;
lifetimeMS = 3000;
lifetimeVarianceMS = 300;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.4 0.4 0.5 0.05";
colors[1] = "0.5 0.5 0.6 0.01";
colors[2] = "0.0 0.0 0.7 0.0";
sizes[0] = 5;
sizes[1] = 5;
sizes[2] = 5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(WFallBParticleEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 5;
ejectionVelocity = 0.25;
velocityVariance = 0.10;
thetaMin = 0.0;
thetaMax = 90.0;
particles = "WFallBParticle" TAB "WFallCParticle";
};
datablock ParticleEmitterNodeData(WFall2ParticleEmitterNode)
{
timeMultiple = 0.5;
};
Here is my script so far.
//-----------------------------------------------------------------------------
//Waterfalls
datablock ParticleData(WFallAParticle)
{
textureName = "~/data/particles/water_splash";
dragCoefficient = 0.0;
gravityCoefficient = 2; // rises slowly
windCoefficient = -2.0;
inheritedVelFactor = 2.00;
lifetimeMS = 12000;
lifetimeVarianceMS = 500;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.30 0.27 0.48 0.15";
colors[1] = "0.09 0.10 0.28 0.10";
colors[2] = "0.11 0.10 0.27 0.07";
//0.46 0.48 0.48 0.16
//"0.10 0.16 0.32 0.17";
sizes[0] = 07;
sizes[1] = 12;
sizes[2] = 15;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(WFallAEmitter)
{
ejectionPeriodMS = 10;
periodVarianceMS = 5;
ejectionVelocity = 0.55;
velocityVariance = 0.30;
thetaMin = 0.0;
thetaMax = 90.0;
particles = "WFallAParticle";
};
datablock ParticleEmitterNodeData(WFall1EmitterNode)
{
timeMultiple = 0.4;
};
//..................
datablock ParticleData(WFallBParticle)
{
textureName = "~/data/particles/water_splash";
dragCoefficient = 0.0;
gravityCoefficient = -0.1; // rises slowly
inheritedVelFactor = 2.00;
lifetimeMS = 3000;
lifetimeVarianceMS = 100;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.44 0.25 0.48 0.07";
colors[1] = "0.44 0.25 0.48 0.05";
colors[2] = "0.44 0.25 0.48 0.0";
sizes[0] = 10;
sizes[1] = 15;
sizes[2] = 20;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleData(WFallCParticle)
{
textureName = "~/data/particles/water_splash";
dragCoefficient = 0.0;
gravityCoefficient = -0.1; // rises slowly
inheritedVelFactor = 2.00;
lifetimeMS = 3000;
lifetimeVarianceMS = 300;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.4 0.4 0.5 0.05";
colors[1] = "0.5 0.5 0.6 0.01";
colors[2] = "0.0 0.0 0.7 0.0";
sizes[0] = 5;
sizes[1] = 5;
sizes[2] = 5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(WFallBParticleEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 5;
ejectionVelocity = 0.25;
velocityVariance = 0.10;
thetaMin = 0.0;
thetaMax = 90.0;
particles = "WFallBParticle" TAB "WFallCParticle";
};
datablock ParticleEmitterNodeData(WFall2ParticleEmitterNode)
{
timeMultiple = 0.5;
};
About the author
If you want to learn more, please go to my website. GodsandNemesis.com.
#2
I have changed this before and it made the water almost black (which I will keep in mind for other effects). I will play around with the settings with your suggestion to see if I can make it realistic looking with the inverted command. It seems that it is related to an old Blender issue where the alpha's added on to each other until they became near-bright-white (most likely my ignorance on this though). I will let you know what I find tomorrow.
Thank you for your direction.
06/23/2006 (10:25 pm)
First off I want to clarify, for any beginner's seeking direction, that the script here came from the awesome resource 3D programmer's "all in one" and unfortunately was not my doing. I have changed this before and it made the water almost black (which I will keep in mind for other effects). I will play around with the settings with your suggestion to see if I can make it realistic looking with the inverted command. It seems that it is related to an old Blender issue where the alpha's added on to each other until they became near-bright-white (most likely my ignorance on this though). I will let you know what I find tomorrow.
Thank you for your direction.
#3
06/24/2006 (5:39 am)
I have tried three different ways of making waterfalls. With particles, IFL's and with both. It just takes time tinkering with the settings. I have gotten better results with just using particles. To make a waterfall more realistic, I made four sets of particles. 1. the waterfall. 2. the splash at the bottom, a left and right. 3. a spray at the bottom. You have to tinker with the color and brightness. What may be bright to you, may be darker to others. I say this because people have their monitors and graphic card set different. Have someone else look at it and get their opinion before you spend to much time on it. This happened to me. One other thing when making a waterfall with particles is that you take a hit with the FPS. When you stand in front of mine, you get a 12 FPS.
#4
@Mark: I have feared that it could be that my monitor and video card could have an effect on this. I will also see if I can get the student from Tech to look at it on his computer to see if this is the problem. I first need to buy him a Torque license though. And the video card on laptop went out- had to buy other computer so I am strapped right now. Than thankyou for the direction on the positioning of the particle emmiters though.
I appreciate the help on this.
06/24/2006 (8:42 pm)
@ Todd: I have tried quite a few variations with the alpha inverted but it is just the opposite spectrum in problems (it wants to be super dark all the time rather than super bright). The closest thing was taking the color portion out of the code entirely. I might be able to get it to come out right with this. I will let you know what I find. I wish I knew how to alter the gui when adding the particles so that I can mess with the colors while in the game rather then going in and out of it. Any direction on this would be great; a really dumbed down tutorial would be appreciated.@Mark: I have feared that it could be that my monitor and video card could have an effect on this. I will also see if I can get the student from Tech to look at it on his computer to see if this is the problem. I first need to buy him a Torque license though. And the video card on laptop went out- had to buy other computer so I am strapped right now. Than thankyou for the direction on the positioning of the particle emmiters though.
I appreciate the help on this.
#5
06/24/2006 (11:07 pm)
Can you post a screen shot ofyou water fall so that we can better understand what you problems are?
#6
http://pg.photos.yahoo.com/ph/rtmeffert/album?.dir=/dc41&.src=ph&.tok=phl1VFFBwHtOvBTx
Thank you
06/25/2006 (9:26 am)
Here is a link to yahoo images gallery. They are pics from inside the waterfall cave and outside; from using either inverted alpha false or true. The aerial photo shows the waterfall from the opposing side that is really energetic looking.http://pg.photos.yahoo.com/ph/rtmeffert/album?.dir=/dc41&.src=ph&.tok=phl1VFFBwHtOvBTx
Thank you
#7
My first guess would be to move the water fall to an area that does not have a dark cave behind it, so that you can eliminate the dark back drop and determine how much of a role that is playing in the way it looks.
From the screen shots, I get the impressing that much of the darkness is coming from the cave, but I could be wrong.
By the way, do you have TLK running? It doesn't look like it, but I can say for sure.
06/26/2006 (9:33 am)
Chad, I have to say that I really am not sure what you have going on there. My first guess would be to move the water fall to an area that does not have a dark cave behind it, so that you can eliminate the dark back drop and determine how much of a role that is playing in the way it looks.
From the screen shots, I get the impressing that much of the darkness is coming from the cave, but I could be wrong.
By the way, do you have TLK running? It doesn't look like it, but I can say for sure.
#8
I have tried different backdrops from white, brown, multicolored, and black. The black backdrop gives the most stable colors believe it or not. Anyway I believe that the waterfall is close to acceptable after I deleted some of the picture I was using; it will need a few tweaks here and there.
The TLK portion is an unfortunate result of using one of the tutorials posted by someone to increase the amount of textures in game. The scripts were from a person, that evidently had the TLK, when I put them in and deleted the originals it made a bunch of extra options that evidently come with TLK. None of them work though; I don't remember what I changed out anymore. Not sure how to get it to go back to normal. It hasn't had any negative effects on performance that I can tell.
Thank you for your help,
06/26/2006 (10:56 am)
Todd,I have tried different backdrops from white, brown, multicolored, and black. The black backdrop gives the most stable colors believe it or not. Anyway I believe that the waterfall is close to acceptable after I deleted some of the picture I was using; it will need a few tweaks here and there.
The TLK portion is an unfortunate result of using one of the tutorials posted by someone to increase the amount of textures in game. The scripts were from a person, that evidently had the TLK, when I put them in and deleted the originals it made a bunch of extra options that evidently come with TLK. None of them work though; I don't remember what I changed out anymore. Not sure how to get it to go back to normal. It hasn't had any negative effects on performance that I can tell.
Thank you for your help,
#9
By the way, looking at your script, I notice that you have some pretty dark colors defined there, is that intentional? or are you trying to figure out what the values mean?
For example "colors[2] = "0.11 0.10 0.27 0.07"; is very dark
06/26/2006 (11:21 am)
Interesting,By the way, looking at your script, I notice that you have some pretty dark colors defined there, is that intentional? or are you trying to figure out what the values mean?
For example "colors[2] = "0.11 0.10 0.27 0.07"; is very dark
#10
06/26/2006 (12:24 pm)
When I take it down too low the waterfall will not show up at all. I do have two suns for this alien environment. I will take one of them out when I get home to see if this has an effect on the waterfall colors. About the TLK- does this have the ability to allow day and night cycles because I will be tackling this issue soon. I honestly don't know what added features it provides, I will probably be purchasing some extentions for the game engine soon. Also Shader looks interesting too I think that it might be the answer to the problem here because the waterfall is an issue that will be fixed over trial and error. But the shader engine could possible provide quick fixes to color issues in the future.
#11
The two suns could have an impact on what you are doing, I don't know, have not tried setting up two suns before.
Your particles can get there color either from the color you define in the script or from the texture.
There are resources for doing day/night cycles, just do a search. I don't know if TLK ships with it as a feature.
06/26/2006 (1:24 pm)
Chad what you are doing has nothing to do with any shader tricks, I have seen waterfalls done well in Stock TGE.The two suns could have an impact on what you are doing, I don't know, have not tried setting up two suns before.
Your particles can get there color either from the color you define in the script or from the texture.
There are resources for doing day/night cycles, just do a search. I don't know if TLK ships with it as a feature.
Torque 3D Owner Todd Pickens
I could be crazy here, but I seem to remember that it was the "useInvAlpha = false;" instruction that you need to change. Try changeing it to ture, as in "useInvAlpha = true;"
If that does not work, I will crack open one of the particle things I have done and see what fixes it.