Forums


Measuring object complexity inworld

Building using prims, sculpties and meshes. Texture creation techniques.

Measuring object complexity inworld

Postby Mike Lorrey » Wed Dec 21, 2016 8:57 pm

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".
turn-on-developer-menu.png
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.
Region-graphics load.png
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.

Object graphics load-decimated.jpg
Selecting a single object or prim will give you data on that one item.
User avatar
Mike Lorrey
 
Posts: 205
Joined: Sun Sep 04, 2016 5:40 pm
Has liked: 55 times
Been liked: 120 times

Re: Measuring object complexity inworld

Postby Keith Selmes » Thu Dec 22, 2016 9:25 am

I'll be using this, thanks
User avatar
Keith Selmes
 
Posts: 174
Joined: Fri Jan 04, 2013 1:13 pm
Location: Devon, UK
Has liked: 169 times
Been liked: 150 times

Re: Measuring object complexity inworld

Postby Dot Matrix » Thu Dec 22, 2016 12:12 pm

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?
User avatar
Dot Matrix
 
Posts: 1312
Joined: Sun Jul 28, 2013 3:26 am
Has liked: 865 times
Been liked: 1826 times

Re: Measuring object complexity inworld

Postby Agatha Ebeler » Thu Dec 22, 2016 5:04 pm

thats nice, but what are the meanings of this different facts? and: how should i interpret it?
Agatha Ebeler
 
Posts: 19
Joined: Sun Oct 02, 2016 1:20 pm
Has liked: 8 times
Been liked: 12 times

Re: Measuring object complexity inworld

Postby Mike Lorrey » Thu Dec 22, 2016 10:40 pm

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)
User avatar
Mike Lorrey
 
Posts: 205
Joined: Sun Sep 04, 2016 5:40 pm
Has liked: 55 times
Been liked: 120 times

Re: Measuring object complexity inworld

Postby Mike Lorrey » Fri Dec 23, 2016 3:17 am

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
User avatar
Mike Lorrey
 
Posts: 205
Joined: Sun Sep 04, 2016 5:40 pm
Has liked: 55 times
Been liked: 120 times

Re: Measuring object complexity inworld

Postby Mike Lorrey » Thu Mar 30, 2017 3:20 am

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.
Droid mesh complexity_002.jpg
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
Droid mesh complexity_006_003.jpg
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
Droid mesh complexity_006_001.jpg
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.
User avatar
Mike Lorrey
 
Posts: 205
Joined: Sun Sep 04, 2016 5:40 pm
Has liked: 55 times
Been liked: 120 times


Return to Building and Texturing

Who is online

Users browsing this forum: No registered users and 1 guest

cron