Q (bug?) about StyleFire

So, I have a simple sample of a StaticFire style, which i’m testing using color RED. It looks good but at the base there’s random white flashes. I can’t tell where the WHITE is coming from…Is that just a feature of Fire, or is one of the color variations going out of bounds?

https://fredrik.hubbe.net/lightsaber/style_editor_beta.html?S=Layers< ++White%2C ++AlphaL<RandomPerLEDFlickerL<Black>%2CIncrementWithReset<ThresholdPulseF<SwingSpeed<400>%2CInt<18000>>%2CSum<EffectPulseF<EFFECT_CLASH>%2CEffectPulseF<EFFECT_LOCKUP_BEGIN>>%2CInt<30000>%2CInt<4000>>>>

				StaticFire<
					Mix<
						SmoothStep<
							Scale<
								BladeAngle<>,
								Int<38000>,
								Int<23000>
							>,
							Int<8000>
						>,
						Mix<
							Int<400>, 
							Black,
							RgbArg<BASE_COLOR_ARG, Rgb<127, 0, 0>>
						>,
						Mix<
							Int<6000>, 
							Black,
							RgbArg<BASE_COLOR_ARG, Rgb<127, 0, 0>>
						>
					>,
					AlphaL<Black, Int<0>>,
					0,
					2,
					4,
					2000,
					2
				>

I see this in the fire.h file

  SimpleColor getColor(int led) {
    int h = this->heat_[this->num_leds_ - 1 - led];
    SimpleColor c;
    if (h < 256) {
      c.c = Color16().mix(c1_.getColor(led).c, h);
    } else if (h < 512) {
      c.c = c1_.getColor(led).c.mix(c2_.getColor(led).c, h - 256);
    } else if (h < 768) {
      c.c = c2_.getColor(led).c.mix(Color16(65535,65535,65535), h - 512);
    } else {
      c.c = Color16(65535, 65535, 65535);
    }
    return c;
  }

Lower the BASE value. You also adjust RAND and COOLING values.

This is where the white is coming from.

StyleFire currently always uses a gradient from Black, Color1, Color2, White.
I’ve been considering changing StyleFire into a function that can use Mix<> with whatever set of colors you want, but I have not done that. (yet)

if you do, kudos if you allow Speed to be a Class, so a function can adjust Speed, like bladeAngle or something. Like a FireStyleX<>

The way the code currently works doesn’t really allow for fine-grained speed adjustments, it’s just 1-20 basically.

awe. That must be why all the “interactive” fire styles, actually use Stripes :stuck_out_tongue: