Mesh Import test

From Second Life Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


NOTE: This test supports the new features of the Project Importer viewer currently (March 2015) available for testing at Linden_Lab_Official:Alternate_Viewers. The old test can be found at [1].

Purpose

Test all functionality of the Mesh Import window. (See Mesh for Mesh feature details)

Test Plan

Uploading Model Basic Functions

  • Open the inventory, click the + menu button and Upload > "Model."
    • Alternatively, use the build menu (Build > Upload > Model)
  • Verify a File Dialog Box opens
  • On Windows, 3D scene/UI should continue to update while file dialog box is open.
  • Pick a .DAE file from your computer, or try duck.dae from https://jira.secondlife.com/secure/attachment/82907/duck.dae
  • Verify the Import Model window appears.
  • Verify the Level of Detail tab shows information about each LOD (High, Medium, Low, Lowest) including # of triangles and vertices in each LOD. These are generated automatically.
  • The model should be presented in a mini window and "spinnable" using the same mouse and keyboard commands as "spinning" around objects in-world.
  • Verify Import Model window does not block you from accessing Second Life (chat, inventory, etc).
  • Verify the Cancel button and X close button in upper right hand corner of Import Model window closes the window without error.

Naming a Model

  • Enter a name for your model
  • Confirm that this field only allows alpha numeric characters
  • Confirm name is confined to 64 characters
  • Confirm Unicode characters cannot be entered or appropriate error is given as inventory items cannot contain Unicode characters. eg. mélange visait à recréer entraîné façon 本項では主にオペラ作品について扱う
  • Confirm that the name entered is given to the object uploaded to the Objects folder
  • Confirm that leaving the name field blank defaults to one of the names in the mesh file be uploaded

Preview Window

  • Verify the High LOD is selected by default in the Preview Window
  • The model should be presented in a mini window and "spinnable" using the same mouse and keyboard commands as "spinning" around objects in-world.
  • Verify you can zoom in/out on the model and rotate it right and left with mouse drag.
  • Verify you can rotate the model up and down with ctrl + mouse drag.
  • Verify you can pan the model with ctrl + shift + mouse drag.
  • Verify that selecting the different Levels of Detail from the Preview Drop Down box shows the selected Level of Detail in the preview window (High, Medium, Low, Lowest)

Show Edges

  • Use duck.dae
  • Enable Show Edges and verify that the Preview shows the edges of the triangles.
  • Disable Show Edges and verify that the triangles edges are no longer highlighted in the Preview window.

Show Physics

  • Use duck.dae, click the Physics tab and set "Step 1: Level of Detail" to Low.
  • Shows selected physics shape if available

Display Textures

Show Skin Weight

Show Joint Positions

Level of Detail Functions

  • Test with duck.dae

Triangle Limit

  • Note the # of triangles shown for the High LOD
  • Set the Preview view to Low
  • Enter a value for Low Triangle Limit that exceeds the # of triangles for the Medium LOD
  • Confirm a message indicating that the Level of detail has too many vertices. (There is no other consequence besides this message. The object will upload fine.)
  • Set the Preview view to Medium
  • Set the Medium Triangle Limit to a lower value and hit enter
  • Verify this updates the model in the preview window.
  • Verify the model's detail has decreased in the preview window
  • Confirm you can set a variety of different values from the low to high and decimations are generated with no viewer errors
  • Note: The number of triangles entered in the triangle limit field may not be the # of triangles that end up in the decimated LOD. When you enter a triangle limit here, that is the value that is fed into the decimator with all the other parameters selected, the output # of triangles is the result of that decimation. This will change from model to model.

Error Threshold

  • Set the Preview view to Medium
  • Next to Medium LOD, select Error Threshold from the Triangle Limit Dropdown
  • Confirm entry in the Error Threshold field is limited to a range from 0.000 to 100.000. (Note: most of the change happens between 0.0 and 2.5)
  • Confirm that a value of 0.000 for Error Threshold shows the maximum # of triangles where 100 shows the smallest (2 triangles 3 vertices per object)
  • Confirm with some values between 0 and 100 for Error Threshold that the model becomes less detailed with higher values.

Load From File

Save State

  • Confirm that changing between LOD states the values for each LOD are preserved and are not overwritten (values entered for High LOD are saved when modifying the Medium LOD etc..)

Generate Normals & Crease Angle

The Crease Angle adjusts the smoothness of the model.

  • Click the Generate Normals checkbox.
  • Change the Crease Angle to 0 or 1.
  • Hit Enter in the text entry box
  • Verify nearly every polygon on the face should be apparent. In this case there is no smoothing - the normal of the face is used at all vertices producing a faceted look with a crease or hard edge between faces.
  • Change the Crease Angle to 180
  • Verify that the model now has smooth shading, no creases.
  • Confirm the bounds for entry are 0.000 to 180.00. Entering a value higher or lower will default back to boundary. Ex. entering 5000 will default to 180.00. Entering -20 will default to 0.000.
  • Confirm non-numeric characters cannot be entered for crease angle.
  • Confirm entering a blank value uses the previous value entered.
  • Confirm setting values for this field works for large and small models

Physics Decomposition

  • Select the Physics Tab
  • Confirm the Analyze and Simplify steps are disabled by default

Step 1 - Level of Detail

  • Select the Use Level of Detail Drop Down box and Select Low ( Repeat for each LOD (Lowest, Low, Medium, High) and for Selecting a File for the physics)
  • Confirm a physics layer is shown in the Preview Window and the Number of Triangles is shown at the bottom of that panel
  • Confirm Step 2: Analyze section is now active

Step 2 - Analyze

  • Upload a model such as duck.dae
  • Select the Physics tab in the upload model dialog and select Step 1: Level of Detail > Medium
  • Confirm that Method: Surface, Quality: Normal, Smooth: 0.000, and Close Holes: Unchecked are default values
  • Click Analyze Button
  • Confirm the Analyze button changes to Cancel and remains that way until Analyze has finished.
  • Confirm that a colored pattern is now shown in the Preview Model
  • Confirm the # of vertices and hulls is now listed at the bottom of the panel
  • Confirm Step 3: Simplify is now active
Analysis Method
  • Confirm there are 3 different methods listed in the Method drop down under analysis: Surface, Solid, and Wrap. In general the surface method works best on curved or organic shapes, the solid method works well on buildings with lots of sharp angles and a clear inside/outside. The wrap method is good for producing a cheap, rough decomposition for things like trees.
  • Each analysis method will produce different results depending on the type and content of model and the desired method selected will vary from model to model and user to user depending on the use. No single setting will work the best for all models. Duck.dae is a good model to demonstrate how the surface method is preferred for that type of model - generating the best representation. A tree model is good representation of how wrap is the preferred method.
  • In general the solid analysis method is a slower process.
  • Confirm that selecting the different analysis methods allows analysis to be completed on models with multiple meshes and that the decomposition occurs on all meshes in the model. (eg. https://jira.secondlife.com/secure/attachment/82976/double_duck.dae)
  • Confirm that selecting the different analysis methods allows analysis to be completed without error on models of varying sizes and complexity. (as time allows)
  • Run the following tests on duck.dae to confirm expected results on a specified model
  • From the 'Method drop down menu' select Surface and from the Quality drop down menu select Preview
  • Click Analyze
  • Confirm the analysis completes (Analyze button switches to a Cancel button while analysis is ongoing - selecting the cancel button should stop the analysis)
  • Surface decomposition starts by treating each triangle as a 2D hull and then combining them. Move the Preview Spread slider a bit so you can see the decomposition in the preview window. Confirm that you see a collection of 2D hulls as in screenshot below

SurfaceUU.png

  • From the 'Method drop down menu' select Solid and from the Quality drop down menu select Preview
  • Click Analyze
  • Confirm the analysis completes (Analyze button switches to a Cancel button while analysis is ongoing - selecting the cancel button should stop the analysis)
  • Solid decomposition treats the shape as a hull with volume and then combining them. Move the Preview Spread slider a bit so you can see the decomposition in the preview window. Confirm see a collection of 3D hulls with volume as in the screenshot below.

SolidUU.png

  • From the 'Method drop down menu' select Wrap and from the Quality drop down menu select Preview
  • Click Analyze
  • Confirm the analysis completes (Analyze button switches to a Cancel button while analysis is ongoing - selecting the cancel button should stop the analysis)
  • Wrap decomposition creates one hull for the whole mesh and then splits it repeatedly until a max hull count is reached.. Move the Preview Spread slider a bit so you can see the decomposition in the preview window. Confirm see a collection of 3D hulls with volume as in the screenshot below.

WrapUU.png

Quality drop down menu
  • Confirm there are 3 options in the Quality drop down menu: Preview, Normal, High
  • These values relate to how much combining and overlap reduction is performed at the decomposition stage. Preview will do minimal work attempting to merge the initial hulls, high will do the most work. A typical workflow would be to do a preview run to ensure you're using a good decomposition method, smoothing value, and that holes are getting closed. Then set the quality to High and run again to get the best output to use in the simplification process.
  • Use a model such as duck.dae and run analysis with Preview quality selected and note the number of Hulls
  • Change the quality to Normal and run analysis again. Confirm the number of hulls is less than the Preview quality
  • Change the quality to High and run analysis again. Confirm the number of hulls is less than Normal quality
Smooth (values from 0 to 10)
  • Confirm the allowed values for Smooth are 0 to 10.
  • Smooth value sets the tolerance when the utility tries to merge coplanar triangles. It refers to the angle between adjacent triangles for which merging is permitted. A value of 1 allows some angle between triangles, resulting in gently curving surfaces being flattened.
  • Smooth 0 does no additional smoothing. If smooth 0 is used the first Analysis, the results will look the same as Smooth 10.
Close Holes (Slow)
  • Close holes attempts to turn an open mesh into a closed one.
  • Download model that has holes in it such as: https://jira.secondlife.com/secure/attachment/82977/wholey%20sphere.dae
  • Load the model into the Model import window
  • Adjust the view in the preview window so you can see the holes in the sphere on the far right
  • Select the Physics tab and use the High LOD
  • Run an Surface analysis in preview quality with with Close holes unchecked
  • Observe you can see the holes present (see screenshot below):

Holes3.png

  • Click on Close Holes and run the analysis again
  • Confirm you can now see the hole has been closed in the physics shape (see screenshot below)

Holesclosed3.png

  • You can also use the Preview Spread slider to expand the hulls to confirm the hole is filled.
  • Confirm with a variety of models that use the Close Holes option checked and unchecked does not cause viewer errors and outputs physics shapes.

Step 3 - Simplify

  • Select to import a model such as duck.dae and complete the analysis step as outlined above
Method
  • Under Simplify select Retain % from the Method drop down menu
  • Confirm the Range for Retain is 0 to 100 (this is the percentage of hulls to maintain in the physics LOD)
  • Select a value of 0 for the Retain % and confirm this simplifies to 1 hull per mesh in the model (for duck.dae that would be 1 hull)
  • Select a value of 100 for the Regain % and confirm this retains all the hulls from the Analysis step
  • Select a value of 50 and confirm that this retains about 50% of the hulls from the Analysis step
  • Select Detail from the Method drop down
  • Confirm the Detail Scale range is from 0.000 to 1.000 (Detail Scale is currently in meters, meaning that most models will have values very near 0 in order to preserve detail. Scale may need to be changed to get better representation for models). The duck will simplify to one hull.
  • Select Better Detail from the Method drop down
  • Confirm the Detail Scale range is from 0.000 to 1.000 (Detail Scale is currently in meters, meaning that most models will have values very near 0 in order to preserve detail. Scale may need to be changed to get better representation for models). The duck will simplify to one hull.


# of Passes
  • Confirm the # of Passes range is 0 to 10 in increments of 1.
  • Affects of # of passes may be difficult to see in preview window, but with several models if you explode the decomposition you should see a trend toward fewer overlaps and a cleaner decomposition by increasing the number of passes

Preview Spread

  • After decomposing a model, move the Preview Spread slider.
  • Verify the decomposed pieces of the model move away from each other as the Preview Spread slider is moved to the right.

Upload

  • When the model is uploaded rez the mesh inworld. Confirm that by default the Physics shape is set to convex hull. Using Develop > Render Metadata > Physics Shape, confirm a single convex hull is shown for the mesh uploaded. Change the Physics shape to Prim in the Edit Tools and confirm that the Physics shape decomposition created during the mesh import process is shown. Best way to confirm this is to use the option to select a physics shape from a file in the import tool, and use a mesh object of a completely different shape for the physics shape. This will make this very evident when that shape is being used.

Multiple Decompositions

  • Confirm that if analysis and simplification is done on the Low LOD and then changed to the Lowest LOD to analyze and simplify you can switch between LODs in the physics tab and the decompositions are saved

Multiple Physics Meshes

  • Select a Model that has multiple layers/meshes like double_duck.dae
  • Open the Upload Model dialog and select the physics tab
  • Select a LOD to use
  • Select the Analyze option and confirm that all meshes are decomposed in the model
  • Select the Simplify option and confirm that all meshes are simplified in the model

No Physics Shape Selected

  • Confirm that if no physics shape is selected that the physics shape shown in world in a single convex hull

Select Physics Shape with No Decomposition

  • Confirm that if you select to use a Level of Detail but upload the model without performing analysis or simplification that once uploaded the sim will use the physics shape mesh for collisions, but if you make the object physical, a single convex hull will be used for the physics shape.

Select Physics Shape with no Simplification

  • Confirm that if you select to use a Level of Detail and Select the Analyze function but do not Simplify always results in a physics shape that is more expensive than the base mesh. (ie. duck.dae, Step 1: Level of Detail = Lowest, Step 2: Analyze = Surface, High, Max and then clicking Calculate weights & fees is going to generate more hulls and thus be more expensive that if you continue to the next step and Simplify)

Upload options

  • Confirm that options for Scale and including Textures, Skin Weight, and Joint Positions are available

Scale

  • Confirm scaling model up or down works as expected changing costs and using scale inworld once imported

Textures

Skin Weight

  • Confirm this option is only enabled when available

Joint Positions

  • Confirm this option is only enabled when available

Calculate weights & fee

  • Verify the Import window lists the Upload fee and Land impact.

Upload button

  • Click the Upload button.
  • Verify at least one mesh shape and one object is uploaded to your inventory.
  • Verify the object has the description you entered earlier.

Upload a rigged object

  • Download https://jira.secondlife.com/secure/attachment/82969/simplebot.dae
  • Select the model for upload
  • Click the Upload options tab in the Upload Model window.
  • Check Include skin weight and Include joint positions
  • Upload the mesh.
  • Wear the mesh.
  • Hide your avatar model by wearing Inventory Library/Body Parts/Alpha Masks/Invisible Avatar
  • Verify the mesh is the size of your Avatar.
  • Verify the mesh animates when you walk around.

Upload a bad object

Models with more than 8 unique faces can be imported

  • Download files for TestHall from https://jira.secondlife.com/secure/attachment/84128/TestHall_models_new_2.zip and https://jira.secondlife.com/secure/attachment/82954/TestHall_textures.zip
  • Unzip the files into one folder.
  • In the viewer choose Build > Upload > Model...
  • Select the TestHall_MESH.dae file
  • In the Medium Level of Detail, switch Generate to Load from File.
  • Click Browse… and select the TestHall_LOD2.dae file
  • Click the Physics tab
  • In Step 1: Level of Detail, select From file in the menu
  • Click Browse… and select the TestHall_PHYS.dae file
  • Click the Upload options tab
  • Check the Include textures checkbox.
  • Click the Calculate weights & fee button
  • Click the Upload button
  • Rez the object.
  • Verify the textures match the following screenshot.

TestHall1.png

  • Edit the object, click the Features tab of the edit tool and change Physics Shape Type to Prim. This will allow you to walk through some parts of the model if you scale it up.
  • Scale up the model as much as possible.
  • Verify you can walk through the wings shown in the following screenshot.

Walk through.jpg

Name based matching

The viewer uses Name Based Matching to match objects from different LODs in the imported model files. The viewer looks for objects in your Mesh files ending with _LOD2, _LOD1, _LOD0, or _PHYS, and tries to match those object to Medium LOD, Low LOD, Lowest LOD and Physics respectively. If an object doesn't end in one of those, it will be considered for the High LOD. If the viewer cannot match the LODs this way it will resort to the old method of matching which is to rely on the order of the objects in the Mesh files.


Test for the negative case:

  • Begin uploading a model using the TestHall_MESH_misnamed_Atrium1x.dae mesh as the High LOD
  • Use TestHall_LOD2.dae for the Medium LOD
  • Verify a message appears in the Upload Model window, Error: Material of model is not a subset of reference model.
  • Verify the Calculate weights & fee button is disabled.

ImporterDebug

  • An ImporterDebug option has been added to the settings.xml file which, if enabled, causes more information to be output during import
  • Open Advanced > Show Debug Settings
  • Verify the default setting for ImporterDebug is FALSE
  • Set ImporterDebug to TRUE
  • Close Debug Settings.
  • Upload the duck.dae model to your inventory.
  • Open the SecondLife.log file and verify there are several lines that start with "INFO: LLModelPreview::updateStatusMessages:"
  • Cleanup: Change ImporterDebug back to FALSE