Game Development Community

Dust Over Battlefield

by none · in Torque 3D Professional · 10/11/2012 (8:41 pm) · 5 replies

Hi, I'm trying to create a really subtle dust blowing over the ground in my desert themed map, but I've tried a bunch of things and I just can't get the desired effect. Should I use a particle system or a precipitation system? Anyone have any snippets that might help?

#1
10/12/2012 (5:02 am)
This should be in Torque 3D Beginner. Unfortunately I don't have an answer at hand atm, if no one have answered this I will return later.
Edit: Although have you checked out the demos and see if any of them is doing it?
#2
10/12/2012 (7:04 am)
Depending on what kind of effect you're after, you could go with a precipitation effect that uses very slow moving and subtle particles. This would give you a fine, whispy dust that would populate a desired area.

That's the general method I use when creating post apocalyptic style scenes. The trick is to use the correct kind of particle image, with behaviour settings. Have a play with it and see how you get on.
#3
10/12/2012 (8:33 am)
I think Richard's method is what I'm after. I checked all the demos and none of them have a dynamic dust/fog working. Thanks, I'll check out the precipitation system and try that. Maybe I can port the ancient TGE sandstorm and slow it down a bit!
#4
10/12/2012 (9:28 am)
Not sure if this is exactly the effect you are looking for but, here is a good place to start.

The first step will be to create a new precipitation data block, You can find environment.cs within game/art/datablocks. Place the following within the file;

NOTE: This is just what I used as an example;


// ----------------------------------------------------------------------------
// DustBlow
// ----------------------------------------------------------------------------
datablock SFXProfile(desertSound)
{
filename = "art/sound/environment/desertWind";
description = AudioLoop2d;
};

datablock PrecipitationData(DustBlow)
{
soundProfile = "dustBreeze";

dropTexture = "art/environment/precipitation/sandParticle";
splashTexture = "art/environment/precipitation/sandParticle2";
dropSize = 0.35;
splashSize = 0.1;
useTrueBillboards = false;
splashMS = 500;
};

sandParticle and sandParticle2 refer to tiny .png images that serve as my particle textures. These I have located in their respective directories.

Now I will open Torque and add a precipitation object to my scene I snap this object to the ground plane so that the icon is not up in the air or under the terrain.

Within the inspector I will use the following settings.

<precipitation tab>
numDrops: 5000
boxWidth: 1000
boxHeight: 15

<Rendering Tab>
dropSize: 25
check useTrueBillboards
check rotateWithCamVel

<Movement Tab>
followCam: NOT checked
useWind: checked
minSpeed: .0025
maxSpeed: .003
minMass: .75
maxMass: .85

<Game Tab>
dataBlock select DustBlow or whatever you called your precipitation datablock.

In my example, I ended up with a scene that looks a bit like this:

3tdstudios.com/images/screenshot_duststorm.jpg
Hope that helps get you started in the right direction.

Ron
#5
10/12/2012 (10:52 pm)
Perfect! Thats exactly what I'm going for, thanks so much for sharing Ron!