Download

How performant are decals?

I’m working on a biome system, and ideally I’d like to be able to change the material on certain parts of my landscape if there are trees present. I had thought of possibly using decals, but I feel like this may create a performance hit if I’ve got many decals.

Are there other methods of manipulating a layer mask at runtime to reveal (or not) certain material attributes?

Deferred decals ftw, stamp away and don’t worry about it other than memory. Use All the decals!

Where you’ll notice the hit in performance will depend on your material and it’s shader complexity. The more complex the material the more it will impact performance.

You can test this in your scene by changing the viewport view mode from “lit” to “shader complexity.”

Take a look at this documentation to get a better understanding of the Shader Complexity view mode.

If you have any questions feel free to ask.

Thank you!

Tim

That makes sense Tim, thank you for the reply.

Hate to be the bearer of bad news, but decal cost doesn’t show up in ShaderComplexity. ShaderComplexity actually only shows material cost + translucent overdraw cost. Overhead from various features like lighting, shadowing, post process and decals are not reflected.

Decals cost similarly to an unshadowed Movable or Stationary light, because they are both applied in a deferred pass. Covering the entire ground with them should have a pretty heavy cost, especially as you look at an angle where you are looking through potentially hundreds of them. GPU costs such as this can be seen with ‘profilegpu’, so to a performance test. Decals are under PostProcessDeferredDecals.

Thanks, Daniel for the info!

@Hyperloop: Sorry to get your hopes up and my misinformation.

Ok yeah it’s a light cost :frowning: Still, it’s not nearly as expensive as it used to be. I’ve never stress tested UE4’s light costs. No light culling implemented I assume? Didn’t see anything like it.

@DanielW

Thank you for the info, this is helpful. Hmm, I think another method that could be less expensive for what I’m trying to do would be to somehow manipulate a splat map or alpha map inside the shader, though I’m not sure if there’s anything exposed in the editor that might let me accomplish this.

You’re doing great! You’re helping out everywhere on the forums, I really appreciate that.

This kind of sounds like the new deferred way of doing decals is rather limited compared the old forward decal system. Is that the case? Or have deferred decals proven to be faster/better than forward decals? Are decals something that will benefit from parallel rendering in the future?

It’s still way faster than forward. Remember, a light cost in deferred is far cheaper than a light cost in traditional forward rendering, at least for overlapping lights.

That being said, for this sort of thing specifically virtualized textures are going to be the biggest win. Totally unlimited stamping and decalling and anything else you can imagine at the cost of HDD/Install size. You don’t even need to go for an entirely unique world texture set ala RAGE, it’s perfectly doable in a kind of instanced manner. Don’t know why it’s not the hot ticket item still, the only implementation of such I’ve seen in a shipping game is the last two Trials games.

Hey, bringing up again this thread for a quick question.

How any of this still applies to VR and the Forward Renderer? it is a good idea to use Decals in general to detail a VR env?

Thanks.