New Rain Texture For Precipitation

Graphical resources like models and images.
4 posts Page 1 of 1
Steve_Yorkshire
Posts: 252
Joined: Tue Feb 03, 2015 10:30 pm
 
  by Steve_Yorkshire » Fri May 05, 2017 8:52 pm
@ 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-)

Jason Campbell
Posts: 268
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Sat May 06, 2017 9:24 pm
Thanks Steve, that looks much better.
Duion
Posts: 1004
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sun May 07, 2017 8:23 pm
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?
Duion
Posts: 1004
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sat Jan 13, 2018 10:36 pm
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.
4 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest