Jump to content
You are about to reply to a thread that has been inactive for 1560 days.

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

Recommended Posts

Posted (edited)

I build a house and when I choose build physics from high everything is perfect except the Linden it cost to upload. So I tried to make my own low poly house physics files, but i never got it to work...

Now I tough can't be to hard and retried it with a single wall with a door and two windows. Again, when using physics Model High it works, but when I upload my physic model the door is blocked.

Here is a Screenshot from the mesh and the physic model. Right is the physic I used on the left. As you can see the door is completed blocked. What am i doing wrong?? 

4ByIuxu.jpg

 

Edited by Lenya Whitfield
Posted (edited)

Found the problem (finaly) I need to join all the objects! 

But how are you doing it with a house? If i join all objects I can't hide anymore some wall to work on the inside? Do I need to upload the parts seperately and then stitch the house back togheter in secondlife? 

 

 

On07zTh.png

 

 

Edited by Lenya Whitfield
Posted

Hmm joining the whole house is a bad idea.... 8 Materials for the whole house...well thats a n'Go.

need to test more, does physics upload work with two mesh objects? is that my problem? Since the house is about 64 Objects? and the Physics where only 32 Objects?

Posted
1 hour ago, Lenya Whitfield said:

Here is a Screenshot from the mesh and the physic model. Right is the physic I used on the left. As you can see the door is completed blocked. What am i doing wrong??

It's because of a flaw in the physics engine. Click on the Analyze button for the physics when you upload and it'll work fine. This is one of the very few cases where analyzed physics is better than unanalyzed

Posted

The Firestorm viewer problem with "cube physics" mentioned in the video has been fixed. Use Firestorm for uploads if you can. Beq Janus has been fixing the uploader, and it's better.

Firestorm now has a resizable window in the uploader, and you can make it big enough to see what's going on. This is a big help. The "preview spread" slider causes the objects in the preview window to be moved outward so you can see the parts better. Also, you can pan, zoom and rotate the preview window with the mouse. So you can see what's going on as you adjust things. Play with the various options in "Analyze" and "Simplify". The best model is one in "Solid" mode, with the fewest number of hulls, that does what you want. You can see all that in the uploader before you do the upload.

Usually, you join all the mesh objects in the physics model together into one mesh object before uploading, with small gaps between the parts. The reason for the small gaps is that the uploader tries to cut the model apart into convex pieces. (Convex means "dentless" - no inward surface dents.) The part of the system (the convex hull decomposer, from Havok) which does that is not very smart about choosing where to cut, and tends to do things like break a cube into tetrahedrons. So you have to help it by putting small gaps in your model where you want the cuts.

The physics engine itself, in the simulator, understands only convex solids and surfaces. Convex solids are handled better. The physics engine knows what's "inside" for a convex solid. It's hard to get your avatar stuck inside a "solid" physics model; the physics engine knows you're where you shouldn't be and pushes you out. For "Surface" models, the physics engine knows if you're in contact with the surface, but it's possible to get stuck inside, if you're going fast or the object isn't watertight.

In general, don't set objects that are thicker than an avatar to "surface" mode if you can possibly avoid it. That mistake is the source of those "I'm stuck inside a rock" problems you get in some terrain builds.

After uploading with a physics model, set the object physics type to "prim", rather than "convex hull". "Convex hull" there means to shrink-wrap the entire object and use that as a physics model, ignoring the model you uploaded. If shrink-wrapping the entire model would work, you don't need a hand-built physics model. Many objects work fine with an overall convex hull. Not doorways, though; a wall with a doorway is a "dent", and not convex. Or anything that's hollow inside, like a house. Small decorative objects, non-sittable furniture, and some sittable furniture work fine in overall convex hull mode.

 

  • Like 1
  • Thanks 2
Posted

I got it worked !! Thanks to a nice person.

 

Only issue i have is with a stairway hole.....i had it fixed...but somehow broke it again.

looks like it's not using a prim..but the physic are excat at the same position two planes.

HTxEEsz.jpeg

Posted (edited)

I think i'm going nuts.....

 

1. i build a new house, then i used planes for the physic.
2. Then i started working on the second floor. Just copied everything and modified it.

Everything so far fine, i upload the Physic file without analyze.

Now i started to add a hole in the upper floor for the stairs. Looks good and then i uses again planes for the physic. But can't get it to work....the physic allways looke like a convec hull. I tried everything...i uploaded it alone...only one object with the physic....it's dosn't change.

Right is the visual Model with the hole for the stair, and left is the physical model.... in SL it looks like in the picture above.

(i moved them appart to see it better)

9i66Rjw.jpeg

Anyone a idea why i have problem with a simple hole when walking trough doors is no issue at all? 

Edited by Lenya Whitfield
Posted

I get crazy with this uploader.....

I did a cube, then subtracet a hole in the middle (like my staircase) then i copied the surface to use as my physic file.

It works!! i can fall throw the hole jeah!! Fantastic...but why are the cost now so high????

i think there is no logic at all.......it makes me just crazy

N9RG4II.jpeg

Posted

sl i realy crazy....just rezzed it again.....nothing else..no new upload or so.

jsybylX.jpg

 

so why does it work here and not in my house? is my DAE file messed up??? do i need to use different files from time to time?

Posted

I got..this is so annoying..but after cleaning my physical plane it works now....

 

So what did i learn:

  1. 1:1 a visual object needs a physical object. you can't use 1:x so visual object allways needs the same amount of physical objects. (Wasn't clear in the video you linked)
  2. The mesh must have a size of least .5 meters..if not you need to make it bigger or you can't dig a hole into it. And it's not the wall size who counts..the whole mesh size even when it is a plane.
  3. Cleaning the physical mesh is important...else LI goes trough the roof

 

  • Like 2
Posted (edited)

So... an explanation for the cost. This is only my theory, but I think it has to do with the fact that the physics mesh is not convex.

The reason why this matters is because the physics in computing is much faster when your meshes are convexed. This means that a complete mesh surrounds the entire object with no holes or cavities.  When you start introducing concavity then you start getting issues with computation and it grows to be much more expensive. However... if you were to stack a bunch of building blocks to closely resemble the shape, That is actually computationally cheaper by magnitudes.

I believe you can get around this if you made the physics mesh for the objects with holes as separate planes and rectangular prisms. Remember, you need only to approximate your mesh in the world of physics.

Finally. You'll also need to keep the size of your triangles in mind for the physics models. As a triangle that's too large can start experiencing errors. As long as a single triangle is no larger than 5 meters on either side, it should be good I suspect.

Edited by Cyrule Adder
Posted (edited)

So along with @animats  lengthy and detailed excellent info  (although I can't find any way to preview as discribed so I am thinking he is working in the FS beta and I am not :D) I got pretty confused over this discussion and the conclusions reached by the OP.  So I did my own test for others reading this now or later that may still be confused.   Here are the screenshots.

546496140_6by6bypoint09.jpg.688239aa23a49f3a7505a39f61123480.jpg

Floor with opening

 

28729755_withphysicsmodel.thumb.jpg.9a7b73e5e2d8bb6129c401ff8c300b1f.jpg

Physics model made with four cubes (all less than .5 thick)

 

Location, rotation and scale applied to both. Uploaded with physics model using ANALYZED. Rezzed and turned to PRIM in the Features panel.

Walkable floor with opening that you fall through.    

 

1891989364_openingworks.thumb.jpg.3876314de0b95ac48689af77ee023613.jpg

 

Note that IN THE PAST there were big issues making this kind of cut and the uploader (even the Linden uploader) would not let it happen.  It would close the hole repeatedly.  It is great that it works now, but the land impact is indeed high.

 

Also, this is the type of mesh that caused all the "opening and closing of the hole" when using "target omega" (smooth door scripts). I spent DAYS working that out and I was not alone. I just quit using those scripts several years ago.  Whether  it is still a problem or not, I don't know.  Maybe a script person will know the answer to that part. 

 

So hopefully these visuals help clear up things a bit.  

Edited by Chic Aeon
spelling
Posted (edited)

I'm trying this, too. So, we start with a cube in Blender, and make it 5m x 5m x 0.2m. That's the floor object. Then create a second cube, 2m x 2m x 2m as a cutter, and use a Boolean modifier to have the cutter punch a square hole in the floor. Apply scale to the mesh, so the scale is 1 and the vertices are where they should be. To have some usable UVs, use "Smart Unwrap" to get a UV  layout.

blenderfloorwithhole.thumb.png.91e26b272e4dbf01f99b29e70c84f926.png

Floor with hole, in Blender.

Then log into the beta grid. I'm on Linux, so I have to run Firestorm under Wine to do uploads with Havok. That's kind of weird, but it works. Standard Firestorm 6.3.2.58052.

uploadhole.thumb.png.d96a1f762dc0c86e4dc1a9f41188e62d.png

Uploading the mesh. Beta grid, Morris sandbox. In the cloud, even; this sim is on AWS.

High, medium, low, lowest, and physics are all the same model here. "Solid" mode, then "Analyze" with default settings, so the convex hull decomposer gets to do its thing. Surprisingly, it gets it right. It decomposes the floor with a hole into four rectangular solids. Can't do better than that.

The display here is the usual Firestorm upload window, but you can stretch that now and make it big enough to be useful. You can also pan, zoom, and tilt. Use the mouse in that window, with CTRL to shift to rotate mode. The "explode hulls" slider moves the image of the hulls out from the center of the object, so you can see them. This has no effect on the upload; it's just to help you see what happened.

This window is where you adjust things until you have a working physics model with reasonable LI. Play with the settings and watch the display change. Here, I didn't have to set anything to a non-default value.

floorwithholeinworld.thumb.png.56353ac50a8e5d69b47262eb47f3db04.png

The object in-world. Physics set to "prim". Standing in the hole. Physics model works as expected.
Land impact: 1.

Not seeing any problems.

sittinginhole.thumb.jpg.553a7c7e654732835ed6343b67f3d291.jpg

Can even sit in the hole.

Blender file: http://www.animats.com/sl/misc/floorwithhole01.blend

Exported DAE file: http://www.animats.com/sl/misc/floorwithhole01.dae

Enjoy.

 

Edited by animats
Posted (edited)
1 hour ago, Chic Aeon said:

So along with @animats  lengthy and detailed excellent info  (although I can't find any way to preview as discribed so I am thinking he is working in the FS beta and I am not :D) I got pretty confused over this discussion and the conclusions reached by the OP.

She was using triangle (that is unanalyzed) physics for the floor, Chic, while your and Animats' illustrations use hull (analyzed) physics.

46 minutes ago, animats said:

Not seeing any problems.

There are two problems with using hull physics for walkable surfaces and one of them can't be avoided.

The one that can't be avoided, is that hull physics isn't precise. The physics engine won't allow two hulls to touch each other and will always leave a tiny gap between them. Since the avatar's physics is also a hull, that means you will always hover slighty above the surface. It may not be noticable in a cramped space such as inside a small building but even so, dont use analyzed physics for walkable surfaces if you can possibly avoid it.

The other problem is that under certain circumstances hul physics are "invisible" to ray casting. This is why we sometimes see mesh surfaces you can't rez on. This can be avoided if you know what to do about it but I've seen meshes even by fairly experienced mesh makers with that flaw.

---

In an ideal world there would have been some sort of documentation descrining this and all the other physics quirks and pifalls but unfortunately this isn't an ideal world. I'm not even sure if LL has anybody who understands physics well enough to be able to write such documentation. It's hard not to notice that the Moles often fail to get the physics right and resort to the prim physics cheat. As for the Linden developers, well when I was a new builder, back in 2013 or 2014, I filed a JIRA about those solid doorways and stairwells. It was assigned to one of LL's most experienced (allegedly) developers that I understand had been involved in developing mesh for Second Life himself. He simply did not understand what I was talking about. He seemed to try his best to help but he just didn't get it. I could show him a picture of a wall with a doorway, show him a picture of the physics model, show him that it wasn't possible to walk thorugh the doorway and all he could respond with was total incomprehension. It was as if he was unfamiliar ot only with mesh but even the concept of doorways. It was downright eerie.

A month or two later I got a similar respons to another (but unrelated) mesh flaw JIRA and that's when I stopped filing JIRAS.

Edited by ChinRey
Posted (edited)
9 minutes ago, ChinRey said:

The other problem is that under certain circumstances hul physics are "invisible" to ray casting. This is why we sometimes see mesh surfaces you can't rez on. This can be avoided if you know what to do about it but I've seen meshes even by fairly experienced mesh makers with that flaw.

I've seen that more with surface models. It's associated with using tiny triangles to stretch the physics model to match the visible model. The uploader forces the physics model and the visible model have the same bounding box, which can cause troubles. People work around the problem by adding dummy objects in the physics model. That creates another set of problems. I have test cases for this, if anyone really wants to work on it.

I don't actually build all that much in SL. It's just that the stuff I do build - moving sidewalks, escalators, motorcycles, and NPCs - all relies heavily on the physics engine. So I've had to explore that area more throroughly than most. Also, I used to write physics engines, so I have some idea of what's going on inside.

Edited by animats
Posted (edited)

@Chic Aeon

2 things, The OP was trying to upload her building as a 4 object link set (not enough materials slots so had to make the ground floor and and upper floor separate objects). And secondly she was using non analysed "triangle" physics.

The problem was that when adding a small triangle to increase the Bounding Box Z dimension of the floor from 0.2 to 0.6m the Physics cost, when set to Physics Shape Type prim was way to high.

We found that by stretching the rezzed floor model along the Z axis to a few meters the Physics cost was reduced dramatically.

I feel sure that this was not the case before (its few years since I have uploaded anything like this). I was expecting a Physics cost of less than 1 for the floor with the Z dimension of 0.6m.

An example upload:

First screenshot is of the visual and Physics model in Blender. An extra triangle (could have used a "collapsed" tri but for illustration the full tri is better) added to increase the BB Z dimension from 0.2 to 0.6m.

1-min.thumb.png.1bfcd40c3979aee739b51c2361a0c653.png

When rezzed the hole is open as expected but the Physics cost is just silly:

2-min.thumb.png.bded9409cc4659d01eb7fec5f40d105e.png

 

To get the Phyics cost to around 1 it is necessary, in this example to increase the BB Z dimension to 8 meters:

4-min.thumb.png.eda4816e24f77e1410069dc4324f4e73.png

And rezzed inworld:

3-min.thumb.png.3ba417cf35dae9c147d642c914f02a64.png

 

 Perhaps someone can say if there has been a change in how the Physics cost is calculated for such models or is it just my memory that is at fault ?

Should also be noted that that we did many uploads (different geometry in Blender) and always had the same high Physics cost for the model when only 0.6m thick.

 

3 hours ago, Chic Aeon said:

Note that IN THE PAST there were big issues making this kind of cut and the uploader (even the Linden uploader) would not let it happen.  It would close the hole repeatedly.  It is great that it works now, but the land impact is indeed high.

I also checked the Physics cost of the "Hull" type Analysed physics and did not find the Physics cost to be any higher than expected. 4 Hulls at 0.36 each =1.4

How many hulls were indicated in the Physics panel of the Uploader with your Physics model ?

5-min.thumb.png.641eac694576661ca8e088db339c8e47.png

 

6-min.thumb.png.ac87241c1c46430b78b54cd560dfb1f2.png

 

Edited by Aquila Kytori
  • Like 2
Posted (edited)
5 hours ago, Cyrule Adder said:

So... an explanation for the cost. This is only my theory, but I think it has to do with the fact that the physics mesh is not convex.

It's a bit more complicated than that. I've explained it in more details in a few older threads here but I can't find them at the moment so here's a summary of the practical implications.

Physics in a virtual world has two purposes, it defines where avatars (and objects set to be physical) can and can't move and it provides surfaces for "ray tracing" (a feature that defines which spots you can rez on and is also used for pathfinding and a few other things).

As Animats has already explained, physics engines work with two very different kinds of physical objects, surfaces and hulls. (There's a third one too, height fields but it's only used for the system ground so it isn't relevant here). HAVOK, the physics engine used by Second Life, operates with five different hulls and two different surfaces but only the two surfaces and one of the hulls are available for meshes.

When we analyze the physics, the uploader will try to convert the physics mesh we feed it into one or more hulls, if we don't analyze, it will use the input as it is and treat it as a surface. The physics engine, including the uploader's analyze function, is not LL's own, HAVOK is an Irish software copmany currently owned by Microsoft. This means there's not much LL can do about it, they have to use it as it is.

Both surface and hull physics have their pros and cons:

---

Hulls

A hull can be compared to ban lines in that they defines an "exclusion zone" you are not allowed to be inside.

The pros are:

  • They are always totally solid, if you are inside it, you will always be pushed out.
  • The physics weight is constant. If the hulls are all simple cubes, each of them will always add 0.360 to the physics weight. More complex hull shapes may add a bit more but it's still constant.

The cons:

  • The physics engine won't allow two hulls to touch each other, it will always leave a little bit of space between them. The uploader tries to compensate for this by shrinking the physics shape slightly but this is not a precise science so you will always hover a little bti above a mesh surface made with hulls.
  • There is no way to reduce the physics weight below the 0.360 per hull limit and the hull shapes are always farly simple. If an objects needs a complex physics shape, it'll have to be made from a lot of hulls.
  • Since a hull isn't defined by its surface and ray tracing is all based on surfaces, it can sometimes cause problems with rezzing and for pathfinding characters.

---

Surfaces

As I said, we have two different kinds of them:

---

Triangle

A single triangle has a constant physics weight of 0.200, making it the lightest of the shapes available for mesh (three of the special hulls we can't use are even lighter). It doesn't give us any useable physics of course but can still be handy for objects that can be phantom anyway.

---

Triangle list

Triangle list is just another name for a mesh, a surface made from several triangles streched between vertices. It is said to be heavier on the server than hull physics but that is a truth with modifcations. We often need multiple hulls or a very complex single hull to get a good physics model and in those cases triangle lists are usually considerably lighter.

One peculiar quirk HAVOK has, is that it doesn't handle triangle lists with small or very long and narrow triangles very well, the bigger the triangles are, the better. If the object size is smaller than 0.5 m on any axis, HAVOK simply gives up and handles it as a single convex hull and depending on other factros, you can get very high physics weight long before you reach that limit.

Pros:

  • Allows for very precise physics shapes
  • No ray tracing issues

Cons:

  • May cause inflated physics weight for very thin objects
  • Does not work at all with objects smaller than the 0.5 m limit
  • Is single sided so you may be able to penetrate it (with a little bit of difficulty) if you walk into it from the back side
  • If you move very fast, you may end up penetrating the surface before the physics engine has time to react. This is not a problem with normal avatar walking/running/flying speeds (unless there is a server glitch) but if you drop onto the surface from a high altitude or crash into it in a fast moving vehicle you can sometimes go right through it.

---

Four special points worth mentioning

  • For a physics model is made from a single 12 tri cube it doesn't seem to matter whether it's analyzed or not. The physics weight is always 0.360 and it doesn't seem to suffer from any of the quirks neither of the hull or surface physics. This may be because it corresponds exactly with the object's bounding box.
  • The bounding box is a cube surrounding the entire object. The physics engine can't keep track of the relations between every single object and avatar in a region of course so it uses the bounding boxes as a preliminary check to see if two objects are so enough to each other it'll have to do a more precise calculation.
  • For those who wonder, the "convex hull" option in the edit window uses HAVOK's analyzer to generate a single hull for the entire object. The physics weight depends on how complex that hull is but usually it's lower than the more detailed "prim physics".
  • Practically all parcels in Second Life are configured with no pushing. This means worn items are always phantom so there is no point in using elaborate physics models for clothes, hair, jewelry etc. Just upload with a single triangle as physics.

 

 

Edited by ChinRey
  • Like 1
  • Thanks 2
Posted
8 minutes ago, Aquila Kytori said:

We found that by stretching the rezzed floor model along the Z axis to a few meters the Physics cost was reduced dramatically.

That's interesting, I too would have expected the opposite. There's still a lot of things we haven't really figured out about HAVOK's triangle list physics and even the most experienced makers have to rely a lot on experience, tests and intuition. I'm not sure if you rememebr the discussion we had here about my road modules, Aquila. I didn't want to use hull physics because of the tracking issues and ended up testing more than 30 different physics models. Sometimes moving a single vertice a few cm was enough to dratically alter the physics weight.

0.6 m is not a "safe" size anyway. It can work but don't bet on it. If you're extending the size with an invisible triangle or a loose vertice there's no point in limiting yourself to 0.6 m anyway. You might as well make it 1 m or more. Btw, when I need to extend the thickness of a floor I usually do it by adding rafters under it. I also use floors thicker than 0.2 m when I'm buiding a house to SL scale. 0.2 m is fairly spot on for RL scale but Second Life houses are (nearly) always oversized. I wrote a very brief post on my Builders' Manual blog about it.

 

22 minutes ago, Aquila Kytori said:

I feel sure that this was not the case before (its few years since I have uploaded anything like this). I was expecting a Physics cost of less than 1 for the floor with the Z dimension of 0.4m.

Ummm, that's not what you taught me back in 2013/2014, Aquila. ;)

Btw - for those who are even newer than me here - Aquila and Drongle McMahon were the ones who did most of the ground work that made it possible for us to learn how to make efficient physics models at all. We've filled in a couple of details since then of course and also done quite a bit of work writing documentation and creating tutorial videos (thanks to Chic for that!) but it's all built on their pioneer work. If it wasn't for them, we'd still be at the mercy of people who don't know what a doorway is and why it's nice to be able to walk through them.

Posted (edited)
4 hours ago, Aquila Kytori said:

I also checked the Physics cost of the "Hull" type Analysed physics and did not find the Physics cost to be any higher than expected. 4 Hulls at 0.36 each =1.4

How many hulls were indicated in the Physics panel of the Uploader with your Physics model ?

Here is what I see in the uploader. 

image.thumb.png.f76d31a8cc72ee3e28cfe38c75f35ba0.png

image.thumb.png.6fa7c8942ff0e220d3a89b1e5c0a049c.png

 

I did NOT make any changes to get the main model as streamlined as it could be.  Possibly (judging from what the OP said she may have had LOTS of triangles.  I didn't even think to do that as I have never had need to basicly make the lowest LOD as for the highest setting LOL.   Honestly, it has never come up so this MAY be a new feature having "possibly" something to do with changing the way mesh is counted in the future?    I really don't know.  

 

I definitely agree that FIVE is a lot  for a floor with a hole in it LOL.    So should the occasion arise (doubtful) I will try and REMEMBER this and know what I need to change.   

 

Good to see you are still out there!!!!!  :D

 

That uploading a house as a linkset is "possible" (I have done it successfully) but SO NOT friendly.  Honestly it isn't that hard to put your roof etc on the main model inworld. IMO anyway :D.  

 

 

PS. If I can find the house like this that gave me all the trouble (scripts) I will see what the upload cost on that was.  It is in with the dust bunnies in my virtural closet so not sure that I can, but I will poke you if I have more info. That was about three years ago I think. 

Edited by Chic Aeon
adding info
Posted (edited)

Oh, about the mesh upload window. It has some undocumented controls. None of these affect the upload; they just let you see what you're doing.

  • Left mouse button - pivot view about Z
  • CNTL-left mouse button - pivot view about X
  • CNTL-shift left mouse button - pan in view plane, but not very far.
  • Mouse wheel - zoom view
  • Preview spread slider - move the convex hull pieces apart so you can see them.
  • Up-Up-Down-Down-Left-Right-Left-Right-B-A - 30 extra lives.
Edited by animats
  • Thanks 1
Posted
24 minutes ago, Chic Aeon said:

Here is what I see in the uploader. 

 

image.thumb.png.6fa7c8942ff0e220d3a89b1e5c0a049c.png

24 hulls would explain it. It shold only be four.

 

3 minutes ago, Chic Aeon said:

This isn't the exact same thing but it does show that "my method" above worked fine (1 li) before.  So it does seem like something has changed.   From July 3 12017

It may be some subtle differences between the two that makes the uploader more prone to split the hulls for one than for the other. But since you mention it, I too have seen some surprising hull splits recently. Nothing I couldn't fix with the Simplify function or some minor tweaks to the physics mesh but still  unexpected. I can't say for sure since I use analyzed physics so rarely but there may have been some tweaks in the analyzing algorithm.

In any case, if you use analyzed physics made from multiple cubes, check the numebr of hulls before you hit the upload button. If that isn't identical to the number of cubes in the physics mesh, you probably want to fix it before you upload.

You are about to reply to a thread that has been inactive for 1560 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
×
×
  • Create New...