The Macubus Fireball

edited 2014 Jun 6 in Addons for DOOM
Header { Version = 6 }

SkipIf -nofxmod

# -----------------------------------------------
# -                 MancFireball                - by Dani J
# -----------------------------------------------
#------------------------------------------------------------------
# STATE DEFINITIONS

state {
  ID = "FATSHOT1"
  Sprite = "MANF"
  Frame = 32768
  Tics = 4
  Next state = "FATSHOT2"
}

State {
  ID = "FATSHOT2"
  Sprite = "MANF"
  Frame = 32769
  Tics = 4
  Next state = "FATSHOT1"
}

State {
  ID = "FATSHOTX1"
  Sprite = "MISL"
  Frame = 32769
  Tics = 8
  Next state = "FATSHOTX2"
}

State {
  ID = "FATSHOTX2"
  Sprite = "MISL"
  Frame = 32770
  Tics = 6
  Next state = "FATSHOTX3"
}

State {
  ID = "FATSHOTX3"
  Sprite = "MISL"
  Frame = 32771
  Tics = 4
  Next state = "NULL"
}

#------------------------------------------------------------------
# MODEL DEFINITIONS

ModelPath "data\jdoom\Models\Projectiles\MancFireball"

Model {
  State = "FATSHOT1"
  Scale = 0
  Skin tics = 1
  Offset XYZ { 0 2 0 }
  Flags = fullbright | movpitch
  Md2{
   	File = "MancFireball.dmd"
   	Frame = "MANFA"
   	Skin range = 8
	}
}

Copy Model {
  State = "FATSHOT2"
  Md2{
	Frame = "MANFB"
	}
}

ModelPath "data\jdoom\Models\FX\Explosions"

Model {
  State = "FATSHOTX1"
  Scale = 0
  Offset = 3
  Skin tics = 1
  Flags = noz | brightshadow2 | fullbright
  Md2{
   	Skin range = 8
   	File = "explosion_new.dmd"
   	Frame = "0"
	}
}

Copy Model {
  State = "FATSHOTX1"
  Inter = 0.99
  Md2{
	Frame = "3"
	Skin = 1
	}
}

Model {
  State = "FATSHOTX2"
  Scale = .3
  Offset = 3
  Flags = noz | brightshadow2 | fullbright
  Md2{
   	File = "explosion_new.dmd"
   	Frame = "3"
   	Skin = 8
	}
}

Copy Model {
  State = "FATSHOTX2"
  Inter = 0.16
  Md2{
	Frame = "4"
	Skin = 9
	}
}
Copy Model {
  State = "FATSHOTX2"
  Inter = 0.33
  Md2{
	Frame = "5"
	Skin = 10
	}
}
Copy Model {
  State = "FATSHOTX2"
  Inter = 0.5
  Md2{
	Frame = "6"
	Skin = 11
	}
}
Copy Model {
  State = "FATSHOTX2"
  Inter = 0.66
  Md2{
	Frame = "7"
	Skin = 12
	}
}
Copy Model {
  State = "FATSHOTX2"
  Inter = 0.83
  Md2{
	Skin = 12
	}
}
Copy Model {
  State = "FATSHOTX3"
  Inter = 0
  Md2{
	Skin = 13
	}
}
Copy Model {
  State = "FATSHOTX3"
  Inter = 0.25
  Md2{
	Skin = 14
	}
}
Copy Model {
  State = "FATSHOTX3"
  Inter = 0.5
  Md2{
	Skin = 15
	}
}


#------------------------------------------------------------------
# LIGHT DEFINITIONS

Light{
  State = "FATSHOT1"
  Flags = nohalo
  Size = .65
  Red = .8
  Green = .05
  Blue = .05
}

Light{
  State = "FATSHOT2"
  Flags = nohalo
  Size = .55
  Red = .8
  Green = .05
  Blue = .05
}

Light{
  State = "FATSHOTX1"
  Flags = nohalo
  Size = 1
  Red = .8
  Green = .05
  Blue = .05
}

Light{
  State = "FATSHOTX2"
  Flags = nohalo
  Size = .6
  Red = .8
  Green = .05
  Blue = .05
}

Light{
  State = "FATSHOTX3"
  Flags = nohalo
  Size = .4
  Red = .8
  Green = .05
  Blue = .05
}


#------------------------------------------------------------------
# PARTICLE DEFINITIONS

# Smoke Trail

Generator {
  State = "FATSHOT1"
  Flags = srcvel | srcdir | blend
  Center { -4 0 0 }
  Speed = -1
  Speed rnd = 0.2
  Spawn radius = 5.8
  Spawn age = 10
  Max age = -1
  Particles = 3000
  Spawn rate = 20
  Vector rnd = 3
  Stage {
   Type = "pt_point";
   Flags = "ptf_bright";
   Tics = 3;
   Radius = 8;
   Resistance = .1;
   Color { 1 0.2 0 0.2 };
   };
  Stage {
   Type = "pt_tex01";
   Flags = "ptf_bright";
   Tics = 5;
   Radius = 16;
   Resistance = .1;
   Color { 0.7 0.1 0.1 0.2 };
   };
  Stage {
   Type = "pt_tex08";
   Flags = "ptf_bright";
   Tics = 3;
   Radius = 4;
   Resistance = .1;
   Color { 1 0.2 0 0.1 };
   };
}

# Explosion

Generator {
  State = "FATSHOTX1"
  Flags = blend
  Speed = 2
  Speed rnd = 0.2
  Spawn radius = 5
  Spawn age = 4
  Max age = 50
  Particles = 3000
  Spawn rate = 10
  Vector rnd = 1
  Stage {
   Type = "pt_point";
   Flags = "ptf_bright";
   Tics = 15;
   Radius = 8;
   Bounce = 0;
   Resistance = .01;
   Color { 0.5 0 0 .3 };
   };
  Stage {
   Type = "pt_point";
   Flags = "ptf_bright";
   Tics = 15;
   Radius = 8;
   Bounce = 0;
   Resistance = .01;
   Color { 0.5 0 0 .3 };
   };
  Stage {
   Type = "pt_tex08";
   Flags = "ptf_bright";
   Tics = 5;
   Radius = 4;
   Color { 0.5 0 0 .1 };
   };
  Stage {
   Type = "pt_point";
   Flags = "ptf_bright";
   Radius = 20;
   Tics = 20;
   Color { 1 0 0 0};
   };
}

Edit: iklw.png here is the pic i have for it and i changed the last particle trail as it now looks better i think.

Comments

  • cool, might use this with my mancubus model :)
  • You need to optimize your fireball FX, as it's now have TOO much particles. You shoot 20 particles per tick for 10 ticks with each "FATSHOT1" state. Each particle longs for 11 ticks. "FATSHOT1" state create new particle generator each 8 ticks.
    So for each projectile we have at least 2 active generators with over 250 particles as sum each game tick.
    Maybe that amount is worth for a very-very detailed fireball as in image below
    fireball.jpg
    But we see a plain drop-like shape with a smooth gradient from white to red. For that shape 10 particles is maximum.

    I encourage you to put more effort into the design of the effects.
  • Its also not a good idea to modify the State sequence (or duplicate the defaults) unnecessarily. Where possible visual effects such as this should not require altering the behavior of the fireball itself.
  • Thanks for the help Veirdo i think i got it down to 7 particles per tic with out loosing too much of it's shape.
    Header { Version = 6 }
    
    SkipIf -nofxmod
    
    # -----------------------------------------------
    # -                 MancFireball                - by Dani J
    # -----------------------------------------------
    #------------------------------------------------------------------
    # STATE DEFINITIONS
    
    state {
      ID = "FATSHOT1"
      Sprite = "MANF"
      Frame = 32768
      Tics = 4
      Next state = "FATSHOT2"
    }
    
    State {
      ID = "FATSHOT2"
      Sprite = "MANF"
      Frame = 32769
      Tics = 4
      Next state = "FATSHOT1"
    }
    
    State {
      ID = "FATSHOTX1"
      Sprite = "MISL"
      Frame = 32769
      Tics = 8
      Next state = "FATSHOTX2"
    }
    
    State {
      ID = "FATSHOTX2"
      Sprite = "MISL"
      Frame = 32770
      Tics = 6
      Next state = "FATSHOTX3"
    }
    
    State {
      ID = "FATSHOTX3"
      Sprite = "MISL"
      Frame = 32771
      Tics = 4
      Next state = "NULL"
    }
    
    #------------------------------------------------------------------
    # MODEL DEFINITIONS
    
    ModelPath "data\jdoom\Models\Projectiles\MancFireball"
    
    Model {
      State = "FATSHOT1"
      Scale = 0
      Skin tics = 1
      Offset XYZ { 0 2 0 }
      Flags = fullbright | movpitch
      Md2{
       	File = "MancFireball.dmd"
       	Frame = "MANFA"
       	Skin range = 8
    	}
    }
    
    Copy Model {
      State = "FATSHOT2"
      Md2{
    	Frame = "MANFB"
    	}
    }
    
    ModelPath "data\jdoom\Models\FX\Explosions"
    
    Model {
      State = "FATSHOTX1"
      Scale = 0
      Offset = 3
      Skin tics = 1
      Flags = noz | brightshadow2 | fullbright
      Md2{
       	Skin range = 8
       	File = "explosion_new.dmd"
       	Frame = "0"
    	}
    }
    
    Copy Model {
      State = "FATSHOTX1"
      Inter = 0.99
      Md2{
    	Frame = "3"
    	Skin = 1
    	}
    }
    
    Model {
      State = "FATSHOTX2"
      Scale = .3
      Offset = 3
      Flags = noz | brightshadow2 | fullbright
      Md2{
       	File = "explosion_new.dmd"
       	Frame = "3"
       	Skin = 8
    	}
    }
    
    Copy Model {
      State = "FATSHOTX2"
      Inter = 0.16
      Md2{
    	Frame = "4"
    	Skin = 9
    	}
    }
    Copy Model {
      State = "FATSHOTX2"
      Inter = 0.33
      Md2{
    	Frame = "5"
    	Skin = 10
    	}
    }
    Copy Model {
      State = "FATSHOTX2"
      Inter = 0.5
      Md2{
    	Frame = "6"
    	Skin = 11
    	}
    }
    Copy Model {
      State = "FATSHOTX2"
      Inter = 0.66
      Md2{
    	Frame = "7"
    	Skin = 12
    	}
    }
    Copy Model {
      State = "FATSHOTX2"
      Inter = 0.83
      Md2{
    	Skin = 12
    	}
    }
    Copy Model {
      State = "FATSHOTX3"
      Inter = 0
      Md2{
    	Skin = 13
    	}
    }
    Copy Model {
      State = "FATSHOTX3"
      Inter = 0.25
      Md2{
    	Skin = 14
    	}
    }
    Copy Model {
      State = "FATSHOTX3"
      Inter = 0.5
      Md2{
    	Skin = 15
    	}
    }
    
    
    #------------------------------------------------------------------
    # LIGHT DEFINITIONS
    
    Light{
      State = "FATSHOT1"
      Flags = nohalo
      Size = .65
      Red = .8
      Green = .05
      Blue = .05
    }
    
    Light{
      State = "FATSHOT2"
      Flags = nohalo
      Size = .55
      Red = .8
      Green = .05
      Blue = .05
    }
    
    Light{
      State = "FATSHOTX1"
      Flags = nohalo
      Size = 1
      Red = .8
      Green = .05
      Blue = .05
    }
    
    Light{
      State = "FATSHOTX2"
      Flags = nohalo
      Size = .6
      Red = .8
      Green = .05
      Blue = .05
    }
    
    Light{
      State = "FATSHOTX3"
      Flags = nohalo
      Size = .4
      Red = .8
      Green = .05
      Blue = .05
    }
    
    
    #------------------------------------------------------------------
    # PARTICLE DEFINITIONS
    
    # Smoke Trail
    
    Generator {
      State = "FATSHOT1"
      Flags = srcvel | srcdir | blend
      Center { -4 0 0 }
      Speed = -1
      Speed rnd = 0.2
      Spawn radius = 5.8
      Spawn age = 10
      Max age = -1
      Particles = 140
      Spawn rate = 20
      Vector rnd = 3
      Stage {
       Type = "pt_point";
       Flags = "ptf_bright";
       Tics = 3;
       Radius = 8;
       Resistance = .1;
       Color { 1 0.2 0 0.2 };
       };
      Stage {
       Type = "pt_tex01";
       Flags = "ptf_bright";
       Tics = 5;
       Radius = 16;
       Resistance = .1;
       Color { 0.7 0.1 0.1 0.2 };
       };
      Stage {
       Type = "pt_tex08";
       Flags = "ptf_bright";
       Tics = 2;
       Radius = 4;
       Resistance = .1;
       Color { 1 0.2 0 0.1 };
       };
    }
    
    # Explosion
    
    Generator {
      State = "FATSHOTX1"
      Flags = blend
      Speed = 2
      Speed rnd = 0.2
      Spawn radius = 5
      Spawn age = 4
      Max age = 50
      Particles = 3000
      Spawn rate = 10
      Vector rnd = 1
      Stage {
       Type = "pt_point";
       Flags = "ptf_bright";
       Tics = 15;
       Radius = 8;
       Bounce = 0;
       Resistance = .01;
       Color { 0.5 0 0 .3 };
       };
      Stage {
       Type = "pt_point";
       Flags = "ptf_bright";
       Tics = 15;
       Radius = 8;
       Bounce = 0;
       Resistance = .01;
       Color { 0.5 0 0 .3 };
       };
      Stage {
       Type = "pt_tex08";
       Flags = "ptf_bright";
       Tics = 5;
       Radius = 4;
       Color { 0.5 0 0 .1 };
       };
      Stage {
       Type = "pt_point";
       Flags = "ptf_bright";
       Radius = 20;
       Tics = 20;
       Color { 1 0 0 0};
       };
    }
    
    let me know if i did achieve that. the more optimization's i can do the better right?

    Edit: if this dose achieve what you think is good then i will go back and optimize all the particle affects i did and re-upload them here on the forums.
  • As I said before, 10 particles per "FATSHOT1" state is enough for the fireball effect like this.
    See my edited def and the screenshot
    Header { Version = 6 }
    
        SkipIf -nofxmod
    
        # -----------------------------------------------
        # -                 MancFireball                - by Dani J
        # -----------------------------------------------
        #------------------------------------------------------------------
    
        #------------------------------------------------------------------
        # MODEL DEFINITIONS
    
        ModelPath "data\jdoom\Models\Projectiles\MancFireball"
    
        Model {
          State = "FATSHOT1"
          Md2{ File = " " }
        }
    
        Copy Model {
          State = "FATSHOT2"
        }
    
        ModelPath "data\jdoom\Models\FX\Explosions"
    
        Model {
          State = "FATSHOTX1"
          Scale = 0
          Offset = 3
          Skin tics = 1
          Flags = noz | brightshadow2 | fullbright
          Md2{
              Skin range = 8
              File = "explosion_new.dmd"
              Frame = "0"
           }
        }
    
        Copy Model {
          State = "FATSHOTX1"
          Inter = 0.99
          Md2{
           Frame = "3"
           Skin = 1
           }
        }
    
        Model {
          State = "FATSHOTX2"
          Scale = .3
          Offset = 3
          Flags = noz | brightshadow2 | fullbright
          Md2{
              File = "explosion_new.dmd"
              Frame = "3"
              Skin = 8
           }
        }
    
        Copy Model {
          State = "FATSHOTX2"
          Inter = 0.16
          Md2{
           Frame = "4"
           Skin = 9
           }
        }
        Copy Model {
          State = "FATSHOTX2"
          Inter = 0.33
          Md2{
           Frame = "5"
           Skin = 10
           }
        }
        Copy Model {
          State = "FATSHOTX2"
          Inter = 0.5
          Md2{
           Frame = "6"
           Skin = 11
           }
        }
        Copy Model {
          State = "FATSHOTX2"
          Inter = 0.66
          Md2{
           Frame = "7"
           Skin = 12
           }
        }
        Copy Model {
          State = "FATSHOTX2"
          Inter = 0.83
          Md2{
           Skin = 12
           }
        }
        Copy Model {
          State = "FATSHOTX3"
          Inter = 0
          Md2{
           Skin = 13
           }
        }
        Copy Model {
          State = "FATSHOTX3"
          Inter = 0.25
          Md2{
           Skin = 14
           }
        }
        Copy Model {
          State = "FATSHOTX3"
          Inter = 0.5
          Md2{
           Skin = 15
           }
        }
    
    
        #------------------------------------------------------------------
        # LIGHT DEFINITIONS
    
        Light{
          State = "FATSHOT1"
          Flags = nohalo
          Size = .65
          Red = .8
          Green = .05
          Blue = .05
        }
    
        Light{
          State = "FATSHOT2"
          Flags = nohalo
          Size = .55
          Red = .8
          Green = .05
          Blue = .05
        }
    
        Light{
          State = "FATSHOTX1"
          Flags = nohalo
          Size = 1
          Red = .8
          Green = .05
          Blue = .05
        }
    
        Light{
          State = "FATSHOTX2"
          Flags = nohalo
          Size = .6
          Red = .8
          Green = .05
          Blue = .05
        }
    
        Light{
          State = "FATSHOTX3"
          Flags = nohalo
          Size = .4
          Red = .8
          Green = .05
          Blue = .05
        }
    
    
        #------------------------------------------------------------------
        # PARTICLE DEFINITIONS
    
        # Smoke Trail
    
        Generator {
          State = "FATSHOT1"
          Flags = srcvel | srcdir | blend | modelonly
          Center { -4 0 0 }
          Speed = -0.5
          Speed rnd = 0.2
          Spawn radius = 4
          Spawn age = 7
          Max age = 28
          Particles = 10
          Spawn rate = 1.42
          Vector rnd = 1
          Stage {
           Type = "pt_point";
           Flags = "ptf_bright";
           Tics = 7;
           Radius = 22;
           Resistance = .1;
           Color { 1 0.2 0.1 1 };
           };
          Stage {
           Type = "pt_tex01";
           Flags = "ptf_bright";
           Tics = 7;
           Radius = 16;
           Resistance = .1;
           Color { 1 0.1 0.1 1 };
           };
          Stage {
           Type = "pt_tex08";
           Flags = "ptf_bright";
           Tics = 7;
           Radius = 7;
           Resistance = .1;
           Color { 1 0.2 0 0.1 };
           };
    	  Stage {
           Type = "pt_tex08";
           Flags = "ptf_bright";
    	   Radius = 2;
           Color { 1 0.2 0 0 };
           };
        }
    
        # Explosion
    
        Generator {
          State = "FATSHOTX1"
          Flags = blend
          Speed = 2
          Speed rnd = 0.2
          Spawn radius = 5
          Spawn age = 4
          Max age = 50
          Particles = 3000
          Spawn rate = 10
          Vector rnd = 1
          Stage {
           Type = "pt_point";
           Flags = "ptf_bright";
           Tics = 15;
           Radius = 8;
           Bounce = 0;
           Resistance = .01;
           Color { 0.5 0 0 .3 };
           };
          Stage {
           Type = "pt_point";
           Flags = "ptf_bright";
           Tics = 15;
           Radius = 8;
           Bounce = 0;
           Resistance = .01;
           Color { 0.5 0 0 .3 };
           };
          Stage {
           Type = "pt_tex08";
           Flags = "ptf_bright";
           Tics = 5;
           Radius = 4;
           Color { 0.5 0 0 .1 };
           };
          Stage {
           Type = "pt_point";
           Flags = "ptf_bright";
           Radius = 20;
           Tics = 20;
           Color { 1 0 0 0};
           };
        }
    
    mancfireball.png

    1. I shrunk down generator spawn age to 7 (remember 8 ticks state cycle), and I forcibly remove used generator after 28 ticks (spawn age + particle life time).
    2. Do not use zero scale model, use zero md2 file path instead.
    3. Vector rnd 1 is enough, as you don't define a direction vector.
    4. Do not use huge amount of particles with almost zero opacity, use small amount and more opaque particles instead.
    5. It's better to end up particle life with the zero opacity
  • your tics are far too long for each section of it. with the tics being a combined total of 10 you have something that looks even better as you do not have this long thing coming at you that looks some what unnatural. i have the tics at 4, 4, and 2. also i would call it an electric fireball but still a fireball.
  • With 10 tics per particle we got a lesser trail and less particles count. All depends of what kind of the effect you want to do.
  • see now thats the problem with how the particle system is now it can't do stuff that looks close to doom we can only approximate and thats what i am trying to do wile trying to make it look cool but when you can't make textures worth a dam it's hard lol.
  • Thats not a logical argument for (abusing) a real time particle system renderer. In an ideal world one could use an unlimited number of pixel-sized particles to accurately replicate the "real" particles of the fire, with complex physics, etc. The reality however is that such a particle system is (potentially) so computationally expensive that real time performance cannot be achieved without compromises. Real time computer graphics is fundamentally a balancing act.

    Trying to represent a complex particle cloud using only "points", one must exchange discreet particles for performance. However, if you can represent a "layer" of cloud particles using a texture - you increase the effective number of visual particles by orders of magnitude. Combine multiple layers on top of one another, spawning, moving, scaling (and ideally, rotating) at different times and it becomes possible to achieve something that provides a decent approximation of the intended effect, while achieving acceptable performance.

    Obviously, though, if you aren't able to produce such textures yourself then you'll need to source them from somewhere. A quick search for "particle cloud texture" yielded dozens of results (ensure to check the usage terms/license, mind you).
Sign In or Register to comment.