0 votes

I would like to be able to draw things like inset windows on top of walls without modifying the geometry of the wall, see image below:

enter image description here

The windows do not have to be transparent, you don't have to be able to see through the wall!

There may also be multiple objects behind the windows which could clip through the windows, not just the wall. In the example image below I don't want to be able to see the blue box in the window. It might work best if the windows are their own geometry (mesh) floating just in front of the wall but the windows must always render on top of the wall.

enter image description here

I tried playing around with normal maps and depth maps but I haven't had much success with having nice, sharp, deep, 90 degree inset features, it works okay if you want soft edges but I would like things sharp! It is also important that light and shadow effect the windows properly as they do the walls.

Something like this I think would work for me but Godot does not have access to the stencil buffer yet. I did find this pull request that mentions it could be used for something like this but I haven't been able to figure out how to do it.

Thank you very much for any help you can provide! Even just pointing me in a direction to start researching would be great!!

Godot version 3.3
in Engine by (252 points)
edited by

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 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.