Progress 17: Depth, Volumes and CPU Picking

Landscape Depth
The landscape now has information in the Y axis(downward), as you dig the tiles change from soil to stone to granite. It’s kept quite simple at the moment but later I want to add further noise manipulation into the algorithm so that the player can find pockets of different types of rock as they dig.

Screenshot_Mon_May_29_00_18_50_2017.png

Excavation into the side of a hill

Excavation Tool
I made some progress on creating tools which the player can use to manipulate the landscape. The excavation tool allows a player to select a rectangular region to dig downward on. At the moment the excavation is done instantly but later it will be dug out by players game units.

Volumes
I’ve added rudimentary support for voxel volumes.
Screenshot_Tue_May_30_18_28_47_2017.png

CPU Picking
I had wrote before about GPU picking which worked reasonably well as a temp solution. However the problem is that because the cpu is just reading the positions buffer on gpu, you can’t pick any locations that are not visible on screen. As I was using the excavation tool this became problematic and made the tool unintuitive. Not only that, on my old and useless macbook pro the PBO(pixel buffer object) was still stalling the cpu despite PBO’s being non blocking. The new solution involves casting a ray from the camera through the terrain and calculating where there is an intersection. Works a treat, don’t know why I didn’t just do this before really.

Other Additions/Changes
– Refactored the worldgen noise sampler.
– Refactored the precipice mesh generator
– Fixed a bug where the world tiles were actually be rendered mirrored on the Z axis.
– Fixed the camera fog distance from showing unrendered geometry when zoomed in.
– Oncreen nodes now hold a component which links to the underlying world object.

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