Jump to content
EnCore Mayne

Mesh Upload

Recommended Posts

i upload a mesh with a physics layer, the form tells me it's .5 for land impact. when i change the Feature shape to Prim from Convex Hull, the land impact goes to 10! is there someway to know what the physics change will do before i invest in uploading?

.5 land impact.PNG

Share this post


Link to post
Share on other sites

It looks like you are using the LL viewer, so the answer is no, but you will be able to soon!

@Beq Janus, one of the Firestorm devs revamped the mesh uploader for the Firestorm 6.0.1 Animesh Beta & she has submitted this feature to Linden Lab, who are in the process of QAing it, so it will be in the LL viewer "soon" (tm).

If you want the feature now, then you can find it in the new 6.0.1 Firestorm.

Beq explains the mesh uploader changes on her blog here: http://beqsother.blogspot.com/2018/12/easing-pain-of-importing-mesh.html

  • Like 1

Share this post


Link to post
Share on other sites

Along with Whrily's answer here are a couple of other tips.

Use the beta grid to test on so you don't pay while experimenting.

Also you need to make your own physics model, NOT let the uploader do that for you. 

You also need to upload a model  JOINED into a single mesh (unless you go to some extra steps so that you can upload a linkset. You can see from the uploader picture that there is only physics on the top PLANE, not the cube below - that's a problem. 

It looks like you made something out of prims, then exported it and imported again. While that "can" work, it comes inherent with problems.

With an optimized modek,  a correct physics mesh and using analyzed physics, the imported object turned to prim will rarely change it land impact cost. 

If you want to learn more, I have a Blender tutorial series that starts at the VERY beginning.  Just ask Goolge : " blender tutoriail chic aeon" 

  • Like 1

Share this post


Link to post
Share on other sites

still have no idea where it's stated that changing the convex hull to prim explodes the Land Impact.

i have a ways to go to understand the unknown and far too inconsistent physics tingy. i'm using Firestorm exclusively, just needed to switch to the lab's viewer cause the Starlight skin (and my font tweaks) doesn't show me any model information. so far i've tweaked the model numerous times in response to the results the uploader gives me. were i not in the beta grid, i'd be broke, so there's that....

unfortunately, once i think i've got it all together and upload to the main grid, the numbers don't jive. if i copy a mesh, the LI jumps. i switch between prim and convex hull and sometimes the LI changes, other times not. i really don't get how a flat plane can be 10LI when a similar vertical plane is 1.

oh, and what's an Analysis button? and why does it cost extra Lindens if i invoke it? and what do all these damned colours mean. could someone point me to where the Lab rats inform the citizenry of their magical tools?

 

Share this post


Link to post
Share on other sites
35 minutes ago, EnCore Mayne said:

oh, and what's an Analysis button? and why does it cost extra Lindens if i invoke it? and what do all these damned colours mean. could someone point me to where the Lab rats inform the citizenry of their magical tools?

It sounds much like you are trying to dance the ballet before walking but you might want to watch this for some explanation. I do NOT recommend starting toward the end of a tutorial series however. 

 

Edited by Chic Aeon
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

i suppose information about this phenomenon, in the vast wealth of individual user experience, will remain a mystery. i converted the 10LI mesh plane to a 5 prim cube linkset. voila! the economy of time over utility is optimized.

Share this post


Link to post
Share on other sites

Don't take it the wrong way but I don't know what I'm looking at in the upload window of your opening post.

You shouldn't let the uploader generate a collision mesh for you because unless your mesh is simple & perfectly convex (meaning that it's already a perfect candidate to make a collider) the collider generation system will most likely produce unoptimized trash.

 

But do you even want to spend the time learning the proper way?

Edited by Kyrah Abattoir
  • Like 1

Share this post


Link to post
Share on other sites

i've learned no one, as yet, has been capable of answering a simple question as to an observable phenomenon. as for having learned in a proper sense, tomatoe, tomato, i've learned that Land Impact is a wild and untamed variable that no one seems to want to address in an intelligent manner without making me feel like some kind of idiot. present company excluded, of course.

Share this post


Link to post
Share on other sites
14 minutes ago, EnCore Mayne said:

Land Impact is a wild and untamed variable that no one seems to want to address in an intelligent manner without making me feel like some kind of idiot

If someone told you there is a vector magnitude to calculate, would you be able to follow? Because that's the type of math involved, plus quite a bit more variables such as the number of triangles in each LoD, all entangled in the final result.

  • Like 2

Share this post


Link to post
Share on other sites
20 hours ago, EnCore Mayne said:

still have no idea where it's stated that changing the convex hull to prim explodes the Land Impact.

i have a ways to go to understand the unknown and far too inconsistent physics tingy. i'm using Firestorm exclusively, just needed to switch to the lab's viewer cause the Starlight skin (and my font tweaks) doesn't show me any model information. so far i've tweaked the model numerous times in response to the results the uploader gives me. were i not in the beta grid, i'd be broke, so there's that....

unfortunately, once i think i've got it all together and upload to the main grid, the numbers don't jive. if i copy a mesh, the LI jumps. i switch between prim and convex hull and sometimes the LI changes, other times not. i really don't get how a flat plane can be 10LI when a similar vertical plane is 1.

oh, and what's an Analysis button? and why does it cost extra Lindens if i invoke it? and what do all these damned colours mean. could someone point me to where the Lab rats inform the citizenry of their magical tools?

 

15

Overall land impact is defined by the larger of the three components download/streaming, physics and server. At upload server will ALWAYS be 0.5* the number of links in the linkset/group, the download cost is defined by a published algorithm and will match that shown in the uploader.

I have a blog post from many years back that dissects the streaming cost, it is not for the faint hearted though, this is not in an attempt to make anyone feel stupid but an attempt to explain a specific algorithm that is used within second life, and to go some way to explaining why it was defined in those terms. http://beqsother.blogspot.com/2016/07/the-truth-about-mesh-streaming.html this discussion gets more technical again as it spills over into https://beqsother.blogspot.com/2016/07/blender-mesh-data-deep-dive.htm

As that blog illustrates the download cost is indirectly related to the number of triangles. but will vary depending on how well the compression software is able to squeeze the mesh data.

So.... putting download cost to one side that leaves us with physics.

The physics cost shown in the uploader has always (until the newest firestorm) shown the convex hull cost of the mesh. But there are a few subtleties that need to be teased out here.

The convex hull physics shape is mandatory. it must be present for the mesh asset to be uploadable. It is created by the viewer on your behalf and uses the available LOD models to do this. A convex hull is single surface that wraps your object, I tend to liken it to what we brits call "Cling Film".

Food-Grade-Wrapping-Cling-Film-for-Veget

Much like the wrap above it follows the outline of the object bridging any concave areas. An extreme example would be a mixing bowl with wrap stretched over it, the top would be flat.

For the convex hull in Second Life the viewer has to be able to produce this shape using no more than 256 vertices. If it cannot manage this then you will get one of those magical MAV_BLOCKING_MISSING errors that we all love. The missing block being the mandatory physics data.

We can also provide a user-defined physics shape, and this can be presented in one of two forms, a low poly mesh, or a set of up to 256 convex hulls. Both start from a user model.

If you select a user mesh shape, by specifying one of the LOD models or uploading your own custom mesh, then by default the Mesh physics is computed. Mesh Physics cost is defined by an algorithm that is not published so we cannot reverse engineer the results (not without a lot of work at least), however, it is based on the number and the area of the triangles that comprise the specified model. In general, the smaller the area the larger the cost with long thin triangles being more heavily penalised than small equilaterals.  The cost of the physics being inversely related to the area of the triangles is what leads to the extreme physics issues (and the "thin wall" cap) associated with small mesh items. These are discussed in https://beqsother.blogspot.com/2016/07/when-is-door-not-door-and-other-things.html. The final side-effect of using a mesh model for physics is the "degenerate triangle". Another one of our lovely MAV errors, degenerate triangles are triangles that are so thin that the uploader simply rejected them and refuses to accept the model for upload until you fix them. then new Firestorm uploader highlights these better than previous viewers but in most cases when you see this error it should set an alarm bell in your head telling you that your physics mesh is too complex and it is time to rethink. 

To avoid the scalability concerns and remove the degenerate triangle problem you can use the Analyse Mesh function. The analyse function takes the user mesh model specified for physics and tries one of a number of selectable algorithms to decompose the shape into a series of convex hulls. As before the maximum number of vertices in a hull is 256 and the maximum number of hulls (per mesh item in the link set) is also 256. The charge for an analysed physics shape is derived from the number of hulls and (I think) the number of vertices of those hulls. This can lead it a very expensive physics shape, but the resultant shape has a fixed cost no matter what scale and does not get affected by the "thin wall" limit thus making it ideal for build components that may be resized. analysing an arbitrary shape and working out how best to present that in physics is a complex task and your results will be far better if you leave big heavy hints for the code, one common way of doing this is to represent a physics mesh as a series of discrete cubes with a small gap around them. The hull analysis is then able to wrap each of those in a nice convex hull and give a stable, predictable shape.

The real issue with physics costs has always been that it is largely guesswork. You don't know for sure (unless you've got enough experience to think it out  for yourself) what the cost of setting physics to prim will be when you get the item in world. The new Firestorm mesh uploader (coming to the SL viewer real soon) provides you with information that you were never given before. In a new panel on the upload screen it will show you the cost of the convex hull alongside the cost of either the mesh or the analysed physics.

The following very contrived example shows a fox sculpt that is about 7000 triangles (I'm just learning to sculpt don't shoot me for my artistic skills) it is large scale (6m high and 5m long) 

57a6eab1a131e9704a3a49f87329a8f8.gif

Fullscreen version: https://i.gyazo.com/ef67b31b06f132b0e4148a3b31835caa.mp4

  1. I go with the defaults and see a convex hull cost of 7.2 LI
  2. I use the generated LOW LOD for the physics without analysing and the cost is 45.7 LI based on the 436 triangles that comprise that LOD at that scale) Note that if I were to change the scale to be smaller (which is likely once in world - nobody wants a 6m fox) the physics cost would escalate.
  3. I use the analyse function with high-quality setting selected to give a better match to the shape. This gives us 73 hulls at a cost of 43.2 LI
  4. We finally select a user-defined mesh.
  5. At just 48 triangles, this gives a physics cost of 5.2, and note also that the convex (base) hull has reduced to 3.1 because it is being calculated from the user-defined mesh model now.
  6. Finally, we analyse this and get 7 hulls at a cost of 2.4 LI

It is worth noting too that the algorithms that perform the decomposition appear to have an element of randomisation to them. As a result, you can get small differences in costs each time you repeat the process. As this code is unavailable to us outside the lab, there is not much more to be said on that. It may be that the randomisation is not in the decomposition but in the fact we are using the GLOD generated LOD models which are known to use a random seed and thus give varying results.

I hope that this helps explain things somewhat. The high-level concept is simple enough to understand but it is not a simple process to understand if you are focussing on the details. There are many nuances and various "tricks" that people try, but this summary I think has covered most aspects.

Beq

Edited by Beq Janus
added gif preview of video
  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites

found some applicable hacks tweaks on the Lab's wiki: http://wiki.secondlife.com/wiki/Physics_Optimization i started resolving my frustration when i read: http://wiki.secondlife.com/wiki/Making_Mesh_Physics which points to the the earlier link.

in use i was able to get my entire build, including aforementioned 10LI floor, walls, columns, roof down to a stable >> FIVE Land Impact <<.

the key is to link your out of your control mesh (allowing the uploader to create the physics model) to a dummy inworld type cube as root and change the link's Feature shape to None. of course, this is done after you've set your mesh to Prim (with resultant horrific LI numbers. (but, be still dear heart). your hitherto complex model will turn into a single 1LI prim with all physics shapes set. [EDIT: not sure if the LI remains if the dummys are removed and relinked. nonetheless, the dummy cubes can just be made transparent. just hung them in space for ease of use.]

all this was done on the Lab's viewer on the Beta grid. i'll test it again inworld with the Firestorm viewer to see if it's real!

SecondLifeViewer 2019-01-16 10-55-48-60.jpg

Edited by EnCore Mayne
  • Like 1

Share this post


Link to post
Share on other sites

No hacks, no tweeks  LI = 1 🙂

Keep your Physics model simple and remove any/most  small or long thin faces (quads or tris). The SL mesh uploader doesn't like to find such faces in the collision mesh. Small or long thin tris will increase the Physics cost quite a bit.

In this example, if you look carefully you will see that I have removed all but one of the faces that join the bottom surface of the floor to the upper surface of the floor and all the thin faces that join the lower and upper surfaces of the roof. Plus the 2 thin vertical faces of the wall thickness at the door opening.

Blender.thumb.png.1bf6e0b7948f99028b643761d97a4cbc.png

Save the Physics model as a separate .dae file.

 

Load up this  physics model in Step 1 of the Physics tab in the mesh uploader window. Don't touch any of the other Physics options.

474376108_Upload.thumb.png.0af6f33175fcb97813cb4337326d43d8.png

 

When rezzed in world edit the mesh and under the Features tab change to Physics Shape Type to Prim.

Rezzed.thumb.png.b10581fcf73693a91289ee26170f8c4c.png

 

Note:

The mesh was not UV unwrapped before exporting. After Unwrapping I would expect the LI to increase to 2. The model was Uploaded using the defaults for all the the lower LOD models.

If you need a closer look at the Physics model or would like to upload this for yourself as a test then you can download the Blender file from here  http://pasteall.org/blend/index.php?id=51053

The High LOD model is on layer 1,  the Physics model on layer 2.

If you have any questions you can IM me on the Beta grid. The next  couple of days you can find me on the Beta grid around this time (early evening UK time. )

 

 

Edited by Aquila Kytori
  • Like 3

Share this post


Link to post
Share on other sites
16 hours ago, Aquila Kytori said:

In this example, if you look carefully you will see that I have removed all but one of the faces that join the bottom surface of the floor to the upper surface of the floor and all the thin faces that join the lower and upper surfaces of the roof.

thank you very much for putting my proud moment to shame Aquila. i'll certainly look out for you on Beta. IM me anytime you see me on main. if you like answering questions, i like asking them!

as to your superior knock off (albeit, as you said, not designed to be textured) i'm curious as to why you would keep a face that joins the floor's upper and lower planes and not a similar notion for the roof.

as my design evolves (build out with inworld prims, save to collada, optimize in Blender) i may just take some time to edit down the build to make my own physics model. and, btw, is there any penalty for uploading a multi object file as opposed to a linked model?

once again, thank you for coming into the thread. always enjoy friendly competition.

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, EnCore Mayne said:

as to your superior knock off (albeit, as you said, not designed to be textured) i'm curious as to why you would keep a face that joins the floor's upper and lower planes and not a similar notion for the roof. 

 

When there are no "suporting" faces joining the lower to the upper surfaces of platforms like that you will often notice that the first step up the avatar takes will sink into the upper surface for half a second before correcting. Because this looks like the main entrance to your building I thought it worth sacrificing a tiny amount of Physics cost to have this edge more solid.

When using this non analyzed Physics method an important factor in the Physics calculation cost is the average size of the triangles used. Where all the other triangles are quite large  having a couple of smaller ones wont effect that average much.

This average size of triangles explains why if you were to make the build smaller the Physics cost would increase. And if you were to increase its size then the Physics cost would decrease.

1012712986_Steppingup.thumb.png.d2392c751e8f3a66a18a3d7e3599b871.png

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...