Friday, April 7, 2017

Final Stretch - 1

The past week was a bit slow with two other project deadlines coming up but I still managed to get just under 10 hours of work in.

There were two main focuses this week, Trees and Camera Control.

After some watching a tutorial and reading some documentation I learned about populating a scene with trees via SpeedTree's world building tools. This is achieved by creating an alpha map to dedicate tree zones and tree-free zones.
Black & white tree layout created in substance painter. The map is actually flipped vertically to match the UVs for Unreal's terrain (which are flipped along the V axis by default for some reason)

Bringing the map into SpeedTree and adjusting some settings gave me this result (using proxy spikes instead of trees)
There is a bit of a challenge getting the tree data into Unreal (due to SpeedTree's confusing licensing requirements) but a little more testing will let me know if this data is usable. Otherwise, I can write a blueprint to populate my scene with trees based on the previously shown alpha map.

Below is the first tree in my scene. This serves mostly as a test to get the workflow down. My first attempt at a pine tree came out poorly due to the small scale of the pine needle card and the large distance that my level needs to view the assets from. The underlying branches look good though and will serve as a good starting place for another attempt. Time permitting I'll be making more trees and increasing their realism through some SpeedTree tutorials and a more photo reference. 

The first tree in Unreal!
Next up is the camera controls. I implemented these to create a "frame" for my scene that limits the player's view to the landscape I've created. Below is the blueprint function I added to the main camera to create the limiter. 

This function plugs into the game's camera control blueprint just before camera position is updated to make sure that it cannot pass beyond the minimum and maximum values that I have set for X and Y in the scene.
The screenshot below shows a minor change to the terrain that I've made so that the game's playspace touches right up against the city, adding to the seamless incorporation of environment.
Blue squares show the character's max movement. Scrolling text on the left refers to the camera's position and was used for debugging the camera limiter function.
Next week will include the addition of more assets to the final scene and my first attempt at a tree population script within Unreal (assuming there isn't a quick way to implement SpeedTree's data)





No comments:

Post a Comment