Team Fortress 2/Creating fire: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Completely revamped, showcasing the particle fire types)
Line 1: Line 1:
{{note|The following method of creating fire effects has largely been replaced by the burning_torch entity introduced with Degroot Keep.}}
''Team Fortress 2'' doesn't fully support the ''env_fire'' entity used in other Source games; while the fire itself is simulated, the flames do not show up in-game. This article demonstrates how to create working fire in ''Team Fortress 2''.


----
==Particle Fire==


Team Fortress 2 doesn't fully support the ''env_fire'' entity used in other Source games; while the fire itself is simulated, the flames do not show up in-game. This article demonstrates how to create working fire in Team Fortress 2, similar to the torch fire used in Egypt.
===Default Particles===


==The Torch==
Insert an ''info_particle_system'' into your map and align it so that the origin where you want the base of the flame to appear, and make sure that the "Start Active?" property is set to "Yes". There are six flame particles available by default:


To begin, choose a prop to hold your fire. For this example, <code>models/egypt/wall_torch/wall_torch.mdl</code> is used.
[[Image:Flame particles.jpeg|right|thumb|The six fire effects in order.]]
*'''flaming_arrow''' — Used for Huntsman arrows that have been set on fire; this one includes very visible smoke that gets less opaque at close up. The fire in the fireplace in Mann Manor is made of a cluster of these.
*'''candle_light1''' — Used for the candles in Mann Manor and the lantern model.
*'''candle_light2''' — Used for the candles in Harvest Event. Slightly smaller than candle_light1.
*'''m_torchflame''' — Used for the interior (wall-mounted) torches in Degroot Keep. Inlcudes faint smoke.
*'''m_brazier_flame''' — Used for the exterior torches in Degroot Keep. Larger than m_torchflame. Also includes faint smoke.
*'''burning_torch''' — A taller, less chaotic torch flame with no smoke. Added sometime around the Medieval Update, intended use unknown.


[[Image:Torch_hammer.png]]
===Custom Particles===


==Creating The Flames==
[[Image:Barrel fire.jpeg|right|thumb|Flaming barrel from ctf_fusion_b2.]]
The [http://wiki.teamfortress.com/wiki/Swamp_Theme Swamp Pack] created by TF2Maps.net includes a larger fire particle designed for flaming barrels, but which could be used for any larger fire such as campfires. To add this to your map, first download and install the Swamp Pack from [http://wiki.teamfortress.com/wiki/Swamp_Theme this link] (most of the assets from the pack were added to the game as part of the Scream Fortress update, but the particle effects were not). Then add an info_particle_system entity with the pitch set to 0 (facing sideways) and Particle System Name set to fire01 or fire01_heatwaver. ({{todo|Find out the difference between these two.}})


There are two different ways to create the visible flames for the fire: either using an ''env_smokestack'' or an ''info_particle_system.''
To make it work, create a second copy of the file swampmapname_particles.txt (in the /tf/maps/ folder) and replace "swampname" with the full filename of your map — for example, cp_swampland_a3_particles.txt.


===Env_Smokestack===
You can also create your own fire particles using ''Team Fortress 2'''s tools mode. See [[Creating A Fire Particle]] for details.


Egypt uses ''env_smokestacks'' to simulate flames and, while they do not look exactly the same as an ''env_fire'' flame, are a good substitute.
==The Egypt Method==
 
Egypt, which was created before the flaming_torch particle was available, uses ''[[env_smokestack]]s'' to simulate flames. This method is included for legacy purposes only.


Insert an ''env_smokestack'' into your map and align it so that the origin is inside the cup of your torch.
Insert an ''env_smokestack'' into your map and align it so that the origin is inside the cup of your torch.
Line 40: Line 49:


{{tip|Some values, specifically the '''Particle Start/End Sizes, Length Of Smoke Trail''' and '''Spread Speed,''' can be adjusted as needed to create different sizes of flames.}}
{{tip|Some values, specifically the '''Particle Start/End Sizes, Length Of Smoke Trail''' and '''Spread Speed,''' can be adjusted as needed to create different sizes of flames.}}
===Info_Particle_System===
{{note|This method is recommended only for small flames, since it borrows the effect used for burning Huntsman arrows. The flame itself is about 16 units high.}}
Insert an ''info_particle_system'' into your map and align it so that the origin is inside the cup of your torch.
You will need these properties:
*'''Particle System Name:''' flaming_arrow
*'''Start Active?:''' Yes
==Glow==
{{note|This is '''not''' the light that is cast by your fire; this is covered in the next section.}}


An ''env_sprite'' is used to simulate the glow of the fire at its base.
An ''env_sprite'' is used to simulate the glow of the fire at its base.
Line 73: Line 67:
==Lighting==
==Lighting==


For your fire to cast light, you will need a ''light'' entity. Place this about 16-32 units forwards from your torch.
For your fire to cast light, you will need a ''[[light]]'' entity. Here are properties used by Egypt's torches:
 
You will need these properties:


*'''Name:''' torch_light
*'''Name:''' torch_light
Line 87: Line 79:
==Trigger_Hurt==
==Trigger_Hurt==


If the player stands on your fire they will need to be hurt by it. This is accomplished with a ''trigger_hurt.''
You may wish to have your fire damage players if they stand in your flames. This is accomplished with a ''[[trigger_hurt]].''


Create a trigger brush of appropriate size for your fire (the size used in Egypt is 10 length X 10 width X 12 height). Tie the brush to a ''trigger_hurt'' and place it where your flame will be.
Create a trigger brush of appropriate size for your fire (the size used in Egypt is 10 length X 10 width X 12 height). Tie the brush to a ''trigger_hurt'' and place it where your flame will be.
Line 96: Line 88:
*'''Damage:''' 10
*'''Damage:''' 10


==Conclusion==
{{todo|Find out how to make this actually ignite players instead.}}
 
That's it! You can now compile your map and the fire should show up in-game. In this screenshot, the torch on the left was made using an ''env_smokestack,'' while the one on the right was made with an ''info_particle_system.''
 
[[Image:Torches_in-game.jpg]]


= See Also =
= See Also =

Revision as of 11:22, 13 September 2011

Team Fortress 2 doesn't fully support the env_fire entity used in other Source games; while the fire itself is simulated, the flames do not show up in-game. This article demonstrates how to create working fire in Team Fortress 2.

Particle Fire

Default Particles

Insert an info_particle_system into your map and align it so that the origin where you want the base of the flame to appear, and make sure that the "Start Active?" property is set to "Yes". There are six flame particles available by default:

The six fire effects in order.
  • flaming_arrow — Used for Huntsman arrows that have been set on fire; this one includes very visible smoke that gets less opaque at close up. The fire in the fireplace in Mann Manor is made of a cluster of these.
  • candle_light1 — Used for the candles in Mann Manor and the lantern model.
  • candle_light2 — Used for the candles in Harvest Event. Slightly smaller than candle_light1.
  • m_torchflame — Used for the interior (wall-mounted) torches in Degroot Keep. Inlcudes faint smoke.
  • m_brazier_flame — Used for the exterior torches in Degroot Keep. Larger than m_torchflame. Also includes faint smoke.
  • burning_torch — A taller, less chaotic torch flame with no smoke. Added sometime around the Medieval Update, intended use unknown.

Custom Particles

Flaming barrel from ctf_fusion_b2.

The Swamp Pack created by TF2Maps.net includes a larger fire particle designed for flaming barrels, but which could be used for any larger fire such as campfires. To add this to your map, first download and install the Swamp Pack from this link (most of the assets from the pack were added to the game as part of the Scream Fortress update, but the particle effects were not). Then add an info_particle_system entity with the pitch set to 0 (facing sideways) and Particle System Name set to fire01 or fire01_heatwaver. (

Todo: Find out the difference between these two.

)

To make it work, create a second copy of the file swampmapname_particles.txt (in the /tf/maps/ folder) and replace "swampname" with the full filename of your map — for example, cp_swampland_a3_particles.txt.

You can also create your own fire particles using Team Fortress 2's tools mode. See Creating A Fire Particle for details.

The Egypt Method

Egypt, which was created before the flaming_torch particle was available, uses env_smokestacks to simulate flames. This method is included for legacy purposes only.

Insert an env_smokestack into your map and align it so that the origin is inside the cup of your torch.

You will need these properties:

  • Initial State: On
  • Spread At The Base: 0
  • Spread Speed: 8
  • Speed: 30
  • Particle Start Size: 9
  • Particle End Size: 4
  • Emission Rate: 15
  • Length Of Smoke Trail: 24
  • Wind X/Y Angle: 0
  • Wind Speed: 0
  • Particle Material: particle/smokesprites_0001
  • Twist: 10
  • Roll Speed: 5
  • Base Colour (R G B): 250 200 133
  • Translucency: 255
Tip.pngTip:Some values, specifically the Particle Start/End Sizes, Length Of Smoke Trail and Spread Speed, can be adjusted as needed to create different sizes of flames.

An env_sprite is used to simulate the glow of the fire at its base.

Insert an env_sprite into your map and align it so that its origin is at the same point as your env_smokestack or info_particle_system.

You will need these properties:

  • Render FX: Constant Glow
  • Render Mode: Additive
  • FX Amount (0 - 255): 125
  • FX Colour (R G B): 255 140 36
  • Framerate: 10
  • Sprite Name: materials/Sprites/light_glow03.vmt
  • Scale: 0.6
  • Size Of Glow Proxy Geometry: 30

Lighting

For your fire to cast light, you will need a light entity. Here are properties used by Egypt's torches:

  • Name: torch_light
  • Brightness: 249 118 62 50 (Change this last number to suit your brightness needs)
  • Appearance: 32 (Yes, just type it in)
Todo: What significant difference does typing in the Appearance value make?

Because these lights have a flickering appearance, if you add a lot of them it may give VRAD errors when compiling your map. To solve this, give all of your torch lights the same name and they will all be calculated together at compile.

Trigger_Hurt

You may wish to have your fire damage players if they stand in your flames. This is accomplished with a trigger_hurt.

Create a trigger brush of appropriate size for your fire (the size used in Egypt is 10 length X 10 width X 12 height). Tie the brush to a trigger_hurt and place it where your flame will be.

You will need these properties:

  • Damage Type: BURN
  • Damage: 10
Todo: Find out how to make this actually ignite players instead.

See Also

Team Fortress 2 Level Creation