This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

As shown in the image below.
I'm trying to use

for i in walls: draw_colored_polygon()

inside one main control node to create wall shadows i.e. fog of war. It works fine for regular walls that use a black color with a full alpha of 1.0.
The windows however should be transparent and only modulate the color behind it a bit.
My problem here is that many windows behind one another add the polygons together and create many seams where they overlap. It is realistic in that windows get harder to see through the more are behind one another but it also creates a fish eye effect when you walk along and see the seems moving along, kind of sickness inducing, so i need it gone.

Long story short,
is there a way of forcing all the


in _draw() to keep alpha at 0.18 even if they overlap?

I tried

draw_colored_polygon( Color(1,1,1) )

and then modulate the control node with self_modulate but it has the same effect as just drawing the polygones with a transparent color.

To clarify all draw calls are done in one control nodes _draw() function.

Godot version 3.2.3
in Engine by (177 points)
edited by

It doesn't add the alpha together, it draws on top of it. If you don't want that effect you will need to calc where the polys overlap and clip it

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.