Jump to content

New Rain Texture For Precipitation


Steve_Yorkshire

Recommended Posts

@Azaezel had posted the wetness shader on irc and I had taken the image which it used for the rain and started messing around with it to try and make a better rain texture for the precipitation object. I found that making it much larger by copying the texture repeatedly on to a 1024 image, giving it some alpha, drastically fading it to ~20% and finally increasing droplet size for the precipitation object made a much better effect than the stock Torque one.


Right-click and save as ...

http://yorkshirerifles.com/downloads/yorks_rain.png

And stick it in art/environment/precipitation/


The datablock (stick it in art/datablocks/environment) and add splashTexture and a sound profile

datablock PrecipitationData(YorksRain)
{
   //soundProfile = "YorksRainSound";
   dropTexture = "art/environment/precipitation/yorks_rain.png";
   //splashTexture = "art/environment/precipitation/yorks_splash";
};

 

What your precipitation object wants to look like - note I do not bother with splashes or collisions but hey, you feel free ;)

Setting droplet size to 5 is very important

%rain = new Precipitation(theForecast) 
               {
                  numDrops = "2048";
                  boxWidth = "100";
                  boxHeight = "50";
                  dropSize = "5.0";
                  splashSize = "0.5";
                  splashMS = "100";
                  animateSplashes = "0";
                  dropAnimateMS = "0";
                  fadeDist = "10";
                  fadeDistEnd = "100";
                  useTrueBillboards = "0";
                  useLighting = "0";
                  glowIntensity = "0 0 0 0";
                  reflect = "0";
                  rotateWithCamVel = "1";
                  doCollision = "0";
                  hitPlayers = "0";
                  hitVehicles = "0";
                  followCam = "1";
                  useWind = "1";
                  minSpeed = "1.5";
                  maxSpeed = "3";
                  minMass = "20";
                  maxMass = "20";
                  useTurbulence = "1";
                  maxTurbulence = "0.1";
                  turbulenceSpeed = "0.2";
                  dataBlock = "YorksRain";
                  position = "0 0 0";
                  rotation = "1 0 0 0";
                  scale = "1 1 1";
                  hidden = "1";
                  canSave = "1";
                  canSaveDynamicFields = "1";
               };
               MissionGroup.add(%rain);

 

And it should look like this.0-10 seconds old rain, 11-20 seconds new fangled rain! 8-)


rmO4EcM4B-I

Link to comment
Share on other sites

I tested that technique now and I noticed one big issue, it is whenever you have building interiors or anything with a ceiling that is rained upon, you will see the rain drops glitching through the ceiling.

That issue exists with the normal raindrops as well, but it goes away if the ceiling is big enough of the raindrop small or slow enough, but with the 1024x1024 I cannot stop it from glitching through the ceiling, any ideas how to solve that?

Link to comment
Share on other sites

  • 8 months later...

I just found out that the rain uses an atlas texture and you can define how many rows of raindrops the texture has probably to add variation so it is not always the same raindrop.

In this case probably not that relevant, since a human cannot distinguish the raindrops anyway if you have that many, but maybe it still can add variation if you have "drops" with more and some with less rain, that way the rain will vary in density.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...