Blade Style help

I’ve used the search function but I didn’t find any topics that seem to solve my question.

I’m trying to create a blade effect for Style Option 2 for use in EDIT MODE that is basically randomized flashes of ALTCOLOR2, by using TrBoing, HumpFlickerL, and TrDelayX. This was inspired by the “Thunderstorm” blade style that uses Stripes and TrDelayX to make random lightning flashes. I’m wanting to create an effect that can overlay lightning flashes on top of the base STYLE OPTION selected.

The timing and position is supposed to be random, so i’m using AlphaL with a HumpFlickerL<ALTCOLOR2m 10000> and then SmoothStep<RandomF, Int<10000>>, to randomly position humps that take 30% or so of the blade size within the blade.

So far, I have this effect but it isn’t showing up:

TransitionLoop<
	AlphaL< // Invisible color
		ALTCOLOR,
		Int<0>
	>,
	TrConcat<
		TrBoing<500, 3>,
		Layers <
			AlphaL<
				HumpFlickerL<ALTCOLOR2, 16000>,
				SmoothStep<
					RandomF,
					Int<16000>
				>
			>,
			AlphaL< // Invisible color
				ALTCOLOR,
				Int<0>
			>
		>,
		TrDelayX< // Random Timer
			Scale<
				SlowNoise<Int<3000>>,
				Int<100>,
				Int<2000>
			>
		>
	>
>

I tried just putting the simple randomized position humpflickerL as a stand alone blade style selection but that also doesn’t show up.

		AlphaL<
			HumpFlickerL<RgbArg<ALT_COLOR2_ARG, Rgb<255, 255, 255>>, 10000>,
			SmoothStep<
				RandomF,
				Int<10000>
			>
		>,

here’s a github link to the WIP code. The above isn’t committed yet.

I’m so confused. Are you writing “ALTCOLOR” here as a placeholder for ALT_COLOR_ARG?

This does show up, but with a hump width at 10000 it’s going to be barely noticeable. Try 100 to see it and adjust from there?

Is this kind of what you’re meaning?

StylePtr<Layers<Black,
  AlphaL<RgbArg<ALT_COLOR_ARG,White>,Int<0>>,
  TransitionLoopL<TrConcat<TrBoing<500,3>,AlphaL<HumpFlickerL<RgbArg<ALT_COLOR_ARG,White>,160>,SmoothStep<RandomF,Int<16000>>>,
TrInstant,Black,
TrDelayX<Scale<SlowNoise<Int<3000>>,Int<100>,Int<2000>>>>>>>()

Oh, I thought the WIDTH was the size, the same as BUMP WIDTH. e.g. 1 = narrow, 32768 = whole length of blade. I’ll try with 100 and see.

I broke my style up into a lot of oop code to reduce duplicate code. So, I include a Colors.h that has

// Base Color
using BASECOLOR = RgbArg<BASE_COLOR_ARG, Rgb<255, 255, 255>>;
// Alt Colors
using ALTCOLOR = RgbArg<ALT_COLOR_ARG, Rgb<255, 255, 255>>;
using ALTCOLOR2 = RgbArg<ALT_COLOR2_ARG, Rgb<255, 255, 255>>;
using ALTCOLOR3 = RgbArg<ALT_COLOR3_ARG, Rgb<255, 255, 255>>;
// Effect Colors
using SWINGCOLOR = RgbArg<SWING_COLOR_ARG, Rgb<255, 255, 255>>;
using BLASTCOLOR = RgbArg<BLAST_COLOR_ARG, Rgb<255, 255, 255>>;
using IGNITIONCOLOR = RgbArg<IGNITION_COLOR_ARG, Rgb<255, 255, 255>>;
using RETRACTIONCOLOR = RgbArg<RETRACTION_COLOR_ARG, Rgb<255, 255, 255>>;
using PREONCOLOR = RgbArg<PREON_COLOR_ARG, Rgb<255, 255, 255>>;
using POSTOFFCOLOR = RgbArg<POSTOFF_COLOR_ARG, Rgb<255, 255, 255>>;
using EMITTERCOLOR = RgbArg<EMITTER_COLOR_ARG, Rgb<255, 255, 255>>;
using CLASHCOLOR = RgbArg<CLASH_COLOR_ARG, Rgb<255, 255, 255>>;
using LOCKUPCOLOR = RgbArg<LOCKUP_COLOR_ARG, Rgb<255, 255, 255>>;
using LBCOLOR = RgbArg<LB_COLOR_ARG, Rgb<255, 255, 255>>;
using DRAGCOLOR = RgbArg<DRAG_COLOR_ARG, Rgb<255, 255, 255>>;
using STABCOLOR = RgbArg<STAB_COLOR_ARG, Rgb<255, 24, 0>>;
using OFFCOLOR = RgbArg<OFF_COLOR_ARG, Rgb<255, 255, 255>>;
using TRANSPARENT = AlphaL<Black, Int<0>>;

I have the code on a github, I’ll edit the first post with a link.

EDIT: Ok, I tried 100, and i can see it now, it’s mostly at the tip of the blade. I thought the position SmoothStep<RandomF, Int<16000>> would put it at a random position, centered in the blade? Or should the Int be the lowest possible position 0 or 500?

Use bump instead of smoothstep.

and with Bump, the the first Int arg is the position, the second int arg is the size?

EDIT: Ok, getting somewhere now. Yeah Bump is working much better then smoothstep.

Yes. Working in the Style Editor makes things very evident as most arguments have a comment descriptor as well as being broken out logically in the right hand column :wink:
The blue linked style above should take you there with the style loaded and active.

ah, ok. Yeah, I find that site kinda hard to work with, compared to writing the code by hand. But I can probably shove my code in there to preview it. But what i’m trying to make is a flash of a hump that takes up about half the blade length, where each flash is at a random position, and random timing. So to look like lightning flashes within the blade.

EDIT: woohoo, got it! <3 Final code:

TransitionLoop<
	AlphaL< // Invisible color
		RgbArg<ALT_COLOR2_ARG, Rgb<255, 255, 255>>,
		Int<0>
	>,
	TrConcat<
		TrBoing<500, 3>,
		TrConcat<
			TrFade<100>,
			AlphaL<
				HumpFlickerL<RgbArg<ALT_COLOR2_ARG, Rgb<255, 255, 255>>, 10>,
				Bump<
					RandomF,
					Int<20000>
				>
			>,
			TrFade<100>
		>,
		TrDelayX< // Random Timer
			Scale<
				SlowNoise<Int<3000>>,
				Int<100>,
				Int<2000>
			>
		>
	>
>

If I have further questions about other issues with this blade style i’m building, should I make a new topic or just roll everything into this one?

Generally speaking, if you’re unsure, just start a new topic.