Change Orientation of Particles?

https://playground.babylonjs.com/#L7JWI9#5

We’re trying to get these particles to move upwards as they currently are, while also being coplanar, or rotated 90 degrees along their local X. Is this possible with this particle system? So far it seems I can only get the particles to face in their direction of movement by turning off billboarding.

We have also tried using the built-in fire material and drawing that material onto a flat plane but the effect does not work suitably for the width required, nor does it have a clean multiplied alpha around the borders of the fire and creates a dark, aliased outline.

Hey and welcome!

I’m not sure to get what you try to achieve here. Do want to change their direction ? Or if it is something else maybe a picture of the desired effect would help

Thanks! So what I mean is this:

Here’s how the particle system looks from the front currently, with billboarding turned off. The particles are pointing in their movement direction which makes them point up, looking flat from the front.

forward want

Here’s how we intend for it to look from the front, in this case achieved by billboarding to the camera.

thin

And here’s how it looks from the side when billboarding is turned on. What we’re trying to do is make it such that the particles face towards the direction of my drawn arrow, thereby giving us the result from picture #2 from a forward view, but giving us a flat look from the side view. Like what the effect would be if we could billboard the particles to a local axis instead of the camera direction.

Ok gotcha!!

So basically something like that (which is supported):
fireSystem.billboardMode = BABYLON.ParticleSystem.BILLBOARDMODE_Y

BUT for X axis right?

1 Like

Very similarly, except it would be the system’s own local axis they are oriented to so it wouldn’t factor the camera direction into the billboarding. Perhaps it’s not even really billboarding at that point, but just applying a rotation to the particles themselves to offset it from pointing in their movement direction. I know there is currently a way to set their starting rotation but only around the forward axis.

I did see someone mention that SPS would be an alternate way to handle it and I agree, I have already started recreating this particle system in SPS to the best of my ability in case what I’m asking here is not possible, or at least not currently supported.

Ok then Ill repost this, I thought Delta got you what you needed.

Look up the Solid Particle System. You can control the mesh/plane that is displaying the particle image and all of the update function.

Takes a little bit more setup but gives you a lot of control.

1 Like

Thank you, it seems like that may be the way to go for the time being so I know now I should probably commit to that solution more fully.

You can make some amazing things with the SPS

https://playground.babylonjs.com/#CMS27E#8

2 Likes

if you want to stick with particles i’m not against the idea of letting you control the rotation with a custom function that would be applied to all particles (like the custom position or direction functions)

2 Likes

That may be a useful feature. We are using the latest official release and not pulling down the latest edits for production so probably wouldn’t make it into what I’m working on, but if that winds up in a future release I certainly wouldn’t complain!

Ha that’s sad because I was about to do it for you but if you do not use it for a while it will not get properly tested :frowning:

1 Like

I have spoken to my superiors and we feel that if you were to add it we would definitely be able to pull the latest and try it. If we run into some bug in the latest that forces us to roll back at the very least we will have tried out that feature first so we know it works!

I truly believe 5.0 is already more stable than 4.2 :slight_smile:
please create an issue for me on the repo and I will work on the feature asap