[Godot] Light2D in add mode makes CreatureGodot node transparent

Discuss issues pertaining to the various game/web runtimes of Creature here.
Post Reply
Sungray
Posts: 4
Joined: Wed Jan 23, 2019 10:33 am

[Godot] Light2D in add mode makes CreatureGodot node transparent

Post by Sungray » Wed Jan 23, 2019 11:14 am

Hi,

When I use a Light2D in Add mode next to a CreatureGodot sprite, the creature sprite becomes semi transparent. This doesn't happen with normal godot sprites.

Is there any workaround ?

Thanks

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Godot] Light2D in add mode makes CreatureGodot node transparent

Post by chong » Wed Jan 23, 2019 4:51 pm

Hello,

I am not too sure about the exact details of Godot's light 2D implementation with respect to sprites.
The final rendering pass is at:

https://github.com/kestrelm/Creature_Go ... t.cpp#L444


As you can see it is just a single call to render the mesh, nothing too fancy here. The source code is provided so if you know anything about the details of the Godot renderer, you can change that to fit your needs. Or you can definitely ask Godot engine internals experts and post on this forum what the fix should be. I will patch it into the GitHub repo if the info can be provided.

Thanks

Sungray
Posts: 4
Joined: Wed Jan 23, 2019 10:33 am

Re: [Godot] Light2D in add mode makes CreatureGodot node transparent

Post by Sungray » Wed Jan 23, 2019 8:21 pm

I've looked into it and tried getting some help from godot experts, but I haven't got much.

The problem isn't that the creaturenode has an alpha when close to a Light2D in add mode, it's that all the different layers are affected by the light. If you have a hand inside a sleeve, the Light2D color will be added to both the sleeve and the underlying hand, the result being that you can see the hand behind the sleeve in a transluscent way.

Any chance this helps you pinpoint the issue ?

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Godot] Light2D in add mode makes CreatureGodot node transparent

Post by chong » Wed Jan 23, 2019 9:05 pm

Hello,

Thanks for the update. The issue is I too have tried looking/asking around but couldn't get any actual information about how to address this rendering issue. Their technical documentation on how their renderer works is still somewhat of a mystery to me.
As I mentioned before, I am using a very standard ( as far as I can tell given the state of their documentation ) way to render a mesh, I am not doing anything special or strange as far as I can tell. It will be great if the technical contributors in the Godot community can provide more insight into this issue.

Thanks

Sungray
Posts: 4
Joined: Wed Jan 23, 2019 10:33 am

Re: [Godot] Light2D in add mode makes CreatureGodot node transparent

Post by Sungray » Thu Jan 24, 2019 9:36 am

Found this :
https://github.com/godotengine/godot/issues/17542

Seems it's indeed an issue in the Godot engine.

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: [Godot] Light2D in add mode makes CreatureGodot node transparent

Post by chong » Thu Jan 24, 2019 4:53 pm

Thanks for the update, looks like a possible issue with the Godot Renderer itself...

Post Reply