Create Decal Bullet Holes, Splats, Impacts, etc. Without Specular Highlights!

Hello, everyone!

For the longest time, I’ve been bothered about how decals always appear washed out when in direct sunlight, specifically the specular highlight, and overall making them look unrealistic and non-3D.

Should be noted that this feature could break at any time and should be used with caution! This is an unintended side affect of terrain materials not functioning with BaseParts

I was fumbling around with Enums and had the bright idea of changing the decal material to “Air” an unlisted material. This appears to have no specular highlights of any kind, so it’s perfect for decals!

How to eliminate specular highlights on decal surfaces
In your decal creation script, simply set the material of the decal’s part to “Air” like so:

decal_part.Material = Enum.Material.Air

Comparisons

Decal material set to anything besides Air, demonstrated using a rocket impact & blood splatter:
image

Same examples, but with the material set to “Air” instead:


image

Another example with bullet holes on the ground with material set to air:

And blood’s material set to air:

Blood’s material set to icky icky plastic or anything else:

Just did a test with 100 bullet holes spawning at once with their materials set to Air on a very complex mesh. Performs a lot better than if the materials were plastic. Possibly because the engine doesn’t need to draw highlights or anything for these objects. They also receive lighting updates, so don’t worry about a bright red decal in a dark room. :slight_smile:

52 Likes

I didn’t know you could do that. :thinking:

UNREAL AIR TIME! Let’s go making parts out of air!

7 Likes

Wow me neither!:astonished: glad you made this tutorial. So others can know about this to. Thanks for this TheRings0fSaturn.

3 Likes

No problem, @jordonh23!

Honestly glad I figured this out recently! :slight_smile:

2 Likes

What a find! Props to you for figuring this out, I completely forgot that air was even a material :laughing:

2 Likes

Very nice. I’ve always used Fabric for this kind of thing - it’s the only material you can select with the lowest reflectance. I would imagine Air is better, but it’s probably worth testing.

3 Likes

Air has 0 reflection, which is great for this usecase. :slight_smile:

2 Likes

So that’s what the air material was for. Alright then.

It’s an interesting find, but I wonder if this is the intended purpose of the air material or if it’ll be changed in the future. Regardless, that’s quite a find. Cheers for sharing.

3 Likes

I believe it’s not an intended feature, as “Air” doesn’t show up on the part’s material, possibly because there’s no string for it under Part.Material.

This has been a thing since I believe Smooth Terrain came out, possibly even since the original terrain came out.

Things like this should definitely be in the original post, preferably at the very top, and very noticeable. It’s not good to rely on behavior that isn’t guaranteed to always stay the same.

You can actually make really good-looking roads with this trick, thank you so much man

13 Likes

Cool! I honestly didn’t even know that the air material is a thing. Thanks for bringing that up and thanks for the tutorial!

This is definitely unintended - it’s a smooth terrain material and causes rendering issues with parts. I used to use it but it broke a couple of times so I would say don’t use this in any real games since it could break at any time :slight_smile:

7 Likes

I think it will last until custom materials update is out

Air material is a Smooth Terrain material. There is some unfortunate overlap in that Smooth Terrain and Part.Material share an enumeration from which not all values are valid in either context. There is nothing magical about using Air for part material, you get the same result by setting Part.Material to any value of Enum.Material that is only valid for Smooth Terrain. The corresponding behavior for smooth terrain is that any value of the enum intended for Part.Material just becomes grass.

2 Likes

No guarantees. It’s a quirk of the rendering system, and keeping in mind they’re working on an overhaul soon, this could very easily stop working tomorrow. It’s dangerous to rely on bugs and undocumented behaviour for that reason.

4 Likes

Perhaps with custom materials, they’ll allow you to have materials without specular highlights?

If so, I’ll edit the original post to showcase this. :slight_smile:

1 Like