Difference between revisions of "Mesh Import test"

From Second Life Wiki
Jump to navigation Jump to search
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Test Plans]]
[[Category:Test Plans]]
[[Category:Content Tools]]
[[Category:Mesh]]
[[Category:Mesh]]


=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 [https://wiki.secondlife.com/w/index.php?title=Mesh_Import_test&oldid=1150398].=


==Purpose==
==Purpose==
Line 8: Line 10:
==Test Plan==
==Test Plan==


===Uploading a Mesh===
===Uploading Model Basic Functions===


* Open the inventory, click the + menu button and Upload > "Model."
* Open the inventory, click the + menu button and Upload > "Model."
Line 14: Line 16:
* Verify a File Dialog Box opens
* Verify a File Dialog Box opens
* On Windows, 3D scene/UI should continue to update while file dialog box is open.
* 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)
* 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 Import Model window appears.
* Verify in the High LOD text box information about the file appears such as triangles and submeshes.
* 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.   
* 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 Import Model window does not block you from accessing Second Life (chat, inventory, etc).
* (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$.
* Verify the Cancel button and X close button in upper right hand corner of Import Model window closes the window without error.


===Generate LOD button===
===Naming a Model===


* Hit the Generate LOD button.
* Enter a name for your model
* Verify the High, medium, low, lowest LODs, and Physical Shape should now contain triangle, vertex, and submesh info.
* 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


===Generate Normals button===
===Preview Window===


* Set the preview box to Medium.
* Verify the High LOD is selected by default in the Preview Window
* Hit the Generate Normals button.
* 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 the model preview becomes more faceted.
* 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)


===Hard Angle===
====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.


* Change the Hard Angle to 1.
====Show Physics====
* Click "Generate Normals".
* Use duck.dae, click the Physics tab and set "Step 1: Level of Detail" to Low.
* Verify nearly every polygon on the face should be apparent.
*Shows selected physics shape if available


===High LOD===
====Display Textures====
* 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.
* Upload TestHall_MESH.dae
* Under the Preview window, check Display... Textures.
* Verify textures are visible in the preview window.


* Next to High LOD, click "Choose a file..."
====Show Skin Weight====
* Verify a file chooser opens
* Download a rigged mesh, https://jira.secondlife.com/secure/attachment/82969/simplebot.dae
* Choose a different model.
* Upload the model in SL
* Set the preview window to High
* Verify the model appears in the T pose in the preview window.
* Verify the model you chose shows up in the preview window.
* Check Display... Skin weights under the preview window.
* (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$.
* Verify the model now has the arms at the sides.
* Click Triangle limit. Enter 64 as a value.
* (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$.
* Verify the model's detail has decreased in the preview window
* <span style="background:#FFFF33">(Add a test to exercise the maximum model size)</span>


===Medium LOD===
====Show Joint Positions====
* Download a rigged mesh, https://jira.secondlife.com/secure/attachment/82969/simplebot.dae
* Upload the model in SL
* Verify the model appears in the T pose in the preview window.
* Check Display... Skin weights under the preview window.
* Check Display... Joints
* Verify the joints are displayed in dark blue.


* Choose a file. Verify that when preview window is set to medium, it shows up in the preview window.
===Level of Detail Functions===
* Click Triangle limit. Enter 64 as a value.
* Test with duck.dae
* Verify the model detail has decreased in the preview window


===Low LOD===
====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.


* Choose a file. Verify that when preview window is set to low, it shows up in the preview window.
====Error Threshold====
* Click Triangle limit. Enter 64 as a value.
* Set the Preview view to Medium
* Verify the model detail has decreased in the preview window
* 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.


===Physical LOD===
====Load From File====
* Under the source for the Medium LOD select "Load from file"
* Select browse and verify a file chooser opens
* Choose a different model. (https://jira.secondlife.com/secure/attachment/82973/cube2.dae)
* Set the preview window to Medium
* Verify the model you chose shows up in the preview window.


* Choose a file. Verify that when preview window is set to Physics, it shows up in the preview window.
====Save State====
* Click Triangle limit. Enter 64 as a value.
* 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..)
* Verify the model detail has decreased in the preview window
* <span style="background:#FFFF33">Does this have a maximum value?</span>


====Generate Normals & Crease Angle====


===LoD criteria enforcement===
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


* Source as of Aug 16, 2010: http://blogs.secondlife.com/message/353310
===Physics Decomposition===
* The prim cost will be 1 prim for every 4KB in the high LoD.  <span style="background:#FFFF33">Will change to something like "The prim cost will be 1 prim for every 400 (or 256 or 128) triangles in the high LoD"</span>
* Each LoD must be NO MORE than 50% the number of triangles of the next highest LoD. <span style="background:#FFFF33">As of 2.1.1 (208871) viewer enforces 50% of KB instead of 50% of triangles. Viewer will need to change</span>
* 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:
* Select the Physics Tab
** leave medium LOD blank. can i set low LOD to be 1/2 of high?
* Confirm the Analyze and Simplify steps are disabled by default
** set medium LOD to the same model as high LOD?
====Step 1 - Level of Detail====
** set medium LOD to a model with more vertices than high LOD?
* 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)
** generate all LODs then lower the high LOD?
* Confirm a physics layer is shown in the Preview Window and the Number of Triangles is shown at the bottom of that panel
** What if the object has several submeshes?
* Confirm Step 2: Analyze section is now active
** set physics mesh higher than High LOD mesh?
====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
[[File: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.
[[File: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.
[[File:WrapUU.png]]


===Description===
===== Quality drop down menu=====


* Verify you can change the description. <span style="background:#FFFF33">Maximum string length?</span>
* 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.


===Generate Normals button===
=====Close Holes (Slow)=====


* Tested above
* 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):
[[File: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)
[[File: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====


===Upload button===
* Select to import a model such as duck.dae and complete the analysis step as outlined above
 
=====Method=====
* Notice that there should be no cost to upload for First Look.
* Under Simplify select Retain % from the Method drop down menu
* Verify that the Upload button is unavailable if the LoD criteria rules are not met.
* Confirm the Range for Retain is 0 to 100 (this is the percentage of hulls to maintain in the physics LOD)
* Verify that the Upload button becomes available when the LoD criteria rules are met.
* 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)
* Click the Upload button.
* Select a value of 100 for the Regain % and confirm this retains all the hulls from the Analysis step
* Verify at least one mesh shape and one object is uploaded to your inventory.
* Select a value of 50 and confirm that this retains about 50% of the hulls from the Analysis step
* Verify the object has the description you entered earlier.
* 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.




===Scrub Materials button===
=====# 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


* Click the Scrub Materials button and verify the model changes from gray to white.
====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.


===Consolidate button===
====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.


* Upload a file that has several submeshes <span style="background:#FFFF33">(something similar to connery.dae)</span>
====Multiple Decompositions====
* 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 <span style="background:#FFFF33">(need a model)</span>
* 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)


===Physics Decomposition window===
* 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


* Upload duck.dae
====Multiple Physics Meshes====
* Verify the ‘>>’ button next to “Physical Shape” is unavailable.
* Select a Model that has multiple layers/meshes like double_duck.dae
* Click the drop down menu next to "Physical Shape:" and set the triangle limit to 4212
* Open the Upload Model dialog and select the physics tab
* Verify the ‘>>’ button next to “Physical Shape” is now available.
* Select a LOD to use
* Click the ‘>>’ button next to “Physical Shape” to open the Physics Decomposition window.
* Select the Analyze option and confirm that all meshes are decomposed in the model
* Verify a window opens that has Decompose and Simplify buttons.
* Select the Simplify option and confirm that all meshes are simplified in the model
* Click Cancel to close the Physics Decomposition window.
* Click the Decompose button
* Uncheck the Mesh checkbox
* Verify the model preview shows the model is broken into pieces of different colors.


====Top section====
====No Physics Shape Selected====
* Mesh checkbox
* Confirm that if no physics shape is selected that the physics shape shown in world in a single convex hull
* Hull checkbox
* 'Drop down menu #1' Submesh drop down? <span style="background:#FFFF33">What's the name of this drop down?</span>


====Stage 1 - Decomposition====
====Select Physics Shape with No Decomposition====
<span style="background:#FFFF33">These all need definitions and tests</span>
* 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.
* Cosine %
* Simplify Coplanar
* Close Holes (Slow)
* 'Drop down menu #2'
** Preview
** Normal
** High
* 'Drop down menu #3'
** Surface
** Solid
** Wrap
** Delaunay (menu cuts off text when selected)
* Decompose button


====Stage 2 - Simplification====
====Select Physics Shape with no Simplification====
<span style="background:#FFFF33">These all need definitions and tests</span>
* 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)
* Combine Quality
* Detail Scale
* Retain%
* 'Drop down menu #4'
** Retain%
** Best
** Better Detail
* Simplify button


====Bottom section====
===Upload options===
* Status <span style="background:#FFFF33">(bug: status does not initialize if you reopen the decomposition window)</span>
* Cancel button


===Explode slider===
* Confirm that options for Scale and including Textures, Skin Weight, and Joint Positions are available


* After decomposing a model, move the Explode slider.
====Scale====
* Verify the decomposed pieces of the model move away from each other as the Explode slider is moved to the right.


===Choose File...===
* Confirm scaling model up or down works as expected changing costs and using scale inworld once imported


* <span style="background:#FFFF33">Are there any limitations here? Does LoD criteria enforcement come into play?</span>
====Textures====
* 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.
* Select Build > Upload > Model
* Select the TestHall_MESH.dae file to import
* Select the Upload options tab and check the box to include textures
* In the Preview window check the option to show textures
* Confirm textures are displayed on the object
* Import the model
* Rez the object inworld
* Confirm the expected textures are visible to you and other users inworld.


====Skin Weight====


===Show Edges===
* Confirm this option is only enabled when available


* Check the Show Edge checkbox and verify that the Preview shows the edges of the triangles.
====Joint Positions====
* Uncheck the Show Edge checkbox and verify that the triangles edges are no longer highlighted in the Preview window.


===Preview window===
* Confirm this option is only enabled when available


* Verify you can zoom in/out on the model and rotate it right and left with mouse drag.
===Calculate weights & fee===
* Verify you can rotate the model up and down with ctrl + mouse drag.
* Verify the Import window lists the Upload fee and Land impact.
* Verify you can pan the model with ctrl + shift + mouse drag. <span style="background:#FFFF33">(should this work? works a little. Only small movements...)</span>


===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 Textures option===
===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.


* <span style="background:#FFFF33">Not implemented at this time?</span>
===Upload a bad object===


* Test uploading a bad object (https://jira.secondlife.com/secure/attachment/82972/Messerschmitt%20KR200.dae)
* Verify an error is returned and the file does not upload.


===Upload a rigged 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.
[[File: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.
[[File:Walk through.jpg]]


* Download http://jira.secondlife.com/secure/attachment/38659/simplebot.dae
===Name based matching===
* Upload the mesh
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.
* 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.


{{todo|Rigged mesh that contains joint offsets}}


===Upload a bad object===
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.


* Test uploading a bad object <span style="background:#FFFF33">(need example object)</span>
===ImporterDebug===
* Verify sufficient error is returned.
* An ImporterDebug option has been added to the settings.xml file which, if enabled, causes more information to be output during import
** Need a test for each error type.
* 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

Latest revision as of 13:46, 18 March 2015


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