0 votes

How can make a part of a mesh invisible. I need to make a animated char invisible on a range on the Y axis. Can some one help me? Shader? Why isn't there a logic comparator on the Shader Graph?

in Engine by (64 points)

If you need to animate the range, I would say shader material, by outputting zero alpha or using pixel discarding. However I have no knowledge to practice that in Godot yet :/
Maybe with alpha you could map the world Y value to a curve that has a sharp cut along the range you want to make invisible, but it would be hard to animate.
Otherwise, using step() would do the trick on alpha without the need for conditionals, however I don't see a node graph equivalent :/

Well thanks for you comment, I've got a problem, on the fragment shader, when a get the vertex position, it makes the vertices go crazy, like it doesn't project them correctly. It stays blank on the screen

enter image description here

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.