File | Date | Author | Commit |
---|---|---|---|
2d | 2022-04-05 |
![]() |
[6dd0cd] animation |
addons | 2022-04-05 |
![]() |
[6dd0cd] animation |
decalco | 2022-04-05 |
![]() |
[7518d3] decal |
materials | 2022-04-04 |
![]() |
[f76533] Initial commit |
prefab | 2022-05-08 |
![]() |
[0debe0] animation |
script | 2022-05-08 |
![]() |
[0debe0] animation |
scène | unknown | ||
.gitignore | 2022-04-04 |
![]() |
[f76533] Initial commit |
LICENSE | 2022-04-04 |
![]() |
[f76533] Initial commit |
README.md | 2022-04-04 |
![]() |
[f76533] Initial commit |
default_env.tres | 2022-04-04 |
![]() |
[f76533] Initial commit |
icon.png | 2022-04-04 |
![]() |
[f76533] Initial commit |
icon.png.import | 2022-04-04 |
![]() |
[f76533] Initial commit |
project.godot | 2022-05-08 |
![]() |
[0debe0] animation |
DecalCO is a shader based solution for the Godot game engine. Decals are a great tool used to add details to a 3d object without having to add more details to its geometry or using really large texture maps.
You can use decal to add things like bullet holes, blood splashes, water puddles in your scenes.
Godot game engine version 3.2.
DecalCO should work with 3.1 version of the Godot game engine too but not confirmed yet.
The 3.0 version of the Godot game engine isn't supported because of an engine bug concerning the depth buffer.
DecalCO's decals offer the following features :
- Texture mapping (albedo, specular, emission, normal map)
- Flipbook animation (useful to animate things like rain drops)
- Shadow mapping
- Multiple lights.
DecalCO is also available on the Godot game engine's Asset Library, you can also download and install it directly from the engine's editor.
To add a new decal to your scene, create a new MeshInstance node and give it a cube mesh.
Next, in the MeshInstance's material slot, create a new shader material and load the decal shader.
DecalCO's decals are projected along their negative local Z axis, make sure this axis is perpendicular (like in the screenshot below) with the surface the decal is projected on to avoid wrong projections.
If you want to project a decal in a corner, you can try doing the following :
In order to fix projections artefacs as much as possible (see example bellow), try keeping the decal as thin as possible by scaling it down on the Z axis.
Here, the decal's projection box is large, objects passing near it will interfere with it's projection.
By making it thiner, the artefac is now gone.
As the decal's logic is happening in a shader, you can save your decal's materials in your project as a resource and share it accros multiple decals.
A demo scene showcasing how you can use this plugin and its features is available in the examples folder.
As the decals are shader-based, they should be pretty efficient. They also can share the same material, so the material count dedicated to them can be limited to one material per decal type.