Jump to content

I've made a relatively complex skybox and I can't figure out the physics


Lydia Alberti
 Share

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

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

Recommended Posts

I've spent so long trying to figure out the physics model for my house and it's driving me nuts. I've read every post on here about it and I still can't figure it out. I have made a physics model and I know about the bounding box issue where the physics model will stretch to the bounding box of the high LOD mesh. But I don't understand how to fix that.

Here's the high LOD:

https://gyazo.com/6e7cbec5016c6d81d66f558919074bdb
https://gyazo.com/e86d11c30f6c70a4aa48d617bdce402d

Here's the physics model:

https://gyazo.com/71ae50d9e7c37444d6a7b2fb68ecd17a
https://gyazo.com/ad122de80f9f80ac5b6e6e670153a8c6

I would post a picture of it uploaded on second life in the uploader, showing the physics but for some reason it's stopped showing the physics preview when I upload the physics model, but anyway, parts of it are stretched and some objects are in the wrong position. Also it has the red lines so I'm not able to upload it because its saying the object has too many triangles (or something along those lines)

Now I've done something and now my physics model isn't even appearing in the preview but it is uploaded. And when I upload the mesh, there isn't the option to change it to "Prim"

I even tried the other method, which is setting the physics to either the high LOD or the medium LOD then hitting "analyze" but the problem says that the number of hulls exceeds 256 and not sure how to fix that either.

Does anyone have any advice regarding this?

Also is it better to upload in Firestorm or the Second life viewer?

Edited by Lydia Alberti
Link to comment
Share on other sites

39 minutes ago, Lydia Alberti said:

I even tried the other method, which is setting the physics to either the high LOD or the medium LOD then hitting "analyze"

I really hope you didn't find that on the forums. That's a horribly bad solution for something like this. ūüėČ

 

39 minutes ago, Lydia Alberti said:

Also is it better to upload in Firestorm or the Second life viewer?

It doesn't matter these days. The uploader is exactly the same.

With that out of the way, I can't spot any obvious errors in your physics model at first glance. I assume you've made sure its overall size is the same as the visual model.

But, did you check that the scale is applied? Rotation must always be set to 0 and scale to 1.0000 for all models. Location isn't that critical but I usually make sure it's set to 1.0000 too.

bilde.thumb.png.f1ffe27cb67de0ce2a3ec927a401b1eb.png

If they aren't, you are very likely to get the kind of problems you mention (and a few others as well). To fix it, go to Oboejct mode, select the item, Hit Ctrl+A and Apply, Rotation, Scale and (if you have the level of OCD mandatory for buiders) Location.

Edited by ChinRey
Link to comment
Share on other sites

It seems like you have quite a few issues with your skybox.  Honestly I would advise making a new and SIMPLE building and getting that to work before tackling something like what you show :D.  

But a few comments.  

 

If you haven't watched this, it may be of help.

Some specifics.   

Your physics model is too complex.  If you are using cube physics then none of the cubes of your physics model should touch each other. 

You need to apply location, rotation and scale and set origin point  to geometry on BOTH the main build and the physic model so that they will "fit" together.   

Hopefully you are working on the Aditi sandbox :D to save those practice upload fees.

 

Even when you get so that you really do understand making a physics model, some buildings will not upload correctly -- this in either Firestorm or Linden Viewer (as far as I know they work the same now so there is no longer a difference, but I could be wrong on that).  Typically many builders would upload this in PIECES and then link them together.  While you can make your build all one mesh and make a physics model for it, the more complex the model, the more likely that the uploader will cough and sputter.   Uploading in pieces will often get you past a problematic area.  

Good luck!!

 

Edited by Chic Aeon
spelling
  • Like 1
Link to comment
Share on other sites

50 minutes ago, Chic Aeon said:

It seems like you have quite a few issues with your skybox.  Honestly I would advise making a new and SIMPLE building and getting that to work before tackling something like what you show :D.  

But a few comments.  

 

If you haven't watched this, it may be of help.

Some specifics.   

Your physics model is too complex.  If you are using cube physics then none of the cubes of your physics model should touch each other. 

You need to apply location, rotation and scale and set origin point  to geometry on BOTH the main build and the physic model so that they will "fit" together.   

Hopefully you are working on the Aditi sandbox :D to save those practice upload fees.

 

Even when you get so that you really do understand making a physics model, some buildings will not upload correctly -- this in either Firestorm or Linden Viewer (as far as I know they work the same now so there is no longer a difference, but I could be wrong on that).  Typically many builders would upload this in PIECES and then link them together.  While you can make your build all one mesh and make a physics model for it, the more complex the model, the more likely that the uploader will cough and sputter.   Uploading in pieces will often get you past a problematic area.  

Good luck!!

 

Hi, I've used your video as a guide and I have made a simple building in the past and that worked out perfectly.
The transforms were all applied to both the physics model and the mesh.

However, I will admit as a shortcut, I took an older file of my mesh and basically used that as a "simplified" version of the physics model. But I will take ur advice to make it from scratch again (and to try and not be lazy about it haha). Currently the "cubes" or what it supposed to be cubes are most likely touching.

I didnt realise most builders typically upload their homes in pieces, cos most of the ones I've seen like homes by Dust Bunny or Onsu, etc they are all uploaded as 1 mesh rather than a linked set, because I find it so fragile especially if the user wants to modify it.

But yeah, when i made a simple one in the past, i even just use the analyze method and it was perfect. But now that this is a complicated mesh, there are so many moving parts that are hard to keep a track of. I'm trying to get better at it and its taking time, but its all a learning experience.

Link to comment
Share on other sites

48 minutes ago, Lydia Alberti said:

I didnt realise most builders typically upload their homes in pieces

I don't know about the brands you mention but a good builder will never make an entire house as a single mesh. Not unless they're going for the 1 LI house challenge of course but that's not for everybody. (I actually only know of one builder who has managed to make 1 LI houses without totally butchering the LoD. I won't say who.)

There are several reasons for that, not all of them applies to a closed skybox like yours:

  • File size and dowload time. For some weird reason the total file size tends to decrease if you split a big mesh into several small ones. That reduces load time, dowload weight and - if done properly - the land impact¬† I can't think of any logical explanation for this strange behaviour but it's well documented.
  • LoD. The outside surfaces of a house, walls and roof, need perfect or near perfect LoD. That is, they must always look solid all the way to the draw distance. Smaller details such as windows do not need that. You want to reduce them fairly fast to seave on the lag.
  • The don't mix large and small tris principle. The land impact and render cost of a mesh depend a lot on its size and triangle/vertice count . By combining - say walls and windows - into a single mesh, you get a worst case scenario for both: the big triangles for the walls adds a lot to the size and the fairly complex windows add a lot of triangles and vertices.
  • Reusable assets. I use windows as an example again but it applies to other parts too of course. A house will usually have several identical windows. Uploading several identical meshes is a huge msitake though. Upload one, copy in-world. Second Life doesn't have object instancing (even though it should) but it still handles several copies of the same asset much better than it handles the same number of different ones.
  • Genuine modifiability. You already mentioned that yourself. I will actually go so far as to say that listing a house made from a single mesh and using baked textures as "modifiable" is false advertising because there is no meaningful way for the buyer to modify it.
  • Flexible draw distance. This doesn't matter for small hosues but for big ones it's rather crucial. The distance to an object is calculated not from the part that is closest to your camera but from the object's center. That means, if you have you draw distance set to default 128 m and you're looking at a big house made from a single big - let's say 40x40 m - mesh, the effective draw distance is only 108 m. That doesn't sound too bad until you realzie the reduction in draw distance doesn't apply to items and avatars inside the house. In other words, people passing by may see you and your furniture at distances where the house tiself is still invisible.
  • Physics. Without going into details, different parts of a house often need different kind of physics.

 

Edited by ChinRey
Link to comment
Share on other sites

The only buildings that I have uploaded as a single mesh were in Sansar (and later here since I already had the file) and that was because you couldn't LINK at that time and couldn't bundle items for sale (also at that time).  While I got it all to work, it was a horrible pain and so not fun. 

 

And note that as far as I know, these multi-pieces houses are often uploaded a piece at a time and NOT uploaded as a linkset (a whole 'nother level of picky stuff to deal with).   So the piece at a time strategy is probably the wisest. 

 

 

Link to comment
Share on other sites

1 minute ago, Chic Aeon said:

The only buildings that I have uploaded as a single mesh were in Sansar (and later here since I already had the file) and that was because you couldn't LINK at that time and couldn't bundle items for sale (also at that time).  While I got it all to work, it was a horrible pain and so not fun. 

 

And note that as far as I know, these multi-pieces houses are often uploaded a piece at a time and NOT uploaded as a linkset (a whole 'nother level of picky stuff to deal with).   So the piece at a time strategy is probably the wisest. 

 

 

Sorry, what do you mean by a linkset, is this meaning, a merge of the mesh in blender and uploaded into SL or is this uploading it in pieces, then selecting it all and placing it back into the inventory so when the user takes it out, it comes out as one rather in pieces?

Link to comment
Share on other sites

25 minutes ago, ChinRey said:

I don't know about the brands you mention but a good builder will never make an entire house as a single mesh. Not unless they're going for the 1 LI house challenge of course but that's not for everybody. (I actually only know of one builder who has managed to make 1 LI houses without totally butchering the LoD. I won't say who.)

Yeah, sorry I haven't been exposed to many, but I've only seen from the most popular furniture brands, that have uploaded it as one so I always had the impression that that was the "way to do it". I guess there isn't necessarily a large bank of "best practices" that I've seen so far, so I went into the project with not real sort of planning and now feeling the repercussions of it now.

Link to comment
Share on other sites

18 minutes ago, Lydia Alberti said:

so I went into the project with not real sort of planning and now feeling the repercussions of it now.

Welcome to the world of SL building! We've all been there. ;)

I could look clsoer at the physics in your original post of course but if you split the building into separate pieces as you should anyway, ost of the problems should go away by themselves.

Link to comment
Share on other sites

I'm a pretty novice modeler and I've experience the same issue. Looking at the model, it looks like your bounding boxes are the same, but I can't really tell from the changing angles.

The way I've gotten around it (and I have no idea if this is a good idea or not) is to create a plane at the bottom of the mesh that basically would determine exact X, Y bounding box. Then in the physics model, use the same plane to set the physics model. That way, there's no guessing work if SL changes the bounding box of either mesh or physics model. The Z dimension you should be able to just match on your original and physics mesh easily. This of course only works if having a flat plane on the ground wont' mess up your physics.

One thing you could possibly check too is if it's all a single mesh, check on blending to see what the bounding boxes are and see if the dimension values match up on your mesh and physics models.

Link to comment
Share on other sites

3 minutes ago, ChinRey said:

Welcome to the world of SL building! We've all been there. ;)

I could look clsoer at the physics in your original post of course but if you split the building into separate pieces as you should anyway, ost of the problems should go away by themselves.

Oooh yes please! If you can give any pointers that would be awesome, as I would love to take them into the next project with a better idea of what to do next time :)

https://www.dropbox.com/s/qy36wwmugs90ik2/physics_model.blend?dl=0

Link to comment
Share on other sites

5 minutes ago, Phaytel said:

I'm a pretty novice modeler and I've experience the same issue. Looking at the model, it looks like your bounding boxes are the same, but I can't really tell from the changing angles.

The way I've gotten around it (and I have no idea if this is a good idea or not) is to create a plane at the bottom of the mesh that basically would determine exact X, Y bounding box. Then in the physics model, use the same plane to set the physics model. That way, there's no guessing work if SL changes the bounding box of either mesh or physics model. The Z dimension you should be able to just match on your original and physics mesh easily. This of course only works if having a flat plane on the ground wont' mess up your physics.

One thing you could possibly check too is if it's all a single mesh, check on blending to see what the bounding boxes are and see if the dimension values match up on your mesh and physics models.

I could give that a shot, thanks. I think in the Z-axis i wanna say the bounding box might be of by like 0.1 or something minute. Also in 2.8 it looks like they got rid of the bounding box viewport :( So have to set the bounding box in the viewport display for each object :(

Link to comment
Share on other sites

6 minutes ago, Phaytel said:

I'll have to look into a bounding box feature in the viewport, I didn't know that existed. The cheap way of doing it is to select all your mesh pieces and Ctrl-J to join into a single mesh and then look at the dimension window, then undo.

https://i.imgur.com/XqWIB4g.png

This is what I got from your physics mesh.

Isn't that just the outline of the mesh rather than the bounding box? This is setting it in the viewport display on the object:
https://gyazo.com/1c8d0bc96b77ad5d9e3afe42805de4c2

Link to comment
Share on other sites

 

4 minutes ago, Lydia Alberti said:

Isn't that just the outline of the mesh rather than the bounding box? This is setting it in the viewport display on the object:
https://gyazo.com/1c8d0bc96b77ad5d9e3afe42805de4c2

If there's no rotation on the object and all the pieces are part of a single mesh, the dimensions are basically the same as the bounding box of the mesh.

Link to comment
Share on other sites

1 hour ago, Lydia Alberti said:

Sorry, what do you mean by a linkset, is this meaning, a merge of the mesh in blender and uploaded into SL or is this uploading it in pieces, then selecting it all and placing it back into the inventory so when the user takes it out, it comes out as one rather in pieces?

Let's say you have three boxes in Blender. 

You could upload them together after JOINING them and that would be a single mesh.

You could upload them one at a time as three single mesh objects and then LINK them inworld.

You could select all three UNJOINED boxes in Blender and export them together as a LINKSET.  

The first method will frequently give you a lower land impact and "easier" long distance LODs. The single meshes will be at least 2 land impact as you have three boxes with the minimum being .5 li per mesh (rounds up) -- BUT you have total flexibility for placement and resizing etc.   The LINKSET method let's you upload "single" (coalesced) mesh items but keeps the placement exact.  This is needed especially for animated objects.  

 

I personally rarely upload as a linkset, but I have seen many people attempt (and sometimes get it to work) uploading houses as linksets.  In order to get the physics correct you need to make a physics model of course with some special steps. There is a video of how in my Blender tutorial playlist.  

 

Agreed that 'best practices' are extremely difficult to find and of course ideas will vary. Keep in mind though that the most POPULAR brands are not necessarily the best made mesh. And many brands don't make there own mesh (this is legal now in SL :D).  Physics issues abound in houses even from builders who have been creatiing mesh for seven years or so (yes, STILL).  Even some of the Linden Homes have mesh physics issues.  So getting the physics correct is as much of an art as the pretty textures -- in my book anyway.     I have seen some horrific "physics hacks" made by some top name builders.  I cringe. I move on. 

Link to comment
Share on other sites

2 minutes ago, Chic Aeon said:

Let's say you have three boxes in Blender. 

You could upload them together after JOINING them and that would be a single mesh.

You could upload them one at a time as three single mesh objects and then LINK them inworld.

You could select all three UNJOINED boxes in Blender and export them together as a LINKSET.  

The first method will frequently give you a lower land impact and "easier" long distance LODs. The single meshes will be at least 2 land impact as you have three boxes with the minimum being .5 li per mesh (rounds up) -- BUT you have total flexibility for placement and resizing etc.   The LINKSET method let's you upload "single" (coalesced) mesh items but keeps the placement exact.  This is needed especially for animated objects.  

 

I personally rarely upload as a linkset, but I have seen many people attempt (and sometimes get it to work) uploading houses as linksets.  In order to get the physics correct you need to make a physics model of course with some special steps. There is a video of how in my Blender tutorial playlist.  

 

Agreed that 'best practices' are extremely difficult to find and of course ideas will vary. Keep in mind though that the most POPULAR brands are not necessarily the best made mesh. And many brands don't make there own mesh (this is legal now in SL :D).  Physics issues abound in houses even from builders who have been creatiing mesh for seven years or so (yes, STILL).  Even some of the Linden Homes have mesh physics issues.  So getting the physics correct is as much of an art as the pretty textures -- in my book anyway.     I have seen some horrific "physics hacks" made by some top name builders.  I cringe. I move on. 

Thanks so much for clarifying that! It seems from your description, I uploaded as a linkset. I also tried to join them in blender apart from the doors and uploaded that too but didn't change the physics mesh and still had that problem. I'll have a dig in your youtube playlist to see if I can get it working that way.

But as for your recommendation was that method two, to upload all 3 as a single mesh and link them inworld? I like the sound of method one however.

Link to comment
Share on other sites

3 hours ago, Lydia Alberti said:

Thanks so much for clarifying that! It seems from your description, I uploaded as a linkset. I also tried to join them in blender apart from the doors and uploaded that too but didn't change the physics mesh and still had that problem. I'll have a dig in your youtube playlist to see if I can get it working that way.

But as for your recommendation was that method two, to upload all 3 as a single mesh and link them inworld? I like the sound of method one however.

If you tried to upload your model as a linkset and didn't go to ALL the extra steps ^^ :D  That would be part of your problem.  Here is the beginning of the linkset physics info from my tutorial.

 

Now to be FAIR, I uploaded the gravestones as a linkset JUST to show how it would be done for the tutorial. I would never have chosen this method "personally". Not sure if I said that in the video or not. 

The problem with JOINING all parts as one and then uploading is (for me) that the more complex something gets the messier it is to work with when you have an interior. For example if you have a roof and a floor joined to the walls and maybe some stairs, camming around "inside" is frustrating.   That's the biggest deal for me. The other is -- as I said -- sometimes even with a PERFECT physics model, the uploader can refuse to match your physics model to your building.  I have only had two or three cases of this over the years, but can verify that it happens -- no matter WHAT viewer you use :D.   That can be pretty depressing.   

 

In the case of YOUR model:

e86d11c30f6c70a4aa48d617bdce402d.png

 

"I" would have divided it into at least three parts --- the cylinder area, the main house, the platform with fencing.  Doors of course would be separate pieces (in my Sansar days I either left the doors off (in one case having the door on saw horses being "worked on" for repairs as part of the installation storyline )-- or uploaded separately and added as a completely different component. 

 

That doesn't mean My way is the BEST way --- just that it would have been my choice. :D.   

 

 

 

Link to comment
Share on other sites

3 minutes ago, Chic Aeon said:

If you tried to upload your model as a linkset and didn't go to ALL the extra steps ^^ :D  That would be part of your problem.  Here is the beginning of the linkset physics info from my tutorial.

 

Now to be FAIR, I uploaded the gravestones as a linkset JUST to show how it would be done for the tutorial. I would never have chosen this method "personally". Not sure if I said that in the video or not. 

The problem with JOINING all parts as one and then uploading is (for me) that the more complex something gets the messier it is to work with when you have an interior. For example if you have a roof and a floor joined to the walls and maybe some stairs, camming around "inside" is frustrating.   That's the biggest deal for me. The other is -- as I said -- sometimes even with a PERFECT physics model, the uploader can refuse to match your physics model to your building.  I have only had two or three cases of this over the years, but can verify that it happens -- no matter WHAT viewer you use :D.   That can be pretty depressing.   

 

In the case of YOUR model:

e86d11c30f6c70a4aa48d617bdce402d.png

 

"I" would have divided it into at least three parts --- the cylinder area, the main house, the platform with fencing.  Doors of course would be separate pieces (in my Sansar days I either left the doors off (in one case having the door on saw horses being "worked on" for repairs as part of the installation storyline )-- or uploaded separately and added as a completely different component. 

 

That doesn't mean My way is the BEST way --- just that it would have been my choice. :D.   

 

 

 

Thank you for the link! I have not watched this one so that's probably why I have no clue haha. I'll definitely give this a watch thanks :)

When you dividing the parts, I'm assuming you mean the flooring and roof? Cos at the moment the actual cylinder part, the walls and the fence are all seperate. If thats the case, then I totally understand where you're coming from. Originally, the cylinder part in terms of the flooring and roof were seperate, but I joined together in blender because i thought it would be logical to merge them as one for the material.

Link to comment
Share on other sites

1 minute ago, Lydia Alberti said:

Thank you for the link! I have not watched this one so that's probably why I have no clue haha. I'll definitely give this a watch thanks :)

When you dividing the parts, I'm assuming you mean the flooring and roof? Cos at the moment the actual cylinder part, the walls and the fence are all seperate. If thats the case, then I totally understand where you're coming from. Originally, the cylinder part in terms of the flooring and roof were seperate, but I joined together in blender because i thought it would be logical to merge them as one for the material.

I think that "How Many Pieces" depends mostly on the person modeling.   So what works better for you.  Also, in case you forgot (as I see I mentioned that in the physics tutorial) you can only have 8 materials per mesh object.  How you work with your materials is of course a choice too. You can have one texture act as one material certainly (only one draw call) but THEN you can't tint or add maps to the various parts of the model.   That doesn't matter so much if you are just making your build for yourself and for today (we do change our minds over time :D) but not as handy if you are selling and your customer might want to tint the house trim another color say.    

Eventually you will work out what is best for you.   

 

My typical house workflow would be to model the walls first, then roof and floor (any order). I typically map, define materials and make textures (Cycle) as I go. I also typically work in MATERIALS mode to show the textures as I work.    If I am lucky the walls, windows, and trims fit on one large texture plane (I bake at 2048)and the roof and base on one. The larger the house the trickier this gets of course.  

Once I have all three parts together with the mapping and things are looking good in render mode, I JOIN the parts and bake. Depending on the model I may only bake the walls and roof together so that I can shine ambient lighting up into the walls and ceiling (easier).  After all parts are baked I will then STILL break the model apart into three or more pieces.   

 

Sure you will have LOTS to think about as you work on this!!!  Have fun. 

Link to comment
Share on other sites

21 hours ago, Lydia Alberti said:

Oooh yes please! If you can give any pointers that would be awesome, as I would love to take them into the next project with a better idea of what to do next time :)

https://www.dropbox.com/s/qy36wwmugs90ik2/physics_model.blend?dl=0

Well, looking at the red marks in the uploader should make the problem very obvious.

bcfbaf6f87.png
90cb177f69.png

"Physics mesh too dense; remove the small, thin triangles (see preview)."

You've done an OK job at keeping most of the building's physics model very simple, but you skipped out on the stairs and apparently some of the floor or outside railings are too thin.

For example, the side wall on your stairs has edges super close together, which will create super thin triangles:
20bfe4b72c.png

It should look more like this:
6c947264b1.png

Edited by Wulfie Reanimator
Link to comment
Share on other sites

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