Game Development Community

FireBallAtmosphere and WeatherLightning setups ?

by Billy L · in Torque Game Engine · 11/25/2005 (4:50 pm) · 21 replies

Hi guys !

Have anyone got example code or any hints to setup FireBallAtmosphere and WeatherLightning.
Would be nice to have something that works without digging to much .

Any clues save time.

Thanks in advance
Page «Previous 1 2
#1
11/30/2005 (4:35 am)
Nothing... I asked in another forum but no help except that fireball atmosphere is used in warezone maybe look at that?
#2
11/30/2005 (4:39 am)
Ask Robert Blanchet politely.
#3
11/30/2005 (12:29 pm)
Ok i ask Robert really politely !!
I found out how to get them in to the game, but i get no effect except sound from the weatherlightning and cant get the fireball debris shape to show .
I can see it spawning a debris but no effect.
So need some help please , if someone from gg will help some of us out with this one.
#4
12/01/2005 (6:41 am)
I don't have much time on my hands so I'll post the stuff I can quickly dig out of the Warzone demo now, and when I get more time I may, or may not ;), add a TDN article about them later.

For FireballAtmosphere:

for the *.cs file:
//-----------------------------------------------------------------------------
// Torque Game Engine 
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

datablock ParticleData(FireballAtmosphereCrescentParticle)
{
   dragCoefficient      = 2;
   gravityCoefficient   = 0.0;
   inheritedVelFactor   = 0.2;
   constantAcceleration = -0.0;
   lifetimeMS           = 600;
   lifetimeVarianceMS   = 000;
   textureName          = "~/data/shapes/particles/fireball/crescent3";
   colors[0]     = "1.0 0.75 0.2 1.0";
   colors[1]     = "1.0 0.75 0.2 0.5";
   colors[2]     = "1.0 0.75 0.2 0.0";
   sizes[0]      = 8.0;
   sizes[1]      = 12.0;
   sizes[2]      = 16.0;
   times[0]      = 0.0;
   times[1]      = 0.5;
   times[2]      = 1.0;
};

datablock ParticleData(FireballAtmosphereParticle)
{
   textureName          = "~/data/shapes/particles/smoke";
   
   dragCoefficient      = 0.0;
   windCoefficient      = 0.0;
   gravityCoefficient   = -0.0;
   inheritedVelFactor   = 0.85;
   
   lifetimeMS           = 2600;
   lifetimeVarianceMS   = 0;
   
   spinRandomMin = -100.0;
   spinRandomMax = 100.0;

   colors[0]     = "1.0 0.9 0.5 1.0";
   colors[1]     = "1.0 0.4 0.08 0.4";
   colors[2]     = "1.0 0.2 0.08 0.0";
   sizes[0]      = 10.0;
   sizes[1]      = 8.0;
   sizes[2]      = 1.0;
   times[0]      = 0.1;
   times[1]      = 0.3;
   times[2]      = 1.0; 
};

datablock ParticleEmitterData(FireballAtmosphereCrescentEmitter)
{
 ejectionPeriodMS = 25;
 periodVarianceMS = 0;
 ejectionVelocity = 40;
 velocityVariance = 5.0;
 ejectionOffset   = 0.0;
 thetaMin         = 0;
 thetaMax         = 80;
 phiReferenceVel  = 0;
 phiVariance      = 360;
 overrideAdvances = false;
 orientParticles  = true;
 lifetimeMS       = 500;
 particles = "FireballAtmosphereCrescentParticle";
};

datablock ParticleEmitterData(FireballAtmosphereEmitter)
{
   ejectionPeriodMS = 10;
   periodVarianceMS = 0;
   
   ejectionVelocity = 1.25;
   velocityVariance = 0.0;
   
   thetaMin         = 0;
   thetaMax         = 30;
   
   particles = "FireballAtmosphereParticle";
};

datablock ExplosionData(FireballAtmosphereBoltExplosion)
{
   emitter[0] = FireballAtmosphereCrescentEmitter;

   particleDensity = 250;
   particleRadius = 3.25;
   faceViewer = true; 
   // Turned off..
   shakeCamera = true;
   impulseRadius = 5;
   lightStartRadius = 5;
   lightEndRadius = 2;
};

datablock DebrisData(AtmosFireball)
{
   emitters[0] = "FireballAtmosphereEmitter";
   
   explosion = FireballAtmosphereBoltExplosion;
   explodeOnMaxBounce = true;
   
   elasticity = 0.0;
   friction = 1.0;
   
   lifetime = 100.0;
   lifetimeVariance = 0.0;
   
   numBounces = 0;
   bounceVariance = 09;
   
   ignoreWater = false;
};

datablock FireballAtmosphereData(FireballAtmos)
{
   fireball = AtmosFireball;
};

for the *.mis file:
new FireballAtmosphere() {
         position = "0 0 0";
         rotation = "1 0 0 0";
         scale = "1 1 1";
         dataBlock = "FireballAtmos";
         dropRadius = "700";
         dropsPerMinute = "25";
         minDropAngle = "15";
         maxDropAngle = "35";
         startVelocity = "350";
         dropHeight = "1000";
         dropDir = "0.212 0.212 -0.953998";
      };
#5
12/01/2005 (6:45 am)
I don't have much time on my hands so I'll post the stuff I can quickly dig out of the Warzone demo now, and when I get more time I may, or may not ;), add a TDN article about them later.

WeatherLightning's sounds are bugged I think, unless they were fixed for TGE 1.4


For WeatherLightning:

for the *.cs file:
//-----------------------------------------------------------------------------
// Torque Game Engine 
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

datablock AudioProfile(Thunder1)
{
   filename  = "~/data/sound/environment/thunder1.ogg";
   description = Audio2DEnvironmentLoud;
   preload = true;
};

datablock AudioProfile(Thunder2)
{
   filename  = "~/data/sound/environment/thunder2.ogg";
   description = Audio2DEnvironmentSoft;
   preload = true;
};

datablock AudioProfile(Thunder3)
{
   filename  = "~/data/sound/environment/thunder3.ogg";
   description = Audio2DEnvironmentSoft;
   preload = true;
};

datablock WeatherLightningData(LightningThunder)
{
   strikeTextures[0] = "~/data/environment/thunder/lightning1frame1";
   strikeTextures[1] = "~/data/environment/thunder/lightning1frame2";
   strikeTextures[2] = "~/data/environment/thunder/lightning1frame3";
   strikeTextures[3] = "~/data/environment/thunder/lightning2frame1";
   strikeTextures[4] = "~/data/environment/thunder/lightning2frame2";
   strikeTextures[5] = "~/data/environment/thunder/lightning2frame3";
   
   flashTextures[0] = "~/data/environment/thunder/cloudflash";
   flashTextures[1] = "~/data/environment/thunder/cloudflash2";
   flashTextures[2] = "~/data/environment/thunder/cloudflash3";
   flashTextures[3] = "~/data/environment/thunder/cloudflash4";
   
   fuzzyTextures[0] = "~/data/environment/thunder/lightning1blur";
   fuzzyTextures[1] = "~/data/environment/thunder/lightning2blur";
   
   //strikeSound = SomeStrikeSound;
   thunderSounds[0] = Thunder1;
   thunderSounds[1] = Thunder2;
   thunderSounds[2] = Thunder3;
};

for the *.mis file:
new WeatherLightning() {
         position = "12.531 313.022 227.912";
         rotation = "1 0 0 0";
         scale = "500 500 500";
         dataBlock = "LightningThunder";
         strikesPerMinute = "9";
         boltDeathAge = "1.4013e-045";
      };
#6
12/01/2005 (6:49 am)
Like I said, I don't have much time at the moment so I can't go into the details of how your textures are supposed to be setup for FireballAtmosphere and WeatherLightning. The texture orientation and look is particularily important for WeatherLightning effect.

But for a quick run down, the strikeTextures should be the 'bolt' part of a lightning strike. The flashTexture should be the cloud layer that lights up when lightning strikes. And the fuzzyTextures should be a blurring of the strikeTextures that get stretched over time.

If you do it correctly the WeatherLightning will look like something similar to this:
www.planettribes.com/tribes2/images/SS_section/Full-size/Gamestats_sky.jpg
#7
12/01/2005 (2:21 pm)
I'm very happy you took some time for this Robert , Thanks alot !!
I could only imagine the effects for my game , so if i get this working i be very happy .
Thanks again !!!
#8
12/04/2005 (9:42 pm)
Feedback !
Got it all working , little bit tricky with the weatherlightning othervise lovely effects.
Time to make better textures for the cloud effect .
And the Positional sounds effect really rocks .
Thanks again Robert !!
#9
12/18/2005 (2:55 pm)
Could you please post the content files that you use in these examples? I got the fireball working nicely using the ~/data/shapes/particles/fire file instead of ~/data/shapes/particles/fireball/crescent3 however I'm not sure if i can subsitute for all the content needed for weatherlightning. the files in the warzone demo seem to be protected from reuse and I'm not sure if i could use them anyway because some of them are in pay for content packs. Thanks!
#10
12/18/2005 (5:42 pm)
Wow that looks nice I'll have to find a use in my game.
#11
12/22/2005 (11:12 am)
Joseph I found all of the graphic files in Tribes 2. Makes me wonder? Is WarZone using Tribes 2 resources and doesn't make it kinda the same??? Are we allowed to do that or is that a special deal. I got them working but I think we have copyright issues??
#12
12/22/2005 (2:00 pm)
Why dont you make your own textures ?
Not so hard check how they done them in Tribes2 and make your own.
#13
12/22/2005 (5:16 pm)
You'll have to use your own textures or ones you've paid for or freebies that you're allowed to use. You cannot take other people's game content and use it in your own without permission since that is copyright infringement. So, be very careful with that. I see nothing wrong if you're just dropping stuff in to see what it would look like in your own machine (that's actually covered under fair use rights in the US), but don't distribute your game with others content unless you have permission and/or the license to do so.

:)
#14
01/23/2007 (5:49 pm)
I have a problem with the lightning bolts here all I get is a giant white square where the bolts should be. I took the lightning arcs and set alpha chanel and they show up as expected using guiBitmap, but when I do the WeatherLightning all I get is a giant white square. Any help?
#15
01/23/2007 (6:52 pm)
What engine you using?
#16
01/24/2007 (2:15 pm)
Engine is 1.4, I suppose this all works in 1.5? ... /sigh
#17
01/24/2007 (3:27 pm)
@Howard
Do you resize the weatherlighting box, if not you must do that to get the desired effect.
Othervise this is working in both 1.4 and 1.5 .
#18
01/25/2007 (4:52 am)
@Billy I dont see a box to resize other then the area box. You refer to this in cc code?

mObjBox.min.set( -0.5, -0.5, -0.5 );
mObjBox.max.set( 0.5, 0.5, 0.5 );

or something in script?

thanks for the reply
#19
01/25/2007 (12:13 pm)
Mark the weatherlightning in the editor and choose size.
set it to 512 512 200 or something.
No changes in script or cc code !
#20
01/25/2007 (1:18 pm)
@Billy man I'm sorry but that must not be part of my engine. I selected it in the editor and right clicked, left clicked, checked all the fields and it has no options for size, tried to add a field named "Size" but no go. I made sure the textures are powers of 2, alpha channel etc.
Page «Previous 1 2