Smoking section?
by Dreamer · in Torque Game Engine · 05/04/2005 (10:55 am) · 1 replies
I have created a shack type of building and placed an Oven inside, what I eventually would like to do is for the room to continually have a little smoke streaming out of it, but when the oven is used I want to fill the room with smoke.
I figured the easiest way to do this was to scale the x and y on my smoke emitter to nearly the size of the building, but that doesn't appear to have any effect.
Next I tried editing the thing with the particle editor, but I can't quite seem to get a nice volume of smoke to be emitted.
Below is my code, the OvenSmoke and Oven Fire are based based on the Chimney.cs file with some values that helped get the smoke a little thicker, but when I expand much beyond these it just makes a mess.
Could someone please look at this and offer advice? Thanx!
I figured the easiest way to do this was to scale the x and y on my smoke emitter to nearly the size of the building, but that doesn't appear to have any effect.
Next I tried editing the thing with the particle editor, but I can't quite seem to get a nice volume of smoke to be emitted.
Below is my code, the OvenSmoke and Oven Fire are based based on the Chimney.cs file with some values that helped get the smoke a little thicker, but when I expand much beyond these it just makes a mess.
Could someone please look at this and offer advice? Thanx!
datablock ParticleData(OvenSmoke)
{
textureName = "~/data/shapes/particles/smoke";
dragCoefficient = 0.0;
gravityCoefficient = -0.2; // rises slowly
inheritedVelFactor = 0.00;
lifetimeMS = 5000;
lifetimeVarianceMS = 250;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.6 0.6 0.6 0.1";
colors[1] = "0.6 0.6 0.6 0.1";
colors[2] = "0.6 0.6 0.6 0.0";
sizes[0] = 0.5;
sizes[1] = 0.75;
sizes[2] = 1.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(OvenSmokeEmitter)
{
ejectionPeriodMS = 20;
periodVarianceMS = 5;
ejectionVelocity = 0.1;
velocityVariance = 0.10;
thetaMin = 0.0;
thetaMax = 90.0;
particles = OvenSmoke;
};
datablock ParticleEmitterNodeData(OvenSmokeEmitterNode)
{
timeMultiple = 1;
};
//-----------------------------------------------------------------------------
datablock ParticleData(OvenFire1)
{
textureName = "~/data/shapes/particles/smoke";
dragCoefficient = 0.0;
gravityCoefficient = -0.3; // rises slowly
inheritedVelFactor = 0.00;
lifetimeMS = 500;
lifetimeVarianceMS = 250;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.8 0.6 0.0 0.1";
colors[1] = "0.8 0.6 0.0 0.1";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 1.0;
sizes[1] = 1.0;
sizes[2] = 5.0;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleData(OvenFire2)
{
textureName = "~/data/shapes/particles/smoke";
dragCoefficient = 0.1;
gravityCoefficient = -0.25; // rises slowly
inheritedVelFactor = 0.00;
lifetimeMS = 1000;
lifetimeVarianceMS = 150;
useInvAlpha = false;
spinRandomMin = -30.0;
spinRandomMax = 30.0;
colors[0] = "0.6 0.6 0.0 0.1";
colors[1] = "0.6 0.6 0.0 0.1";
colors[2] = "0.0 0.0 0.0 0.0";
sizes[0] = 0.5;
sizes[1] = 0.5;
sizes[2] = 0.5;
times[0] = 0.0;
times[1] = 0.5;
times[2] = 1.0;
};
datablock ParticleEmitterData(OvenFireEmitter)
{
ejectionPeriodMS = 15;
periodVarianceMS = 5;
ejectionVelocity = 0.25;
velocityVariance = 0.10;
thetaMin = 0.0;
thetaMax = 90.0;
particles = "OvenFire1" TAB "OvenFire2";
};
datablock ParticleEmitterNodeData(OvenFireEmitterNode)
{
timeMultiple = 1;
};
Zod