Mesh uploads and use: Incentivize correct use of LODs
tracked
Thunder Rahja
Mesh levels of detail (LODs) are an important part of keeping the world of Second Life (and other 3D software and games) from becoming too graphically demanding on the variety of devices that run it. Different LODs are selected to be rendered by the viewer based on distance from the camera, scaled with the appropriate LOD distance factor in graphics settings.
The problem: Creators are penalized with higher upload fees for creating proper mesh LODs, and users are penalized with higher land impact for using those meshes on their land
Mesh involves two costs, upload fees and land impact, which affect both the creator and the end user. Many mesh creators upload their creations with great detail on the highest LOD, but then cripple their lower LODs to as few triangles as possible to reduce these costs. While this results in higher quality mesh compared to a mesh made with proper LODs at the same costs, it also increases the processing power needed to render the scene and causes the mesh to crumple or almost completely vanish when medium or lower LOD is rendered, most notably on lower-end PCs.
This problem and workaround have irreversibly damaged our ecosystem, and for years now creators have crippled their own creations and told users to raise their graphics settings to compensate. With SL21B going on right now, and a recent Firestorm viewer update that automatically changed graphics settings on first launch, I saw a handful of shops with signs telling Firestorm users to raise their object LOD distance factor to maximum. This is not a good solution.
There is also an ongoing bug in Firestorm that complicates this problem. When moving the camera around in Firestorm, objects worn by avatars (including the user's own avatar) sometimes remain in lower LODs even when moving the camera very close to them, and this requires the user to right-click the incorrectly-rendered avatar and reset their mesh LOD.
Suggestion 1: Upload fees and land impact should be based on the LOD with the highest byte count
To encourage use of proper mesh LODs, both the upload fee and the land impact (download weight) should be based on solely the highest byte count of the LODs provided, instead of the weighted average currently implemented.
Suggestion 2: Restructure upload fees to encourage correct use of LODs
For each LOD, the general guideline is that the triangle count should be roughly 25% to 50% of the next higher LOD. The upload fee and land impact should not increase if the byte count of each LOD is less than half (or one quarter?) of the byte count of the LOD above it. The upload fee and land impact should remain unchanged from the current implementation otherwise.
Suggestion 3: Penalize misuse of LODs
Conversely, the upload fee (but not the land impact) should be increased if the uploader is deliberately crippling LODs to try to game the system. Crippled LODs are obvious when the triangle count of the highest LOD is in the (tens of) thousands but medium and lower LODs are two digits or less, with the expectation that users will raise their graphics settings in order to see the mesh as the creator wants it to be seen.
Log In
Medea Destiny
While in general something along these lines would be great, care should be taken not to penalize good practices by accident. For certain content it makes sense to have a low-lod model with an extremely low vertex count compared to higher LODs. For example with something moderately flat, you might choose to have a lowest lod model that simply show a 2D image of the object on a flat plane.
Kristy Aurelia
I think there also should be no LoD requirements for tiny meshes, let's say you have a picture frame or maybe a basic wall with two cutouts for windows. They're likely to be < 100 vertexes to begin with.
Because GPUs process things in parallel batches - waves, and wave sizes are 32 or 64 in modern GPUs (2010 or newer), that means GPU can process that many vertexes all at once, and smaller number than that would leave parts of it idle and such. With small geometries like that, the draw call and memory cost of loading more LoDs would outweigh the actual drawing cost.
I think this is something LL graphics dev team could look into to verify, but I'm fairly certain that rendering 1 vertex has the same performance impact as 32 or 64 based on GPU architecture. Also GPUs tend to process two triangles adjacent triangles at once, as the cache can reuse 2 of the vertexes. So for example, If you have 32 thread wave, that can process 32 vertexes, that's ~10 triangles, more if vertexes are shared etc.
So, my point is there should be no difference in cost/impact if the lowest LoD is 2 or 10 triangles (in a single face). And also no need for LoDs if all of them are of this size. This would let you simplify parts of objects to cubes rather than flat planes, also would allow having billboards facing multiple directions, rather than just one.
And there are cases where you just want a simple prism, or frustum, or even a box, all of which don't really need LoDs. (Because prims support cut, twist, hole, skew and so on, they actually have a lot more triangles than a 'static' equivalent shape would have).
My educated guess would be that below 128 vertexes no LoDs are needed.
animats Resident
I'd suggest a check at upload time that the lower LODs have roughly the same outline as the higher LODs. That prevents objects from disappearing at distance. Compute the silhouette of the mesh from all six axis directions. Then subtract the lower LOD silhouettes from the higher LOD silhouettes, to show where lower LODs lack coverage. If the non-covered areas are more than, say, 10-20% of the high LOD area, something is badly wrong with that LOD.
This will catch the cases where the side of a building was reduced to one triangle, leaving a huge hole. Or some piece of clothing just disappears. That looks terrible. Those are the usual LOD bad cases.
This is a reasonably simple check to implement. One could get fancier and do renders from multiple angles, but that's real work.
The check can be performed in the viewer and/or the server. It probably should be done automatically in the viewer when using the built-in LOD reducer, to prevent excessively low settings. That will catch most of the bad cases. Few people go to the trouble of making bad LODs in Blender.
Re-checking server side or in Marketplace is at LL's discretion.
Celestine Ghiardie
I don't agree on penalizing the ultra low LODs - those are absolutely possible to make as a fully customized LOD that actually works to keep the objects shape even at great distances. A penalty like this would penalize a creator who actually put a lot of time and thought into creating just that. it IS also a sign of the people "cheating" and just lowering it to absolute minimum. But its not a bullet proof way of catching that practice and would kill the creations that were actually made right too.
Jinx Bloodrose
I fully agree with this. The complexity and cost needs to account for optimized mesh, and reward well created and thought out projects.
I am tired of seeing linksets with a 100 k or more triangles crumble as you walk away, or getting punished for using hand created LODs since.
Optimization of SL starts with the User, and should be rewarded.
Spidey Linden
tracked
Issue tracked. We have no estimate when it may be implemented. Please see future updates here.
JenniWindrider Resident
There are good reasons for having very drastically lower complexity for lower LODs. Distance impostors for trees for example don't need high detail in any way shape or form.
Otherwise, absolutely agreed.
Thunder Rahja
JenniWindrider Resident: Certainly! Trees at their lowest LOD might become as few as 8 triangles, appearing like a flat texture in the distance. However, the tree mesh should not jump from 1000+ triangles at high LOD to 8 triangles at medium LOD. There should be a proper medium LOD mesh with a decently modeled trunk even if the majority of the leaves become flattened, to provide a model that still looks attractive on lower-end devices.
Jenni Darkwatch
Thunder Rahja: Sorry for the late reply. That depends a lot on the size of the object/tree. Very large objects switch to the next lowest LOD so late that it's IMO feasible to just have the highest LOD detailed and all others just being impostors, even on low-end devices.
I do fully agree that this should absolutely not be done for smaller objects.
Nescolet Resident
I dont agree with point 3, because sometimes we just need the highest LOD, for example, on items that are meant to be look at only within small spaces, like bathrooms or dressing rooms.
Thunder Rahja
Nescolet Resident: Object-object occlusion (on by default) causes objects that are out of sight to no longer render, reducing their impact on the scene. You can never account for 100% of use cases your creations will have. Also bear in mind that lower-end devices might never render your mesh in high LOD even when very close to it.