Jump to content

Mesh upload costs much higher without a UV map.


Rhys Goode
 Share

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

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

Recommended Posts

Here are some numbers I thought might be of interest.  I am making a chain link belt, it has about 45 85-vertex tori and an iconosphere.  I made it using Blender, which reports 3645 vertices.  The belt was inspired by a simiIar belt from by inventory, made from 50 tiny prims As I was starting to build, I wanted to see a small change in the shape of the unit link, and neglected to make a UV map for one iteration.  That turned out to have a *huge* impact on the mesh uploader.

For the model with no UV map set at all:  One run of the Mesh uploader reported 7304 Tris, 3645 Verts for high LOD, 3652 Tris and 3652 Tri/1828 Vets form the lowest LOD.  The numbers of verts and tris for the lowest LOD varied from run to run, the upload cost between $L150 and $L165, with DL cost 141 to 165.  The Physics cost 24.12 did not change from run to run. Much worse for LI than the prim based belt. But wait ...

I went back to Blender and pushed the UV unwrap button.  I took no care at all to mark seams, so the map was not good for much.  For this version of the model, the mesh upload reports 7304 Tris, and 14397 Verts for the high LOD case (same count of Tris, a lot more Verts), and 116 tris/619 verts for the Lowest LOD.  THis model cost only $L37 to upload, and DL cost was 25.2 +/- 0.1, Physics 9.64.  There was a little variation in the Lowest LOD counts, and so in the DL cost but only a little compared to the first case.  Not too bad, about half the LI as the prim based belt.  But ...

And as I wrote this, I realized I could do a lot better.  This is a piece of jewelry, by the time the camera gets far enough away to shift to the lowest LOD, it is invisible.  So, I added two small faces to make the object appear bigger (they are from a different material, I can texture them to be invisible), and told the mesh uploader to use the full detail model for the first 3 LOD's and to use 8 tris for the lowest LOD.   When I cam away, the resulting object object behaves even better  than the 25 LI object I got above by taking the defaults, but now the DL and (and so LI)  costs are down to just over 4, and it only costs $L13 to upload!  

So, both the out of pocket cost of  uploading, and the ultimate LI both went down by a factor of 5 when I did the most rudimentary UV map possible.  Using the model witht he UV map, and exploiting the fact that it cant be seen far away anyway, got be down another factor of 5.

I can't wait to show these numbers to my friend who's motto is "UV maps are for later, after you get the basic shape set".

Link to comment
Share on other sites


Rhys Goode wrote:

 

I can't wait to show these numbers to my friend who's motto is "UV maps are for later, after you get the basic shape set".

The two go hand in hand, but you can only make a UV map if you have geometry first:)

Anyway, the un-unwrapped model probably has a load of seams. All vertices on such a seam will count for every UV island they are connected to. So on a plane where all the individual tris are a UV island that would be six times. This results in a lot more data with all its upload consequences. Why the vert count went up by a factor 4 I don't know, that has got to be a mistake. A factor 4 is pretty much what you get when you subdivide your object one time.

Link to comment
Share on other sites

The effect of omitting the UV map has been described in this jira. Essentially, if there is no UV map, the uploader uses uninitialised data instead. The precise effects depend on what that data happens to be, but usually results in a highly fragmentd UV map - that is one in which most triangles are not connected to any others in the map. The effects on an applied texture are shown in the jira.

When a gemoetric vertex is represented at several different locations in the UV map, as happens when the map is fragmented, the vertex data has to be duplicated in the SL internal data format, where it appears once for each different UV map position. This increases the vertex count, often by as much as six-fold, as you will see in the uploader, where the count is after such duplications. The vertex data count is the major determinant of download cost (and usually LI). So the UV fragmentation leads to increased LI. The extent of the increase depends on exactly what the uninitialised data is, and may vary in repeat uploads of the same dae file (it may not vary if the same data gets used).

In your case, unwrapping without seams leads to a completely conneceted (although useless) UV map, minimising duplicated vertex count and LI. For those who want to look at the effect of geometry alone on LI, before going to the trouble of making a useful UV map, this is probably the best thing to do, as the numbers obtained with no UV map are inflated and unreproducible.

  • Like 1
Link to comment
Share on other sites

"...is it more efficient to UV map an object using the minimal amount of seams?"

Generally, yes.

The notable exception is with seams that lie along sharp-shaded edges or material boundaries, as these will already have duplicated vertices, because the vertices have to appear with different normals, or in the separate lists for each material. In that case, no further duplication is needed to use the different UV locations.In the extreme cvase, if a mesh is highly faceted, with all triangle edges non-coplanar and all using sharp shading, then no amount of UV fragmentation can further increase the LI, which will already be high because every vertex is duplicated for every triangle it touches.

Of course, it is always a compromise. The more you restrict seams, the more texture distortion may become apparent on curved surfaces. So deciding how many seams to use is a matter of experience and judgement.

Of course this only applies where the LI is determined by the download weight. If it's the physics weight that's higher, then reducing the download weight will not affect the LI.

 

  • Like 1
Link to comment
Share on other sites

I find my workflow incorporates Drongles advice too. I've found good LI results by doing my best to mark seams ONLY on edges that I have already marked as sharp - Often you cant keep ALL the seams running down sharp edges but the more you can achieve it the better the results will be. Then, with all the seams marked and the model unwrapped, I get every texture layer I want baked. Then as the last stage before export, I clear all the sharp markings on edges and make sure every face is shaded smooth. Since I baked the textures while they were still marked sharp the look of the uploaded and textured model will reflect that and produce the illusion that they are still sharp edges on a smoothly shaded model, but only those edges that are part of seams get duplicated vertex data.

  • Like 1
Link to comment
Share on other sites

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