Is there any hit on performance with 2 sided materials vs non 2 sided?

As the question states just want to know if there is a visible or invisible catch to this.

Thanks.

Yes it costs more performance to render a material 2 sided than not.
On a one sided material the GPU first checks if the normals of each polygon face towards the camera and doesn’t render them if they don’t. This would mean that a sphere would for example cost close to half as much performance on the geometry side of things.

This doesn’t mean to avoid it any cost - just make sure not to use it on everything unless absolutely necessary.

Great thanks for the heads up.

Austin casts Necro, it isn’t very effective…

Could we all get some more detailed information on this? Is the material shader cost doubled with 2 sided? How does the culling work, would BMAliens example render the full sphere? Does it then need to draw the inside as well? Is that more geometry being added to the scene?

Are there tips and/or tricks to combating the necessity of a 2 sided material?

Thanks!

Well first concept everything in game design is about context so with out context the answer is yes/no/maybe :wink:

Next concept anything you add to world space adds a performance hit and once again about context. Are you working on a desktop project? Mobile VR?

Last concept worrying about possible performance issue during the iteration phase will drive you nuts that the tendency becomes about decaying the fidelity of the asset when it’s not really necessary. Best practice is to just build it and run a profile once the project is near completion under the same conditions in which the game will be played.

In general performance loss usually occurs when a map object inherents the performance loss simply by being included in world space during the development phase, IE in the PIE, and even an open object editor window will add it’s performance hit which tends to make playing in the editor useless as far as determine performance. Always test performance of your project as a deliverable. :wink:

So to kind of answer the question 2 sided material may or many not add a performance hit, as to shader complexity but by running a profile you will be able to drill down and actually confirm that it’s the 2-sided material that causing the problem and save you sanity in the process :smiley:

1 Like

While what Frankie says is very true i believe there is a big pattern in questions in these forums that fundamentally have the same objective, the question wasn’t really about performance but more about the how it works part and by determining that the performance part can be answered.

​​​​​​i too would like to know what and how 2 sided material does to an object in more nitty gritty detail other than just increase material complexity. In other words what is it telling the engine to do, okay render back surface and front ones, thats fine obviously understood but for example does this mean my 1000 poly mesh is suddenly seen as 2000 poly mesh by the engine? How is the material complexity increased what kind of math is it doing? Etc.

2 sided materials are relatively easy to figure out but like i said above the core issue in these questions lay in the fact that so little is described or tutorialized or documented as to how something works rather than just do this to get this. And for that reason we will continue to see more such questions.

2 years i pondered over an effect i was failing to achieve until someone briefly explained the why of inner workings after understanding the base which was not documented i was able to come up with a working alternative in matter of days

1 Like

True and usually I don’t answer questions like this with out some kind of context in which a performance hit would even be noticeable but since performance hit was part of the question well you know. :wink:

As an accurate and safe response to the question Yes there is a performance hit but as to theory falls under the category that if I spit into a swimming pool I made the water rise. Guess it would be easier to say the 2-side materials performance is only relative to the context in which it is used. .

Humm I would say the first realization is that there is no spoon. :wink:

The next realization is that a polygon is an invention that makes mesh editing easier in your application of choice and the reality a polygon is made from two tris with a hidden edge. That means when you import your 1000 poly object into Unreal 4 it turns into 2000 surfaces as a triangle aka tris.

Does that mean 4000 tris surface count if using 2-sided ?

As an area that needs to be filled the direct answer is yes of course

Just for completeness what really matters is the simple vertex that is defied by it’s position in 3d space. Add another you can draw an edge and another you have a area that can be defined as a surface. With that bit of information you the send the small amount data to the GPU and tell it what materials to apply that has been upload to it’s vram.

Need performance improvement buy a faster video card. :wink:

Totally agree but when asked a simple question with out context how far down the rabbit hole should the response be?

Does 2sided materials add a performance hit?

Yes.

Done.

Maybe the FAQ response should be please post the question in context form?

After that I would be more than happy to talk about how little I know :smiley:

fair enough :slight_smile:

My 2 cents. Would anyone know if a 2 sided shader on a cape for example hurt performance more than extruding the cape and using regular shader? I’m doing a VR game and curious what works best.