Avatar of Mr_Fulano
Mr_Fulano
Flag for United States of America asked on

Game Asset Design and Performance.

I have a question regarding performance and how game engines handle mesh objects. – For the purpose of this question, let’s assume we have a wall asset within a game. If we make our wall 10 feet tall and 100 feet long, we have a rectangle, which can be made up of two large triangles.

So, our first example is a wall that is 10 feet tall X 100 feet long and is made up of 2 triangles.

Let’s now assume we broke up that same wall into smaller 10 foot sections (i.e. 10 feet tall X 10 feet long each).

So, in our second example we have our 100 foot long wall made up of 10 individual sections, which are each 10' x 10' made up or 2 triangles each, so our 100 foot wall now contains 20 triangles.

In recap:
Example 1 = A wall, 10 feet tall X 100 feet long and is made up of 2 triangles.

Example 2 = A wall made up of 10 sections, each at 10 feet tall x10 feet long and each section is made up or 2 triangles, so our wall has a total of 20 triangles.

My question is which of these designs approaches to our wall is more memory intensive for the game engine to deliver to the scene?

Is it more expensive (in terms of memory resources) to draw 2 very large triangles. Or, is it more expensive to draw 20 much smaller triangles?

Or are they equivalent…after all, we’re producing the same asset which is 10 feet tall and 100 feet long? The only difference is that in one instance we're drawing 2 huge triangles and in the other we're drawing 20 much smaller triangles. Can we assume each triangle is 1 "draw-call"? Or is that something totally different?

Although this may seem somewhat academic in terms of "one wall", it can add up when you're producing "modular" assets for a city scene or for a large office building scene or modular asset.

Thank you,
Fulano
Game ProgrammingComputer GamesCAD/Architecture Software

Avatar of undefined
Last Comment
Mr_Fulano

8/22/2022 - Mon
SOLUTION
dpearson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mr_Fulano

ASKER
Hi Doug, thank you for the very detailed explanation. Perhaps I am a bit confused, because I always thought that poly count had a huge impact on performance. I understand that painting the different textures have an impact, but I was always under the impression that drawing the geometry over and over, frame by frame, taxied the system's resources tremendously, so that's the origin of my question. I do recognize that this is a difficult question to answer, because a lot of developers don't get too deeply interested about the dynamics of how the game engine does what it does, but rather simply work with a set of industry supported rules of thumb.

Thanks for the very good info.
Fulano
SOLUTION
dpearson

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mr_Fulano

ASKER
Thanks Doug, you have very valid points, but let's put aside the concepts of poly count and draw calls and go back to my basic question. Would it be "better" to have a wall with 2 large triangles or 20 smaller ones if the wall is made up of a modular composition?
ASKER CERTIFIED SOLUTION
Ben McNelly

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Mr_Fulano

ASKER
Hi Ben, I think you're correct. I agree with your analysis. In the end, there are going to be more draw calls and more performance impacts on the 20 smaller segments than the larger 2 segments.

Both you and Doug presented a very good analysis and I think both addressed my concerns. I think the only other thing I could do is create two very simple scenes in my game and fill one with the 20X version of the wall and the other with the larger version of the wall and see if it would have any impact whatsoever, but my machine is so powerful in terms of hardware, that I may not see anything at all. Trying it on a much weaker machine would probably be the only way I can figure that out.

Thank you both for your great help.
Fulano
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Mr_Fulano

ASKER
Great job to you both!