Volcano Rocks Are Getting Real

Unity’s physics system is pretty good for make look real rock falling down the volcano. It looks very real.

Here are the options I wanted for the rocks expelled from the volcano:

  1. Random rock from at least 4 rocks
  2. Randomly set on fire, with smoke trail
  3. Random rock size
  4. Random rock debris (splinter) generation on ground collision
  5. Rocks must react to multiple ground collisions
  6. Random sound on FIRST ground collision & random picth. Has bass effect.
  7. Diffenrent random sound AFTER the first collision, does not have a “rock rain effect”
  8. Rocks must stay on ground indefinetly
  9. All effects must be detroyed from the rocks after it stops moving
  10. Rocks must be able to “jump out freely” from the volcano without colliding with another rock during its ascension
  11. Fire must gradually fade out after the rocks stops moving

After countless trys and errors, here is the logic I came up with:

Here are the results:

 

Gaia / CTS: Controlling the snow value at runtime without the weather manager

Here is a quick way to change the snow value in CTS (Complete Terrain Shader), without installing the weather manager.

GameObject terrainGO = GameObject.Find("Terrain");
Terrain terrain = terrainGO.GetComponent();
Material material = terrain.materialTemplate;
material.SetFloat("_Snow_Amount", 2);

I needed this to be able to add the look and feel of the volcano ashes. This parameter “_Snow_Amount” will be slowly incremented after the eruption phase.

Here is a quick peek at the terrain covered in ashes: