Creating a Simple Cave – Unity!
This will be a simple tutorial on how I made a basic cave in Unity. I used rocks meshes from a pack that I found and was free on the unity asset store. I will also show you how to add fog and torches to the interior cave to make it feel more immersive.
I started by downloading a rock pack from the asset store and then imported it to my assets, the pack I downloaded has a various amounts of rocks that I use to put together and start building up the foundations of a cave.
Fig. 1 This is the pack I use (You don’t have to use this one)
I created a small plane to build the cave on for this tutorial, I then started dragging the rock meshes from the rocks pack into the plain and using the move and rotation tools to get them in the position that I want.
Fig. 2 Placing the rocks
I continued placing more and more rocks until eventually I had a small enough cave, You can place these rocks however you want and be as creative as you want. I then used the some of the flatter rocks to make my floor to add texture, however if your building this cave on an terrain you might not need to do this or if you have a texture for the plane that you already like.
Fig. 3 Interior of my cave
Lighting the Cave:
When it came to lighting, I used pre-made torch meshes which I downloaded from another pack, however you can make your own torch using blender or other 3D modelling programs or just search for free ones on the unity asset store. I will show you how to add a light to your and a fire particle effect.
Starting with the light, you right-click on your torch mesh and go to light and click point light. Once you have that, go to your inspector and change the colour to an orange. You can change the range, intensity to your liking and depending on how well lit you want the cave to be.
Fig. 4, 5, 6 showing the light effect on the torch.
And now for the fire particle system. Go to your asset folder and right click anywhere in the empty space, go to import package, then click on particle systems. Once you have that imported you can start working on the particles. Then you right-click the torch in the hierarchy, go to effects then click on particle systems.
Fig. 7, 8 Adding a particle system.
To add the fire texture to your particle, click on the particle and go to your inspector, go to renderer and find where it says material, then click the small circle to the right of that box and find the particle named “Particle Firecloud”. Once you have one torch done you can duplicate it and add more around your cave. The screenshots below should provide all the information needed to set the torch flame up correctly.
Fig. 9 The complete torch
Fig. 10, 11 Fire particle settings
Cave fog is not necessary but can make the cave look more realistic. You right-click on the hierarchy and add a particle system like before and this time add the “ParticleDuststorm” as your material. Once that is done move the Particle to where you want the fog in your cave to be and follow the information in the screenshots below again.
Fig. 12, 13 fog settings
Fig. 14 the complete cave
That’s how you make a simple cave, you can expand the cave to as big as you want and change any settings on the particle systems and lights to suit your own cave a bit more if you wish to do so.