Search Issue Tracker

Won't Fix

Votes

0

Found in [Package]

12.0.0

Issue ID

1319090

Regression

No

[VFX] Trail with VisualEffect.Simulate doesn't handle position for sub-timesteps properly

Package: Visual Effect Graph

-

How to reproduce:
1. Open the user's attached "BugReport1.zip" project
2. Open the "SampleScene" Scene
3. Make sure the "Gizmos" is enabled in the Game view
4. Enter Play Mode
5. Observe the Game view

Expected result: The Trail generated by the VFX is smooth like the red debug lines
Actual result: The Trail generated by the VFX is polygonal and not smooth like the red debug lines

Reproducible with: 10.4.0 (2020.3.2f1), 11.0.0 (2021.1.2f1), 12.0.0 (2021.2.0a11)
Could not test with: 7.5.3 (2019.4.23f1) - VFX not working after downgrading

  1. Resolution Note:

    Hello,
    Thanks for this repro project, we are aware about this nonintuitive behavior, typically, it corresponds to this kind of usage :

    ```
    User code :
    vfx.SetVector3("color", red);
    vfx.Simulate(0.1f, 1);
    vfx.SetVector3("color", green);
    vfx.Simulate(0.1f, 2);
    vfx.SetVector3("color", blue);
    vfx.Simulate(0.1f, 3);

    What we be run actually is (because simulate is pushed on stack of event, like SendEvent) :
    vfx.SetVector3("color", red);
    vfx.SetVector3("color", green);
    vfx.SetVector3("color", blue);
    vfx.Simulate(0.1f, 1);
    vfx.Simulate(0.1f, 2);
    vfx.Simulate(0.1f, 3);
    ```

    There are two ways of approaching this problem :
    - Process the position interpolation (considering a Bezier curve) within the VFXGraph, this is typically the use case for a weapon trail, we will provide an appropriate sample.
    - Directly control the spawn from script using direct link event to initialize context without any spawn context, however, this approach is only available since 21.2

    Additionally, you can follow this feature in backlog https://portal.productboard.com/unity/1-unity-platform-rendering-visual-effects/c/101-sub-frame-interpolation which should resolve this problem more elegantly.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.