Djinni Wiki

This is a very quick and rough tutorial on how to create a new special effect that can be attached to objects.

The effects editor is divided into four panels:

  • upper left - a tree view of the effect structure (emitters, change envelopes, etc)
  • middle - preview
  • camera icon - starts/stops the animation
  • other icons set the background colour or add helper objects
  • upper right - effect phases (each phase can set its own change envelopes for effect parameters)
  • bottom - envelopes and their keys in a time graph
  • you can drag parameters from the tree view in here to add envelopes to them; add new keys with the pencil/clipboard icon; move keys with the move icon; enter precise values with the edit boxes below; pan around with the middle button; zoom in/out with the mousewheel.
  • WARNING - this window sometimes gets 'stuck' in its sizing mode, as if you were holding Alt (especially after Alt-Tabbing out and back). If your mouse keeps resizing the graph instead of adding keys or selecting with a rectangular area, hit and releast Alt once or twice. The same goes for the phases window.

Let's get cracking.

  1. Create a new effect (File - New - WootFX Effect)
  2. In the tree view right-click and Add new element - Emitter
  3. In the preview panel click the camera, get the effect rolling (it's not going to show up at this time yet)
  4. Expand the emitter's properties and set:
    • Birth Rate: 5 - here come puffs of rectangular smoke
    • Velocity: 1 - the smoke floats upwards
    • Blend Type: Lighten - now the smoke blends properly
    • Particle Rotation: 2 - now the puffs rotate
    • Spread: 0.1 - the smoke spreads out a bit
  5. Now let's make a choo-choo train:
    • Drag Birth Rate into the panel below, an "Emitter 1.Birth Rate" entry should be created there - the smoke disappears, don't worry
    • In the graph window click the pencil and click in the graph area to add a key with Time:0 Value:5 (or close to that) - you'll get a new key and a red line extending out of it
    • One more key, Time:1 Value:40 - the smoke will thicken drastically
    • One more, Time:2 Value:5 - the smoke thins out again
    • You should have a "hump" in the graph now.
    • Now let's loop it, so that our 5-to-40 change gets repeated over time: [X] Loop enabled, Loop begin:0, Loop end: 2

You should now have a beautiful, hopelessly unrealistic, smoke effect thickening in a 2-second cycle.

Now if you plan to control this effect from your scripts, using ChangePlaceableEffectPhase, let's add a fadeout phase:

  • right-click in the Phase Graph, Add new phase, name it 'fadeout'
  • click the phase - oops, our smoke is gone
  • like before, set keys for the Birth Rate envelope to change from 40 in time 0 to 0 in time 2, non-looped. This is a nice 2-second fadeout.

Now to test it - just click the Cast phase and watch the pulsating smoke... or click the fadeout phase and watch the smoke die away.

This should be enough for starters, to be able to dig into default effects and customize them to our liking.