Measuring object complexity inworld

Building using prims, sculpties and meshes. Texture creation techniques.
Post Reply
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 270 times

Measuring object complexity inworld

Post by Mike Lorrey »

We often upload meshes and forget how much complexity they had when we did it, and we often buy or get freebies while hypergridding without thinking about what the cost is on our server because each mesh prim has a land impact of 1 no matter how complex it is. HOWEVER, complexity still impacts us, because it puts a load on our viewer to render the mesh. The more vertexes, triangles, etc there are in the sim, the more load it puts on your viewer, so creators want to minimize the complexity of a build in the application they create it in, and or pick a lower level of detail on the mesh upload interface. However we don't often remember what those are unless we document everything, and have no idea what the complexity is of others work.

BUT, there are tools on the viewer that help you measure this, which are found in the Developer menu.
If you are unaware of this menu, or it is not visible, go to Preferences, to the Advanced tab, and check "Show Developer Menu".
how to turn on Developer Menu
how to turn on Developer Menu
The Developer menu will then appear at the top of your viewer. Then go to the Developer menu and select "Show Info", then from that submenu, select "Show render info". A data display will appear in the lower left corner of your viewer with a lot of data in it about all sorts of rendering thats going on. What is important is down near the bottom, the third to last line. If you don't have any objects or link prims selected, it will show the total number of triangles and vertexes of all objects in the sim, how much memory those objects consume, and how many objects there are.
overall graphics rendering costs of the region
overall graphics rendering costs of the region
However if you have one object or prim selected, that same line will show you just the data for your selection. This is how you can measure the complexity of an extant object in sim, even one you did not upload yourself.
Selecting a single object or prim will give you data on that one item.
Selecting a single object or prim will give you data on that one item.
These users thanked the author Mike Lorrey for the post (total 6):
Dot MatrixIlan TochnerArton TripsaKeith SelmesShandon LoringWonder Wheeler
User avatar
Keith Selmes
Posts: 175
Joined: Fri Jan 04, 2013 1:13 pm
Location: Devon, UK
Has thanked: 174 times
Been thanked: 153 times
Contact:

Re: Measuring object complexity inworld

Post by Keith Selmes »

I'll be using this, thanks
User avatar
Dot Matrix
Posts: 1625
Joined: Sun Jul 28, 2013 3:26 am
Has thanked: 1208 times
Been thanked: 2324 times

Re: Measuring object complexity inworld

Post by Dot Matrix »

This is very helpful, and I'm looking at and comparing the numbers on various regions.

Out of interest, what sorts of numbers should people aim for, for different types of builds?
Agatha Ebeler
Posts: 19
Joined: Sun Oct 02, 2016 1:20 pm
Has thanked: 8 times
Been thanked: 13 times

Re: Measuring object complexity inworld

Post by Agatha Ebeler »

thats nice, but what are the meanings of this different facts? and: how should i interpret it?
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 270 times

Re: Measuring object complexity inworld

Post by Mike Lorrey »

Okay, KTris = thousand triangles. Kverts = thousand vertexes. The complexity you should aim for is really subjective to the object you are developing. Note in my example, I have a highly complex object thats around 32 thousand tris and 30,000 verts. Originally it was 47 thousand or so. Using decimation tools, removing duplicate vertexes, etc helps to optimize your work in blender, which is what I did here to reduce the graphics load of this one object by 15,000 verts and tris, thereabouts. When you decimate you have to balance between optimization and actual damage to the build. I took this one slightly too far and had to rebuild some faces/edges in blender before export. This particular object I had originally built in world with prims, almost 500 prims totalling well over 60,000 vertexes I believe. Converting tris to quads, decimation, removing duplicate vertexes have all helped optimize this object down. It probably isn't quite as clean as if I'd built it entirely in blender, but doing it this way took me MUCH less time.
The final thing to notice is the memory required for the object. This one is about 300kb. The original prim object if I recall saved as a collada file of well over 3 MB. This object is a fairly complex mesh, but it has largely improved over a regular prim build by maybe an order of magnitude. Less complex objects should obviously have much lower vert and tri counts, and take up less memory.

NOTE: This is all about rendering cost. It has nothing to do with physics impact on the server (or on your viewer). Any complex meshes that you do not need to be solid, i.e. walked on or otherwise be collidable, you should set to "PRIM TYPE NONE" in the features tab of the edit dialog. This will cause the sim physics engine to ignore the mesh entirely, and you can set this on individual link prims in a linkset while leaving other prims as PRIM TYPE PRIM (for instance, set the branches/leaves of a tree to PRIM TYPE NONE while making the trunk PRIM TYPE PRIM will improve sim performance immensely) (CREDIT: Kayaker Magic taught me about that)
These users thanked the author Mike Lorrey for the post (total 3):
Ilan TochnerDot MatrixWonder Wheeler
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 270 times

Re: Measuring object complexity inworld

Post by Mike Lorrey »

Here are a few other examples. one is a mesh avatar Serene Jewel is working on. You can see its complexity is about 27 Ktris, which shows you the correlation to avatar complexity.
mesh-complexity_001.jpg
The second item, the purple thing, is a mesh couch frame I made. This was originally a prim set of torii and tubes that was exported to collada, imported to Blender, then joined and optimized by eliminating duplicate vertexes, converting tris to quads, etc. I also merged vertexes of what had been adjacent prims together to create one continuous mesh surface. This object was originally almost 10,000 triangles, it now is 1,505.
mesh-complexity_002.jpg
These users thanked the author Mike Lorrey for the post:
Ilan Tochner
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 270 times

Re: Measuring object complexity inworld

Post by Mike Lorrey »

Here's a new comparison study. I have two droids here. I originally built this in SL in 2010 and made the prims into sculpts with Sculptcrafter. A few months ago I turned the sculpts into mesh, before I had really developed my techniques for optimization.
Guess which is the optimized mesh?
Guess which is the optimized mesh?
So one of these droids is the Sculpt To Mesh conversion without optimization. The other one has gone through a couple days of optimization work to get rid of all the unneeded vertexes that are inside surfaces, joining meshes together vertex to vertex, doing a bit of decimation, dissolving unneeded faces, and just improving the overall look.

The stats are as follows:
Sculpt to mesh model, unoptimized: 29,924 triangles, 18,579 vertexes, 26 objects, streaming cost: 28.1
This is the sculpt to mesh, unoptimized
This is the sculpt to mesh, unoptimized
Optimized mesh: 6,813 triangles (77.2% improvement) , 7,755 vertexes (58.3% improvement), 18 objects , streaming cost 13.0
And this is the optimized mesh droid.
And this is the optimized mesh droid.
Beyond these obvious differences in complexity, the mesh has of course enabled me to have multiple materials for each meshed object, and map them properly, so they look better.
These users thanked the author Mike Lorrey for the post (total 2):
Ilan TochnerDot Matrix
Post Reply