2015-04-02

A very confusing mesh issue

As part of a very long-term Raven Park build project, I'm currently working on creating some mesh components. As usual I'm making them with Mesh Studio. Earlier today I made a mesh version of a "prototype" object to see what the land impact would be like and to also see how well it held up to being viewed at a distance. The test went well and I was satisfied with how it turned out, both in terms of how far away it could be seen and the resulting land impact.

Fast forward to later on in the day and I now have a fully-textured source linkset (the "prototype" had a single texture applied to it and so only had a single material face -- this final version has 4). I go through the usual exercise of making the 4 LOD levels and the physics shape (as I did with the prototype), throw them all through the Mesh Studio servers and upload the result. The final land impact was slightly higher than the prototype because I needed to keep some extra faces down through all the LOD levels but it was still well within what was acceptable for the build.

Here's the textured "final" mesh next to the untextured "prototype":


Aside from the textures, and a couple of very small tweaks to the size and position of one or two of the prims that made the source linkset, they're identical. Their overall sizes are identical (< 0.6, 0.6, 7.501 > in both cases).

Only... as I start to cam away things start to differ. At around 18m away from the objects this happens:


(forgive the quality -- this is a scaled up crop, for obvious reasons). What's happened is that the "prototype" is still showing either the high or medium LOD model (it's pretty much impossible to tell which just from looking -- which is how I try and design the medium LOD) whereas the "final" object has already dropped to the low LOD. Not much further away and the "final" drops to the lowest whereas the "prototype" seems to stick with the high or medium all the way to the edge of my draw distance (which I normally have at 128).

I just can't fathom it. I've tried tweaking the source linkset and looking for any differences between the "prototype" and "final" and.... I can't see what the issue is.

I've even gone so far as going over the mesh steaming cost article on the wiki, via the mesh LODs article by Beq Janus in this magazine, to try and calculate what should be happening. That, however, has left me a little more confused. In both cases they talk about the radius of the bounding box but the concept of the radius doesn't seem to be defined anywhere (I know what a radius is, of course, but when the object in question doesn't have a bounding box whose ratios are 1:1:1 it helps to know exactly how it's defined). That issue aside though, it seems clear that two mesh objects with the same sized bounding box should collapse to the next LOD down at the same time at any given camera distance.

Shouldn't they?

Edit to add: I finally got to the bottom of this, with the help of others.

2 comments:

  1. Radius in terms of bounding box (and I would agree that using the term radius and the term box in the same sentence should be banned) means the distance from the centre to the corner. It is effectively the radius of a sphere inside which the bounding box would entirely fit.

    ReplyDelete
    Replies
    1. That makes so much more sense now. Thank you. :)

      Delete