Explosions - how to make them like i want them to be? - Page 2

Explosions - how to make them like i want them to be?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Argh,

Dirt:

Code: Select all

[BulletImpact]
{
	[dirt]
	{
		[properties]
		{
			size=10;
			color=0.2, 0.1, 0.05;
			alphaFalloff=2;
			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;
			pos=-10 r20, 20, -10 r20;
		}
		ground=1;
		count=5;
	}
	[groundflash]
	{
		flashSize = 10;
		flashAlpha = 1;
		circleGrowth = 3;
		circleAlpha = 1;
		ttl = 10;
		color = 0.3, 0.3, 0.5;
		water=1;
	}
}
what else was giving you an issue?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

GFX, if you please. I'll try out your Dirt code when I get home.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Code: Select all

[GFXIMPACT]
{
	[gfx]
	{
		[properties]
		{
		creationTime=2;
		lifeTime= 10;
		color=1111;
		speed=0.5 r-1.5, 5.7 r1.6, 0.5 r-1.5;
		pos=-10 r20, 20, -10 r20;
		}

	ground=1;
	count=5;
	}

}
worked and gave me white particles. I am playing with the color stuff right now so if you see nothing then it is my bad :P
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

The GFX code you provided doesn't work for me, but the Dirt works just fine. Thanks, now to make my first attempt at something complex...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Code: Select all

[BulletImpact]
{
	[dirt]
	{
		[properties]
		{
			size=10;
			color=0.2, 0.1, 0.05;
			alphaFalloff=2;
			speed=0.75 r-1.5, 1.7 r1.6, 0.75 r-1.5;
			pos=-10 r20, 20, -10 r20;
		}
		ground=1;
		count=5;
	}
	[gfx]
	{
		[properties]
		{
		creationTime=2;
		lifeTime= 10;
		color=200;
		speed=0.5 r-1.5, 0.7 r5.6, 0.5 r-1.5;
		pos=-5 r20, 0 r10, -5 r20;
		}

	water=1;
	count=25;
	}
}
here you go... with the gfx code and improved bullet hit fx..

It seems the color is just for the brightness of the GFX thing-e. YAY white dots.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Have you been able to figure out what governs the lifetime of a HeatCloud? I'm able to get them to grow and wobble just fine, but they stay on the screen far too long and I'm trying to figure out what makes them decay...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

I want to say it is heat fall off.

Code: Select all

	[heatcloud]
	{
		[properties]
		{
			pos = -10 r20, r20,-10 r20;
			speed = -1 r2, r2, -1 r2;
			heat = 10;
			maxheat=10;
			heatFalloff=1;
			size = 10;
			sizeGrowth=0.2;
		}
		air=1;
		ground=1;
		count=6;
	}
is one I use

*edit* Just checked.. yep the higher the number the faster it goes away. *end edit*
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

It's the relationship between maxheat and heatfalloff. Try setting maxheat to zero, and your particle disappears. The relationship maxheat / heatfalloff seems to be the number of frames before the Heatcloud disappears. I think.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

And what in the heck do SizeGrowth, SizeMod and SizeModMod do? Thus far, the results have been... erm... confusing...

I'm trying for a really nice "explosion sucking inwards" quick-boom fireball, if that makes any sense. I have almost all of the other makings of a really nice, reasonably fast light-arty shellburst effect now, but this is still eluding me. More when done playing around...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

well, we still need a dome effect.. that is part of what we are missing if we ever hope to create something similar to the current explosions. Forgive me I am off to bed soon.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

NP, I should be, but I'm not :P

I just want to get one decent custom FX done lol...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

lol, well steal my bullet one and take away all the suckage :P. night man.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Code: Select all

[ARCHER_MISSILE_FX]
{
[dirt]
	{
      	[properties]
      		{
         		size=15;
         		color=0.1, 0.1, 0.1;
         		alphaFalloff=0.5;
         		speed=0.75 r-3, 1.7 r4, 0.75 r-3;
         		pos=-10 r20, 0, -10 r20;
      		}
	air=1;
      	ground=1;
      	count=15;
	water=0;
   	}
[heatcloud]
   		{
      		[properties]
      		{
      		heat = 15;
      		maxheat = 15;
      		heatFalloff = 1;
      		size = 15;
      		sizeGrowth = -1;
      		sizemod = 0;
      		sizemodmod = 0;
      		speed = 0, 3, 0;
      		pos = 0, 0, 0;
      		}
	air=1;
      	water=1;
      	ground=1;
      	count=1;
	} 
[smoke]
	{
	[properties]
      		{
         		color = 0.5;
         		startSize = 1.5;
         		sizeExpansion = 0.3;
         		ageSpeed=0.03;
         		size = 5;
         		sizeGrowth = -1.5;
         		pos = 5 r-5, 5 r-5, 5 r-5;
         		speed=0, 1 r0.3, 0;
      		}
	air=1;
      	water=1;
      	ground=1;
      	count=3;
   	}
[groundflash]
   	{
      	flashSize = 10;
      	flashAlpha = 0.3;
      	circleGrowth = 5;
      	circleAlpha = 0.3;
      	ttl = 10;
      	color = 1, 1, 0.5;
	air=0;
     	ground=1;
      	water=1;
	}
}
Almost right. The only problems are the things that cannot be solved, such as the fact that the current vector system inevitably causes movement along a predictable vector, instead of allowing us to do "flat spheres" to produce a nice smoke-ring effect. Still, it's something, and now that I know how to make the HeatCloud work right, I can start working on my next little thing... a much better flamethrower effect :D Thx for the help, Smoth!
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

*yawns* no problem man... I really need to sleep. I'll see you around.. /me crashes on bed.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Hmm. Got a new flamethrower effect going. Works great, looks wonderful. Only problem is, that now that I have a really great flamethrower particle-death event, I am reminded just how limited the current flamethrower effect code is :P

I'm more than half inclined to substantially rebuild the Knight for NanoBlobs with a faked-up s3o "flame", and have the animation really not match what is actually happening, so that I can have an effective illusion. There are lots of problems with this, though. Drat, now I want a custom projectile that I can apply growth curves and gravity to, lol... JC, you've created a monster ;)

Ok, enough chitchat... here's some code for a nice, fast flamethrower FX. This really looks very nice IF you use a BALLISTIC projectile, because you get lots of overlap on the alpha, and the slow fade gives you a very, very sexy fire-glow that fades with time. I suppose it'd look nice if you used a lineofsight and then gave it a ridiculously high ROF, too, or expanded the effect by about 1.5-2X, but I'm not willing to up the Knight's ROF just to see a special effect work a bit better- I'd rather wait, and hope that the next version of Spring has customizable weapon particles (and hopefully sphere/cone projections, so that we can do properly-random things, but nevermind).

Code: Select all

[FLAMETHROWER_FX]
{
[heatcloud]
   		{
      		[properties]
      		{
      		heat = 15;
      		maxheat = 15;
      		heatFalloff = 1;
      		size = 3;
      		sizeGrowth = 0.5;
      		sizemod = 0;
      		sizemodmod = 0;
      		speed = 0, 2, 0;
      		pos = 0, 0, 0;
      		}
	air=1;
      	water=1;
      	ground=1;
      	count=1;
	} 
[smoke]
	{
	[properties]
      		{
         		color = 0.1;
         		startSize = 1.5;
         		sizeExpansion = 0.5;
         		ageSpeed=0.03;
         		size = 5;
         		sizeGrowth = 0.5;
         		pos = 5 r-5, 5 r-5, 5 r-5;
         		speed=0, 2 r0.5, 0;
      		}
	air=1;
      	water=1;
      	ground=1;
      	count=3;
   	}
[groundflash]
   	{
      	flashSize = 25;
      	flashAlpha = 0.8;
      	circleGrowth = 0;
      	circleAlpha = 0;
      	ttl = 30;
      	color = 1, 0.3, 0.2;
	air=0;
     	ground=1;
      	water=1;
	}
}
[/code]
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

You can also use the i and r commands on other things than speed and position (except for the groundflash which is hacked in atm).
I haven't seen anyone actually use that hence the post
Last edited by jcnossen on 07 Jul 2006, 20:10, edited 1 time in total.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

we do use ground flash, what about explosion domes? Also in the current version of the svn, is the usage of multiple effect types ie more then one dirt working right? Also, while I am bugging you.... :P what does the color tag for GFX represent... is it only the brightness of the dots.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

is the usage of multiple effect types ie more then one dirt working right?
Yes, but you need a different syntax. The TDF parser which is used still only supports unique section names, so you need to name the projectile section different ("dirt2" or something), and use "class=dirt" in it.
what does the color tag for GFX represent
It's 4 unsigned chars: RGBA, with every char from 0-255.

(255,0,0,255 is red with full alpha)

You can also look in the projectile code itself, the TDF projectile properties are directly mapped onto actual C++ class variables (You will see a CGfxProjectile::color for example)
what about explosion domes
Yeah I forgot to put that stuff in last release, I'll add it when I continue on the projectile system.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Mmm, can't wait to be able to "stack" things... I can finally build us a proper big, gorgeous nuke... I already have the positions planned out, just need enough particle creation points to do it right :D

I do not see how to attach these explosions to BOS death events, i.e., FALL | EXPLODE, etc. I take it that that's going to be waiting awhile? Not a priority at the moment, at any rate.

I've gotten really good results out've the system thus far, cutting down FPS lag due to particles quite a bit- it really keeps the game engine from bottoming out like it used to... and it looks far more professional and consistent. Now I just need to figure out what I can do about NanoBlobs's simtime issues. I'll test Maestro's assertions about quad-vs-tris on speed, and see if I'm going to have to remodel things...




Ooooh... and one tiny request...

Could you allow us to specify a "StartTime" timer (in frames, like everything else) for each effect? That'd make it possible to do some things that would be pretty annoying otherwise...
User avatar
GrOuNd_ZeRo
Posts: 1370
Joined: 30 Apr 2005, 01:10

Post by GrOuNd_ZeRo »

Since you are all genious, can you explain the code to me?

right now it seems a little confusing to me.

Like I suggested before, a sample pack.
Post Reply

Return to “Engine”