Update 16: AO, Trees and the Perspective Camera

Orthographic vs Perspective
Up until now I’ve had the game camera set up as an orthographic projection. Which gives a similar style to an isometric game but in 3D. I went for this initially because I wanted it to be reminiscent of games like Age Of Empires and  RCT. It wasn’t until I started working on the construction tools that I realised how it was becoming difficult to visually understand the terrain and where to place objects. It really doesnt work all that well. Because orthographic cameras have a fixed depth you essentially lose some important information regarding the position and shape of the 3D objects. It makes them slightly harder to understand and also makes it difficult to judge distances in the game world. Games like Monument Valley take advantage of this to create optical illusions and interesting puzzles. For this game though, I don’t want illusions, the most important thing is that the player can understand quickly what is happening in the game.

A slight problem with using perspective camera is that the method for grass rendering I was using did not work as well. As I was using shell rendering It only looks decent when looking downward on the world, with a perspective camera it just didn’t work. Rendering the grass that way was quite costly anyhow, so I had no problem removing it.

Screenshot_Sat_May_20_13_49_52_2017

New Perspective Camera

Day/Night Cycle
I put a little time into getting a working visible day and night cycle. In free floating camera mode you can see the sun in the sky at the correct position. The sky itself now changes color according to the time of day, so for example it will turn orange near sunset. At night the distance fog is changed to give some atmosphere. At night time the focal point of the camera emits light, this makes it so you can still see the surrounding area as well as giving an eerie atmosphere.

Ambient Occlusion
I wrote last update about screen space ambient occlusion and how the performance hit was too large to justify the effect. I’ve been playing around with some other methods with some success. I can’t bake occlusion into the mesh because the terrain itself is actually just a displacement map. What I thought of doing however is to calculate the AO by sampling the adjacent pixels from within the displace map for each vertex. You can see the results in the day/night pictures above.

Trees
A bit of time was put into the ECS which will manage all the world objects. I put together a placeholder tree model and spawned 10,000 of them around the map. The viewing distance for the trees is not to great in floating camera mode but in normal construction mode It works fine.

Screenshot_Sat_May_20_14_55_07_2017

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s