Bring Your Own Medium to the Cave –
Part Deux
CS237 Assignment #2
|
Out |
Tues, 9/17 |
|
Due |
Thurs, 9/19 |
This assignment builds completely on the first one. Now, working in groups of two, pick one of your virtual world designs from the previous assignment or a combination of the two, and work on creating that environment in the Cave. You are given a version of the CavePainting program that allows you to import, resize, and position your 2D imagery within the Cave. (See the Resources section below for details.) And, of course, it allows you to create the usual CavePainting strokes. This is all you need to do, so there is no programming involved in this assignment. You should save your world in CavePainting (.cps) format when you’re done so that you can display it in the Cave for the class on Thursday. Instructions on how to import and position pictures in space and how to save and load paintings using CavePainting are provided below. Remember, you can also get to this information by typing “less $G/shared/man/cavepainting.txt” from one of the machines in the Cave.
Before starting this assignment, you should logon to any Cave computer. Then, open up a terminal window and at the prompt type, “cs237-setup-asgn2”. This will create a courses/cs237/asgn2 directory in your home directory and copy a few files into that directory for you. Next, change directories to get into the asgn2 directory. (By the way, a directory is exactly the same as a “folder” on windows or mac systems.) To change directories to your asgn2 directory, type “cd course/cs237/asgn2”. Then, to see the files in this directory, list them by typing “ls”. You will see 3 image files, these end in .rgb. There is also a file called glueconfig-asgn2. This is the file you will need to edit in this assignment.
Files named glueconfig-something contain settings for Cave programs. You can change the default settings for a program by telling it to look in a glueconfig file. You do this by typing the name of the glueconfig file at the end of the command that starts the program. So, to start CavePainting with the options contained in glueconfig-asgn2, type “cavepainting cave glueconfig-asgn2”.
For this assignment, you will be using the glueconfig-asgn2 file to tell CavePainting the names of the 2D images you want to load into the program. To do this, you need to load glueconfig-asgn2 file up in a text editor. For example, on the machine that you logged into (fish1, fish2, fish3), go to the asgn2 directory and type xemacs glueconfig. You will notice the following lines in the glueconfig file. These specify the names of the image files in your asgn2 directory.
# Texture File Name Name Transparent
#
-------------------------------------------------------------------------
LOAD_TEXTURES hatch1.rgb hatch1 no \
artery_wall.rgb artery_wall yes \
scan0001.rgb scan0001 no
You’ll need to change and add to these lines to load in your own images for this assignment. LOAD_TEXTURES is the name of the configuration option you will be changing. This is followed by a list of filenames, texture names, and whether this texture is transparent (whether it has an alpha channel). Each image file name should refer to a file saved in your ~/courses/cs237/asgn2 directory. For this assignment, make the name field the same as the filename field except without the .rgb extension.
To use your own images rather than the example ones, replace hatch1.rgb with the name of your file. You can keep adding additional lines with additional filenames as long as you want. Remember to include a “\” at the end of each line! CavePainting can only read .rgb, and .tga image file formats. If your images are not already in this format, read “Getting you Image Files onto a Cave Computer” below to find out how to convert them.
With the stylus held away from the wand, press the bottom stylus button to bring up the Texture Palette. (Texture palette fades in..) Point the stylus directly at one of the images in the texture palette. The image will become selected when you get close to it. (A box will show up around the image.) Press the same (bottom) button on the stylus again to create a copy of this texture in the middle of the Cave room.
Now, to move the image around, first select it. Do this by holding down the 2nd button from the left on the wand and moving the wand on top of the image. Again, a box will show up around the image to tell you that it has been selected. Once it has been selected, hold down the 3rd button from the left on the wand and move the wand around to move the image to a new position. Let go of that button when you get it where you want it. To scale the image up or down, press the wand’s joystick up or down. Each tap of the joystick will scale the image up or down by a percentage.
To save a painting in CavePainting file format, press the “S” key on clio’s keyboard. Remember that you need to get your mouse in that small “ButtonsKeyboard” window in the top left of clio’s monitor in order to have the program respond to keyboard presses. If you have a really huge painting, the computer may appear to freeze for a few seconds while the file is created. It will be saved in the file ~/course/cs237/asgn2/saved-painting.cps. Every time you save a painting it goes to this same file, so it will overwrite any old painting stored under that name if you don’t rename it before saving again! Be sure to rename your file by typing “mv saved-painting.cps asgn2-draft1.cps”. Save often!!! I have tested the program thoroughly, but it may not be 100% bug free and it may crash at some point. If this happens you will loose your work if you haven’t saved it, so save often and remember to rename your previously saved painting to asgn2-draft.cps or something like that before saving again.
To load a painting that you have saved, edit the glueconfig-asgn2 file so that it contains the following line:
LOAD_PAINTING saved-painting.cps
Of course, replace saved-painting.cps with another filename if you have renamed your file.
The easiest way to get images onto the Cave Computer is probably to save your images on a CD or a Zip disk (100 or 250 MB), let me know if you need to borrow one.. and bring them to the Cave, then follow these instructions to get them off one of the windows computers in the room and onto the network: Put your disk into the windows machine. That’s the one to the left of fish3 in the Cave room. Start the SFTP program, there is an icon for it on the desktop. Open a connection to clio.cascv.brown.edu with your username and password. Copy the file(s) from your disk to your course/cs237/asgn2 directory using this program.
Your images need to be in .tga or .rgb format. If they are not, you can convert them at the Cave using a program called gimp. Gimp is a lot like photoshop. Change directories to the place where you have your images stored (should be course/cs237/asgn2), then type “gimp imagefilename”. Then right-click on the image and go to File->Save As. At the bottom of the window that pops up, change the file name to have a .rgb extension. For example, change image1.jpg to image1.rgb. Press enter. When it asks about Compression Type, select RLE Compression.
Note also that your images must be a certain size. A good size is 512 pixels by 512 pixels. They can actually be any of the following sizes (all in pixels): 2x2, 4x4, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, and 1024x1024. In general, 512 by 512 is a good compromise between so big that it slows down the computer and so small that it looks blocky.
Here are step by step instructions on how to use the scanner in the Cave from a linux machine (fish1,fish2,fish3) and get your image into CavePainting:
From a terminal window on fish1, fish2, or fish3, follow these instructions:
You can create or edit files on the Cave computers by using a program called XEmacs. Start it by typing “xemacs” at the prompt of the computer you logged into. Don’t do this on clio because then it will display XEmacs in the Cave. Rather, if you logged into the computer fish1, goto a terminal window that has a fish1 ~ -> prompt and type “xemacs”. You can use the File menu and buttons at the top the same way you would in Microsoft Word or any other word processing program.
The unix file system is setup with a hierarchy of directories, just like the folders you commonly see in Windows or Macintosh. When you login with a terminal window you automatically go to your home directory. This special directory is denoted by a “~”. That’s why when you log into clio you get the clio ~ -> prompt. The ~ section of that denotes that the current folder that you are working in is your home directory. In this assignment, some directories will be created for you when you run the cs237-setup-asgn2 command. This will create a course directory inside your home directory and then a cs237 directory inside that and an asgn2 directory inside of that. You change the current directory with the command “cd dir-name”. So, when you’re logged into clio, type “cd course” and your prompt will change to clio ~/course ->. You can list the files that are in the current directory with the command “ls”. If you do that from within the course directory, you will see the directory cs237. Try a “cd cs237” and then a “cd asgn2”.
Unix Summary:
clio ~/course ->, course is the current directory.
Helpful Unix Commands:
|
cd name-of-directory |
Change directories |
|
ls |
List all the files in the current directory |
|
xemacs filename |
Start a program to edit a file named filename |
o Ran cs237-setup-asgn2
o Changed directories to ~/course/cs237/asgn2
o Modified the glueconfig-asgn2 file to load your own imagery
o Positioned imagery in 3D
o Cave-Painted additional 3D form
o Saved the completed painting
o Tested re-loading the painting
o Answered and e-mailed assignment questions and checklist
0:25 read and understand handout
0:30 decide together on virtual environment and build strategy
0:30 get images onto cave machine
0:45 read Kirby et al
0:45 read van Dyke et al
0:20 answer
assignment questions