Mesh Import test

From Second Life Wiki
Jump to navigation Jump to search


Purpose

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

Test Plan

Uploading a Mesh

  • 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 in the High LOD text box information about the file appears such as triangles and submeshes.
  • 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).
  • (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$.

Generate LOD button

  • Hit the Generate LOD button.
  • Verify the High, medium, low, lowest LODs, and Physical Shape should now contain triangle, vertex, and submesh info.

Generate Normals button

  • Set the preview box to Medium.
  • Hit the Generate Normals button.
  • Verify the model preview becomes more faceted.

Hard Angle

  • Change the Hard Angle to 1.
  • Click "Generate Normals".
  • Verify nearly every polygon on the face should be apparent.

High LOD

  • Next to High LOD, click "Choose a file..."
  • 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.
  • (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$.
  • 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
  • (Add a test to exercise the maximum model size)

Medium LOD

  • Choose a file. Verify that when preview window is set to medium, it shows up in the preview window.
  • Click Triangle limit. Enter 64 as a value.
  • Verify the model detail has decreased in the preview window

Low LOD

  • Choose a file. Verify that when preview window is set to low, it shows up in the preview window.
  • Click Triangle limit. Enter 64 as a value.
  • Verify the model detail has decreased in the preview window

Physical LOD

  • Choose a file. Verify that when preview window is set to Physics, it shows up in the preview window.
  • Click Triangle limit. Enter 64 as a value.
  • Verify the model detail has decreased in the preview window
  • Does this have a maximum value?


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?


Description

  • Verify you can change the description. Maximum string length?


Generate Normals button

  • Tested above


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.


Scrub Materials button

  • Click the Scrub Materials button and verify the model changes from gray to white.


Consolidate button

  • 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)

Physics Decomposition window

  • Upload duck.dae
  • Verify the ‘>>’ button next to “Physical Shape” is unavailable.
  • Click the drop down menu next to "Physical Shape:" and set the triangle limit to 4212
  • Verify the ‘>>’ button next to “Physical Shape” is now available.
  • Click the ‘>>’ button next to “Physical Shape” to open the Physics Decomposition window.
  • Verify a window opens that has Decompose and Simplify buttons.
  • 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

  • Mesh checkbox
  • Hull checkbox
  • 'Drop down menu #1' Submesh drop down? What's the name of this drop down?

Stage 1 - Decomposition

These all need definitions and tests

  • 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

These all need definitions and tests

  • Combine Quality
  • Detail Scale
  • Retain%
  • 'Drop down menu #4'
    • Retain%
    • Best
    • Better Detail
  • Simplify button

Bottom section

  • Status (bug: status does not initialize if you reopen the decomposition window)
  • Cancel button

Explode slider

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

Choose File...

  • Are there any limitations here? Does LoD criteria enforcement come into play?


Show Edges

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

Preview window

  • 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. (should this work? works a little. Only small movements...)


Upload Textures option

  • Not implemented at this time?


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.

Stuff to do: Rigged mesh that contains joint offsets


Upload a bad object

  • Test uploading a bad object (need example object)
  • Verify sufficient error is returned.
    • Need a test for each error type.