Environment Scheme Tutorial
- This is a beginner-level tutorial, which gives the basic steps to create an environment scheme.
In this tutorial, we will:
- Create a new environment scheme
- Set some options for light, color, and fog in an area
- Add clouds
- Set the light to change over the course of a game "day"
- Experiment with the Time-of-day controls to show how the light will cycle in an area over time, manually or automatically
Create an environment scheme
- In HeroBlade, open the Environment panel.
- Click on Add
- Name the new scheme, for example, "TestScheme"
- Names cannot use punctuation or spaces.
- Click on Apply, and choose "all visible rooms" (as applicable)
- Select the checkbox next to Use Dynamic Sky
Set options for light color and fog
- Click on the Light pane
- Click to enable HDR if it is not already (the default settings are ok in most cases)
- You should see a long rectangle for "Front Color"
- If you do not see a rectangle, ensure that "Dynamic Sky" is checked at the top of the panel
- The rectangle represents a 24-hour day:
- Far left: Dawn
- 25%: Noon
- 50%: Sunset
- 75%: Midnight
- 100%: Dawn
- Click at approximately the 25% "Noon" point on the rectangle
- A Color Picker GUI should appear.
- Choose a reddish tinge
- Close the Light pane on the environment panel, by clicking on the minus sign
- Open the Fog pane on the environment panel (click the plus sign)
- In the "Min Density" graph, click on the dot at the far left, and drag upwards to choose a Min Density of .300
- This should result in the entire red horizontal line rising to the .3 level. If you end up clicking a dot which raises just one part of the line, press the DEL key to delete that point, and try again to move the entire line
- Maneuver your character's view to see objects in the far distance (right-click and drag in the viewport so you can see a far horizon)
- In the environment panel, fog pane, click on the lefthand dot in the "Distance from Camera" section, and drag downwards. As the number decreases, you should see fog begin to appear in the distance. Try to end around approximately 1.250 or so.
- Drag the Max Density down to around .7
Observe changes over time
At the top of the environment panel is a "Speed of Day" box, with controls underneath it.
- Click the ">>" button, which will simulate the passing of time at a rate of 30 seconds per day.
- You should see the light slowly change.
- Click on the "X" to stop the clock.
Change the light color over time
- In the Front Color Bar, click around the 50% "Sunset" part of the bar.
- Choose a darker reddish color than was used for the Noon part
- In the top of the Environment Panel, locate the Time of Day slider.
- Drag the slider left and right, to see how the light will change at different times of day.
Change light intensity over time
- Locate the Light Intensity bar in the Light Pane
- The bar represents time from dawn to noon to sunset to midnight, and back to dawn. Therefore "dawn" is at the far left, and "noon" is about 25% across the panel
- Drag the bar at dawn down to about .5, to represent the lower light level
- At the "noon" point about 25% in, drag the line up to the top, to brightest light intensity
- At the "midnight" point about 75% in, drag the bar down to 0.
- Additional points can be added as needed. To delete a point, select it and press the "Delete" button
- Go back to the Time of Day slider, and drag it back and forth to see how the light intensity changes
Set time to pass automatically
- To make the time pass automatically, use the "Speed of Day" option at the top of the Environment Panel
- Set "Speed of Day" to 1440.00, which will take one minute of real-time to go through one day of game time.
- There are presets available for Speed of Day, with the > and >> arrows underneath.
- Clicking on ">" or "<" will set time forwards or backwards, to a fixed rate of 5 minutes per day. Clicking on ">>" or "<<" will set time to 30 seconds per day
- The Time of Day slider is only for testing purposes, and will not control the actual behavior of the area. To change actual area behavior, this is done in HSL, such as with the SetEnviroDeltaTime and SetEnviroTimeOfDay functions.
- Go to the Cloud Layers pane
- Click "Add Layer". Clouds should now appear in the sky.
- If clouds do not appear:
- Check that "Dynamic sky" is checked at the top of the environment panel
- Check that a clouds texture if available in your world. In the Clouds pane, check in the "Each Cloud's Texture" box that it is using a .dds file which is available to you. If not, click on the "..." button and choose a different texture. A good place to check is in HE\Render\ShaderTextures.
- Set the speed of the clouds with the "Each Cloud's Speed" slider.
- To change the direction that the clouds are moving, click on the arrow in the "Global Heading" ellipse and drag it to a different direction.
At this point, the clouds will probably appear white, regardless of the time of day. To change this, such as to have them show color, and fade away at night:
- Open the Atmosphere pane
- Locate the bar that says "Tint each cloud's color"
- Click on the small box at the far left "dawn" point
- Choose a pink dawnish color
- Click around the 75% point for midnight
- In the Color Picker, set the Alpha to 0.00, to make the clouds transparent at midnight
- Maneuver your character's view to see the sky, and you should see stars showing up at night, as the clouds fade away.
The best way to learn about many other features in the Environment Panel, is to experiment! Have fun. :)
Suggestions of things to try:
- Play with the settings in the "Precipitation" pane
- Add an asset that reacts to wind, such as a Speed Tree, and then play with the different sliders in the "Wind" pane.
To learn more about environment-related HSL functions, search on SetEnviro in the Client Scripts, via the Script Editor.