DEV Community

Pisces Studios
Pisces Studios

Posted on

Easy Bump Mapping, Explosion Effects, and Destructible Trees: Deterrence - Video Devlog 3

Image description
A tower defense mixed with real-time strategy where you repel attacking sentient AI robots until they give up.

Destructible Trees

I opted not to use Unity's terrain trees for this game because the terrain tree colliders didn't work with my units pathfinding system. Instead, I just used game objects for trees which also gave me more freedom to do what I want with them.

Figure1

To make the trees destructible, the trees have a reference to a destroyed tree prefab which inherit the transform of the tree that instantiated it. The destroyed tree prefab has a rigid body for physics and a script with an explosive force scenario to play out.

Figure2

It is also a good idea to put trees on they're own layer and disable the trees from interacting with the block layer in the physics settings. This way you don't get trees that collide with the invisible block layer.

Easy Bump Mapping

To get the desired look for my landing zone tent, I went with a solid color and a height map. A height map is a gray scaled texture where white represents bumps. I use the brush free handed and then soften what's been drawn to make the bump more smooth. This texture can be imported into Unity and converted to a normal texture through gray scale.

Figure3

Now that the LZ model is complete, I import the LZ model into unity to see how it looks. After adjusting all the materials, you can now see an awesome looking tent in Unity.

Figure4


If you would like to follow me on my game dev journey, don't forget to subscribe or follow on social media!

Facebook - https://www.facebook.com/DeterrenceGame/
Twitter - https://twitter.com/DeterrenceGame
Instagram - https://www.instagram.com/deterrencegame/
Discord Server - https://discord.gg/CjAybsdq
IndieDB - https://www.indiedb.com/games/deterrence

Top comments (0)