DecalCo

An asset by Master_J_
The page banner background of a mountain and forest
DecalCo hero image

Quick Information

0 ratings
DecalCo icon image
Master_J_
DecalCo

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.

Supported Engine Version
3.2
Version String
1.2
License Version
MIT
Support Level
community
Modified Date
4 years ago
Git URL
Issue URL

README DecalCo

What is DecalCO?

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.

System requirements

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.

Features

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.

Intallation

  • Download DecalCO's source code
  • Unzip it and copy the "decalco" folder into your Godot's project folder.

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.

How to use DecalCO?

To add a new decal to your scene, create a new MeshInstance node and give it a cube mesh. README image

Next, in the MeshInstance's material slot, create a new shader material and load the decal shader. README image

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

If you want to project a decal in a corner, you can try doing the following : README projectionAngle

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. README image By making it thiner, the artefac is now gone. README image

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

Performance

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.

Known issues and limitations

  • GLES2.0 projections update with a delay when the camera moves.
  • GLES2.0 normal maps may look considerably worse than they do with GLES3.0 depending on viewing angle and light setup.
  • GLES2.0 in DecalCo uses DEPTH_TEXTURE which may not work on some old hardware; especially mobile, as stated in the official documentation.
  • PBR lighting not supported because of some hacks necessary for the shader to work, PBR could be done if things like the iradiance texture is exposed to the light shader.
  • Specular lighting only works with a single light.
  • Decal wrapping on sharp angles produce ugly results, this could be solved by cliping the decal on those spots but will require to compute the face normal using the screen texture which would make the shader even less efficient than it already is.

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.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
DecalCo icon image
Master_J_
DecalCo

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.

Supported Engine Version
3.2
Version String
1.2
License Version
MIT
Support Level
community
Modified Date
4 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers