Decal planes subdivided and projected onto 3D geometry

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By unfa
:warning: Old Version Published before Godot 3 was released.

enter image description here

I did this manually to show the concept.

The thing is to dynamically calculate approximate normal of the area under the decal and use it to project a decal plane onto the surface, prefarably duplicating parts of the original geometry and mapping the decal texture onto that. I don’t really know how this works, but it’s done in many game engines and I think we’d need this kind of thing too.

BTW, I’m not sure if other game engines don’t just use a decal texture instead of projecting a plane. Projecting and subdiving a plane, has the disadvantage that if the Z-buffer rounding goes wrong, it would be partially shown and partially hidden, which would be a really awful effect.

Bojidar Marinov | 2016-03-21 11:57

There has to be a Z-offset applied to the projected plane to avoid the surfaces fighting each other.

unfa | 2016-03-21 12:00

This feature is planned for Godot 3.0, with the 3D renderer rewrite.

Calinou | 2016-03-21 13:38