Skip to content

Add an option to make particle trails use global space even if particles are emitted in local space #13099

@DDarby-Lewis

Description

@DDarby-Lewis

Describe the project you are working on

A game with lots of VFX and gpu particles.

Describe the problem or limitation you are having in your project

GPU particles can emit either in local or global space, trails have no separate controls.
So I either have trails following the gpu particles node completely, or particles and trails being emitted and left behind as the node moved (so the trail continues to come out of thin air).

Describe the feature / enhancement and how it helps to overcome the problem or limitation

In other engines I have used the option to set the coord space for different parts of an effect separately.
I would like to have the option to set the particles to be emitted from local space, but the trails to be left in global space.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The Local Coords checkbox on the particles node could be swapped for a enum dropdown that has various options:

  • global
  • local
  • local_trails

So the first two options are the previous false, and true states, the final option is the new behaviour.

I have looked at the code that manages particles, and it's rather involved with little explanation so if someone with experience of it is happy to help advise on what would be required to make this change I am happy to do the work.

From what I can tell it should basically involve adding a local transform parameter which can be pushed and used to update only for newly emitted particles when in the third mode but allowing the already exiting particles to persist in global space.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It can't, from what I can tell, even writing a custom particle process mat it would not have all the required data.

Is there a reason why this should be core and not an add-on in the asset library?

It would require changes to paticle storage I suspect.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions