The Low Down on LODs

Grab your favourite IDE and tinker with the innards of game engines

The Low Down on LODs

Postby coder0xff on Sun Jul 26, 2009 7:23 pm

I've determined the exact and accurate description of how LODs are computed. First, I'll just say what it is... and then I'll explain. LOD is 100 divided by the number of pixels spanned by one unit (vertically) at a distance equal to the model origin's distance...

K, so WTF does that mean, right? Most importantly, it means that LOD is NOT dependent upon the model size, and IS dependent on screen resolution and the FOV.

Here's an example: You make a model of an upright cylinder that's one unit tall. At a certain distance, the cylinder will appear to be 5 pixels tall in game. Hence, one vertical unit is 5 pixels tall - at this specific distance. So this distance would have a LOD of 20 (100 / 5).

Now, of course, if you increase your screen resolution (or lower FOV), then the number of pixels at the same distance is going to be greater - which means the LOD has changed, too. Now that it's, say, 10 pixels tall, the LOD is 10 (100 / 10). You are going to see greater detail LODs used at further distance with a higher resolution. This way you won't have high res renders of low polygon models.

Hope someone finds this useful. I've always wanted to know exactly how it's done.
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: The Low Down on LODs

Postby joe_rogers_11155 on Sun Jul 26, 2009 8:18 pm

interesting...but can you define LOD for me?
"Day breaks, but decay soon follows." - Ava Winona
Currently developing in radio silence... 99 Bolts
Here's another project of mine... Assault on Overwatch
Are you new to Source SDK? VDC
joe_rogers_11155
Veteran
Veteran
 
Joined: Wed Oct 08, 2008 11:11 pm
Location: United States

Re: The Low Down on LODs

Postby johnmagicson on Tue Jul 28, 2009 7:12 am

LOD stands for Level of Detail. It's when a model changes to lower poly models when you're farther away from them.
johnmagicson
Dumpling
Dumpling
 
Joined: Wed May 13, 2009 7:11 am

Re: The Low Down on LODs

Postby Lord Ned on Tue Jul 28, 2009 7:14 am

I'm a tard and can't read.
Resident Source Guru, Competent Level Designer, Talented Artist, Horrible Speller
User avatar
Lord Ned
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Thu Jul 17, 2008 8:42 pm

Re: The Low Down on LODs

Postby coder0xff on Tue Jul 28, 2009 10:04 am

Lord Ned wrote:I'm a tard and can't read.


???
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: The Low Down on LODs

Postby Carbon14 on Tue Jul 28, 2009 11:04 am

Useful info, I was just looking into LOD's today as well! After I realized Source seems to be pretty much pants on head retarded and wont let you use normal maps on vertex shadowed props I started looking at adding detail that I would usually put in the normal map onto the actual model and using LOD's to keep performance ok.
User avatar
Carbon14
Regular
Regular
 
Joined: Sat Sep 22, 2007 3:33 am

Re: The Low Down on LODs

Postby joe_rogers_11155 on Tue Jul 28, 2009 11:04 am

I think he meant...

"I'm a tard and can't read." -joe
"Day breaks, but decay soon follows." - Ava Winona
Currently developing in radio silence... 99 Bolts
Here's another project of mine... Assault on Overwatch
Are you new to Source SDK? VDC
joe_rogers_11155
Veteran
Veteran
 
Joined: Wed Oct 08, 2008 11:11 pm
Location: United States

Re: The Low Down on LODs

Postby The Wanderer on Tue Jul 28, 2009 11:24 am

Nice read, i was always under the impression it was handled trough the drawdistance radius; so between not drawing and up close, it would make it's own cuts as to when to transfer to a lower/higher poly version.
Sad to see i was wrong :cry: , glad to know how it's actually done :D
Image
User avatar
The Wanderer
Senior Member
Senior Member
 
Joined: Tue Dec 27, 2005 1:03 pm
Location: Belgium

Re: The Low Down on LODs

Postby destructo on Tue Jul 28, 2009 2:06 pm

nice system, smarter than drawdistance alone. slightly off-topic (but useful if this is a lod info thread), when making lods for custom trees/bushes, any idea if billboards are supported for distant lods?
destructo
Regular
Regular
 
Joined: Sat Jul 25, 2009 5:06 pm

Re: The Low Down on LODs

Postby vcool on Tue Jul 28, 2009 4:11 pm

Any model can have a LOD, destructo.
Image

Neighborhood Forum Elitist
User avatar
vcool
Veteran
Veteran
 
Joined: Fri Jun 23, 2006 1:03 am
Location: USSR

Re: The Low Down on LODs

Postby coder0xff on Tue Jul 28, 2009 4:57 pm

Destructo, you mean going from a 3d representation of a tree to a completely 2D one, correct? I would have to say no, but I'm not an expert on that.
User avatar
coder0xff
Veteran
Veteran
 
Joined: Fri Jun 13, 2008 1:51 am

Re: The Low Down on LODs

Postby Zipfinator on Tue Jul 28, 2009 5:12 pm

coder0xff wrote:Destructo, you mean going from a 3d representation of a tree to a completely 2D one, correct? I would have to say no, but I'm not an expert on that.


Well technically you could do that, but you couldn't make it act like a sprite only when it's in that LOD. Would be better to use say 3 intersecting planes. A LOD like that would probably be for a few thousand units away though.
Image
|Pipe Dream|City 17: Episode 1|
User avatar
Zipfinator
Veteran
Veteran
 
Joined: Thu Dec 21, 2006 6:03 pm
Location: California

Re: The Low Down on LODs

Postby destructo on Tue Jul 28, 2009 5:31 pm

right, 3 plane lod it is then. i've got a set of overgrowth in an old bf2 map that i might bring to hammer, a lot lower poly than the hl2 trees (<1k polys, smaller textures)- http://poe1.pointofexistence.com/poe/ne ... ape_02.jpg
destructo
Regular
Regular
 
Joined: Sat Jul 25, 2009 5:06 pm

Re: The Low Down on LODs

Postby Lord Ned on Wed Jul 29, 2009 4:22 pm

coder0xff wrote:
Lord Ned wrote:I'm a tard and can't read.


???


I edited the post. Orginally I said "Why can't it be based on distance" and then I realized it was retarded, and went and re-read the post and understood it. :p
Resident Source Guru, Competent Level Designer, Talented Artist, Horrible Speller
User avatar
Lord Ned
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Thu Jul 17, 2008 8:42 pm

Return to Programming

Who is online

Users browsing this forum: No registered users