Hide Static Mesh using material - Impact to Game performance

I am planning to use material to hide my game static meshes and also disable all related the static meshes collision. I am planning to do this to a lot of static meshes in my game level; would this hurt the game performance? If the static mesh is not visible and also doesn’t have collision, would it still hurt performance?

1 Like

How would you hide them using the material?

I changed the material opacity

Ok then, very bad idea :slight_smile:

Opacity is very expensive to render. So if you have a lot of transparent meshes, the engine still has to calculate what can and can’t be seen.

Much better to just hide / unhide the actors.

If you want to fade in / out, then you can just

change to translucent material
fade out
set hidden

Thanks for the feedback, it is good that I asked before I start converting a whole bunch of meshes :stuck_out_tongue: and regret later.

Can you suggest some pointers on the fade in/ out effect? After changing the material to translucent, how do I achieve the fade in/ out effect?

1 Like

Just by changing the opacity

image

You apply a dynamic material instance to the mesh, and control that parameter.

It’s easier if you just put the whole thing ( mesh and code ) in a blueprint.

I don’t get it. I was controlling the opacity of the material; but I thought you say it is expensive and it is a very bad idea?

What is the different between your pasted material BP compare to what I mentioned earlier which is also changing the material opacity? :slight_smile:

I’m just saying if you want a fade in/out effect, then you can switch to a translucent material just for the fade, and then switch back to opaque.

Oh got it, thanks!! Using translucent material is more expensive than opaque in game play, therefore after fade in/ out, I would need to switch the material right?

1 Like

Yes :slight_smile:

Got it, thanks a million!!

1 Like