Skip to content

Latest commit

 

History

History
91 lines (57 loc) · 4.3 KB

README.md

File metadata and controls

91 lines (57 loc) · 4.3 KB

FireSimulationPlugin

This is our first UE4 plugin. Plugin can contain bugs. If you found some, please inform. We will be very grateful
This plugin for Unreal Engine 4 enables the simulation of fire and smoke propagation within your scenes.

How to Use

Follow these steps to integrate the Fire Simulation Plugin into your Unreal Engine project:

Setting Up the Environment

  1. Place the FireManagerActor in your scene.

  2. Configure the Fire Grid:

    • Create a GridActor in your scene.
    • Assign the desired size to this actor to define the Fire Grid. The simulation will only occur within the bounds of this actor.
  3. You also must to place ExponentialHeightFog on scene to make smoke work.

Preparing Actors for Simulation

  1. Enable Fire Simulation for Actors:

    • Add a FireSimulationComponent to each actor you want to include in the fire simulation.
    • Specify the following properties for each actor:
      • Mass: The mass of the actor in kilograms.
      • IsWall: Walls cannot burn.
      • IsBurning: If true, the actor is a starting point for the fire to spread. There MUST be only 1 starting point.
      • Selected material: The name of a material that has a set of combustion parameters such as Linear flame speed, Lowest Heat Of Combustion, Burning Rate, etc. You can explore JSON file in YourProject\Plugins\FireSimulation\Content\Data\materials.json
  2. Mark Room Boundaries:

    • Place RoomMarker actors in the scene to define the boundaries of rooms. Smoke will be generated within these boundaries.
  3. Configure Doors:

    • Add a DoorComponent to every door in the scene.
    • Configure the component with ConnectedRoom1 and ConnectedRoom2 to specify which rooms the door connects. Please note that smoke will flow from ConnectedRoom1 to ConnectedRoom2. So to make smoke work properly you need correctly setup directions in doors.
    • Optionally, set IsOpen to indicate if the door is open or closed. if the door is closed the smoke will not pass through the door.

Running the Simulation

  1. Configure and Run the Simulation:
    • Navigate to the FireSimulation tab in the Unreal Engine window.
    • In the modal window, set:
    • Fire Grid element size. The size of 1 element in grid. Example: 50 means grid will be filled with cubes with size 50x50x50
    • Number of threads for simulation calculations
    • Measure. The number of Unreal Engine untis that will be equal to 1 meter.
    • Fire distance. Visualisation parameter. Distance between fire actors. The greater the distance, the fewer Actors will be required to represent the fire zone and fewer resources will be required.
    • Select a Fire Particle System. Visualisation of fire. If you dont have Fire ParticlleSytem you can pick default visualisation located in Project/Plugins/FireSimulation/Content/P_Fire.uasset
    • Use Draw Grid to visualize your grid in the scene and Clear Grid to clear it. Be CAREFULL. If element size is too low this will crash UE.
    • Click Confirm Changes to confirm and save plugin settings.

Example Images

  • FireSimulation tab:

    FireSimulation tab

  • Example of Scene:

    Example of Scene

  • Draw Grid Example:

    Draw Grid

EXAMPLE OF PLUGINS WORK

Scene setup

image

10 seconds

image

40 seconds

image

150 seconds

image

185 seconds

image

240 seconds

image