The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+7 votes

The title says it all, how do you do a silhouette form of your objects, especially when they're behind other objects like rocks and trees, walls, etc

in Engine by (119 points)
recategorized by

Need to mess with shaders. I don't know much about it but there's a tutorial in here.

2 Answers

0 votes

I got this to work oddly enough by doing these things

  1. Create a mesh instance, and select "Use Alpha" in the Material options (or if you're doing a shader use DIFFUSE_ALPHA, instead of just DIFFUSE)

  2. Create a mesh instance as a child of the above mesh instance, and set it to "On Top" (I recommend using the "create outline mesh" tool to do this, also setting "unshaded" to me makes it look nice)


If you'd like object an object to be in front of this effect, set it's material to "use alpha" also

This is the way I found out how to hack around it, but I wouldn't expect this to work everywhere, or to be supported after 3.0 but who knows

by (122 points)

For the outline mesh, I set the Outline Size to 1, then scaled the resulting mesh to about 0.499, since the outline options don't allow the size to be 0, and so there wasn't any bits poking out.

The reason I suspect this works, is because Juan has told me that the alpha pipeline renders objects slightly different, and the fact the child mesh isn't rendered in that same way, probably has a heavy roll in why this works.

0 votes

If 2D, your solution might be with light node and light mask (from CanvasItem), never played much with lights but with a quick test I was able to do this:

enter image description here

The left and right sprites are on different light mask, the center light2D affects only one of them.

by (7,890 points)
reshown by
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 Frequently asked questions and 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 [email protected] with your username.