racer home

Adding rain to tracks

 

Home "The true sign of intelligence is not knowledge but imagination." - Albert Einstein


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

Introduction

This document describes how rain works in Racer. The current text is based on rain in v0.6.5-v0.8.9.

The files involved

The following files play a part in rain:

Turning rain on

Rain state is decided per track. As the mood of a track changes when it's rainy, textures can be made less bright, the sun color reduced a bit (see a track's special.ini). In the special.ini, set env.rain to something between 0 and 1, where 0 is no rain, 1 is full rain. To enable rain on a track follow these steps:

Turning the sun off

Some rainy tracks may look strange with a large bright sun. In the track's special.ini file, you may turn off the sun by settings gfx.sun.enable to 0 (v0.6.5+).

Tuning rain

The following can be tweaked:

Dynamic rain (over time)

The rain amount can be varied a bit over time. Note that a full cycle between sunny and rain is not really possible; rain tracks preferably have specific shaders defined to make the track look wet, and Racer doesn't support fully dynamic weather where the track can dry up.

In a track's special.ini file, you can specify a rain curve (see Curved on how to create curves). An example extract from special.ini and rain.crv file is shown below:

env
{
  rain_curve=rain.crv
}

The rain.crv file opened in Curved. Note the maximum vertically (rain amount) is 1.0 and the maximum horizontally (time in seconds) is 20. Every 20 seconds this curve will loop.

rain curve

 

 


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated November 13, 2012 )