PROJECT textures onto ANY Mesh! (In Godot)

preview_player
Показать описание
So Godot has this super useful node called "Decal", and it lets you project textures onto meshes.

Make sure you have a mesh in your scene already.

Then after adding one of the Decal nodes into a scene, you will see an empty yellow box frame. With it selected, add a texture into the inspector. This is done via Albedo, Normal, Orm, or Emission.

Let's just drag an image into the Albedo slot.

If the Decal box overlaps your Mesh, you will now see the dragged-in image projected on top of the Mesh. Congrats, you've used a Decal! It's that simple.

But what if you only want the Decal node to project on certain Meshes, but not others?

Using the Decal Node's "Cull Mask", you can set which Layers it can be seen on.

To adjust these Layers on your Meshes, find their "VisualInstance" category. Here you will set the Layer that Cull Mask looks for. If Mesh A is on VisualInstance Layer 1, and the Decal's Cull Mask does not have "1" marked, then it won't appear on Mesh A. But if Mesh B has its VisualInstance Layer 2 turned on, and the Decal's Cull Mask "2" is marked, then it will appear on Mesh B.

I hope this information was helpful or useful to you! I stumbled on this useful node during one of my Godot devlog livestreams, and wanted to share a bit about it. I stream pretty often, so I hope you'll consider subscribing to see me learn Godot in public here on YouTube.

BTW you can join this channel too, and get access to perks (like an entire, exclusive livestream!)

#indiedev #gamedesign #godotengine
Рекомендации по теме
Комментарии
Автор

Really well structured and informative. The visual is engaging and clear too. Great short! It got me thinking about making eyes that blink by using a Decal as the pupil.

PierogigonGameDev
Автор

Why is this the only Decal node overview I could find that mentions Cull Masks? Thank you so much for mentioning that

Widdy
Автор

so helpful. i didnt know this existed!

LightsOut
Автор

I watch some of your streams. But I definitely recommend more of these shorts!

Keep at it.

Force_Eye_Dev
Автор

Thanks a lot actually, I can finally make my mastoc horror game more like a mascot horror fame

EugeneCat
Автор

We got vehicle Decal system without even knowing it 🤣

Millu
Автор

I wonder if this could be used to create a performant and accurate and sharp shadow

RenderingUser
Автор

Do most games use decal (or something similar) when they show attack area indicator?
You know, like AOE spell impact, or when a boss is about to lunge along a line

AgriasOaks
Автор

Is this potentially useful to set up a jump scare for players as they approach?

hackysac
Автор

bro you are professional game developer why don't make game android platform ? btw good video :)

Zikoo_R