Creating A Fire Particle: Difference between revisions
m (add {{lang}}) |
Le Glaconus (talk | contribs) (formatting) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Underlinked|date=January 2024}} | ||
{{languageBar}} | |||
==Overview== | ==Overview== | ||
The aim of this tutorial is to give you a insight of fire creation in | The aim of this tutorial is to give you a insight of fire creation in particles. | ||
:[[ | This article will not explain the complete ins and outs of particle creation, as there is already documentation on it [[:Category:Particle_System|here]]. You will learn to create a fire particle like this: | ||
:[[File:Fire particle.jpg|200px]] | |||
===Properties=== | ===Properties=== | ||
Make a new particle system, and name it. First we need to determine the | 1. Make a new particle system, and name it. First we need to determine the | ||
main properies of the particle. In the main tab of the particle, select the '''system properties''' tab. | main properies of the particle. In the main tab of the particle, select the '''system properties''' tab. | ||
Change the '''max_particles''' to 40. Now select the '''material''' line, and click | 2. Change the '''{{mono|max_particles}}''' to 40. Now select the '''material''' line, and click the {{mono|...}} button to load the material browser and search for an appropriate fire material. For example, {{path|icon=file|particle/fire_particle_4/fire_particle_4|vmt}}. | ||
the ... button to load the material browser and search for | |||
Set the | 3. Set the {{code|bounding_box_min}} to {{code|-512 -512 -512}} and the {{code|bounding_box_max}} to {{code|512 512 512}}. | ||
Change the | Change the {{code|color}}''' field to an orange color. We're done on the system properties tab now. Now in the main tab select the '''render''' tab. Right-click on the tab and select the add option. | ||
===Renderer=== | ===Renderer=== | ||
All particles need some kind of renderer to actually do anything. So we're going to add a '''render_animated_sprites''' renderer. Inside it change the | All particles need some kind of renderer to actually do anything. So we're going to add a '''{{mono|render_animated_sprites}}''' renderer. Inside it change the {{code|animation_rate}} number to {{code|0.9}} and set the {{code|animation_fit_lifetime}} to {{code|1}}. We're done with the renderer now. next click on the '''operator''' tab. | ||
===Operators=== | ===Operators=== | ||
With the operators we will determine things like movement type, alpha fade in/out, lifespan etc. Operators do the work after the particle is initialized, rather then the initializers job of setting the starting state. | 1. With the operators we will determine things like movement type, alpha fade in/out, lifespan etc. Operators do the work after the particle is initialized, rather then the initializers job of setting the starting state. | ||
In the operator tab, add a ''' | 2. In the operator tab, add a '''Movement Basic'''. This will determine the basic movement that the particle will do. In the '''Movement Basic''', we only need to do one thing here. In the {{code|gravity}} field, set it to {{code|0 0 50}}. Gravity gives the fire a direction to emit, {{code|0 0 50}} will make the fire go up like it would in real life, where as setting it to {{code|0 0 -50}}, it will make it emit downwards. | ||
Next add a '' | 3. Next add a '''Oscillate Vector'''. This operator will help us create a wavy fire effect, to keep the fire being wavy and bumpy like a real fire, rather then a static looking fire. Here's a example of its function: | ||
::[[ | ::[[File:Sin_wave.jpg]] | ||
In the ''' | 4. In the '''Oscillate Vector''', under the {{code|oscillation rate min}}, change the numbers to {{code|-0.400000006 -0.400000006 0}} and under {{code|oscillation rate max}}, change the numbers to {{code|0.400000006 0.400000006 0}}. Change the {{code|oscillation frequency min}} numbers to {{code|0.5 0.5 1}} and the {{code|oscillation frequency max}} numbers to {{code|1 1 0}}. | ||
We're done with this operator now. | We're done with this operator now. | ||
Next add a '''Lifespan Decay'''. This will delete the particle when it's given lifespan expires, we need to do this to make our alpha fade work, which we'll add. We don't need to add anything to this operator, it just needs to be there for it to function correctly. | 5. Next add a '''Lifespan Decay'''. This will delete the particle when it's given lifespan expires, we need to do this to make our alpha fade work, which we'll add. We don't need to add anything to this operator, it just needs to be there for it to function correctly. | ||
Now we'll add the Alpha Fade. Add a ''' | 6. Now we'll add the '''Alpha Fade''''. Add a '''Alpha Fade In Random'''. Inside it change the {{code|fade in time min}} to {{code|0.3000000119}} and the {{code|fade in time max}} to {{code|0.400000006}}. Now add a '''Alpha Fade Out Random''' and change the {{code|fade out time min}} to {{code|0.349999994}} and {{code|fade out time max}} to {{code|0.5}}. | ||
We're done with the operators now. | We're done with the operators now. | ||
Line 47: | Line 47: | ||
We need to add some initializers. These will determine the particles starting state. | We need to add some initializers. These will determine the particles starting state. | ||
Add a '''Radius Random''', set the | 1. Add a '''Radius Random''', set the {{code|radius_min}} to {{code|3}}, and the {{code|radius_max}} to {{code|10}}. This emits the particle within this radius, if you wanted a much larger fire, then for instance you would set the max to {{code|50}}. | ||
Next add a '''Alpha Random'''. Set the | 2. Next add a '''Alpha Random'''. Set the {{code|alpha_min}} to {{code|120}} and the {{code|alpha_max}} to {{code|200}}. | ||
Now add a '''Rotation Random'''. Nothing is needed to add inside here. | 3. Now add a '''Rotation Random'''. Nothing is needed to add inside here. | ||
Next add a '''Position Within Sphere Random'''. Set the | 4. Next add a '''Position Within Sphere Random'''. Set the {{code|distance_bias}} to {{code|1 1 0}} and the {{code|speed_max}} to {{code|10}}. | ||
Set the | Set both the {{code|speed_in_local_coordinate_system_min}} and {{code|speed_in_local_coordinate_system_max}} to {{code|0 0 5}}. This tells the particle to emit inside this sphere with a certain speed. | ||
Add a '''Lifetime Random''' and set it's | 5. Add a '''Lifetime Random''' and set it's {{code|lifetime_max}} to {{code|1.25}} and {{code|lifetime_min}} to {{code|1}}. This sets each particle in the fires life to random in these numbers. | ||
Add a '''Sequence Random''' and set the | 6. Add a '''Sequence Random''' and set both the {{code|sequence_max}} and the {{code|sequence_min}} to {{code|2}}. | ||
Now add a '''Position Modify Offset Random''' and set the | 7. Now add a '''Position Modify Offset Random''' and set the {{code|offset in local space 0/1}} to {{code|1}}. | ||
The | The initializing is now complete. | ||
===Emitters=== | ===Emitters=== | ||
Lastly, we need to add the main function that brings the particle to life. Emitters are what do this. | |||
Add a | 1. Add a {{code|emit_continuously}} and the fire particle should come to life in the preview box. | ||
Set the | Set the {{code|emission_rate}} to {{code|50}}. | ||
==Conclusion== | ==Conclusion== | ||
The particle is now finished, you should have a small fire particle built. You can | The particle is now finished, you should have a small fire particle built. You can learn from the way you built this to edit from it to make other particles like a waterfall. | ||
learn from the way you built this to edit from it to make other particles like a | |||
waterfall. | |||
[[Category:Particle System]] | [[Category:Particle System]] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 09:58, 28 May 2025




January 2024
Overview
The aim of this tutorial is to give you a insight of fire creation in particles.
This article will not explain the complete ins and outs of particle creation, as there is already documentation on it here. You will learn to create a fire particle like this:
Properties
1. Make a new particle system, and name it. First we need to determine the main properies of the particle. In the main tab of the particle, select the system properties tab.
2. Change the max_particles to 40. Now select the material line, and click the ... button to load the material browser and search for an appropriate fire material. For example, particle/fire_particle_4/fire_particle_4.vmt
.
3. Set the bounding_box_min to -512 -512 -512 and the bounding_box_max to 512 512 512. Change the color field to an orange color. We're done on the system properties tab now. Now in the main tab select the render tab. Right-click on the tab and select the add option.
Renderer
All particles need some kind of renderer to actually do anything. So we're going to add a render_animated_sprites renderer. Inside it change the animation_rate number to 0.9 and set the animation_fit_lifetime to 1. We're done with the renderer now. next click on the operator tab.
Operators
1. With the operators we will determine things like movement type, alpha fade in/out, lifespan etc. Operators do the work after the particle is initialized, rather then the initializers job of setting the starting state.
2. In the operator tab, add a Movement Basic. This will determine the basic movement that the particle will do. In the Movement Basic, we only need to do one thing here. In the gravity field, set it to 0 0 50. Gravity gives the fire a direction to emit, 0 0 50 will make the fire go up like it would in real life, where as setting it to 0 0 -50, it will make it emit downwards.
3. Next add a Oscillate Vector. This operator will help us create a wavy fire effect, to keep the fire being wavy and bumpy like a real fire, rather then a static looking fire. Here's a example of its function:
4. In the Oscillate Vector, under the oscillation rate min, change the numbers to -0.400000006 -0.400000006 0 and under oscillation rate max, change the numbers to 0.400000006 0.400000006 0. Change the oscillation frequency min numbers to 0.5 0.5 1 and the oscillation frequency max numbers to 1 1 0.
We're done with this operator now.
5. Next add a Lifespan Decay. This will delete the particle when it's given lifespan expires, we need to do this to make our alpha fade work, which we'll add. We don't need to add anything to this operator, it just needs to be there for it to function correctly.
6. Now we'll add the Alpha Fade'. Add a Alpha Fade In Random. Inside it change the fade in time min to 0.3000000119 and the fade in time max to 0.400000006. Now add a Alpha Fade Out Random and change the fade out time min to 0.349999994 and fade out time max to 0.5.
We're done with the operators now.
Initializers
We need to add some initializers. These will determine the particles starting state.
1. Add a Radius Random, set the radius_min to 3, and the radius_max to 10. This emits the particle within this radius, if you wanted a much larger fire, then for instance you would set the max to 50.
2. Next add a Alpha Random. Set the alpha_min to 120 and the alpha_max to 200.
3. Now add a Rotation Random. Nothing is needed to add inside here.
4. Next add a Position Within Sphere Random. Set the distance_bias to 1 1 0 and the speed_max to 10. Set both the speed_in_local_coordinate_system_min and speed_in_local_coordinate_system_max to 0 0 5. This tells the particle to emit inside this sphere with a certain speed.
5. Add a Lifetime Random and set it's lifetime_max to 1.25 and lifetime_min to 1. This sets each particle in the fires life to random in these numbers.
6. Add a Sequence Random and set both the sequence_max and the sequence_min to 2.
7. Now add a Position Modify Offset Random and set the offset in local space 0/1 to 1.
The initializing is now complete.
Emitters
Lastly, we need to add the main function that brings the particle to life. Emitters are what do this.
1. Add a emit_continuously and the fire particle should come to life in the preview box. Set the emission_rate to 50.
Conclusion
The particle is now finished, you should have a small fire particle built. You can learn from the way you built this to edit from it to make other particles like a waterfall.