Entry 19/9/2016

Are LOD ships worth it?


In this blog, I want to try to understand why it is LOD can be so important. I

know that LOD’s are changed within the code, but since this is a modelling

dissertation I’ll assume that “it just works”.  I also may discuss other options that

run alongside LOD, but of which are changed in code also, I’ll address them

to show my understanding because they do relate to modelling.

 

The result every developer wants and needs when doing LOD models is to

enable the optimisation of the computers resources, of which it has a finite

amount of, and to increase the overall performance of the game.

 

Viewpoint and the number of objects in your scene is a major factor when it

comes to deciding how many LOD you need to create. Given that I’m not that

experienced with interior ship modelling I’ll stick with a third person camera

angle. This means the whole/ part section of the model will be seen when the

player is commanding the ship Figure 1.(Brian Crecente. 2014)  This will mean

that a high poly LOD will be present at most times the player is around the ship.

Since games such as Elite are a cockpit view, there are certain conditions in

which the ship will have a lower LOD, for example being in the pilot seat

virtually the rest of the ship is switched to a much lower LOD all bar the cockpit.

Being around another player in space will bring back the higher LOD so the

other player can see your ship in greater detail. This, as I will show later, doesn’t

necessary always work.

star-citizen-ship

Figure 1 : Star Citizen (Brian Crecente. 2014)

Again using (Arno. 2011) LOD was set out in a set of points in which method to

use

  • Simple object = placed once: might not need LOD at all
  • Complex object = placed once: give it LODs
  • Simple object = placed many times: use drawcall batching
  • Complex object = placed many times: probably not a good idea.

Given that I’m modelling complex ships but only placing them once, this forum

backs me in my dissertation in LODing my models.

 

Now its best to understand what drawcall is. (Forum.unity3d. 2009) Drawcall is

the amount of objects which need to be drawn to the screen. Materials are

counted as one drawcall to the graphics API, but objects can get drawn many

times given different lighting sources on them. Having a lot of drawcalls to the

system is likely to slow down your game. My ships will come under the category

of the complex object placed once, meaning it is suitable for LOD

models. Drawcall batching, however, can be used by Unity to save on

performance (Technologies, U. 2016), Unity itself can combine what would

normally be single drawcalls and batch them together saving on processing

power. Nvidia’s presentation (Matthias Wloka. 2016) on batching states

that communication between CPU and GPU by design would rather

draw 1M objects of ten tris than ten objects of 1M tris each. The texturing

side is something I can have a conscious impact on, being efficient with

my texture atlas will mean I’m able to use drawcalls effectively without

wasting them on single materials with only a portion of a diffuse map

being used.

 

Additional factors which the code would deal with would be factors such as

shadows and shaders. If the player is far enough away from an object, that

object no longer needs to cast multiple shadows. This again is another job that

now longer doesn’t need a drawcall, saving further performance.

 

Though this forum post defines these images as bugs/glitches, it allows us to see

the LOD in action between the two images we can see how shaders are also

part of the process of increasing performance.The game obviously hasn’t

detected that two players are close to each other, so its most probable that

some actual LOD has taken place, given that from the player’s distance from

each other we can’t see that LOD nevertheless. Figure 3. (c64orinoco. 2015)

demonstrate the underlining principle, though the player shouldn’t notice it.

screenshot_0934

Figure 3: Close to Each Other Elite (c64orinoco. 2015)

screenshot_0950

This again is another bugged/glitched ship model from Elite, though before the

LOD was working correctly; this one has failed to switch up to a higher poly

model along with what looks like shaders being turned off. You can tell

it’s further down in its LOD due to the very angular structure of the ship Figure

4. (Talyn. 2015). It is evident that you’re not supposed to see the ship from this

angle or position.

texture-swap-issue-2

Figure 4: Planetary Landing LOD bugs (Talyn. 2015)

Overall LOD is defiantly the way to go. The performance increases from LOD

models makes me satisfied in the choices I have chosen in going down this

path. Though as I’ve said I, won’t cover the coding, it’s still important that I

discover the cause and effect of LOD models on a system.

 

References

 

Arno. (2011). LODs.. Do you recommend them? | FSDeveloper. [online] Available at: http://www.fsdeveloper.com/forum/threads/lods-do-you-recommend-them.100238/ [Accessed 16 Sep. 2016].

c64orinoco. (2015). Vulture model LOD / Reflection shader bug. [online] Available at: https://forums.frontier.co.uk/showthread.php/122241-Vulture-model-LOD-Reflection-shader-bug [Accessed 19 Sep. 2016].

Crecente, B. (2014). Star Citizen’s Arena Commander is the first tantalizing taste of a great space sim. [online] Polygon. Available at: http://www.polygon.com/2014/4/13/5609590/star-citizens-arena-commander [Accessed 24 Oct. 2016].

Forum.unity3d. (2009). What are Draw calls | Unity Community. [online] Available at: http://forum.unity3d.com/threads/what-are-draw-calls.27416/ [Accessed 19 Sep. 2016].

Talyn. (2015). LOD model geometry flickers between high and low on surface and in stations. [online] Available at: https://forums.frontier.co.uk/showthread.php/205570-LOD-model-geometry-flickers-between-high-and-low-on-surface-and-in-stations [Accessed 19 Sep. 2016].

Technologies, U. (2016). Unity – Manual: Draw Call Batching. [online] Docs.unity3d.com. Available at: https://docs.unity3d.com/460/Documentation/Manual/DrawCallBatching.html [Accessed 19 Sep. 2016].

Wloka. M (2016). BatchBatchBatch. [online] Available at: https://www.nvidia.com/docs/IO/8228/BatchBatchBatch.pdf [Accessed 19 Sep. 2016].