+1 vote

Hi,

I was thinking of making a scene transition using shader and the node animationplay, like this:

Old West Transition Scene

I gave a read in godot docs and I just understood how to use the "uniform".
How to manipulate images?
How do I join a vector2 and join some function?
How do I add a white mask and scale it to fit the image on top?
(The visual editor of v2.1.4 beta is still bugging, when I add a new block, the other blocks that are already, they change places)
(and also do not want to stay depending on the visual editor).

The documentation could have more information on how to use this and also several examples to facilitate learning.
It has a 2 tutorial in Portuguese but they do not teach the sufficient one.
I already left several projects for not knowing how to do something, because for me it is important to have this in the game!

You do not know how frustrating and exhausting it is not to know how logic works and worse still you want to complete a project but in the midst of progress you start getting discouraged and banging with various bugs. :/

in Engine by (146 points)

The first question here is, if you really need a shader for this effect.

Anyway if you use a shader, then here are some links for screen reading shaders.
Docs:
http://docs.godotengine.org/en/stable/learning/features/shading/screen-reading_shaders.html
http://docs.godotengine.org/en/stable/learning/features/shading/shading_language.html

And an interesting Q&A post with example code for a screen reading shader:
https://godotengine.org/qa/13023/shaders-how-does-one-create-blackhole-effect-using-shaders

Personally, I prefer the text editor for creating shaders. Just keep in mind that the shader language is different from gdscript.
You'd probably need the uniforms to receive a background texture and some kind of scale factor which can then be updated by an animation.

But:
You could also generate such an effect with a sprite and a textureframe. Generate a png of your background color with a transparent oval in the middle (maybe leave some border).
Then assign your background image to the sprite and the transparent oval png to the texture frame.

But the sprite behind the textureframe. Set it centered and alter the region rect via an animation so it starts from picture center and finally sizes the region to the whole screen size. Now you should have the basic effect but rectangular.

Now scale the texture frame (stretch mode "scaled") in the same animation from 0 in the center of the screen to some area bigger than the screen.

You should be able to achive this by playing a bit around.

I wanted to do this with shader to better understand how they work, but it seems that most of us here do not know how to handle shader.
I just wanted a different look for my game.

I also wanted to add a shader type:
https://goo.gl/Q3ep2a

I think it was an illusion to try to create this game ... I think I'll abandon it just like the others. :/
thank you anyway, you are very nice with me :)

Hey man, don't give up! If you want to create a game you can do it! I think you can create the effect you want but you need to be more specific about why you want that specific effect.

For example, I asked a similar question a few weeks ago. I wanted to make all of a certain color in my images transparent. People were saying intially to don't do that. I explained that I wanted to do this because of XYZ reason. Then someone came by and gave me some hints. I did some reasearch and tried some code for shader which didnt work. Then later somoen came and helped me correct my code. Now I fixed it and I got my shader... I'm not a genius!

If you want to solve a problem, you can!

Good luck!

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.