PDA

View Full Version : Digital Flame


Krash
22nd November 2001, 12:46
Without being too modest, I think this beats the pants off any pre-existing "flame" presets we've currently got. It looks the most "flame-like" when the music is quiet, and more digital when it's loud.
Oh, and a while back, we were having a conversation about the effective use of warp. See exhibit A:

=============
Digital Flame
=============
[preset00]
fRating=3.000000
fGammaAdj=2.000000
fDecay=0.900000
fVideoEchoZoom=1.000000
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=0
nWaveMode=6
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=0
bTexWrap=0
bDarkenCenter=0
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=12
nMotionVectorsY=9
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=1.000000
fWaveScale=0.369700
fWaveSmoothing=0.750000
fWaveParam=0.000000
fModWaveAlphaStart=0.750000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=53.523884
fWarpScale=0.408391
fZoomExponent=1.000000
fShader=0.000000
zoom=1.000000
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.000000
sx=1.000000
sy=1.000000
wave_r=0.699900
wave_g=0.600000
wave_b=0.800000
wave_x=0.000000
wave_y=0.500000
ob_size=0.000000
ob_r=0.000000
ob_g=0.000000
ob_b=0.000000
ob_a=0.000000
ib_size=0.000000
ib_r=0.000000
ib_g=0.000000
ib_b=0.000000
ib_a=0.000000
per_frame_1=dx =-0.0005;
per_frame_2=dy =-0.0005;
per_frame_3=q1 = (bass_att + mid_att + treb_att) /3;
per_frame_4=q2 = time + 1000;
per_frame_5=bass_thresh = above(bass_att,bass_thresh)*2 + (1-above(bass_att,bass_thresh))*((bass_thresh-1.4)*0.95+1.4);
per_frame_6=treb_thresh = above(treb_att,treb_thresh)*2 + (1-above(treb_att,treb_thresh))*((treb_thresh-1.5)*0.85+1.2);
per_frame_7=bass_on = above(bass_thresh,1.9);
per_frame_8=treb_on = above(treb_thresh,1.9);
per_frame_9=swapcolour = bass_on - treb_on;
per_frame_10=red_aim = if(equal(swapcolour,1),1,if(equal(swapcolour,0),0.9,0.7));
per_frame_11=green_aim = if(equal(swapcolour,1),0.7,if(equal(swapcolour,0),0.3,0.6));
per_frame_12=blue_aim = if(equal(swapcolour,1),0,if(equal(swapcolour,0),0.2,0.8));
per_frame_13=red = red + (red_aim - red)*0.5;
per_frame_14=green = green + (green_aim - green)*0.5;
per_frame_15=blue = blue + (blue_aim - blue)*0.5;
per_frame_16=wave_r = red;
per_frame_17=wave_g = green;
per_frame_18=wave_b = blue;
per_pixel_1=dy = -0.1*(q1-1)*log(2-(abs(y*2 - 1.8)));
per_pixel_2=dy = below(dy,0.02)*dy - 0.02;
per_pixel_3=dy = dy + 0.01*(sin((x*q2*0.483) + (y*q2*1.238)) + sin((x*q2*1.612) + (y*q2*0.648)));


Enjoy.

- Krash

Rovastar
22nd November 2001, 13:12
Excellent effect Krash. Me likes lots.

unchained
22nd November 2001, 13:13
Pretty nice, if a bit small.

I don't know if you worked out the effect yourself, or just played around until you got it, or what, but just as a general heads-up to anybody interested, there's a lot of information out there on how to do effects like flames, and explosions and whatnot using fractal patterns. A good place to look is through the archives from the assembly demo competitions that were really big in the late 80s-early 90s. (I dunno where they're keeping all that stuff these days, but a search for assembly demo should turn up something) In fact, it's a good source for a lot of graphics coding information, though it tends to be a bit on the technical side, since most of it centered around coding in raw assembler for DOS platforms.

Also, here's the zip of Krash's preset for those too lazy to paste.

Krash
22nd November 2001, 13:23
if by small, you mean the amount of space it takes up on screen, then it gets bigger with beats.
So if you are playing music that has obvious breaks between loud and soft parts, the flame will stretch to take up about 2/3rds of the screen. I cut it down to this level, because when it got higher, it started to look too much like lines, and not enough like flames =]

And I half figured out the pattern, and half fluked it. I knew what I wanted, and had a vague idea of how to do it, but after that, I guessed until it looked nice.

- Krash

StudioMusic
22nd November 2001, 13:31
Very cool and great beat detection, something I really like. But right now I am still hook on Monstrosity. SM

unchained
22nd November 2001, 14:14
Doh, I wasn't paying any attention to what was playing when I watched it, and didn't look at the code too close. I just saw wee little flames at the bottom of the screen, said "Hey, cool" and quit back out. Next time I'm in MD I'll take a look at scaling up whatever you did without distortion.

Illusion
23rd November 2001, 06:06
This is excellent Krash, I'll be trying a mod of this (amongst the other ones I want to do) next week, the effect is very original. Nice work.

I'd like to see it perhaps a little "bigger" too, because on my computer it needs pretty intense beats to get anywhere near the top. But it looks awesome.. has a lot of potential...

Krash
23rd November 2001, 11:58
making it move higher isn't really that much of a challenge, but the higher/faster you make it move, the less it looks like flame.
You can make it higher by simply increasing the decay value (infact, I would recommend this - on my system, the flame gets past half way up the screen pretty regularly - so it might just be fading too fast for you to see).
The other way to do it is by editing the per_pixel presets. If you increase the multiplier in per_pixel_1, it will go higher., but not look right. You can also change the numbers in per_pixel_2 to make it go higher. Make the number in the brackets lower (going into negative values), and the number outside the brackets higher.

Go ahead and modify it until you like it, and post what you come up with ;]

- Krash

unchained
23rd November 2001, 12:46
I like it already, that was never the issue. :)

Illusion
24th November 2001, 05:05
Yeah, I like it too Krash, it's one of the most original ones I've seen in a while. It wasn't a criticism, merely a suggestion But I'll try having a fiddle with it anyway :)

StudioMusic
24th November 2001, 10:49
Same with me, no change needed for the realistical flame effect. SM

Krash
25th November 2001, 14:19
A couple of mods of my own preset. They're pretty similar, but hey...

===========
Pyrotechnia
===========
[preset00]
fRating=3.000000
fGammaAdj=2.000000
fDecay=0.980000
fVideoEchoZoom=1.000000
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=0
nWaveMode=0
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=0
bTexWrap=1
bDarkenCenter=0
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=12
nMotionVectorsY=9
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=1.000000
fWaveScale=0.016913
fWaveSmoothing=0.750000
fWaveParam=-0.199900
fModWaveAlphaStart=0.750000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=53.523884
fWarpScale=0.408391
fZoomExponent=11.201996
fShader=0.000000
zoom=1.000000
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.000000
sx=1.000000
sy=1.000000
wave_r=0.699900
wave_g=0.600000
wave_b=0.800000
wave_x=0.500000
wave_y=0.500000
ob_size=0.000000
ob_r=0.000000
ob_g=0.000000
ob_b=0.000000
ob_a=0.000000
ib_size=0.000000
ib_r=0.000000
ib_g=0.000000
ib_b=0.000000
ib_a=0.000000
per_frame_1=dx =-0.0005;
per_frame_2=dy =-0.0005;
per_frame_3=q1 = (bass_att + mid_att + treb_att) /3;
per_frame_4=q2 = time + 1000;
per_frame_5=bass_thresh = above(bass_att,bass_thresh)*2 + (1-above(bass_att,bass_thresh))*((bass_thresh-1.4)*0.95+1.4);
per_frame_6=treb_thresh = above(treb_att,treb_thresh)*2 + (1-above(treb_att,treb_thresh))*((treb_thresh-1.4)*0.95+1.4);
per_frame_7=bass_on = above(bass_thresh,1.9);
per_frame_8=treb_on = above(treb_thresh,1.9);
per_frame_9=swapcolour = bass_on - treb_on;
per_frame_10=red_aim = if(equal(swapcolour,1),0.7,if(equal(swapcolour,0),0.9,1));
per_frame_11=green_aim = if(equal(swapcolour,1),0.6,if(equal(swapcolour,0),0.3,0.6));
per_frame_12=blue_aim = if(equal(swapcolour,1),0.8,if(equal(swapcolour,0),0.2,0));
per_frame_13=red = red + (red_aim - red)*0.5;
per_frame_14=green = green + (green_aim - green)*0.5;
per_frame_15=blue = blue + (blue_aim - blue)*0.5;
per_frame_16=wave_r = red;
per_frame_17=wave_g = green;
per_frame_18=wave_b = blue;
per_frame_19=xpos = if(equal(bass_thresh,2),0.01*rand(100),xpos);
per_frame_20=ypos = if(equal(treb_thresh,2),0.01*rand(100),ypos);
per_frame_21=myst = if(equal(bass_thresh,2),0.02*rand(10)-1,myst);
per_frame_22=myst = myst + if(equal(bass_thresh,2),0.2*sin(time),0);
per_frame_23=wave_mystery = myst;
per_frame_24=wave_x = xpos;
per_frame_25=wave_y = ypos;
per_pixel_1=dy = -0.01*(q1-1)*log(2-(abs((y+0.5)*2 - 1.8)));
per_pixel_2=dy = below(dy,0.02)*dy - 0.01;
per_pixel_3=dy = dy + 0.005*(sin((x*q2*0.483) + (y*q2*1.238)) + sin((x*q2*1.612) + (y*q2*0.648)));


=================
Zero-G Combustion
=================
[preset00]
fRating=3.000000
fGammaAdj=2.000000
fDecay=0.980000
fVideoEchoZoom=1.000000
fVideoEchoAlpha=0.000000
nVideoEchoOrientation=0
nWaveMode=1
bAdditiveWaves=0
bWaveDots=0
bModWaveAlphaByVolume=0
bMaximizeWaveColor=0
bTexWrap=1
bDarkenCenter=0
bMotionVectorsOn=0
bRedBlueStereo=0
nMotionVectorsX=12
nMotionVectorsY=9
bBrighten=0
bDarken=0
bSolarize=0
bInvert=0
fWaveAlpha=1.000000
fWaveScale=0.408374
fWaveSmoothing=0.750000
fWaveParam=-0.999900
fModWaveAlphaStart=0.750000
fModWaveAlphaEnd=0.950000
fWarpAnimSpeed=53.523884
fWarpScale=0.408391
fZoomExponent=11.201996
fShader=0.000000
zoom=1.000000
rot=0.000000
cx=0.500000
cy=0.500000
dx=0.000000
dy=0.000000
warp=1.000000
sx=1.000000
sy=1.000000
wave_r=0.699900
wave_g=0.600000
wave_b=0.800000
wave_x=0.500000
wave_y=0.500000
ob_size=0.000000
ob_r=0.000000
ob_g=0.000000
ob_b=0.000000
ob_a=0.000000
ib_size=0.000000
ib_r=0.000000
ib_g=0.000000
ib_b=0.000000
ib_a=0.000000
per_frame_1=dx =-0.0005;
per_frame_2=dy =-0.0005;
per_frame_3=q1 = (bass_att + mid_att + treb_att) /3;
per_frame_4=q2 = time + 1000;
per_frame_5=bass_thresh = above(bass_att,bass_thresh)*2 + (1-above(bass_att,bass_thresh))*((bass_thresh-1.4)*0.95+1.4);
per_frame_6=treb_thresh = above(treb_att,treb_thresh)*2 + (1-above(treb_att,treb_thresh))*((treb_thresh-1.4)*0.95+1.4);
per_frame_7=bass_on = above(bass_thresh,1.9);
per_frame_8=treb_on = above(treb_thresh,1.9);
per_frame_9=swapcolour = bass_on - treb_on;
per_frame_10=red_aim = if(equal(swapcolour,1),0.7,if(equal(swapcolour,0),0.9,1));
per_frame_11=green_aim = if(equal(swapcolour,1),0.6,if(equal(swapcolour,0),0.3,0.6));
per_frame_12=blue_aim = if(equal(swapcolour,1),0.8,if(equal(swapcolour,0),0.2,0));
per_frame_13=red = red + (red_aim - red)*0.5;
per_frame_14=green = green + (green_aim - green)*0.5;
per_frame_15=blue = blue + (blue_aim - blue)*0.5;
per_frame_16=wave_r = red;
per_frame_17=wave_g = green;
per_frame_18=wave_b = blue;
per_frame_19=xpos = if(equal(bass_thresh,2),0.01*rand(100),xpos);
per_frame_20=ypos = if(equal(treb_thresh,2),0.01*rand(100),ypos);
per_frame_21=wave_x = xpos;
per_frame_22=wave_y = ypos;
per_pixel_1=dy = -0.01*(q1-1)*log(2-(abs((y+0.5)*2 - 1.8)));
per_pixel_2=dy = below(dy,0.02)*dy - 0.01;
per_pixel_3=dy = dy + 0.005*(sin((x*q2*0.483) + (y*q2*1.238)) + sin((x*q2*1.612) + (y*q2*0.648)));


Enjoy.

- Krash

StudioMusic
25th November 2001, 14:49
2 very nice and different mods something way out of the norm. Here is the zip of them also. SM