Skip to content

Generate Visibility Rect for particles doesn't produce useful results #107705

Open
@miv391

Description

@miv391

Tested versions

  • Reproducible in v4.5.beta1.mono.official [46c495c]
  • Reproducible in v4.4.1.stable.official [49a5bc7]

System information

Godot v4.5.beta1.mono - Windows 10 (build 19045) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 32.0.15.6094) - Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4 threads) - 15.95 GiB memory

Issue description

When the particle effect is quite random, the rect generated by Generate Visibilit Rect editor tool is also quite random. In my case the particle effect presents hit effect sparkles, so there are only a few particles, the effect is one shot and short. The following image displays results of seven consecutive Generate Visibilit Rect results, I didn't handpick just the extreme results.

Image

I know that the visibility rect can be set manually, but when there is tool for generating the rect, it would be nice if it were useful.

This could be fixed by running the particle effect multiple times and calculating maximum rect of all runs. There could be an editor setting for how many times the particle effect is run or the particle effect is run until the maximum rect is not changed for, lets say five consecutive runs.

Steps to reproduce

This can be reproduced practically with any GPUParticled2D particle effect, but the problem is most glaring when the particle effect is quite short, one shot and contains only a few particles.

  • Create a GPUParticled2D particle effect.
  • Run Generate Visibility Rect tool for a few times and compare the results.

Minimal reproduction project (MRP)

Reproduction project has a one shot particle effect having only 5 particles. Setting the amount of particles to 1 gives the extreme case.

visibility-rect-test.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions