Jump to content

Mesh buildings and LOD


Muka Release
 Share

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

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

Recommended Posts

Hi, I'm working on a building and I'm trying to figure out how to optimize the different LODs.

Basically all the details are on the front facade and the only way to reduce the amount of triangles would be to make it all flat. So for High & Medium LOD I'm thinking of just keeping it the same but I was wondering :

1- Havign the same mesh for High & Medium LOD = basically double Land Impact but still the same rez time for the viewer, it's not loading the 2 meshs as if they were different.. I hope, right ?

2- The other solution would be to add some tiny triangles to make the bounding box bigger, the same way people did with sculpties, change a 10x6x0.5 mesh size to 10x10x10 for example but I have yet to try it, see if it's a better tradeoff... 

3-The last solution I can think of would be to attach all the meshs together to make one huge mesh but since some parts of the building are symmetrical and using the same meshs that would probably just take a longer time to rez and take a huge amount of land impact... 

 

Anyways I was wondering if anyone figured what the best solution was or if there's another one I didn't think of. :matte-motes-bashful-cute-2:

Link to comment
Share on other sites

The LOD calculations are based around how detailed the mesh is at each LOD swap distance. So a larger mesh with a lot of detail will be penalised unless its details are signficantly reduced at the critical LODs. (Drongle will answer this far better than I can, in regards to which LODs are most important for given mesh sizes etc).

In a nutshell, its all a balancing act between visual detail/quality and Land Impact costs.

Breaking up your facade into smaller meshes will probably reduce the Land Impact, however the LOD swaps for each will happen at different times due to camera distance from each piece, as well as the actual volume/size of each piece as well.

Personally, I'd probably make the entire facade (and the whole exterior if it will fit within the maximum 64m3 volume) as a single mesh object, and then decide which parts to reduce detail on at each LOD stage.
Keep in mind that at longer ranges, the minor details will be very hard to discern, so you can probably get away with much lower levels of detail (especially if your textures have baked in details which can help compensate for lack of geometry).
NOTE: I strongly recommend keeping any internal rooms as totally separate mesh objects. Since their details will be largely (if not totally) obscured from outside view, you don't want to be penalised by their geometry in regards to long range LODs. Treat the exterior as an independent mesh shell which you can later link to the interior rooms via the inworld build menu; and the interior rooms you can be severely savage on in regards to their own LODs, since much of the time their LOD changes will not be visible at all.

Your larger bounding box idea probably won't gain much... it will just force the full detail to remain visible over longer ranges, and hence push up the associated Land Impact accordingly.

If you are efficient with your mesh modeling, the overall rezzing up time shouldnt be too bad - generally the textures should take longer to load than the actual mesh shape does.

To give yourself a clearer idea of when the relevant LOD swaps will occur, I'd suggest modeling a very basic shape in the same dimensions... with easy to spot details that will change for each LOD swap. That way, you will get a good idea of the distances involved for each LOD changeover, and you can work out what detail will actually be visible at those ranges. (Use the Aditi test grid for this to avoid paying upload costs for experiments like this).

I'll pass this over to Drongle for a more technical explanation of LODs :matte-motes-wink:

 

Link to comment
Share on other sites

There are two interesting questions hidden here. First, if you use the "Use LOD above", does it avoid downloading the same mesh again when it needs it, after a LOD switch. I don't know the answer to that. One would hope it would be sensible enough not to re-download it. I would have to ask Runitai, or read much more source code than I can bear. I can say that you don't get the reduction in Land impact that you might expect from the saving, if it is indeed there.

Second, does the viewer recognise multiple (possibly scaled, possibly differently textured) instances of the same mesh and avoid downloading them repeatedly? Again I would hope so. In this case, some experimnents should be able to tell us. If you make many differently scaled and textured versions of a sculpty, you can see them all rez at the same instant when the map downloads. Is it the same with a mesh? Once again, you don't get any savings in land impact from any the improved efficiency from using instancing like this.

So on to the question of LODs. First, as usual, it all depends on size. You mention dimensions of 10 x 6 x 0,05, which I assume is the size of the mesh we are discussing. This has a radius of sqrt (10*10 + 6*6 + 0.5*0.5)/2 = 5.84. That is just above the cutoff (5.43) above which the lowest LOD no longer enters into the download weight calculation. So the lowest LOD is irrelevant to land impact (although it might still be seen by people with large draw distances and low renderVolumeLODFactor).  The effect of the low LOD will be dominant at this size. So your strategy of concentrating effort there is good. The medium LOD does still have some effect though. (details here).

I don't understand your suggestion for adding thickness. This will have a very minimal effect on the download weight, increasing it (see the equation above). What is this meant to achieve?

Maeve has mentioned the good and bad effects of joining the meshes together, in addition to the loss of efficiency by repetition that you mention. The overall land impact of the joined mesh will be more than the sum of the parts because of the effect of size. The big advantage is avoiding uncoordinated LOD switches. How much that matters depends on how obtrusive the LOD switches are. Experiment (on Aditi) is your friend here. Remember to consider what sort of graphics settings you want to cater for, as these can make a big difference to the effects of LOD.

 

edited - more typos than I could stand.

Link to comment
Share on other sites


Muka Release wrote:

 

1- Havign the same mesh for High & Medium LOD = basically double Land Impact but still the same rez time for the viewer, it's not loading the 2 meshs as if they were different.. I hope, right ?

You're mixing up things here I think. As Drongle said, it would make sense if the model was only downloaded once, which would be good for download time. Mono scripts download duplicates only once, same for textures (so also sculpt objects).

What you should be worried about though is not the download or rezzing time, but the time it takes to refresh a single frame, this is pretty much entirely depending on your graphics card. So even if the medium LoD doesn't have to be downloaded, it would probably be a bad idea to use your high LoD. You could either enhance your higher LoD if you tuned down your geometry on the medium one, or end up with a lower landimpact and graphical load if you just reduce LoD medium. This, if done right, should have no visible effect at all.


2- The other solution would be to add some tiny triangles to make the bounding box bigger, the same way people did with sculpties, change a 10x6x0.5 mesh size to 10x10x10 for example but I have yet to try it, see if it's a better tradeoff... 

If you are aiming at a low landimpact above all things, that could be helpful. You could be near a switching point for the size determining the LoD. It's kind of cheating the system though and I never looked into it. Drongle's graphs will help anyway.

Making the bounding box bigger than the actual object will cause some difficulties when editing the object inworld. Faking the bounding box by using extra triangles is very helpful for matching up LoD models btw.


3-The last solution I can think of would be to attach all the meshs together to make one huge mesh but since some parts of the building are symmetrical and using the same meshs that would probably just take a longer time to rez and take a huge amount of land impact...


Since splitting your object into pieces (symmetrical or duplicate pieces) brings down th size of each single object, the landimpact would go down, not up. However the LoD changes would happen a lot closer, which means you might have to add geometry to certain parts. This on top of what Meave mentioned, different pieces switching LoD at different distances, which might not always look good. I usually split up my facades into the facade itself and the windows. That way you can keep a fairly basic shape for the wall itself and use very detailed windows with very aggressive LoDs. A window at a distance doesn't have to be more than 2 triangles (or four when it has to be visible from both sides). The basic shape will make sure your wall won't have a big landimpact or graphical impact, the simple lower LoDs will make sure the same is the case for your windows.

Link to comment
Share on other sites

  • 5 weeks later...

The viewer does indeed appear to rez different LOD's separately as needed depending on the camera's distance from the object.  They are not rezzed together with the mesh itself.  Therefore, having separate meshes for each LOD does minimally increase rezz time.  As Kwakkelde points out, however, some geometry is completely unnecessary at LOD 2 and beyond, and forcing the viewer to rez unneeded gemometry should be avoided when possible.

With regard to the second point, if prim cost is your ownly concern, I would recommend including all of the pieces on the same mesh with different faces and upload with fully collapsed LOD's.  If the mesh is more than 20-30 meters or so the default camera constraints will not be able to pull back far enough from the object for it to even reach LOD 2, and by collapsing the lower LOD's you will dramatically reduce your PE.

Link to comment
Share on other sites

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