Here are some Krakatoa coloring techniques.

Particle Flow scene, 200 particles are moved slowly around a little sphere – emitter object. To make nice thin lines, they are separated as much as possible in Position Object operator.

energy ball pflow setup

After exporting to Krakatoa’s PRT format, here is rendered 80 million particles:

krakatoa render

3dsmax 2012 scene with PFlow setup, as well PRT Loader with already pre-cached one frame (220MB). All MagmaScripts with exact screenshots included. Magma files can be download separately under each thread or from dropbox.


Position | Magma flow

Atmospherical gizmo object is used as placement area for blending two colors.

Keep in mind that object radius and scale are completely different values. A more complex way is attached in the .magmascript file. ×
download magma


After some tweaks, there is a possibility to use more than one gizmo.


Or even custom geometries.

download magma


Or color by nearest particles from another particles container.

krakatoa magma particles
download magma


Density | Magma flow

Density can be modified individually, even in another magma flow. Here is an example how to set noise map as particle opacity.

To better represent what we do with density channel, it is good to use additional PRT Viewport Color output in magma Flow. It doesn’t affect final rendering and works in viewport only. ×
download magma


Velocity | Magma flow

Here is a simple way to blend two colors by particle speed.

download magma


Gradient | Magma flow

Usually is better to use 3dsmax maps to generate color data, as for example gradient ramp as particles velocity mark.

Krakatoa colors by velocity
Important: Gradient Ramp mapping cordinates must be setup to vertex colors.×
download magma


Or even better – leave entire color info to maps/other sources and modify only particles texture coordinates. Here is the same results like previous, but completely different approach.

download magma



One of the most wonderful Krakatoa tricks is that same particles coloring approach can be used for render elements (as CustomData).

krakatoa render elements


Here is an example how one more color was added to the final image by extracting and masking one velocity direction from Velocity Pass. With custom elements, any masks can be created.

krakatoa fusion compositing


Final Video

25 Responses to “Particle colors | part 3”

  1. Aman Duggal, Reply

    gr8 tut….!!!! gonna try this!!!!

  2. denizsahin, Reply

    thanks for the tutorial, chache times ?

    • deko, Reply

      You’re welcome!
      Particles count is pretty heavy, in last frames there is 20 million particles and overall sequence (0-400 frame) take more than 80 GB of data. On my one machine it took almost 24 hours to calculate. And it’s one partition only.

      Video above created from 4x partition and together have 80 millions particles.

      • denizsahin, Reply

        i have to dispute the pflow setup a litle bit more
        after 7 hours ^^
        particle birth count 150
        particle count 3m
        step size 0.22,

        i need a lot more particle and need a lot more time for the sim, thanks for sharing deko!

        • deko, Reply

          To speed up, you can reduce Spawn by Rate in Event06 (try from 400 to 100). This setup is a little different than usual, Spawn by Travel makes quantity of thin lines and Spawn by Rate is density of an every line.
          Best of luck!

  3. zoubein, Reply

    Great Stuff! Its nice to see the magma flows with clear examples of their use. I specially like the compositing trick as that is something I always struggle with.

    • deko, Reply

      Glad you liked!

      • zoubein, Reply

        Do you think you could post your flow for the custom data? Thanks!

        • deko, Reply

          As I remember, there was flow from Position by Gizmo example, the very first one. Second picture is standart Krakatoa Velocity Render Element.
          Btw, CustomData Element works like any other Magma Flow, except output must be Vector value (color).

  4. Milko, Reply

    Hi, thanks for sharing these!

  5. Denis, Reply

    Which channels you’ve saved in Krakatoa?

    • deko, Reply

      In this scene only default channels is required: Position, Velocity, Density, Color, Normal, ID.

  6. Gre, Reply


  7. Strob, Reply

    cool! very beautiful

  8. Shadewe, Reply

    I’m currently trying to use the ColorByParticles magmaflow, but whenever I try to select my PRT loader in the “InputParticles” it wont work. It clears the selection whenever I deselect the operator.. Can you help me?

    • deko, Reply

      What type of Particles you are trying to pick? As I remember only ThinkBox particles are accepted, try save to PRT and select PRT Loader particles. Is that works now?

      • Shadewe, Reply

        I’m trying to load particles from at KrakatoaPRTLoader. I saved the PRT’s from at particle flow system, driven by FumeFX. Does this make a difference?

  9. Superxcm, Reply

    Thanks! I just found out your website, it’s great resources. Thanks for taking the time to do that!
    Keep it rockin!

  10. Anonymous, Reply

    Great stuff, as always…. Thanks!!!

  11. Anonymous, Reply

    love you

  12. WE.1502 | Han Han Xue, Reply

    […] different particle coloring methods using Thinkbox Magma 2. I still remember reading deKO’s post a year ago and not understanding anything. Yesterday I quickly skimmed over the post again and […]

  13. Anonymous, Reply

    it’s amazing when i try the DENSITY | MAGMA FLOW part ,i add the prtviewport color ,it is not work in the viewport ,then i assign the noise material to the particle ,the color in the other magma flow does not work .can you help me ?

Leave a Reply