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.
- Capture a mesh from at least 3 angles.
- Align these meshes to each other with scanalyze.
- Save the aligned meshes, and transfer them to your CATS account.
- Check out the MeshShop code and compile it
- 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)
- Start the Cygwin bash shell if it is not already running.
- Use pwd to make sure you are in /cygdrive/c/Documents and
Settings/All Users/Documents/cmps160 students, cd there if
you are not.
- Use mkdir to make a directory with your name and cd to it.
- Place your object in the scanning volume.
- At the cygwin command prompt type:
% vidcapture -s 20000
- Verify that the object is completely visible by both cameras. Keys '1'
and '2' switch camrea views.
- 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.
- Ctrl-C to kill the vidcapture window.
- In cygwin type:
% capmesh -capscreen2 -rect -proc scan1
- 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.
- Close scanalyze.
- Rotate your object in the scanning volume by about 20 degrees
- Use capmesh again with a different number after the word scan for at least two more scans.
- 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)
- Create a local directory on this machine with your name.
- Copy all *.ply files from Shared\ Documents/cmps160\ students into the new directory. yourname/scan1/scan1.ply, yourname/scan2/scan2.ply, etc
- In cygwin cd to the directory holding your scans.
- % scanalyze *.ply
- Right click in the main window and choose ->RenderOption->FalseColor
- Notice the moveView and moveMesh buttons. These are your friends. Left
mouse button rotates, Middle mouse button translates and Left-Middle zooms.
Try it.
- 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
- From the main window menus select ->Commands->ICPRegistration
- 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)
- 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.
- Repeat until all meshes are aligned
- 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.
- 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!
- Log into one the machines in the mac lab.
- 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.
- 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.
- You can close the unix.ic window now.
- 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.
- 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).
- 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.