Game Development Community

question on particles

by Pierre DragoFire Hay · in Torque 3D Professional · 06/17/2015 (4:03 pm) · 9 replies

Ok I've been playing around with emitters and particles, and I'm unsure if it's possible to get the particles to be viewable from all angles?

I've managed to get what I need working, but if you happen to be above the emitter the particles aren't 100% visible, they appear as discs and not as an 3d item. It seems they are only really visible on an horizontal plane, not the vertical plan.

Has anyone tried to get particles visible from any plane?

#1
06/17/2015 (5:00 pm)
That's odd - I wonder if they're billboarded...

They're supposed to align to face the front normal toward the camera at all times, but "billboards" are frequently locked so that they only rotate on the vertical axis.

Sounds like a bug.
#2
06/17/2015 (6:20 pm)
They appear to be billboards, but I wonder if 3 billboards could be fixed together to form an 3d effect?
#3
06/17/2015 (11:34 pm)
The vertices in the emitter class are batched as a collection of quads.
It is possible to append and batch within the vertex buffer more stuff.
T3D renders them stripped anyway..
#4
06/18/2015 (1:17 pm)
@Ivan is it possible to have the emitter using 3d models as particles?

I'm trying to get a true bubble effect, like that when you're diving and past through someone else's bubble exhaust.

ATM the particles look good if you're looking at them on the horizontal planes, but once you're within the bubble stream/blast, looking from above or below the particles aren't viewable or you see the billboards.

Any suggestions?
#5
06/21/2015 (6:17 pm)
@Pierre if you want, and can work with a lack of documentation then you could try my ParticleRefactor: ParticleSystemRefactor been a while since I looked at it, so it's not up to date but it can render particles as meshes.. Okay actually it can't atm, but that's because I haven't pushed the TSShape renderer to the repo, I wont mind doing that for you then if you want to use the refactor.

Here's some more info on the refactor: "ParticleSystem refactor" blog
#6
06/21/2015 (9:32 pm)
Three possibilities:

1. Directly draw them separated, each having its own vertex buffer.

2. Batch them. Batching stripped geometry into one buffer is handy - you must degenerate the strip with empty triangles (called also degenerate triangles), having zero rasterization value.

2. Batch them into one buffer but draw one by one. Having a primitive buffer, you just say "begin" + "end" vertex for the current draw.
#7
08/01/2015 (11:43 am)
Unless I'm misunderstanding the original question, would the "aligned" particle type work for you? This is just a flat image that always faces the camera (on all 3 rotation axes), which works fine for generally spherical effects like bubbles. Most of the stock particle effects like explosions are just the "aligned" particle type.
#8
08/01/2015 (6:23 pm)
@Henry that what I thought too, but for some reason found it not to be the case, it only works on the side angle, not from above or below.

As in my example, I can have a billboard particle emitter producing exactly what I need for the sides, but you move the camera through the billboards looking directly at the emitter point the billboard particles are seem as flat billboards, and only appear correctly once you move the camera away from direct above or below the emitter.
#9
08/02/2015 (10:54 am)
Whoops, sorry, got that backwards. "Aligned" will produce billboards facing a specific direction. Try with all 3 options false (orientParticles, orientOnVelocity, alignParticles) and then try orientParticles true and see if either of those modes work for you.

orientParticles should produce "camera facer" particles.
orientOnVelocity aligns particles to the ejection velocity (could be used for something like sparks)
With everything off the alignment is controlled by the ejection angles, which if totally random can still look 3D and add some variance.