Jump to content

glTF mesh is coming. Some proposals regarding levels of detail.


animats
 Share

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

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

Recommended Posts

Linden Lab has announced that, following glTF materials, which are in test now, glTF meshes will follow. This offers some opportunities.

(Background: glTF is a public, well-documented standard format for 3D content. Just about everything in 3D supports it now, including Blender, Maya, Unity, Unreal Engine, etc.)

Overall goal

Goal: build it in Blender/Maya/etc, upload it to SL, and what you built is what you get in SL. It should be possible to upload an entire textured linkset in one upload and have it upload correctly.

Mesh representation options

glTF is very general, with many options. Exactly which options SL supports will have to be nailed down. Content creators will need to know this. Some suggestions follow.

Representing linksets

COLLADA, which we use now, can upload an entire linkset. The link order of the uploaded linkset is random. Uploading the same linkset twice can yield different link order. (I looked at the code; the actual order depends on the order of the memory addresses in the viewer's uploader.) So nobody does that. glTF has a proper hierarchy, and that should be preserved in the upload to SL. There's an accepted JIRA for adding hierarchies (where child prims can have their own children) to SL. Ideally, that should be added to SL around the same time as glTF import.

Representing levels of detail

Levels of detail need to be supported in glTF meshes for SL. While this is not a standard feature of glTF 2.0, there is a draft extension for this. Will that work? Is it better to have one model with multiple levels of detail than several different models? What's tooling for that like in Blender and Maya? Will Blender plug-ins to help manage this be needed? Comments?

Levels of detail vs. faces

Currently, there's a rule that all LODs must have the same set of faces. That keeps face numbers consistent. While SL internally supports empty faces, and prims use them, you can't upload LODs with empty faces. This makes it difficult to create lower levels of detail that use different textures, for impostor-like situations. Empty faces should be allowed.

 

OK, that's some of the basics. Next, how to get better levels of detail.

  • Like 3
  • Thanks 2
Link to comment
Share on other sites

SL has a big problem with low-quality lower levels of detail. This is a proposal on how to deal with that in the glTF era.

These pictures are all at default Firestorm LOD settings.

seethrough2.png.98e18d4e758f009f245edc52950a445d.png

Nice street in New Babbage. But that water tower should have three legs.

seethrough3.thumb.png.48a9bec0c7f6b08cbc59bcdb4c39b2da.png

See-through building. London City, one of the first places visited by new users.

We all know this. It's been discussed to death at Creator User Group. It's a mess. The glTF era offers some ways out.

General idea:

  • Land impact calculation for glTF impact should be not be higher than for COLLADA import.
  • Lower LOD allowances should be a little more generous. The lowest LOD should be allowed at least 32 triangles or so without penalty. That's just a guess. When the GPU displays a mesh, there's a  minimum fixed cost, and it's probably higher than 32 triangles. Mesh reduction to the point that big holes appear is just wrong.
  • There should be automatic enforcement of some basic LOD quality standards.

How is LOD quality evaluated? By rendering the textured LOD meshes from multiple directions and comparing the results automatically. Render, for each LOD, from all four directions and from above. Simple renderers for glTF are freely available. If the upload server needs to render a glTF object, it's not hard.

Then check each LOD by reducing the highest LOD images to a smaller size and do an image similarity comparison. This needs only a simple image compare, not one of the modern deep learning ones.

How should enforcement work? A suggestion:

  • The uploader should render and compare the images as above. First do a coverage check. All the LODs must have roughly the same outline. If the areas covered are significantly different, reject that LOD. The user can still upload, but bad lower LODs will be ignored and the land impact will be higher.
  • If the images are a poor match, the uploader should display the badly matched images side by side and request user confirmation that the user really, really wants to do this.

Marketplace could help here. Since glTF can easily be rendered, the Marketplace system could generate a 360 degree panorama of each uploaded object, to be displayed to potential customers.

duck.gif.b0b64880fa8c0715593544ac70b83335.gif

Sample panorama. At last, see before you buy. Show the customer what they will get, with all the LODs shown at smaller sizes.

So, with some technology and some subtle nudging, we can get to better LODs.

Edited by animats
Clean up whitespace
  • Like 2
  • Thanks 3
Link to comment
Share on other sites

A key concept here is to avoid pushing the mesh simplifier that generates lower LODs so hard that it breaks. Right now, creators can get a lower land impact by forcing the lowest LOD down to one triangle. This doesn't speed up the rendering of the scene significantly. There needs to be no penalty for a lowest LOD that's in the 20-50 triangle range.

Then the mesh simplifier in the uploader can be configured to not overdo it. Don't go below that limit.

The mesh simpliifer ought to have silhouette protection, like the one in Unreal Engine Editor. That guarantees surface coverage and won't make holes. So far, though, I haven't found open source code for that. Only the commercial products have it.

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, animats said:

There needs to be no penalty for a lowest LOD that's in the 20-50 triangle range.

That's not very different from how it is today. I've yet to see a mesh that couldn't keep at least a dozen triangles in all LOD models without increasing the LI, 20 isn't unusual and 50 isn't too uncommon either.

It is a good idea to formalise this but the real problem is that too many content creators (including the Lindens and Moles unfortunately) do not know how to control their LOD levels so they oversimplify out of ignorance.

The main problem with LOD in SL, however, is still that the number of levels and the swap distances can't be set for individual objects. I'm not aware of any other virtual environment (exepct the opensim SL clone of course) that has such a crude and heavy handed approach to LOD and if glTF compliance forces LL to change this it may well turn out to be one of the biggest improvements SL has ever got.

Edited by ChinRey
  • Like 1
Link to comment
Share on other sites

6 minutes ago, OptimoMaximo said:

Too much speculation... LL will get it all wrong, as usual. It's just their style of doing development.

I know this isn't the Social Casino but we could place bets..

I put 5 fake theoretical tokens on, "Incorrect LOD selection results in unpredictable results at medium distance and LOD factor selected."

Edited to add:  Sorry, I know this is a serious thread. But your post seemed to want a response.

Edited by Love Zhaoying
  • Like 1
Link to comment
Share on other sites

2 hours ago, ChinRey said:

It is a good idea to formalise this but the real problem is that too many content creators (including the Lindens and Moles unfortunately) do not know how to control their LOD levels so they oversimplify out of ignorance.

A simple fix is to not let the automatic mesh reducer cut the number of triangles to a value smaller than would reduce the LI.. Most of the really awful models are auto-generated. Few people actually go into Blender and create a crap lower LOD by hand.

The animesh LOD rules might help here. If the highest LOD has 1000 triangles, the medium one can have 500, low can have 250, and lowest 125. This is more generous than the present system. Less stringent restrictions would reduce the incentive to try to stay at highest LOD for too long.

With newer hardware and Vulkan, you can push more triangles through the GPU than SL usually does. I do that in Sharpview. SL's classic values are more suited to lower end hardware. The supported hardware spec is being revised by LL; this was mentioned at Creator User Group. With ALM and PBR becoming standard, and glTF coming, you need a GPU from the last decade or so. I'm typing this on a machine with an NVidia 670, which was released in 2012. It runs SL reasonably well, although not with shadows.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

The uploader is also not very useful for LODing. Depending on object size, some might never see medium LOD before it drops out of view distance and some might make lowest LOD at 5m. You can either

1. Just do the high LOD and set everything besides high to 0 in the uploader

2. Create LODs for everything when some won't even be used which can increase LI

There really needs to be a full preview you can walk around and test different view distances on in the mesh preview. And something to indicate color wise when the LOD changes. SL doesn't incentivize making proper LODs at all. Granted there is some very obvious mis-use of LODs, but the only way to really do it right and not waste LI while not having your stuff turn into visible triangles is to upload in world, walk around and inspect everything, then do LODs for whatever degrades poorly. It's a huge time sink and given how the cost of products is dropping for a lot of goods, it's no wonder people don't take LODing seriously. Regardless it's something that should be fixed, especially because poorly done LODs aren't something you see in a marketplace listing. And if there's no in world demo, you can easily buy stuff that is useless depending on what you want to use it for.

  • Like 3
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 352 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...