How To Upload Mesh
From OpenSimulator
(A new page detailing how to avoid problems with mesh in 0.9 and ubODE) |
(→More Information) |
||
(34 intermediate revisions by 4 users not shown) | |||
Line 5: | Line 5: | ||
== How to Upload Mesh == | == How to Upload Mesh == | ||
=== What fields must you fill in on the model upload dialog? === | === What fields must you fill in on the model upload dialog? === | ||
− | These are the values that | + | These are the values that it is recommended that you always fill in. Some are absolutely necessary for physical structures like buildings. |
Since OpenSim 0.9.0 and ubODE many people have had problems with mesh they upload, even with mesh that were uploaded in previous versions. | Since OpenSim 0.9.0 and ubODE many people have had problems with mesh they upload, even with mesh that were uploaded in previous versions. | ||
− | These problems are all based on the Physics Level of Detail | + | These problems are all based on the Physics Level of Detail: pay special attention to that section below. |
− | + | * Model Name: (recommended) | |
− | + | * This model represents... (recommended) | |
− | + | * Level of Detail (highly recommended) | |
− | + | * Physics tab (source of many mesh problems) | |
− | + | ||
All other fields in the Upload Dialog can be ignored | All other fields in the Upload Dialog can be ignored | ||
− | + | ===Model Name:=== | |
− | + | This field is the name the mesh will have in your inventory. Come on! Fill something meaningful in. | |
− | + | ||
− | + | ===This Model represents...=== | |
− | Pick the closest one. I'm not sure this | + | Pick the closest one. I'm not sure this affects anything. Many mesh are used as part of something else so the most common choice is "Building Component". |
− | + | This is not used by OpenSim, but some viewers could in theory use it to select different meshes processing/optimization parameters. | |
+ | |||
+ | This model represents… has only one function "MUT_Unspecified" Specified in llmeshrepository.cpp | ||
===Level of Detail=== | ===Level of Detail=== | ||
This determines what your mesh looks like as you view it from farther and farther away. | This determines what your mesh looks like as you view it from farther and farther away. | ||
− | + | When close to a object we see its detailed forms, while at far distances we just get a idea of its contour. | |
− | + | This allows for a major performance improvement, using the simplest needed mesh for a particular distance to the object. | |
− | + | We can have 4 different meshes for this from HIGH, MEDIUM, LOW and LOWEST LOD meshes. | |
− | + | For better results, a mesh creator should create all this meshes. For simpler cases, viewers have a tool to create them. | |
− | + | You need to verify if they are correct and the transitions are acceptable. | |
− | + | Modern viewers now lets us see them on edit tab, without having to fly all over those view distances. | |
===Physics tab, Step 1 Level of Detail:=== | ===Physics tab, Step 1 Level of Detail:=== | ||
− | View your | + | View your model in the Preview window, it will initially be gray. |
Rotate it (with CTRL-LEFT-MOUSE-DRAG) and zoom it (with SHIFT-LEFT-MOUSE_DRAG) until you can see it at a good angle. | Rotate it (with CTRL-LEFT-MOUSE-DRAG) and zoom it (with SHIFT-LEFT-MOUSE_DRAG) until you can see it at a good angle. | ||
As you select different Physics Level of Detail values, yellow triangles appear on top of your model. | As you select different Physics Level of Detail values, yellow triangles appear on top of your model. | ||
+ | * You can create your own model for physics and select it here | ||
+ | * Or you can select a LOD from the visual part. | ||
+ | * Or you may not select any thing on this tab (leave as "CHOOSE ONE"). | ||
− | + | Note that some visual LOD may not be good for physics, because of different optimization criteria, so you may need to choose HIGH for a proper collision shape. | |
− | + | * If a yellow triangle appears inside a doorway in a building in the preview, you will not be able to walk through that door. | |
− | + | ||
+ | Not selecting anything on physics tab (or leaving it as CHOOSE ONE") is a valid option because current viewers will always upload a crude physics shape that follows the outline of your mesh, with holes filled. | ||
+ | This is the collision shape you will get when setting Physics Shape Type to CONVEX, also the initial default after upload. | ||
+ | This is a valid option if that crude shape is good enough for your needs, or you will only use the mesh with Physics Shape Type set to None, for example on vehicles or other objects that have the collision shape defined by simple and faster colliders like Boxes or true spheres. It is also valid for Avatars since Opensimulator physics engines use a special collider for them, ignoring the mesh. | ||
===Calculate Weights & Fee=== | ===Calculate Weights & Fee=== | ||
Line 45: | Line 52: | ||
This may take a long time, may never finish, or give you errors. What can you do about that? | This may take a long time, may never finish, or give you errors. What can you do about that? | ||
− | + | * If you don't need to walk on your model or walk through the holes, try setting the Physics Level of Detail to LOWEST or CHOOSE ONE (this last one means none) | |
− | + | * Setting the Physics Level of Detail to HIGHEST sometimes allows a model to load successfully when other settings do not. | |
− | + | * If you must have a physics model, try uploading it on another region running BulletSim, ODE, an older version of OpenSim or some combination. Carry the mesh home in your suitcase if necessary. | |
− | + | * Your model may have gaps, tortured quadrangles or too many vertexes. Try simplifying it or cleaning it up with Blender (or your favorite modeling program) and then upload it again. | |
===Upload=== | ===Upload=== | ||
Line 55: | Line 62: | ||
This may take a long time, may never finish, or give you errors. See the suggestions above. | This may take a long time, may never finish, or give you errors. See the suggestions above. | ||
− | + | ==After You Upload A MESH== | |
− | + | ===Rez a copy and check it out=== | |
− | + | * By default on 0.9 a new mesh is rezzed with Physics Shape Type CONVEX | |
− | + | * Depending on what version of OpenSim you have, what physics engine it is using and other parameters, your mesh may rez in a mode that you don't expect. | |
− | + | * Depending on whether your mesh is used as a root or a child prim, it may rez in a mode that you don't expect. | |
− | + | So rez a copy of your mesh, link it to something else if necessary, edit it and look at the Physics Shape Type in the Features tab in the build dialog. | |
− | + | ||
− | + | ===The Physics Shape Type has the following values:=== | |
− | + | * NONE means no collisions, physics may even not know about this prim. Root prims cannot have this type. | |
− | + | * CONVEX HULL means your prim acts like it has been shrink-wrapped with an invisible shield. You cannot walk through holes or most cuts in it. | |
− | + | (only ubOde does this for all prims including sculpt maps and meshes) | |
− | + | * PRIM means your prim collides with the high resolution shape defined by the prim parameters, sculpt map or physics mesh. | |
− | + | ||
− | + | ===Why Do Some Mesh Not Allow Physics Type PRIM?=== | |
− | + | If you uploaded your mesh and did not set the Physics Level of Detail to any value (left it as CHOOSE ONE), viewers will not allowed to set PRIM type in this case: | |
− | + | * BulletSim or ODE physics engines will use MED or HIGH LOD from visual part of the mesh, so you will get collision like PRIM, even if you did not want it and viewers don't show it as a option. If you change Physics Shape Type the resulting collision shape may became unpredictable. | |
− | + | * In OpenSim 0.9 with ubODE physics you will get the options you see in viewer Edit->features->Physics Shape Type. | |
− | + | ||
+ | If your mesh was loaded in an older version of OpenSim, did not have a Physics Level of Detail and has worked fine for ages, when you update to 0.9 and want to use ubODE then YOU MAY NO LONGER BE ABLE TO WALK THROUGH HOLES IN THE MESH. | ||
+ | Those models need to be uploaded again defining a shape on the upload Physics tab. If you no longer have the DAE file or you got the mesh from some unknown source but still have mod rights, you can add several invisible prims to make up a physics shape. Link all with one of those as root, and set the mesh physics shape type to none. | ||
+ | The use of ubOde is of course just a option. You can just keep using Bullet at least until the time where will need to change it also. | ||
+ | |||
+ | ===See the uploaded physics mesh=== | ||
+ | Some viewers like Firestorm allow us to see the physics meshes of objects in world | ||
+ | ( Menu Developer -> Render Metadata -> Physics Shapes ) | ||
+ | so you can use that to check if the upload was in fact correct, viewers do odd things occasionally.. | ||
+ | you can select Physics shape Type Prim (if present) and Convex and observe | ||
+ | ( note this is very heavy and viewer may crash if there are many prims in view ) | ||
+ | Some more recent viewers now allow to the see the physics shape of a simple prim. Firestorm has this option on the edit dialog, tab Features, click on the little eye near Physics Shape Type to show or hide it. | ||
+ | === More Information === | ||
+ | [https://beqsother.blogspot.com/ Beq's techy blog] Firestorm developer Beq Janus blog, with some technical information about assets like mesh, textures, etc. | ||
[[Category:Users]] | [[Category:Users]] | ||
[[Category:Getting Started]] | [[Category:Getting Started]] |
Latest revision as of 14:56, 30 October 2021
[edit] How to Upload Mesh
[edit] What fields must you fill in on the model upload dialog?
These are the values that it is recommended that you always fill in. Some are absolutely necessary for physical structures like buildings. Since OpenSim 0.9.0 and ubODE many people have had problems with mesh they upload, even with mesh that were uploaded in previous versions. These problems are all based on the Physics Level of Detail: pay special attention to that section below.
- Model Name: (recommended)
- This model represents... (recommended)
- Level of Detail (highly recommended)
- Physics tab (source of many mesh problems)
All other fields in the Upload Dialog can be ignored
[edit] Model Name:
This field is the name the mesh will have in your inventory. Come on! Fill something meaningful in.
[edit] This Model represents...
Pick the closest one. I'm not sure this affects anything. Many mesh are used as part of something else so the most common choice is "Building Component". This is not used by OpenSim, but some viewers could in theory use it to select different meshes processing/optimization parameters.
This model represents… has only one function "MUT_Unspecified" Specified in llmeshrepository.cpp
[edit] Level of Detail
This determines what your mesh looks like as you view it from farther and farther away. When close to a object we see its detailed forms, while at far distances we just get a idea of its contour. This allows for a major performance improvement, using the simplest needed mesh for a particular distance to the object. We can have 4 different meshes for this from HIGH, MEDIUM, LOW and LOWEST LOD meshes. For better results, a mesh creator should create all this meshes. For simpler cases, viewers have a tool to create them. You need to verify if they are correct and the transitions are acceptable. Modern viewers now lets us see them on edit tab, without having to fly all over those view distances.
[edit] Physics tab, Step 1 Level of Detail:
View your model in the Preview window, it will initially be gray. Rotate it (with CTRL-LEFT-MOUSE-DRAG) and zoom it (with SHIFT-LEFT-MOUSE_DRAG) until you can see it at a good angle. As you select different Physics Level of Detail values, yellow triangles appear on top of your model.
- You can create your own model for physics and select it here
- Or you can select a LOD from the visual part.
- Or you may not select any thing on this tab (leave as "CHOOSE ONE").
Note that some visual LOD may not be good for physics, because of different optimization criteria, so you may need to choose HIGH for a proper collision shape.
- If a yellow triangle appears inside a doorway in a building in the preview, you will not be able to walk through that door.
Not selecting anything on physics tab (or leaving it as CHOOSE ONE") is a valid option because current viewers will always upload a crude physics shape that follows the outline of your mesh, with holes filled. This is the collision shape you will get when setting Physics Shape Type to CONVEX, also the initial default after upload. This is a valid option if that crude shape is good enough for your needs, or you will only use the mesh with Physics Shape Type set to None, for example on vehicles or other objects that have the collision shape defined by simple and faster colliders like Boxes or true spheres. It is also valid for Avatars since Opensimulator physics engines use a special collider for them, ignoring the mesh.
[edit] Calculate Weights & Fee
Press this button after setting the four fields above. This may take a long time, may never finish, or give you errors. What can you do about that?
- If you don't need to walk on your model or walk through the holes, try setting the Physics Level of Detail to LOWEST or CHOOSE ONE (this last one means none)
- Setting the Physics Level of Detail to HIGHEST sometimes allows a model to load successfully when other settings do not.
- If you must have a physics model, try uploading it on another region running BulletSim, ODE, an older version of OpenSim or some combination. Carry the mesh home in your suitcase if necessary.
- Your model may have gaps, tortured quadrangles or too many vertexes. Try simplifying it or cleaning it up with Blender (or your favorite modeling program) and then upload it again.
[edit] Upload
The Calculate Weights & Fee button will change to Upload, press that. Your mesh will be uploaded and appear in your Objects folder in inventory. This may take a long time, may never finish, or give you errors. See the suggestions above.
[edit] After You Upload A MESH
[edit] Rez a copy and check it out
- By default on 0.9 a new mesh is rezzed with Physics Shape Type CONVEX
- Depending on what version of OpenSim you have, what physics engine it is using and other parameters, your mesh may rez in a mode that you don't expect.
- Depending on whether your mesh is used as a root or a child prim, it may rez in a mode that you don't expect.
So rez a copy of your mesh, link it to something else if necessary, edit it and look at the Physics Shape Type in the Features tab in the build dialog.
[edit] The Physics Shape Type has the following values:
- NONE means no collisions, physics may even not know about this prim. Root prims cannot have this type.
- CONVEX HULL means your prim acts like it has been shrink-wrapped with an invisible shield. You cannot walk through holes or most cuts in it.
(only ubOde does this for all prims including sculpt maps and meshes)
- PRIM means your prim collides with the high resolution shape defined by the prim parameters, sculpt map or physics mesh.
[edit] Why Do Some Mesh Not Allow Physics Type PRIM?
If you uploaded your mesh and did not set the Physics Level of Detail to any value (left it as CHOOSE ONE), viewers will not allowed to set PRIM type in this case:
- BulletSim or ODE physics engines will use MED or HIGH LOD from visual part of the mesh, so you will get collision like PRIM, even if you did not want it and viewers don't show it as a option. If you change Physics Shape Type the resulting collision shape may became unpredictable.
- In OpenSim 0.9 with ubODE physics you will get the options you see in viewer Edit->features->Physics Shape Type.
If your mesh was loaded in an older version of OpenSim, did not have a Physics Level of Detail and has worked fine for ages, when you update to 0.9 and want to use ubODE then YOU MAY NO LONGER BE ABLE TO WALK THROUGH HOLES IN THE MESH. Those models need to be uploaded again defining a shape on the upload Physics tab. If you no longer have the DAE file or you got the mesh from some unknown source but still have mod rights, you can add several invisible prims to make up a physics shape. Link all with one of those as root, and set the mesh physics shape type to none. The use of ubOde is of course just a option. You can just keep using Bullet at least until the time where will need to change it also.
[edit] See the uploaded physics mesh
Some viewers like Firestorm allow us to see the physics meshes of objects in world ( Menu Developer -> Render Metadata -> Physics Shapes ) so you can use that to check if the upload was in fact correct, viewers do odd things occasionally.. you can select Physics shape Type Prim (if present) and Convex and observe ( note this is very heavy and viewer may crash if there are many prims in view ) Some more recent viewers now allow to the see the physics shape of a simple prim. Firestorm has this option on the edit dialog, tab Features, click on the little eye near Physics Shape Type to show or hide it.
[edit] More Information
Beq's techy blog Firestorm developer Beq Janus blog, with some technical information about assets like mesh, textures, etc.