Speed line shader/effect when boosting
#4
Hey both,
Cheers for the welcome, glad to be here! I'm glad to hear you like the effect/shader. Having read through both of your posts, there's definitely some good suggestions as to the next steps for this.

Let me quickly address a few questions first:
(Yesterday, 06:58 PM)Sven Wrote: The colors look pretty rainbowy, which looks nice imo and works well for the tracks you used in the video, however I'm wondering how it will look on tracks that are darker in tone, such as Fort Magma or STK Enterprise. Is the coloring also something that can be easily changed inside the shader?

Another question I have is: how does the effect work with different aspect ratios?

Thanks, and yes I agree I personally think it works well at the moment, even in the darker tracks. The color change happens over time and helps break up the uniformity of the effect. That being said I should be able to parameterize it such that we can try a different range of hues. It is certainly something we can easily experiment with and tweak to polish up the effect Smile

As for the aspect ratio, it's something I correct for in the very beginning of the shader by factoring in the screen resolution in the UV calculation. As such it should behave uniformly on most screens.

Alayan Wrote:A 7900XT is still a pretty good discrete GPU. The vast majority of STK players have much weaker cards, and many people play the game on integrated GPUs or on phones. 30µs is fine, but if it's something like 300µs or 500µs on a weaker machine, that's significant.

The effect looks pretty good, but it probably should come with a toggle in the graphics settings and be only enabled at some presets to-be-determined through testing. Probably level 4 (within the current levels).
Yes the GPU I have is certainly overkill for profiling and running this game, that being said performance is something I analyze on the daily and is certainly something I want to make sure is good for all players. I've got some other hardware that I can try for testing to be certain. Generally however the effect is really cheap conceptually, so I don't think we'll run into any issues with it, but I definitely want to test it properly before we ship it.

Alayan Wrote:All speeds that are genuinely high require collecting at least one source of max speed boost, but:

    There are many speed boost sources, and trying to come up with a list of combinations that should or should not trigger the effect would lead to a messy and unsatisfying result.
    There are many situations in which a speed boost can be triggered while going at a fairly low speed. Displaying the speed lines in that situation, but not at a higher speed obtained with less boost sources, would simply be odd.
    When you mix in sources of SpeedDecrease, it becomes even messier.


There is a much simpler and more elegant solution: make both the trigger threshold and the intensity depend on the ratio to the generic max speed.

Generic max speed is currently used in the speed formula for basketballs, but it also works very well here because unlike a kart's own max speed, it is constant throughout the race.
This does track with some of the woes I had trying to implement a good BoostIntensity value for the effect indeed. Initially I was trying to just use the ratio of current speed over the maximum speed. Then I noticed it was dynamic based on active speedboosts/decreases etc. I'll have a look at what you're mentioning here with the generic max speed instead.

Alayan Wrote:Of note: there is also the motion blur shader that's supposed to fill a similar role. I can't remember off the top of my head what issue it has (I think there was something making it look not so good), but I remember distinctly that activation conditions for the motion blur effect are bad, and much of what I suggested for your speed lines goes back to thoughts I had regarding activation conditions for motion blur.

Personally, I prefer the visual style of speedlines, and there is a reason why blur effects are not part of the main graphics slider, but any integration of your effect into SuperTuxKart should give some consideration to how the two effects interact, and motion blur's activation conditions should be revised too (although in a separate commit/PR).
I did look at the motion blur and it looks like it's triggered on a speed increase as well and then lasts for a fixed time (0.75s if memory serves me right), but it doesn't appear to really use any intensity value to dampen/strengthen the effect depending on the player's speed. I think if we apply the same BoostIntensity that we'll feed into the SpeedLine shader, we might genuinely have a nice layered effect.

Overall thanks both for the feedback on it! I'll try and implement it using the Generic Max Speed to try it out and post results here. After that if you guys agree maybe we can start a draft PR so we can all test it locally and see what needs changing to make it into the game? 

Cheers and kind regards,
stbdev
Reply


Messages In This Thread
RE: Speed line shader/effect when boosting - by stbdev - 5 hours ago

Forum Jump: