Skip to content

Is your game better optimized if you re-use models?

I am new to game development. I don't know how to exactly ask this.

I want to make a city in my game. I would rather make every single house unique, but I am worried that it will affect optimization. Will my game be more optimized if I re-use the same models?

1 points3 comments
Open on Reddit
About this post
Posted
Archived
Score
1 · 100% up
Kind
Text
ID
ny8m78

Author

4
posts
2
comments
1
media
View profile

4 comments

Probably. It depends on your engine. Unity has a technique called GPU Instancing which is a significant optimization if you are rendering multiple copies of the same mesh. Other engines likely have something similar. You need to look at the details of your rendering stack to understand what opportunities there are for sharing geometry. In the end, optimization is going to depend on the details of your code and how you build your game.

2 points

It will take less space and use less RAM. If you use instance static meshes in ue4 it will count as a single draw call per mesh

2 points

Best idea would be to make one base mesh for a house, then have multiple little add-on meshes that you just place over top of the base mesh. The base mesh would be instanced multiple times so it only has to be loaded once, and the smaller add-ons would all be loaded.

2 points

As said - the best for performance do as UE4 does - create a level with different models, then "bake" it into one huge static mesh. Renderer will "cut" invisible parts of this mesh and draw only what in camera (UE4 does it on engine level, but it can be implemented with pure DX/GL code).

But "bake" will not work if you need to interact with doors, they must be separated objects.

Also each object must have Level of detail mesh - LOD0-1-2. When we close to house - engine use LOD0 with high poly model, when it far away - engine loads simplified model.

Sometimes they even use sprites to replace LODx but for me it looks ugly.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.