Jump to content

The importance of LOD


ChinRey
 Share

You are about to reply to a thread that has been inactive for 3410 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts


Perrie Juran wrote

 

Oh, I'd much rather they focus on working on the System.

And I know a lot of users have done a lot of work doing tutorials, etc on best practices.

Maybe they should allow us to post those tutorials in
which hasn't had any new material added since 2011.

They do have a section in the Wiki, but I think alot of people just don't know this, or want to use it. Personally, I like the forum environment. I've done lots of tutorials, but I'm just some guy that kind of learned this stuff. Basically, the only reasons I do tutorials, is either someone asked me to, or it's a product tutorial. Sometimes, I'll post these on the forums. The forums are nice because if I do get something wrong, someone can correct me. Maybe if we had a way to link forum discussions with the wiki and knowledge base, that would be the best solutions, and have LL highlight really good discussion in the forums.

I also think there is the issue of quality, or precieved quality. If I make a tutorial, I'm not going to prepare that much. I might go over what I want to talk about a few times, but to me, it's freeballing it, and just get it done. I'm not going to make but a dollar or so a month on a tutorial. It's hardly worth the time invested, other than helping out someone that was clueless. My point is, if they are waiting for professional tutorial makers to do it, they'll be waiting a very long time.

Link to comment
Share on other sites

Blender's decimator preserves the UV map now.

Oh goody. I'll have to go and play with it again. Does it respect UV seams etc.....never mind, I'll soon find out.

ETA: Ah. On first glance: unsubdivide doesn't conserve the UV. The other modes do up to a point, but I think I can get better results manually, especially for drastic reduction. Certainly better than it used to be.  Might be some use for it, but ....

Link to comment
Share on other sites

 


Drongle McMahon wrote:

What instancing means .... same drawcall .
..

I can't claim to have looked at the code, but I would be surprised if there's any instancing at that level in the standard viewer, even with legacy prims. Others would know better.

There is intancing in the sense of downloading the mesh assets (geometry etc), independently of texturing, provided the only differences between objects are simple transformations (and provided they aren't uploaded together with the different textures, getting different uuids). I'm not even sure whether it even applies to the generation of geometry from sculpt maps for sculpties that share a map. I think that happens per object level, not per map. (You do see coordinated snapping on of objects with shared maps, but I think that's the map download/cache fetch).

Yes, I think you're right. We might've discussed this before, and that was the consensus - that there's something going on, but its not 'true' instancing.

(I keep writing rambling paragraphs here about render states and shaders, but none of it is relevant...ahem.)

Even old GPUs can hande amazing number of triangles and still keep the fps at about 50 or above. But even the latest GPUs cannot handle overlayed alpha textures. That is called alpha overdraw. To put it simple, when you render dozen of alpha blended textures over eachother, the GPU has to make "Photoshop level" graphics work with every drawcall.

Excellent point. Modern graphics engines have gotten better at it, but more often than not they're faking it. Trees, for example - Leaves and foliage aren't really transparent, but rather translucent, and to achieve that effect creators in SL might use a few % of transparency. In a game like Skyrim with trees everywhere, they can use shaders that can do actual translucency.

 

 

 

Link to comment
Share on other sites


Drongle McMahon wrote:

Blender's decimator preserves the UV map now.

Oh goody. I'll have to go and play with it again. Does it respect UV seams etc.....never mind, I'll soon find out.

ETA: Ah. On first glance: unsubdivide doesn't conserve the UV. The other modes do up to a point, but I think I can get better results manually, especially for drastic reduction. Certainly better than it used to be.  Might be some use for it, but ....

If you're looking for a decimator that preserves UVs, take a look at Meshlab. Its an app designed for cleaning up 3d scans, but has a bunch of decimation functions. I've only started recently using it again after discovering that one of its decimation functions can preserve UVs. Its my new friend for making organic-ish LODs :)

You always want to do a manual pass over decimated models, of course.

Link to comment
Share on other sites


IvanBenjammin wrote:


Drongle McMahon wrote:

Blender's decimator preserves the UV map now.

Oh goody. I'll have to go and play with it again. Does it respect UV seams etc.....never mind, I'll soon find out.

ETA: Ah. On first glance: unsubdivide doesn't conserve the UV. The other modes do up to a point, but I think I can get better results manually, especially for drastic reduction. Certainly better than it used to be.  Might be some use for it, but ....

If you're looking for a decimator that preserves UVs, take a look at Meshlab. Its an app designed for cleaning up 3d scans, but has a bunch of decimation functions. I've only started recently using it again after discovering that one of its decimation functions can preserve UVs. Its my new friend for making organic-ish LODs
:)

You always want to do a manual pass over decimated models, of course.

I've played with Meshlab. It's pretty extensive, once you understand how it works. You can even highlight areas to just reduce those areas. I just like Blender better because it's all part of my workflow.

Link to comment
Share on other sites


Drongle McMahon wrote:

Blender's decimator preserves the UV map now.

Oh goody. I'll have to go and play with it again. Does it respect UV seams etc.....never mind, I'll soon find out.

ETA: Ah. On first glance: unsubdivide doesn't conserve the UV. The other modes do up to a point, but I think I can get better results manually, especially for drastic reduction. Certainly better than it used to be.  Might be some use for it, but ....

I think if you are starting with a medium to higher poly mesh, it is worth using the decimator. If your model is already very low poly, I don't see how the decimator will help much at all. So far for me, I almost always end up doing the lowest LOD by dissolving verts.

Link to comment
Share on other sites

While polygon crunchers can do a decent job, I can still do better manually. Going lower in polycount while keeping the shape and shading alive. For me, creating the LoD models is the easiest and quickest part of the whole asset creation process. The medium LoD model is done rather quickly by just removing a bunch of edgeloops. It's done within minutes. From there the low LoD model isn't too far away. Continuing removing edgeloops, merging some verts here and there.

Crucial for smaller props in SL is the lowest LoD, because it has to be very low, as we know, to keep the LI down. But since it has to be this low in polycount, it can be even box modeled from scratch and remapped onto the texture within minutes.

Link to comment
Share on other sites


arton Rotaru wrote:

While polygon crunchers can do a decent job, I can still do better manually. Going lower in polycount while keeping the shape and shading alive. For me, creating the LoD models is the easiest and quickest part of the whole asset creation process. The medium LoD model is done rather quickly by just removing a bunch of edgeloops. It's done within minutes. From there the low LoD model isn't too far away. Continuing removing edgeloops, merging some verts here and there.

Crucial for smaller props in SL is the lowest LoD, because it has to be very low, as we know, to keep the LI down. But since it has to be this low in polycount, it can be even box modeled from scratch and remapped onto the texture within minutes.

Oh, I get it. Probably half of the things I model are avatars or npcs now. Generally the mid LODs are just me desolving loops. After that tho, it gets sketchy. Things with bones need that extra geometry to bend those joints correctly. I still have thousands of verts to reduce down, and removing more loops will destroy any structure left in the mesh. I don't see much difference in whether I remove those thousands of verts or Blender does it. When I get within a set range, I stop it and manually clean it up. On some things the Low to Lowest is so few verts left that it is much better to do that manually too.

Link to comment
Share on other sites

Yeah of course, some thing things are easier to LoDing down than others. As always it depends alot on what the model is.

If it makes no difference between automatic and manually, there isn't much point in doing it by hand indeed. Though, I just can speak for myself, with hard surface stuff (which I mostly do) I have yet to see a poly cruncher doing the reduction at the same quality level as done by hand.

You know, there is still such saying; "you can have good LoD, or auto LoD, but not both at the same time". :matte-motes-smitten:

But yes, I have to admit that I also enjoy the process of making sweet LoDs by hand. That's why I'm doing it in the first place. lol

Link to comment
Share on other sites


IvanBenjammin wrote:

Yes, I think you're right. We might've discussed this before, and that was the consensus - that there's something going on, but its not 'true' instancing.


Maybe we should call it limited instancing?

I would be very surprised if the seven basic prim shapes aren't hard coded into the viewer but the permutations probably aren't.

Sculpt maps are cached and reused of course and so are textures.

I think we can consider it confirmed that mesh assets are instanced. Observations made by various people and the fact that LL mentioned them as one of the things suitable for CDN proves this beyond any reasonable doubt.

When it comes to LSL, Mono compiled scripts are "instanced" in the way that multiple identical copies running on the same sim only uses the same amount of server memory as a single one.

So SL has several mechanisms for reusing data although it can hardly be called true instancing.

Link to comment
Share on other sites


IvanBenjammin wrote:

If you're looking for a decimator that preserves UVs, take a look at Meshlab.

I used Meshlab quite a bit back when I thought SketchUp was a good tool for making SL meshes. I was really impressed by its ability to clean up even SketchUp mess but the fact that it only supported single material mesh made it pretty much useless for me. Have they changed that?

 


IvanBenjammin wrote

You always want to do a manual pass over decimated models, of course.

Oh yes. MeshLab's mesh simplification algorithm is miles ahead of the one LL bought for the uploader but it's still an aid to, not a substitute for, manual optimization. That makes me feel god actually: at least there is one thing humans can still do better than computers. :matte-motes-wink:

Link to comment
Share on other sites


ChinRey wrote:

So SL has several mechanisms for reusing data although it can hardly be called true instancing.

 That sounds like a no true Scotsman argument to me. How about you define what true instancing is first then claim the view doesn't do it.

I would assume you're talking about functions like glDraw*Instanced*(). The viewer doesn't use those becuase they don't make much sense within the context of the kind of content we have in SL. Then perhaps you're talking about glMultiDraw*Indirect(). The viewer doesn't use those because they were just added in OpenGL 4.3 two years ago and a significant portion of the user base doesn't have hardware or drivers new enough for them.

None of that really matters tho. As soon as you have less inputs than outputs you're doing some kind of instancing and the viewer has plenty of that going on.

Link to comment
Share on other sites


Drongle McMahon wrote:

This sort of thing happens mostly/worst when people try to cheat the LI system, not caring about those who can't afford or don't know how to set high RenderVolumeLODFactor. The one-triangle medium LOD trick should have been prevented somehow. Too late now. For me, the challenge of making good LODs is part of the enjoyment of making mesh. I guess others don't share that. and it is hard work.

There are some mesh makers that can do detailed, low LI mesh, that holds up well at distant LODs. I have no idea HOW they do this... but they do.

Go look at "Dysfunctional Designs" and "Skye Studio" as examples.

- What Skye Studio does should even be possible as I understand it. It no only holds up at a distance, but has precise physics for walking on polygonal shapes.

I'd suggest that if we want more of this - the people able to do it start teaching everyone else.

 

Link to comment
Share on other sites

Honestly, there is really no magic involved with Land Impact and LoD. It just takes some amount of artistic skill, and imagination like with every other aspect of content creation. Some do better than others, and some are just lazy. It always has been like that, and it always will be.

Link to comment
Share on other sites

A lot can be learned from just experimenting. Make an object in blender, make different LOD shapes and login to aditi and experiment away... try uploading with different LOD files and physics, try different LOD viewer settings, scale your object up and down and repeat the previous. Watch your object from different distances and see where the switching points for LOD are at various sizes. After playing around for a while you'll start to get a feeling for how things work. No magic there, just a learning curve!

Link to comment
Share on other sites


arton Rotaru wrote:

While polygon crunchers can do a decent job, I can still do better manually. Going lower in polycount while keeping the shape and shading alive. For me, creating the LoD models is the easiest and quickest part of the whole asset creation process. The medium LoD model is done rather quickly by just removing a bunch of edgeloops. It's done within minutes. From there the low LoD model isn't too far away. Continuing removing edgeloops, merging some verts here and there.

Crucial for smaller props in SL is the lowest LoD, because it has to be very low, as we know, to keep the LI down. But since it has to be this low in polycount, it can be even box modeled from scratch and remapped onto the texture within minutes.

I agree...mostly. But there are always exceptions. I made some rock walls recently. Due to the shape of the high poly I was baking from, I needed more polys for the edges and seams than for the front/back faces, so I couldn't (or didn't want to, I guess) remove complete edge loops. I ended up building the medium LOD by separating out the top and side edges (where UV seams were) - which were reduced manually, and the front/back faces - which could be happily decimated in mesh lab, and stitched it all back together. The slightly chaotic decimation wasn't a problem for such a rough surface. The lowest LODs were boxes or close to, but the medium needed to maintain its shape around the edge as much as possible as it would be seen from a distance where that level of detail could still be visible.

 

I used Meshlab quite a bit back when I thought SketchUp was a good tool for making SL meshes. I was really impressed by its ability to clean up even SketchUp mess but the fact that it only supported single material mesh made it pretty much useless for me. Have they changed that?

I couldn't say, tbh. I use it for a singular decimation function (Quadratic Edge Collapse something something with texture), then its exported back out. I don't usually worry about multiple material setup until I'm preparing the final files that get exported for SL.

Link to comment
Share on other sites

I just have to second (or is that third) Arton's and Christhiana's post here.

If you go to the first page of this discussion, you'll find a list of tricks and techniques. They should cover about ninety percent of what is possible to do to optimize the visual models.

I completely forgot about the physics model though. You make that either from triangles or from boxes ("hulls"). If you use hulls, you click the "Analyze" button after you've selected the model, if you use triangles, you don't.

In either case, it's a matter of deciding which surfaces you need to make an efficient physics model.

Oh, and never ever under any circumstance touch any of the other buttons or fields in the physics section of the uploader. Choose "From file" and select the physics model you've made. If it's a hull model, click on "Analyze" if it isn't don't. That's all you should do.

The uploader is actually occasionally able to generate if not good, at least tolerable LOD models but phsyics models? Nope.

Link to comment
Share on other sites


Christhiana wrote:

A lot can be learned from just experimenting.

That's very true.

Some studying can smoothen the learning curve a lot though.

When it comes to what to keep and what to omit from each LOD model, it's very hard to give some specific rules since it depends on so many things. But actually knowing where the switch points - the distances where the viewer switches between the models - is very useful. Drongle posted the forumla in another thread a while ago. I hope it's OK to repost it here:


Drongle McMahon wrote:

The switch distances for an object are proportional to the object "radius", which is the half-diagonal of the bounding box. It can be calculatede as r = sqrt(x*x + y*y + z*z)/2, where x, y and z are the dimensions of the object in meters. The first switch, high to medium LOD, is at: rvlf * r/0.24; the next at 4 times that distance, and the last at 8 times. For objects with major dimensions of 1m, at rvlf=1.125, these are about 4, 16 and 32 m for a cube, 3.3, 13 and 27 for a thin plate, and 2.5, 9 and 19 for a narrow rod. Just multiply these by the scale factor for larger or smaller objects. Multiply bu rvlf/1.125 for different settings of that parameter.

That's the theory but as I have mentioned earlier in this thread, the actual switch points may be different, sometimes actual LOD is much lower than the theoretical one. It is also important to note that the distance here is between the center of the object and the camera, not between the avatar and the nearest surface. In reality that means that the 1m cube that hits your avatar's nose is very likely to be rendered with is mid resolution rather than its high resolution model.

Which brings me to one aspect we haven't discussed yet, the importance of the mid resolution model. A good rule of thumb is: the lowest and low resolution models are the ones you see in the background, the mid resolution is the one you look at and the high resolution model the one you examine.

Link to comment
Share on other sites

When the medium LOD model is the one we'll be viewing most of the time, should I keep them the same as the high LOD verison for simpler shapes? For example, I'm building a house which mostly consists of simple basic shapes linked together. Reducing the polygons on them would immediatly show. There really isn't much to be simplified without destroying the shape of the objects, some of them are essentially just shaped boxes. Would it have a huge impact on Li if I kept the medium (and maybe even the lower) LOD version the same as the high poly one?

Link to comment
Share on other sites

That  all depends on the size of the object(s). For small objects, the lowest LOD has by far the greatest effect on LI (the download weight part; if physics weight is higher, that's a different matter). As the size increases, the higher LODs become more influential. The lower LODs each become irrelevant at a threshold size. For wall/house sized objects, you are probably well into the range where low and/or medium will have a large effect. So keeping them the same as the high LOD is probably not a good idea (unless your house is made of lots of small pieces). It is a bit complicated, but the details, including the meaning of "size" and the thresholds sizes etc., are available in this old thread.

  • Like 1
Link to comment
Share on other sites


Christhiana wrote:

When the medium LOD model is the one we'll be viewing most of the time, should I keep them the same as the high LOD verison for simpler shapes? For example, I'm building a house which mostly consists of simple basic shapes linked together. Reducing the polygons on them would immediatly show. There really isn't much to be simplified without destroying the shape of the objects, some of them are essentially just shaped boxes. Would it have a huge impact on Li if I kept the medium (and maybe even the lower) LOD version the same as the high poly one?

Hmmm... One example perhaps: A single wall element with a window opening in it only has 16 tris. If it is - say about 10x4 m that means you can use the same model all the way and still keep the download weight well below 0.5. You may want to have as much download LI as possible to spare for other more complex objects but if you keep the high resolution model for the mid and reduce the inner wall (not the outer) to a single triangle for the low and lowest, downlaod weight should probably go down to 0.06 (the lowest you can go) with no LOD issues whatsoever.

It's hard to be more specific than that without knowing more about your build. Except one thing: don't mesh single cubes or such, that makes no sense at all (unless you want it to have smooth normals of course but you don't if it's a wall).

  • Like 1
Link to comment
Share on other sites

I hope it's OK to repost it here

OK, but I should add that these are the basic distances. There are various adjustments that the viewer makes that mean these are quite approximate. Also the switches can get delayed, and they tend to be somwhat different depending on whether you (ie the camera) are approaching or receding from the object. This is in addition to the lag-like effects you have described.

Link to comment
Share on other sites

Thank you for the link drongle... I'll have to study those graphs tommorrow after I've gotten some sleep :)

 

Chinray, thank you for the info, I'll experiment a little with the simpler shapes tommorow. I like the tip of using a trianlge for the inner wall! Good thinking! :) I kept the larger shapes fairly simple to avoid high land impact while retaining a good LOD at a distance, so I guess I was on the correct path :)

I sometimes use mesh cube shapes instead of prims so I can bake AO on them.

 

One more question though, do the LOD models always use the textures of the high poly model or can I upload a different texture along with a LOD model. This way I could just show a simple shape with a rendered picture of the object on the lower LOD's. 

 

Link to comment
Share on other sites


Pussycat Catnap wrote
- What Skye Studio does should even be possible as I understand it. It no only holds up at a distance, but has precise physics for walking on polygonal shapes.



Christhiana wrote:

For example, I'm building a house which mostly consists of simple basic shapes linked together. Reducing the polygons on them would immediatly show.

I should have remembered this in my previous post...

It's a common misconception that large meshes automatically have high LI. The fact is that realtively simple shapes with few triangles can be scaled up really big without too much LI increase. It's the combination of many polys and large size that can be problematic.

I already gave a wall example but mesh landscapes are the same. With smooth normals and careful design, you can make quite complex looking ground plates with only a few triangles. This applies to physics models too, not just visual ones and as logn as the elevation is at least 0.5 m (and it always is) you can use triangle physics.

I've been working on a full sim mesh landscape in the sky whenever I've ahd some time to spare. 52x52 m ground elements - made from abnout two dozen tris each. The physics model I use is identical to the high resolution model so there are no problems whatsoever with walkability. Typically these elements end up at 3-4 download weight and physics weight well below 1.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3410 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...