the most awesome plasma effect I've ever seen

Community Forums/Showcase/the most awesome plasma effect I've ever seen

Najdorf(Posted 2005) [#1]
Check out simon's great "fireworks" example (built in with max), and change line 95 to

"SetScale 200/sp.z,200/sp.z"

(i.e. scale the particles 10 times bigger)

It makes THE coolest realtime effect I've ever seen IN MY WHOLE LIFE

Edit:Oh, and put the graphics in 32 bit!

ReEdit: I never thought something lke this was possible to achieve in realtime. Its a proof of the power of Max


Picklesworth(Posted 2005) [#2]
Line 95 is a bunch of comments for me at the moment. Doesn't feel like the right place.


Najdorf(Posted 2005) [#3]
well change line

"SetScale 20/sp.z,20/sp.z" to " "SetScale 200/sp.z,200/sp.z"


Picklesworth(Posted 2005) [#4]
Oh, I was using the wrong "fireworks" example. It turns out there are two :D
Looks cool.


Bot Builder(Posted 2005) [#5]
Hey... that's pretty cool. Some stuff like this can be seen here:

http://www.blitzbasic.com/Community/posts.php?topic=45716

Even better imho is if you change no_sparks to 40 and then take out the If Keyhit(KEY_SPACE) bit :) screensaverish


Najdorf(Posted 2005) [#6]
wow your right!

This stuff can make a game IMPRESSIVE


Paul "Taiphoz"(Posted 2005) [#7]
lol.. does look kinda nice.


FischGurke(Posted 2005) [#8]
Yeah, additive blending is a nice trick to make graphics look shiny and impressive. :D


drnmr(Posted 2005) [#9]
i found another way to make related plasma effects:

in the fire works demo change line 92 to
SetScale 200/sp.z,500/sp.z
and insert hidemouse pretty much any where you want


jkrankie(Posted 2005) [#10]
my current project uses additive blending to (i think) good effect

http://r-knight.madasafish.com/CG_01Demov01.sitx

mac only at the minute, right click to down load (may only work in 10.3.x)

cheers
charlie


Najdorf(Posted 2005) [#11]
yeah I'm using it as an effect when two players collide in my ragdoll demo


FischGurke(Posted 2005) [#12]
@jkrankie: This is a cool game you got there, very addictive! Though I'm missing some music and sound effects... You're using additive blending to get this "motion blur" effect, right?

-IBD


Ralighón(Posted 2016) [#13]
I guess after 11 years maybe nobody is interested in this thread any more, but just in case, you could check this. I find the effect surprising, very close to what I was looking for.

Thanks everybody (Hi, simonh! :)

' ------------------------------------------------------

' Fireworks by simonh (si@...)
' Modified by Ralighón, 2016.

Strict

Global width:Int = 1280 ' the screen width
Global height:Int = 800 'the screen height

Graphics width,height,16

' Create a spark type
Type spark
Field x#,y#,z#,vy#,xd#,yd#,zd#,r#,g#,b#,alpha#
End Type

Global sparki:TImage = LoadImage("spark.png") ' Spark image.
Global no_sparks:Int ' Number of sparks per each firework.
Global spark_list:TList = New TList ' Spark list

' Load and set font
Global font:TImageFont=LoadImageFont("Arial.ttf",1)
SetImageFont font

' Start main loop

Hidemouse

While Not KeyHit(KEY_ESCAPE)

' If space key pressed then create new set of sparks (new firework)

If KeyHit(KEY_SPACE)
Local x:Float = Float(Rand(-100,100))
Local y:Float = Float(Rand(-100,100))
Local z:Float = 200.0
'
Local r:Float = Float(Rand(255))
Local g:Float = Float(Rand(255))
Local b:Float = Float(Rand(255))

no_sparks = Rand(100,300)

For Local i:Int = 1 To no_sparks
Local speed:Float = 0.1 * Float(Rnd(10))
Local ang1:Float = Rnd!(360)
Local ang2:Float = Rnd!(360)

Local sp:spark = New spark
spark_list.AddLast sp

sp.x = x ; sp.y = y ; sp.z = z
sp.r = r ; sp.g = g ; sp.b = b

sp.xd = Cos(ang1) * Cos(ang2) * speed
sp.yd = Cos(ang1) * Sin(ang2) * speed
sp.zd = Sin(ang1) * speed

sp.alpha = 1.0
Next
EndIf

' Draw all sparks

For Local sp:spark = EachIn spark_list
If sp.alpha > 0
sp.x = sp.x + sp.xd * Float(Rand(15))'10.0
sp.y = sp.y + sp.yd * Float(Rand(15))'10.0
sp.z = sp.z + sp.zd * Float(Rand(15))'10.0
sp.y = sp.y + sp.vy
sp.vy = sp.vy + 0'0.02

' Calculate x and y draw values based on x,y,z co-ordinates
Local d:Float = Float(Rand(200,800))
Local x:Float = (width/2.0) + ((sp.x/sp.z) * d)
Local y:Float = (height/2.0) + ((sp.y/sp.z) * d)

sp.alpha = sp.alpha - 0.01

SetColor sp.r,sp.g,sp.b
SetBlend LIGHTBLEND
SetAlpha sp.alpha
SetScale 200/sp.z,200/sp.z
DrawImage sparki,x,y
Else
spark_list.Remove sp
EndIf
Next

SetBlend SOLIDBLEND
SetScale 1,1
SetColor 255,255,255
DrawText "Press space to ignite firework",0,0

Flip
Cls

Wend