Smoke
by Jason Pfaff · in General Discussion · 12/07/2006 (1:12 pm) · 4 replies
I have been trying to get a really good datablock for smoke, but I have had no luck getting it right. Does anyone know of a good tutorial or some code I could look at. Thanks
About the author
Torque Owner Alan James
Really Really Good Things Studio
Anyway, here is some script for large black smoke, not sure if it is what you're looking for. just add it to a existing script file (chimneyfire.cs, or equivalent or create a new .cs file and make sure you exec it in your game.cs script).
datablock ParticleData(ChimneyFire3) { textureName = "~/data/shapes/particles/smoke"; dragCoefficient = 0.0; gravityCoefficient = -0.5; // rises slowly inheritedVelFactor = 0.00; lifetimeMS = 1900; lifetimeVarianceMS = 450; 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] = 4.5; sizes[1] = 4.5; sizes[2] = 4.5; times[0] = 0.0; times[1] = 0.5; times[2] = 1.0; }; datablock ParticleEmitterData(ChimneyFire3Emitter) { ejectionPeriodMS = 200; periodVarianceMS = 10; ejectionVelocity = 0.15; velocityVariance = 0.05; thetaMin = 3.0; thetaMax = 90.0; particles = "ChimneyFire3"; }; datablock ParticleEmitterNodeData(ChimneyFire3EmitterNode) { timeMultiple = 1; };- Alan