Physics
- Gwyddion Oakley
- Posts: 13
- Joined: Wed Feb 14, 2018 3:12 pm
- Has thanked: 21 times
- Been thanked: 41 times
Physics
Thanks to Ozwell Wayfarer for the brilliant article on general uploading.
I am doing some testing specifically on physics and the different engines so wanted to share the results here. I can only share my own techniques, I am sure there are others, better than mine, but I am self taught, by trial and error, so this is the way I have found works. I will make a few posts as I test the uploads, but firstly, here is a post on the original model. I am using this bridge model, as it is pretty simple and cheap to upload, but also has very specific physics. An avatar needs to walk over the bridge, without falling through, also under the bridge without it being blocked, and finally the railings need to stop the avatar falling off the sides.
1. Modelling in Blender
Firstly I made the model in blender, I wont go into all the techniques for that, as there are hundreds of tutorials on modelling on youtube and elsewhere. But basically I tried to keep verticies low, but also give enough to create the soft moulded shape of the wood, smoothed by years of use, and the smoothed edges of the stone.
I added a single light source where the sun might be.
Now for the physics. It is important I have found, to keep the physics mesh and the model mesh in the same spot,in blender space, there are workarounds if you can't, but they are messy, so best option, build two meshes one on top of the other, the same size.
This image shows just the physics mesh shape, and you can see it is super low poly, only using just enough mesh to describe the shape of the physics.
Add texture faces, and bake as you would normally do, on the bridge model. The physics model does not need a texture face.
So to uploading.
PLEASE NOTE, AS THIS SEEMS TO BE IMPORTANT, I AM UPLOADING THIS MESH ON A SIM WITH ubODE PHYSICS ENABLED.
Firstly select each object the bridge mesh first, and save it as a .dae file. Then select the physics mesh and save that also as a .dae file. I call them 'Bridge' for the first mesh, which has all the detail and 'BridgePHY" for the physics mesh.
Uploading the bridge mesh, will look like this in the viewer...
You can select whatever upload parameters you usually use here.
Then hit the physics tab...
When you see the blue outline, this is your physics mesh, you can rotate the view, to check it is lined up properly with the grey mesh.
Then upload to your world.
I have used the ubODE physics engine on my sim, and uploaded with the above directions. And I have a properly working bridge, that can be walked on, or under, and has solid railings.
Now I will test the other engines, by changing them on my sim, and let you know what happens in the next post.
I am doing some testing specifically on physics and the different engines so wanted to share the results here. I can only share my own techniques, I am sure there are others, better than mine, but I am self taught, by trial and error, so this is the way I have found works. I will make a few posts as I test the uploads, but firstly, here is a post on the original model. I am using this bridge model, as it is pretty simple and cheap to upload, but also has very specific physics. An avatar needs to walk over the bridge, without falling through, also under the bridge without it being blocked, and finally the railings need to stop the avatar falling off the sides.
1. Modelling in Blender
Firstly I made the model in blender, I wont go into all the techniques for that, as there are hundreds of tutorials on modelling on youtube and elsewhere. But basically I tried to keep verticies low, but also give enough to create the soft moulded shape of the wood, smoothed by years of use, and the smoothed edges of the stone.
I added a single light source where the sun might be.
Now for the physics. It is important I have found, to keep the physics mesh and the model mesh in the same spot,in blender space, there are workarounds if you can't, but they are messy, so best option, build two meshes one on top of the other, the same size.
This image shows just the physics mesh shape, and you can see it is super low poly, only using just enough mesh to describe the shape of the physics.
Add texture faces, and bake as you would normally do, on the bridge model. The physics model does not need a texture face.
So to uploading.
PLEASE NOTE, AS THIS SEEMS TO BE IMPORTANT, I AM UPLOADING THIS MESH ON A SIM WITH ubODE PHYSICS ENABLED.
Firstly select each object the bridge mesh first, and save it as a .dae file. Then select the physics mesh and save that also as a .dae file. I call them 'Bridge' for the first mesh, which has all the detail and 'BridgePHY" for the physics mesh.
Uploading the bridge mesh, will look like this in the viewer...
You can select whatever upload parameters you usually use here.
Then hit the physics tab...
When you see the blue outline, this is your physics mesh, you can rotate the view, to check it is lined up properly with the grey mesh.
Then upload to your world.
I have used the ubODE physics engine on my sim, and uploaded with the above directions. And I have a properly working bridge, that can be walked on, or under, and has solid railings.
Now I will test the other engines, by changing them on my sim, and let you know what happens in the next post.
Last edited by Gwyddion Oakley on Thu Feb 04, 2021 9:56 pm, edited 1 time in total.
- These users thanked the author Gwyddion Oakley for the post (total 6):
- Ilan Tochner • Shandon Loring • Alexina Proctor • Snoots Dwagon • Dot Matrix • Chris Namaste
- Gwyddion Oakley
- Posts: 13
- Joined: Wed Feb 14, 2018 3:12 pm
- Has thanked: 21 times
- Been thanked: 41 times
Re: Physics
Ok.. so I have now logged off and gone into the world settings in Kitely.
And I have selected ODE physics.
The world took a few moments to change, and I logged back in.
My bridge seems just as it was before, I can walk under it fine, and also over it, and the railings are still preventing me from falling off the edges.
So now for the third option..
Switching over to bullet, and logging in again, I find my bridge still works!
There is a little bit of choppy camera issue as I walk under the bridge but all the physics are as they should be.
I am finally going to test this again with a doorway, as they are notorious for being an issue.
And I have selected ODE physics.
The world took a few moments to change, and I logged back in.
My bridge seems just as it was before, I can walk under it fine, and also over it, and the railings are still preventing me from falling off the edges.
So now for the third option..
Switching over to bullet, and logging in again, I find my bridge still works!
There is a little bit of choppy camera issue as I walk under the bridge but all the physics are as they should be.
I am finally going to test this again with a doorway, as they are notorious for being an issue.
- These users thanked the author Gwyddion Oakley for the post (total 3):
- Alexina Proctor • Dot Matrix • Chris Namaste
- Gwyddion Oakley
- Posts: 13
- Joined: Wed Feb 14, 2018 3:12 pm
- Has thanked: 21 times
- Been thanked: 41 times
Re: Physics
Doorway
Ok so I am using a bit of mesh I often put into my builds, an arched doorway, slightly messy modelling heh.
And I have changed the sim back to ubODE physics.
The door mesh
The very simple physics mesh
And both together, to make sure they fit correctly
And upload to .dae files for both objects, one at a time.
Following steps for bridge, exactly as before.
And here it is in the uploader, all looking as it should be.
And here we are inworld, walking through the door just fine, but it is not possible to walk through the walls on either side.
So I will switch the physics engines on the sim again, as before and see what happens...
On ODE now, and I can still walk through the door, but not through the walls, all seems very smooth and fine.
Now switched to Bullet, and again, the camera does bounce a bit when I go through the door, but all is fine, I can walk through the door, but not the walls.
In summary, using this technique, and ubODE physics on the sim to upload, all physics engines are completable with the mesh that is uploaded.
Ok so I am using a bit of mesh I often put into my builds, an arched doorway, slightly messy modelling heh.
And I have changed the sim back to ubODE physics.
The door mesh
The very simple physics mesh
And both together, to make sure they fit correctly
And upload to .dae files for both objects, one at a time.
Following steps for bridge, exactly as before.
And here it is in the uploader, all looking as it should be.
And here we are inworld, walking through the door just fine, but it is not possible to walk through the walls on either side.
So I will switch the physics engines on the sim again, as before and see what happens...
On ODE now, and I can still walk through the door, but not through the walls, all seems very smooth and fine.
Now switched to Bullet, and again, the camera does bounce a bit when I go through the door, but all is fine, I can walk through the door, but not the walls.
In summary, using this technique, and ubODE physics on the sim to upload, all physics engines are completable with the mesh that is uploaded.
- These users thanked the author Gwyddion Oakley for the post (total 5):
- Ilan Tochner • Alexina Proctor • Dot Matrix • Graham Mills • Chris Namaste
- Shandon Loring
- Posts: 1348
- Joined: Sat Oct 26, 2013 3:25 am
- Has thanked: 982 times
- Been thanked: 1588 times
- Contact:
Re: Physics
Great Info Gwyddion!
Thank you for posting!
Thank you for posting!
- These users thanked the author Shandon Loring for the post:
- Gwyddion Oakley
- Dot Matrix
- Posts: 1626
- Joined: Sun Jul 28, 2013 3:26 am
- Has thanked: 1209 times
- Been thanked: 2326 times
Re: Physics
Excellent work. Thank you so much for testing this systematically and illustrating all the steps we need to follow.
- These users thanked the author Dot Matrix for the post:
- Gwyddion Oakley
- Tess Juel
- Posts: 360
- Joined: Sun Sep 11, 2016 4:24 pm
- Has thanked: 260 times
- Been thanked: 470 times
Re: Physics
An even better solution would be something like this (if llinks to Google Photos work here):Gwyddion Oakley wrote: ↑Thu Feb 04, 2021 10:33 pmIn summary, using this technique, and ubODE physics on the sim to upload, all physics engines are completable with the mesh that is uploaded.
Or with the physics lifted up to show it more clearly:
You don't really need the bit above the doorway since nobody's likely to ever bump into that part of the wall anyway and there's point in sloping the edges of the physics planes since the physics isn't so exact it makes any difference. You do want to have separate physics planes on either side of the wall though, if only to define the wall thickness.
I see you've already read my How to make good mesh physics thread here ( viewtopic.php?p=28231 for those who haven't seen it yet). That was going to be a looong explanation but I ran out of things to write. Good physics for opensim really is that simple, at least when it comes to static objects.
- These users thanked the author Tess Juel for the post (total 5):
- Ilan Tochner • Graham Mills • Ada Radius • Chris Namaste • Gwyddion Oakley
- Snoots Dwagon
- Posts: 422
- Joined: Mon Jul 30, 2018 9:45 pm
- Has thanked: 442 times
- Been thanked: 779 times
Re: Physics
Tess, I've found that for many people Google Photos doesn't work here (for some unknown reason). Most just see a box with a large, grey negative sign in the middle. I don't have a solution. If the photo isn't on Kitely Market, I've not figured out a way to upload one here. I left a post asking people how to do so reliably, but didn't get an answer. Seems the photo cloud companies don't like people directly accessing the photos there. My opinion of that: MY PHOTOS ya twits. But they don't listen, at all.
If the photo is on Kitely Market though (or a very accessible online photo), is just a matter of Viewing the photo and copying the URL and posting here as an IMG. However if that photo ever changes address or goes offline, it will stop working here. : )
It is possible to directly upload a photo here, but the size is very limited as well as the number of photos in one post (I have no idea what the specific stats are on that).
~~~~~~~
I'm a dwagon in real life too. (Ask my sister, who totally agrees.)
~~~~~~~
I'm a dwagon in real life too. (Ask my sister, who totally agrees.)
~~~~~~~
- Tess Juel
- Posts: 360
- Joined: Sun Sep 11, 2016 4:24 pm
- Has thanked: 260 times
- Been thanked: 470 times
Re: Physics
Awww. Any solutions?Snoots Dwagon wrote: ↑Sat Feb 06, 2021 5:19 pmTess, I've found that for many people Google Photos doesn't work here (for some unknown reason).
I can work with that most of the time but how do I do it?Snoots Dwagon wrote: ↑Sat Feb 06, 2021 5:19 pmIt is possible to directly upload a photo here, but the size is very limited as well as the number of photos in one post (I have no idea what the specific stats are on that).
- Snoots Dwagon
- Posts: 422
- Joined: Mon Jul 30, 2018 9:45 pm
- Has thanked: 442 times
- Been thanked: 779 times
Re: Physics
Tess Juel wrote: ↑Sun Feb 07, 2021 11:26 amAwww. Any solutions?Snoots Dwagon wrote: ↑Sat Feb 06, 2021 5:19 pmTess, I've found that for many people Google Photos doesn't work here (for some unknown reason).
I can work with that most of the time but how do I do it?Snoots Dwagon wrote: ↑Sat Feb 06, 2021 5:19 pmIt is possible to directly upload a photo here, but the size is very limited as well as the number of photos in one post (I have no idea what the specific stats are on that).
Those are very good questions. I'm trying to find the answers. Anyone else have solutions to this?
~~~~~~~
I'm a dwagon in real life too. (Ask my sister, who totally agrees.)
~~~~~~~
I'm a dwagon in real life too. (Ask my sister, who totally agrees.)
~~~~~~~
- Gwyddion Oakley
- Posts: 13
- Joined: Wed Feb 14, 2018 3:12 pm
- Has thanked: 21 times
- Been thanked: 41 times
Re: Physics
Tess Juel, excellent example, thanks, however my model has 9 verts, and yours 16, so technically I win haha.
But I get your point about the wall thickness. If you want to be accurate with the physics then two walls are needed. But once your avi bumps into a wall, the camera angle is too close to be able to see if you are in the wall, or against it. And many of the AOs these days have us wandering through mesh or off the edge of cliffs, while we stand on one spot. So I think it is not needed to be that specific.
The only place I would say perfect physics is an issue is in floors, as it really looks bad if an avi has their feet planted in the ground.
But either way, yours or mine, they are both low poly enough to be great physics models that work well, and do not add unnecessary information for the engines to process. And what you have shown here, is that there are many ways to do it right, we just need to avoid anything with too much information.
But I get your point about the wall thickness. If you want to be accurate with the physics then two walls are needed. But once your avi bumps into a wall, the camera angle is too close to be able to see if you are in the wall, or against it. And many of the AOs these days have us wandering through mesh or off the edge of cliffs, while we stand on one spot. So I think it is not needed to be that specific.
The only place I would say perfect physics is an issue is in floors, as it really looks bad if an avi has their feet planted in the ground.
But either way, yours or mine, they are both low poly enough to be great physics models that work well, and do not add unnecessary information for the engines to process. And what you have shown here, is that there are many ways to do it right, we just need to avoid anything with too much information.