Motion blur in 2D

SamaelSamael Posts: 4Member

I have stars and background in the menu. I need to make sure that when the stars move, there will be a trace behind them. When switching to another screen in this menu, the camera moves abruptly to another area, but without the motion blur effect, it looks very bad. How can I get the effect of motion blur in Godot 3?

Answers

  • TwistedTwiglegTwistedTwigleg Posts: 858Admin

    Someone made a 3D motion blur shader in Godot. Maybe you can change the shader to work with 2D camera nodes instead of 3D camera nodes?

    I took a brief look at the code for the shader, and the GDScript code for updating the shader, and at first glance it does not look too hard to convert into 2D. Maybe you can you it as a base to make a 2D motion blur shader?

  • SamaelSamael Posts: 4Member

    I always avoided shaders, because I didn’t understand how they work. I will try to understand what is written in this shader, but this is hardly possible.

  • SamaelSamael Posts: 4Member

    Acquainted with the documentation, looked at some examples, was able to write a simple blur for the sprite. But it was not possible to write a shader for the camera, information about this could not be found. Shaders are still magic to me. Has nobody ever asked such a question and this effect is not implemented in Godot?

  • SamaelSamael Posts: 4Member

    I achieved the desired effect by scaling. I hope in the future in Godot there will be all sorts of effects.

  • TwistedTwiglegTwistedTwigleg Posts: 858Admin
    edited October 14

    @Samael said:
    I achieved the desired effect by scaling. I hope in the future in Godot there will be all sorts of effects.

    I'm glad you were able to get a result that works for your project. :smile:

    Has nobody ever asked such a question and this effect is not implemented in Godot?

    I do not know for sure, I imagine it's been brought up before. A quick google search shows there is at least some interest.

    Probably the issue preventing 3D motion blur also effects making 2D motion blur.

    That said, it may not be a bad idea to make a feature request/proposal issue for 2D motion blur, since as far as I can tell there is no open issues on the repository for 2D motion blur. (There is just the issue I liked above, which as far as I can tell, seems to be for 3D projects)

Sign In or Register to comment.