| Getting started • Basics • Lua Scripting • Data.wak • Useful Tools |
| Audio • Enemies • Environments • Perks • Spells • Spritesheets • Materials • Image Emitters |
| Lua API • Enums • Special Tags • List of all tags • Utility Scripts • Sound Events • Enemy Information Table • Spell and Perk IDs |
Image emitters are commonly used to create particle animations, They are used on many things such as Picking up a Potion, Using a Kammi , Picking up a new wand etc.
Coding an image emitter[]
An image emitter is made using a ParticleEmitterComponent more info on the image emitter component can be found in component_documentation.txt under Steam\steamapps\common\Noita\tools_modding
The main parts of an image emitter involve:
| Var Name | Value Allowed | Description |
|---|---|---|
| image_animation_file | "String path to file" | "file to use for image-based animation" |
| image_animation_speed | [0, 255] | "how long do we stay on one frame of image-based animation. 0.5 means two game frames per one animation frame. 2.0 means two animation frames per one game frame, and so on. 0 means we always emit at time 0 of the animation." |
| image_animation_loop | [0, 1] | "does image-based animation keep looping while this component is active?" |
| image_animation_phase | [0, 1] | "the point in time [0,1] where the image-based animation will start the first cycle" |
| image_animation_emission_probability | [0, 1] | "[0,1], probability of emitting image based particles is multiplied with this" |
| image_animation_raytrace_from_center | [0, 1] | "enable this to disable image_animations (from the center) going through the world" |
| image_animation_use_entity_rotation | [0, 1] | "if 1, image animation emission will be rotated based on entity rotation" |
Here's an example of an image emitter with a played sound
<Entity name = "Emit_Effect" serialize = "1">
<InheritTransformComponent
only_position="1"
></InheritTransformComponent>
<ParticleEmitterComponent
emitted_material_name="water"
gravity.y="0.0"
offset.y="-18"
lifetime_min="4"
lifetime_max="8"
count_min="8"
count_max="8"
render_on_grid="1"
collide_with_grid="0"
collide_with_gas_and_fire="0"
fade_based_on_lifetime="1"
area_circle_radius.min="0"
area_circle_radius.max="0"
cosmetic_force_create="0"
airflow_force="0.251"
airflow_time="1.01"
airflow_scale="0.05"
emission_interval_min_frames="1"
emission_interval_max_frames="1"
emit_cosmetic_particles="1"
image_animation_file="mods/Ride Minecart/data/images/Minecart_Emit.png"
image_animation_speed="0.1"
image_animation_loop="0"
image_animation_raytrace_from_center="0"
is_emitting="1"
></ParticleEmitterComponent>
<LifetimeComponent
lifetime="500" >
</LifetimeComponent>
<!--
<AudioComponent
file="data/audio/Desktop/event_cues.bank"
event_root="event_cues/spell_refresh">
</AudioComponent>
-->
<AudioLoopComponent
_enabled="1"
file="data/audio/Desktop/misc.bank"
event_name="misc/runestone_loop"
calculate_material_lowpass="0"
auto_play="1"
></AudioLoopComponent>
</Entity>
to run this image emitter you would do
EntityLoad("Path to Image emitter", Xcoord, Ycoord)
Image Emitters[]
Image Emitter rely on a few conditions
- if the background of the image is clear it should be replaced with black
- The colors and shades of Red, Green, Yellow and Black should be only used
Different colors effect the image this is shown below;
Advanced Image Emitters[]
Once you come to grips with how image emitters works you can begin to understand how certain aniamtions are formed. Take the Kammi for example this is summoned using a combination of Green and Red in the image. The red causes the animation to have a constant amount of pixels and the green represents the animtion going to the centre (time) combined togther making yellow this creates the final animation of the Kammi.
The Kammi particle emitter image which uses a combination of red and green thus forming a yellow |
Creating your own Kammi effect[]
Creating the kammi effect is probably the most difficult method to do (atleast in my opinion) - so i will guide you on how to do it :D
What i'm using[]
For this tutorial i will be using:
If you aren't using gimp you need to make sure your software has a Distance Transform tool.
Steps[]
Now follow the steps below:
Other Methods[]
Example of gradient norm effect which is way nicer - but im not going to show you how to do everything! :)
Many other methods could be used to achieve this effect - some maybe even leading to a nicer version of this here are some other ways of doing it but theres many more - if you happen to know any please feel free to add them :D
- Gaussian blur
- Enlarge the image, have it white, on a black background, and apply distance transform
- Gradient Norm
Made by bobbymcbobface[]
With help from the awesome community that is noita :)













