Assignment 1 - Capture a mesh

 

You need to several things to complete this assignment. We'll be on hand in E2-386 to help you.

  1. Capture a mesh from at least 3 angles.
  2. Align these meshes to each other with scanalyze.
  3. Save the aligned meshes, and transfer them to your CATS account.
  4. Check out the MeshShop code and compile it
  5. Show us your meshes inside MeshShop during next weeks lab

 

Here are some more details


Capture a mesh from at least 3 angles.

There is a particular machine set up with the scanner. You'll have to be sitting at this machine. (atria)

  1. Start the Cygwin bash shell if it is not already running.
  2. Use pwd to make sure you are in /cygdrive/c/Documents and Settings/All Users/Documents/cmps160 students, cd there if you are not.
  3. Use mkdir to make a directory with your name and cd to it.
  4. Place your object in the scanning volume.
  5. At the cygwin command prompt type:
    % vidcapture -s 20000
  6. Verify that the object is completely visible by both cameras. Keys '1' and '2' switch camrea views.
  7. Verify exposure level and focus for each camera. When the projector is on with a white screen, your object should be brightly lit but not saturating large areas of the sensor. Its OK if the specular highlight saturates a bit because you can get geometry for this area from different angles.
  8. Ctrl-C to kill the vidcapture window.
  9. In cygwin type:
    % capmesh -capscreen2 -rect -proc scan1
  10. Check the polygon mesh you scanned with
    % scanalyze scan1/*.ply
    The faces of your object that were facing the cameras and the light should be visible. If there are large portions that are missing that shouldn't be you should consider adjusting the exposure settings.
  11. Close scanalyze.
  12. Rotate your object in the scanning volume by about 20 degrees
  13. Use capmesh again with a different number after the word scan for at least two more scans.
  14. You may use scanalyze again to verify that all of your captured meshes look OK, but this is not necesary.

Align these meshes to each other

Use the other windows machine to accomplish this step. (polaris)

  1. Create a local directory on this machine with your name.
  2. Copy all *.ply files from Shared\ Documents/cmps160\ students into the new directory. yourname/scan1/scan1.ply, yourname/scan2/scan2.ply, etc
  3. In cygwin cd to the directory holding your scans.
  4. % scanalyze *.ply
  5. Right click in the main window and choose ->RenderOption->FalseColor
  6. Notice the moveView and moveMesh buttons. These are your friends. Left mouse button rotates, Middle mouse button translates and Left-Middle zooms. Try it.
  7. Select the first and second mesh in the mesh controls window, the check boxes control visibility, the circular radio button controls the current active mesh
  8. From the main window menus select ->Commands->ICPRegistration
  9. Click 'Sync' in the new window, this sets up to align the current selected mesh to the other visible mesh (assume you have two visible right now)
  10. Click 'Register Meshes' until the meshes align with each other. If after a few iterations the meshes seems to be converging to the wrong orientation, try gettting it closer by hand then re-try ICP registration.
  11. Repeat until all meshes are aligned
  12. Choose the menu command ->File->FlattenAllScans.. This saves the reoriented geometry back into the original files.

If you want to use scanalyze on your own machines its available at http://graphics.stanford.edu/software/scanalyze/


Save the aligned meshes, and transfer them to your ITS(CATS) account.

  1. scp *.ply username@unix.ic.ucsc.edu:~

Check out the MeshShop code and compile it

Many future assignments in this class will be developing plugins in the framework of this application.

Oops, I have to try this for myself to make sure it works!

  1. Log into one the machines in the mac lab.
  2. Start ssh/terminal (in the dock at the bottom of the screen). This should open two windows, one logged into unix.ic and the other to the local machine.
  3. In the unix.ic window type (all on one line)
    /afs/cats.ucsc.edu/courses/cmps115-cf/svn/bin/svn co http://svn.dforge.cse.ucsc.edu/meshshop meshshop
    If it asks for a password just hit enter. This will make create a directory called meshshop in your current directory with the latest version of our code.
  4. You can close the unix.ic window now.
  5. On the local machine cd to Desktop/yourname's\ Home\ Directory/. This is the same as your unix home directory and is where you should save your work.
  6. From here, cd to the meshshop directory you checked out with svn and type
    make -f Makefile.Aqua
    to build a version of meshshop that will run on the local machine (Makefile.sun should build in the sun labs).
  7. Afer the build is complete, run ./meshshop example_data/bunny.ply
    You should see a mesh of the world-famous Stanford Bunny (and be able to rotate it by clicking).

Show us your meshes inside Meshshop

Easy enough! Just run ~/path/to/your/meshshop *.ply in the directory with your meshes.