Temperature

This section controls everything about temperature in the world. EasySky V2 picks a random temperature for the day and the night, each time it starts a new day. The chosen temperature is always between the min and max values defined by its temperature curves. All properties of the temperature section are:

  • Viewport Aspect Ratio
    • The aspect ratio of the viewport. Only used when previewing the debug preview material, when Show Temperature Debug Draw is enabled.
  • Temperature Curves
    • The curves used to get a global temperature of the world. There are 4 curves, starting at 0 and ending at 12 (January – December). Based on the date, and on weather it’s night or day, the system will pick a random temperature between these values.
  • Debug Print Temperature Volume Info
    • This will print some debug info about the current temperature and how it’s build up, at the current camera location.
  • Show Temperature Debug Draw
    • Show a nice overlay material that visualizes temperature in the scene.
  • Debug draw opacity
    • The opacity of the debug temperature material.
  • Snow Start Temperature
    • Temperature at which snow starts to form.
  • Snow Blend Size
    • Amount of temperature difference to blend from no to full snow.

Temperature Volumes (BP_TemperatureVolume)

EasySky V2 uses BP_TemperatureVolume actors to make local temperature overrides. These volumes can be placed anywhere in the world. Each volume has the following properties:

  • Volume Type
    • It can be a box or a sphere. For performance optimization reasons, box rotation only works on the yaw axis. Any other rotation values will be ignored.
  • Temperature Type
    • Temperature Difference
      • Temperature will be threated as a difference of the current temperature.
    • Fixed Temperature
      • The temperature volume will override the current temperature, and use this temperature as a fixed value for that zone.
  • Temperature
    • The temperature value
  • Priority
    • The priority of this temperature volume. A higher priority value will be drawn last and override lower priority volumes.
  • Power
    • Power value of the blend between the volume and the world.
  • Hardness
    • Only available in the box type. This will controll the hardness of the fade between the box and the world.

Example of a Temperature Volume placed at a fire place. The snow melts at the heart of the sphere.

Performance

As everything in games, these temperature volumes also have a small cost. To know more about how much they will impact performance, it’s good to have a basic understanding of how they work, and where the costs are.

First, the CPU collects all data from the volumes. They get sorted based on their priority and then the data is stored into a 13×256 32 bit texture map. The settings stored are these:

  • Amount of box type volumes
  • Amount of sphere type volumes
  • And then a line of data per volume
    • volume_type
    • position x
    • position y
    • position z
    • extend_x (Radius for sphere)
    • extend_y (Box only)
    • extend_z (Box only)
    • forward_x (Box only)
    • forward_y (Box only)
    • power
    • temperature value
    • hardness (Box only)
    • temperature_type

The shader reads this data and outputs a final temperature per pixel. This means that for each box volume, the shader adds 13 texture lookups, and a small amount of calculations. For each sphere volume, the shader adds 8 texture lookups. The calculation complexity for spheres is also less than for boxes.

So in general, spheres are cheaper than boxes, and the more volumes you have, the heavier it becomes for each pixel that’s using puddles or snow.