Particle System

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Thedude
Posts: 2
Joined: Wed Jun 30, 2004 4:58 am

Particle System

Post by Thedude »

How would I make a smoke trail that dosn't follow the object which created, kinda like a jet smoke trail, and help would be nice
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

don't make the emitter a child of your moving object.
Guest

Post by Guest »

I mean in the sense that, the smoke emitter will follow the node, but when it emits the smoke it shoots it in the direction-180 of the object its following
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

Well IParticleSystemSceneNode::createGravityAffector can help you. I don't know if that's exactly what you want, but if you amke the gravity sideways it should come out decently
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
Alex
Posts: 8
Joined: Fri Jul 02, 2004 5:27 am
Location: Western Australia
Contact:

Post by Alex »

IIRC each particle in a system is relative to the node the system is attached to. This means if your jet or whatever is rotating and moving each particle will rotate and move in accordance with that. This can look quite silly especially if you have long smoke trails.

Unless you can set the particle positions to be absolute rather than relative (move on their own rather than sharing position data with the node) you may have to make or derive your own smoke particle system.

An easy solution would be to create a billboard every couple of frames relative to the jet, which has its own position data and lifetime variables like size, color, etc.

I promise you if you attach the emitter to the object, it will look funny. But don't take any ones word for it, try it for yourself :)
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

Yeah, you're right, for jet trails it would look funny
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
Thedude
Posts: 2
Joined: Wed Jun 30, 2004 4:58 am

Post by Thedude »

I tried rotating the object it was following and it looks weird. Plus I tried using billboards but they seem to slow it down a bit (only a bit). I tried all this before I asked, I was just wondering if there where any other ways
Alex
Posts: 8
Joined: Fri Jul 02, 2004 5:27 am
Location: Western Australia
Contact:

Post by Alex »

Particle systems are basically a bunch of managed billboards so you should be able to create your own billboard system that emulates a smoke trail quite easily.

Using billboards is the only feasible approach to my knowledge, could you provide some more details about the billboard approach you tried, like source code or something.

One thought could be to derive a new class from the particle system that tracks the world position of its parent node and adds/subracts the change in position/orientation since the last update from each particle, meaning that no matter how much you rotate and scale and shift a node, particles in your derived system will not be affected.
Post Reply