Stretched Billboard Without Rotating

Hi all,

I am trying to create a booster particle effect from 2d texture by using stretched billboard mode.

When viewing from the side, that is the desired effect.

However when viewing head-on, I would like the particle to be “thin and stretched” (just like a viewing the side of a plane mesh) instead of rotating the texture.

(The desired behavior in Unity)

Is it possible to change the rotation behavior?
Do I have to customize the vertex shader to achieve the “thin stretched” effect?

Hello and welcome to the Babylon community! I think you’ll need to customize the vertex shader, right @sebavan ?

I do not think we support this mode by default so you might need a custom version. @PatrickRyan is our Particle guru and could confirm ?

You might need a custom update to add the support.

I like the idea though and It would be a great contrib if we do really not support it ?

Also @PatrickRyan please try in this pg: not the op one as it modifies the default particle shader and might not work for what you try. if you opened the other one first, please open in a new tab :slight_smile:

@sebavan, this playground is what I would have done to have the billboard react the way @s207152 has described. I created a transform to use as the emitter source so I could utilize the emitter axis. I set the particles to emit up rather than right, and then set the particle rotation to match the orientation of the emitter. The isLocal property set to true says that particles should be updated in the emitter’s local space rather than world space, so a BILLBOARDMODE_Y should reflect the emitter’s local Y rather than the world Y. The billboardMode accessor seems to ignore the isLocal property, however. This feels like a bug to me. What do you think?

I would think billboard is only global and not in the parent which makes sense so I guess is local is not taken in account as you mentioned.

Let me burn a wildcard to summon @Deltakosh and see if he has an idea ?

@sebavan if billboardMode is only global, then it feels like we need to add one more property for BILLBOARDMODE_STRETCHED to allow billboard only around the axis of the direction of particle emission. It seems with just BILLBOARDMODE_ALL, BILLBOARDMODE_STRETCHED, and BILLBOARDMODE_Y that we are leaving some scenarios on the shelf when using stretched particle cards. This really doesn’t show up as an issue if the particle cards are square.


That would definitely be great if it will be supported as an option of BILLBOARDMODE_STRETCHED!

As for now, I have come up a workaround by changing row1 vector to direction.
Here is the updated PG:

Notice the changes on line 86, 89, 90.

@Evgeni_Popov would you have time to look into this one ?

I have created a PR based on @s207152 code: