Modding: Image Emitters

Modding Pages

**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:

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;

Light red = highest spawn rate
Dark red = lowest spawn rate
Dark green = gets spawned first
Light green = gets spawned last
Red = first to spawn
Yellow = last to spawn

## 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.

## 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:

* GMIC
* Gimp
* This Page as reference

If you aren't using gimp you need to make sure your software has a Distance Transform tool.

### Other Methods

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 :)