Difference between revisions of "Mesh Import test"
Kurt Linden (talk | contribs) |
Kurt Linden (talk | contribs) |
||
Line 92: | Line 92: | ||
* Confirm that selecting Half Edge Collapse and Edge Collapse values do not cause any viewer errors | * Confirm that selecting Half Edge Collapse and Edge Collapse values do not cause any viewer errors | ||
* For a variety of models use the Half Edge Collapse and Edge Collapse operator and confirm the models will in general appear different using each parameter, this will vary dependent on the model. Depending on the shapes and intended use a user may select Edge Collapse vs. Half Edge Collapse from situation to situation. | * For a variety of models use the Half Edge Collapse and Edge Collapse operator and confirm the models will in general appear different using each parameter, this will vary dependent on the model. Depending on the shapes and intended use a user may select Edge Collapse vs. Half Edge Collapse from situation to situation. | ||
* To confirm the functions shown in the viewer are performing expected actions load a simple mesh such as a cube | * To confirm the functions shown in the viewer are performing expected actions load a simple mesh such as a cube available here [https://jira.secondlife.com/browse/CTS-466] | ||
* Turn on Show Edges in the Preview Window | * Turn on Show Edges in the Preview Window | ||
* Set the Error Threshold to be 0%, this may resemble the following screenshot: | * Set the Error Threshold to be 0%, this may resemble the following screenshot: |
Revision as of 11:01, 15 April 2011
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://collada.org/owl/browse.php?sess=0&parent=126&expand=1&order=name&curview=0)
- 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.
- (Not implemented as of 2010-8-31) Verify the Import window lists the number of prim equivalents the mesh is and how much it will cost in L$.
Naming a Model
- Enter a name for your model
- Confirm that this field only allows alpha numeric characters
- Confirm name is confined to X characters
- Confirm Unicode characters cannot be entered or appropriate error is given as inventory items cannot contain unicode characters
- 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 resizing the Import Model window resizes the preview window as well providing more area to Preview the mesh.
- 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)
- Confirm that selecting the different available options from the gear drop down menu shows those features in the preview window where available
Show Edges
- 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
- Shows selected physics shape if available
Show Textures
- If textures have been included with the model, textures should be visible with this setting in the preview window.
Show Skin Weight
- For Rigged Meshes
Show Joint Positions
- For Rigged Meshes
Level of Detail Functions
- Perform these tests for each LOD (High, Medium, Low, Lowest)
- Select an LOD by clicking on a row in the Level of Detail Tab or from the Preview Level of Detail dropdown box. Both areas should update with selected value.
Triangle Limit
- Select the Auto Generate radio button
- Note the # of triangles shown for the High LOD
- Enter a value for Triangle Limit that exceeds the # of triangles for the High LOD
- Confirm the resulting decimation matches the # of triangles for the High LOD, should not exceed.
- Set the Triangle Limit to a lower value and hit enter
- Verify this updates the model
- 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
- 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
- Confirm that a value of 0.000 for Error Threshold shows the maximum # of triangles where 100 shows the smallest (2 triangles 3 vertices)
- Confirm with some values between 0 and 100 for Error Threshold that the model becomes less detailed with higher values.
Build Operator
GLOD Definition: Selects the method used for incrementally reducing the geometry while building the multiresolution hierarchy.
Half Edge Collapse: Merges two vertices currently connected by an edge. One of the two vertices is merged into the other, which remains (essentially) unchanged.
Edge Collapse: Merges two vertices currently connected by an edge. Both vertices are replace by a new, unified vertex, which is chosen to minimize error according to some error metric.
- Open a model
- Confirm that Half Edge Collapse is the default value shown
- Confirm that without changing any other parameters that selecting Half Edge Collapse again does not further simplify the model
- Confirm that selecting Half Edge Collapse and Edge Collapse values do not cause any viewer errors
- For a variety of models use the Half Edge Collapse and Edge Collapse operator and confirm the models will in general appear different using each parameter, this will vary dependent on the model. Depending on the shapes and intended use a user may select Edge Collapse vs. Half Edge Collapse from situation to situation.
- To confirm the functions shown in the viewer are performing expected actions load a simple mesh such as a cube available here [1]
- Turn on Show Edges in the Preview Window
- Set the Error Threshold to be 0%, this may resemble the following screenshot:
- Now change the Error Threshold to be 0.300
- Set the Build Operator to Half Edge Collapse
- Observe the decimation resembles the following screenshot
- Compare this to the above 0errorcube.png and confirm that the resulting vertices are all existing vertices. No new vertices should be generated with Half Edge Collapse
- Now set the Build Operator to Edge Collapse
- Observe the decimation resembles the following screenshot
- Compare this to the above 0errorcube.png and confirm that their are new vertices and topology created using Edge Collapse
Queue Mode
GLOD Definition: Changes the way order in which vertices are chosen to be collapsed.
Greedy: After each simplification operation, GLOD will recalculate the priority values for each of the neighboring edge.
Lazy: After each simplification operation, GLOD will mark the priority values of each neighboring edge to be dirty. Recomputation of costs will only be done on required edges.
Independent: This method performs non-overlapping sets of operations on the input geometry, resulting in hierarchies of logarithmic height.
- Confirm under Queue Mode that Greedy is selected by default
- Confirm that changing the value to Greedy, Lazy, and Independent does not cause any viewer errors
- For a variety of models use the Greedy, Lazy, and Independent modes and confirm the models will in general appear different using each parameter, this will vary dependent on the model. Depending on the shapes and intended use a user may select a different mode from situation to situation.
- Independent setting currently crashes viewer
- Confirm changing these setting works on large and small mesh uploads
Border Mode
GLOD Definition: Changes the handling of vertices on a geometric border (i.e. a vertex without a full ring of triangles around it).
UNLOCK: The default behavior, does not treat geometric border vertices specially.
LOCK: Prevents any modification to or removal of border vertices.
- Confirm under Border Mode that Unlock is selected by default
- Confirm that setting this value to Unlock and Lock does not cause any viewer errors
- Select Build > Upload > Model for a model that has borders (facade)
- In the level of details tab select the Medium LOD
- Observe that with Border Mode unlock, the borders may be simplified during decimation (see screenshot below)
- Select Border Mode lock and confirm that the borders are not simplified during decimation and remain in tact (see screenshot below)
- Observe how the model's decimation is changed to keep the borders in tact
GLOD Definition: This floating point parameter is intended to compensate for small floating point errors present in your data set. It controls the amount of distance between two vertices before they are considered coincident. Increase this number if cracks appear in your object.
- Confirm that Share Tolerance is set to 0.00001 by default this is the smallest unit the viewer can distinguish 2 vertices
- Confirm that Share Tolerance values are limited to the range 0.000 to 1.000
- Confirm that increasing the Share Tolerance reduces the # of vertices and triangles as more vertices will be considered coincident and get combined during decimation - small changes in share tolerance can greatly simplify a model
- Confirm that a share tolerance of 1 results in 1 triangle and 1 vertex
- Confirm that setting Share Tolerance back to 0.00001 and resetting the triangle # the LOD is reset to expected complexity
None
- Confirm that Selecting the None radio button removes this LOD (High is required)
Load From File
- Under Mesh select the Load from file radio button
- Select browse and verify a file chooser opens
- Choose a different model.
- Set the preview window to High
- Verify the model you chose shows up in the preview window.
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..)
Maximum Model Size
- (Not implemented as of 2010-8-31) Verify the Import window lists the number of prim equivalents the mesh is and how much it will cost in L$.0 This should update as each parameter above is changes to make the model more or less complex.
Crease Angle
The Crease Angle adjusts the smoothness of the model.
- 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 Analysis and Simplification functions are disabled by default
- 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 1: Analyze section is now active
Step 1 - Analyze (Decompose)
- Upload a model such as duck.dae
- Select the Physics tab in the upload model dialog and select Use Level of Detail > Medium
- Confirm that Method: Surface, Quality: Normal, Smooth: 0.000, and Close Holes: Unchecked are default values
- Click Analyze Button (Decompose to convex hulls)
- 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 2: Simplification 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 (http://sketchup.google.com/3dwarehouse/details?mid=d106aaeaa51217cc465e08d496c0420f&prevstart=0)
- 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 or connery.dae are good models 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 (connery.dae is good model to demonstrate and test this with)
- Confirm that selecting the different analysis methods allows analysis to be completed without error on models of varying sizes and complexity.
- 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
- 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.
- 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.
- 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 or connery.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
- With a variety of models select the different quality options and confirm there are no viewer errors and expected results are shown.
Smooth Slider (values from 0.000 to 1.000)
- Note: values may be off. Will investigate and update.
- Confirm the allowed values for Smooth are 0.000 to 1.000
- 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 zero allows some angle between triangles, resulting in gently curving surfaces being flattened.
- Need to find a model to test this with.
Close Holes (Slow)
- Close holes attempts to turn an open mesh into a closed one.
- Download model that has holes in it such as: http://sketchup.google.com/3dwarehouse/details?mid=b989c960ff1e436aed460cb37e572af8&prevstart=0
- 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):
- 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)
- 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 2 - Simplification
- Select to import a model such as duck.dae and complete the analysis step as outlined above
Method
- Under Simplification select Retain % from the Method drop down menu
- Confirm the Range for Retain is 0.000 to 1.000 (this is the percentage of hulls to maintain in the physics LOD, 0 = 0% 1 = 100%)
- Select a value of 0.000 for the Retain % and confirm this simplifies to 1 hull per mesh in the model (for duck.dae that would be 1 hull, for connery.dae that would be 7 hulls)
- Select a value of 1.000 for the Regain % and confirm this retains all the hulls from the Analysis step
- Select a value of ~0.5 and confirm that this retains about 50% of the hulls from the Analysis step
- 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 )
- Todo: Get more information about Detail and Better detail simplification methods and models to test
# 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 connery.dae or hotrod.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. Enforcing "good" decomposition in the importer is still on the todo list.
Choose File...
- Are there any limitations here? Does LoD criteria enforcement come into play?
LoD criteria enforcement
- Source as of Aug 16, 2010: http://blogs.secondlife.com/message/353310
- The prim cost will be 1 prim for every 4KB in the high LoD. Will change to something like "The prim cost will be 1 prim for every 400 (or 256 or 128) triangles in the high LoD"
- Each LoD must be NO MORE than 50% the number of triangles of the next highest LoD. As of 2.1.1 (208871) viewer enforces 50% of KB instead of 50% of triangles. Viewer will need to change
- Any LoD that has less than 128 vertices will not be reduced.
- This cost is independent of physics cost, and the final cost of an object will be the mesh streaming cost OR the physics cost, whichever is greater
- Attempts to break these rules:
- leave medium LOD blank. can i set low LOD to be 1/2 of high?
- set medium LOD to the same model as high LOD?
- set medium LOD to a model with more vertices than high LOD?
- generate all LODs then lower the high LOD?
- What if the object has several submeshes?
- set physics mesh higher than High LOD mesh?
Modifiers Tab
- 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
- Edit the cube.dae file and update the library_images section to point to the path of an image file on your local machine (update this line: <init_from>/Users/roxie/Desktop/hurricane.jpg</init_from> )
- Save the cube.dae file
- Open Mesh Viewer and select Build > Upload > Model
- Select the cube.dae file to import
- Select the modifiers tab and check the box to include textures
- In the Preview window drop select the option to show textures
- Confirm the texture is displayed on each face of the cube in the preview window in the model import dialog
- Import the model
- Rez the object inworld
- Confirm the expected textures are visible to you and other users inworld.
Skin Weight
- Confirm this option is only enabled when available
Joint Positions
- Confirm this option is only enabled when available
Upload button
- Notice that there should be no cost to upload for First Look.
- Verify that the Upload button is unavailable if the LoD criteria rules are not met.
- Verify that the Upload button becomes available when the LoD criteria rules are met.
- 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.
Consolidate button
(This may have been deprecated)
- Upload a file that has several submeshes (something similar to connery.dae)
- Click the Consolidate button
- Verify the submeshes has changed to 2. (because there are 2 materials or colors in the object)
- Click the Scrub Materials button
- Click the Consolidate button
- Verify the submeshes has changed to 1. (because there is only 1 material now)
- Close the Mesh Upload window without uploading.
- Upload a model with more than 64k vertices (need a model)
- Click the Scrub Materials button.
- Click the Consolidate button.
- Verify the submeshes is 2 or greater. (because there is 1 mesh for every 64k vertices)
Upload a rigged object
- Download http://jira.secondlife.com/secure/attachment/38659/simplebot.dae
- Upload the mesh
- Verify generate normals does nothing unexpected.
- Verify LOD generation does nothing unexpected.
- Walk around and Verify the rigged object animates in the preview window.
- Verify "consolidate" is grayed out.
- Upload the mesh
- Verify a mesh and an object are uploaded.
Upload a bad object
- Test uploading a bad object (need example object)
- Verify sufficient error is returned.
- Need a test for each error type.