Skip to content

Conversation

@Garanas
Copy link
Member

@Garanas Garanas commented Apr 16, 2024

Description of the proposed changes

This reduces the life time of water trails to a similar value to what we have for footprints and tread marks. When you zoom out and back in all emitters are recomputed. The water trails are surprisingly complex (multiple emitters per unit that last 10 to 15 seconds on average) and are therefore a prime target for a frame time spike.

Adjusted life time

water-trail-adjusted.mp4

Old life time

water-trail-old.mp4

Testing done on the proposed changes

Spawn in naval units and observe the trail.

Additional context

I'd also like to review the other water trail effects.

Rebased version of #6088

Checklist

  • Changes are annotated, including comments where useful
  • Changes are documented in the changelog for the next game version

@Garanas Garanas added the area: graphics Anything Related to the Game Graphics label Apr 16, 2024
@Garanas
Copy link
Member Author

Garanas commented Apr 16, 2024

The emitters are determined by the terrain type definitions, specifically:

            Water = {
                AeonGroundFX01 = { EmitterBasePath .. 'aeon_groundfx_emit.bp', },
                AeonGroundFXT1Engineer = { EmitterBasePath .. 'aeon_t1eng_groundfx01_emit.bp', },
                AeonGroundFXT2Engineer = {
                    EmitterBasePath .. 'aeon_t2eng_groundfx01_emit.bp',
                    EmitterBasePath .. 'aeon_t2eng_groundfx02_emit.bp',
                },
                BackWake = {
                    EmitterBasePath .. 'water_move_trail_back_02_emit.bp',
                    EmitterBasePath .. 'water_move_trail_back_03_emit.bp',
                    EmitterBasePath .. 'water_move_trail_back_04_emit.bp',
                },
                Hover01 = { EmitterBasePath .. 'tt_water_hover01_01_emit.bp', },
                LeftFrontWake = { EmitterBasePath .. 'water_move_wake_front_l_01_emit.bp', },
                RightFrontWake = { EmitterBasePath .. 'water_move_wake_front_r_01_emit.bp', },
                SeraphimGroundFX01 = {
                    EmitterBasePath .. 'seraphim_groundfx_emit.bp',
                    EmitterBasePath .. 'seraphim_groundfx_02_emit.bp',
                },
                SeraphimGroundFX02 = {
                    EmitterBasePath .. 'seraphim_groundfx_03_emit.bp',
                    EmitterBasePath .. 'seraphim_groundfx_04_emit.bp',
                },
            },
            ```

@BlackYps
Copy link
Contributor

I like that the water trails look more reasonable in general now.
We could further improve the visuals by changing that second emitter that creates this shorter trail. It looks kinda weird at the moment. I am not quite sure what it is supposed to represent. Maybe it is supposed to mimick the dissipating foam...
I would suggest either making the lifetime longer and varying the lifetime a lot to better achieve this effect, or to remove it entirely.
grafik

@Garanas
Copy link
Member Author

Garanas commented Apr 19, 2024

It is supposed to be this:

image

I can make it slightly shorter and close to the unit.

@Garanas
Copy link
Member Author

Garanas commented Apr 27, 2024

I'm merging this in as it works on its own. Additional changes can be done via new pull requests

@Garanas Garanas marked this pull request as ready for review April 27, 2024 09:00
@Garanas Garanas merged commit fb526ec into deploy/fafdevelop Apr 27, 2024
@Garanas Garanas deleted the performance/water-trail-lifetime-02 branch April 27, 2024 09:00
@zhanghm18GIT
Copy link

zhanghm18GIT commented Dec 4, 2025

图片 @Garanas Sorry to bother you, but I recently came across this pull request while studying unit movement effects, and I've also encountered a similar issue: in your second video, between 2 and 5 seconds, the trails of moving naval units suddenly disappear, and they only reappear by zooming in and out.Two units also exhibit this problem at 18 seconds in your first video. 图片 Is there any way to avoid this problem?

I don't seem to have this issue when adding movement effects to army units; the effects don't suddenly disappear when army units move. However, this problem frequently occurs with naval unit movement effects.

@Garanas
Copy link
Member Author

Garanas commented Dec 4, 2025

@zhanghm18GIT I don't know why this happens. We can only interact with emitters. The behavior of particles (created by emitters) is entirely in the engine.

@Garanas
Copy link
Member Author

Garanas commented Dec 10, 2025

@zhanghm18GIT With thanks to @speed2CZ , a fix for missing ship wake effects is found in #6981!

@zhanghm18GIT
Copy link

@Garanas Thank you for letting me know. I'm very glad to see this issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Anything Related to the Game Graphics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants