1. Home
  2. Docs
  3. Ignis
  4. Tutorials
  5. Use with Unity Terrain Trees

Use with Unity Terrain Trees

Example Use Case: You are using built-in Unity terrain in your project. You want some of the grass or trees or everything in your terrain to be able to catch flames.

Additional information:

Backup your terrain! Ignis will manipulate trees in runtime, so in case of a rare blue screen on your computer you can lose data!

Ignis can be used with Unity Terrain (Prefabs placed as trees. Can be bushes etc as long as they are placed with tree tool). Ignis checks with predefined intervals if there are any fires close enough of unity terrain trees. If some tree is close enough, Ignis will replace a tree instance with a prefab on the same position/scale/rotation as the tree. After that it will act like any flammable object and is deleted if it is not ignited and the fire moves farther away. 

If your scene has a huge amount of trees and huge amount of flammable objects, be sure to cull far away/non-important flammable objects and trees to avoid unnecessary checks and draining the performance. Also this will leave burnt gameobjects (Flame already burnt away, whole life cycle completed). So if you have a large scene you should replace these with burnt tree instances or destroy them when the player is farther away.

How to set it up:

  1. Backup your terrain! Ignis will manipulate trees in runtime, so in case of a rare blue screen on your computer you can lose data!
  2. Enable “Unity Terrain Compatible” from FlameEngine in your scene.
  1. This will spawn a new component:
  1. You can adjust these variables, if you want to optimize performance/smoothness, but these can also be left alone.
  2. Convert your tree prefab you intend to use normally to the flammable object by right-click -> OAVA-Convert->Flammable Object/Vegetation and set up the flames to your liking.
  1. Add it normally to your terrain trees:
  1. Note that you can add bushes also to trees if you want.
  2. Done! Ignis will now spawn invisible flammable objects set up in your tree prefab when flammable objects are close.
Was this article helpful to you? Yes No

Leave a Reply

Your email address will not be published. Required fields are marked *