Import images into CavePainting: Difference between revisions
No edit summary |
|||
| (21 intermediate revisions by 3 users not shown) | |||
| Line 2: | Line 2: | ||
= Image Format = | = Image Format = | ||
All images used in CavePainting must be JPEGs (extension .jpg). In the filename patterns described below, an asterisk (<tt>*</tt>) indicates any text you want. | All images used in CavePainting must be JPEGs (extension .jpg) in RGB color mode (not grayscale, etc.). The mode of an image can be set in the menu item Image>Mode. In the filename patterns described below, an asterisk (<tt>*</tt>) indicates any text you want. The program loads all your images on startup, so if CavePainting fails to start properly, new images that you're loading for the first time may be to blame. Check the [[Troubleshoot CavePainting startup crashes]] HOWTO for instructions on fixing your images. | ||
== Common Problems == | |||
* Sometimes having spaces in the names of images can cause problems. To avoid this use snake_case or cameCase for your file names. | |||
* When creating an alpha mask make sure that the alpha mask is ''only'' black and white. Some applications like photoshop use antialiasing when you delete a section which uses the entire gray scale. | |||
** This usually manifests as the cave screen going blank when you launch your account, but other accounts booting up just fine. | |||
* Make sure that your image is in RGB, not CYMK or some other format. | |||
== Color Palettes == | == Color Palettes == | ||
Custom color palettes must be 512x512 JPEGs with a filename of the form <tt>color-swatch-table*.jpg</tt>. | Custom color palettes must be 512x512 JPEGs with a filename of the form <tt>color-swatch-table*.jpg</tt>. | ||
[[Image:color-swatch-table_example.jpg| | {| align="center" | ||
|- | |||
| valign="top" | [[Image:color-swatch-table_example.jpg|none|thumb|256px|<tt>[[:Image:color-swatch-table_example.jpg|color-swatch-table_example.jpg]]</tt> --- one of the default CavePainting color palettes.]] | |||
| valign="top" | [[Image:color-swatch-table_sam-ballardini.jpg|none|thumb|256px|<tt>[[:Image:color-swatch-table_sam-ballardini.jpg|color-swatch-table_sam-ballardini.jpg]]</tt> --- an example pallette created by a [[CS137]] student.]] | |||
|} | |||
== Slides == | == Slides == | ||
Slides, also known as "billboards", are flat images that you can place in virtual space like floating pieces of paper. Each slide depends on two files, a picture and a mask, which must be the same size and have matching filename patterns. | Slides, also known as "billboards", are flat images that you can place in virtual space like floating pieces of paper. Each slide depends on two files, a picture and a mask, which must be the same size and have matching filename patterns. Also, the slides must be square (equal width and height) and have dimensions that are powers of 2 (64, 128, 256, 512, 1024, 2048, or 4096). | ||
{| {{Prettytable}} | {| {{Prettytable}} | ||
| Line 21: | Line 31: | ||
| Picture | | Picture | ||
| <tt>slide*.jpg</tt> | | <tt>slide*.jpg</tt> | ||
| rowspan=2 | 64x64, 128x128, 256x256, 512x512 | | rowspan=2 | 64x64, 128x128, 256x256, 512x512, 1024x1024, 2048x2048, 4096x4096 | ||
| The picture on the slide. | | The picture on the slide. | ||
|- | |- | ||
| Mask | | Mask | ||
| <tt>alphamask*.jpg</tt> | | <tt>alphamask*.jpg</tt> | ||
| A black-and-white image matching the picture. The picture is visible where the mask is white, and it's transparent where the mask is black. | | A black-and-white image matching the picture. The picture is visible where the mask is white, and it's transparent where the mask is black. Make sure the color mode is not grayscale. | ||
|} | |||
{| align="center" | |||
|- | |||
| [[Image:slide_example.jpg|thumb|256px|<tt>[[:Image:slide_example.jpg|slide_example.jpg]]</tt>]] | |||
| [[Image:alphamask_example.jpg|thumb|256px|<tt>[[:Image:alphamask_example.jpg|alphamask_example.jpg]]</tt>]] | |||
|} | |} | ||
| Line 34: | Line 50: | ||
Palettes of patterns or masks each have 16 entries in them, each of which is a 64x64 image. In order to tell CavePainting what all 16 images are, you import them all in one file, with the square images concatenated together in a row. This gives you 16 64x64 squares lined up in a row, resulting in a 1024x64 JPEG file that you import into the program. See the examples below to get a better idea of what this means. | Palettes of patterns or masks each have 16 entries in them, each of which is a 64x64 image. In order to tell CavePainting what all 16 images are, you import them all in one file, with the square images concatenated together in a row. This gives you 16 64x64 squares lined up in a row, resulting in a 1024x64 JPEG file that you import into the program. See the examples below to get a better idea of what this means. | ||
The vertical direction in the pattern or mask image is aligned with the direction of the stroke | The vertical direction in the pattern or mask image is aligned with the direction of the stroke --- that is, a pattern that looks like horizontal stripes will result in a brush stroke with stripes across it, whereas a pattern of vertical stripes will result in a brush stroke with stripes along its length. | ||
=== Stroke Patterns === | === Stroke Patterns === | ||
A stroke pattern applies a pattern of color to a brush stroke. | A stroke pattern applies a pattern of color to a brush stroke. You should make sure that each element of any custom stroke pattern palette that you create has a little bit of visual texture to it, rather than having any large, flat areas of color. Depth perception of virtual objects in the [[Cave]] requires that your eyes can match up their two views of every object. If an object has no surface texture, it is much harder to match up than one with a little bit of texture to it. | ||
[[Image: | The filename format for stroke pattern palettes is <tt>pattern*.jpg</tt>. | ||
[[Image:Patterns_example.jpg|center|thumb|512px|<tt>[[:Image:Patterns_example.jpg|patterns_example.jpg]]</tt> --- the default CavePainting stroke pattern palette.]] | |||
=== Stroke Masks === | === Stroke Masks === | ||
| Line 46: | Line 64: | ||
The filename format for stroke mask palettes is <tt>brushtips*.jpg</tt>. | The filename format for stroke mask palettes is <tt>brushtips*.jpg</tt>. | ||
[[Image:brushtips_example.jpg|center|thumb|512px|<tt>[[:Image:brushtips_example.jpg|brushtips_example.jpg]]</tt> --- the default CavePainting stroke mask palette.]] | |||
[[Image:brushtips_dithered.jpg|center|thumb|512px|<tt>[[:Image:brushtips_dithered.jpg|brushtips_dithered.jpg]]</tt> --- a stroke mask palette for dithered translucency.]] | |||
= Loading Images = | = Loading Images = | ||
To import images into [[CavePainting]], | To import images into [[CavePainting]], follow these steps: | ||
* Prepare the slides (and optional masks) in your program of choice | |||
* Rename the files as described above | |||
* Copy the images to a USB flash drive | |||
* Insert the USB flash drive into the Windows machine | |||
* Open the Windows File Browser from the taskbar | |||
* Navigate to your USB flash drive on the left panel of the File Browser | |||
* Copy the image data you wish to transfer | |||
* Open the "CS137 - Student Directories" link on the desktop and navigate to your user directory | |||
* Paste your image files to your user directory | |||
* Eject your USB key | |||
* Start or restart Cavepainting | |||
* Enjoy your data! | |||
= Using Images = | = Using Images = | ||
Latest revision as of 15:47, 12 September 2017
You can add custom color palettes, slides, paint stroke patterns, or paint stroke masks to CavePainting simply by loading image files into the program. In order to work, though, they need to be in a particular size and format, and have a particular sort of name. Loading them into the program is pretty easy, but the first time you do it you need to perform an extra setup step.
Image Format
All images used in CavePainting must be JPEGs (extension .jpg) in RGB color mode (not grayscale, etc.). The mode of an image can be set in the menu item Image>Mode. In the filename patterns described below, an asterisk (*) indicates any text you want. The program loads all your images on startup, so if CavePainting fails to start properly, new images that you're loading for the first time may be to blame. Check the Troubleshoot CavePainting startup crashes HOWTO for instructions on fixing your images.
Common Problems
- Sometimes having spaces in the names of images can cause problems. To avoid this use snake_case or cameCase for your file names.
- When creating an alpha mask make sure that the alpha mask is only black and white. Some applications like photoshop use antialiasing when you delete a section which uses the entire gray scale.
- This usually manifests as the cave screen going blank when you launch your account, but other accounts booting up just fine.
- Make sure that your image is in RGB, not CYMK or some other format.
Color Palettes
Custom color palettes must be 512x512 JPEGs with a filename of the form color-swatch-table*.jpg.
Slides
Slides, also known as "billboards", are flat images that you can place in virtual space like floating pieces of paper. Each slide depends on two files, a picture and a mask, which must be the same size and have matching filename patterns. Also, the slides must be square (equal width and height) and have dimensions that are powers of 2 (64, 128, 256, 512, 1024, 2048, or 4096).
| File | Name Pattern | Size | Function |
|---|---|---|---|
| Picture | slide*.jpg | 64x64, 128x128, 256x256, 512x512, 1024x1024, 2048x2048, 4096x4096 | The picture on the slide. |
| Mask | alphamask*.jpg | A black-and-white image matching the picture. The picture is visible where the mask is white, and it's transparent where the mask is black. Make sure the color mode is not grayscale. |
Strokes
You can customize the appearance of paint strokes in two different ways. You can put a particular picture, or pattern, on the stroke, or you can make it transparent in a particular shape with a mask.
Palettes of patterns or masks each have 16 entries in them, each of which is a 64x64 image. In order to tell CavePainting what all 16 images are, you import them all in one file, with the square images concatenated together in a row. This gives you 16 64x64 squares lined up in a row, resulting in a 1024x64 JPEG file that you import into the program. See the examples below to get a better idea of what this means.
The vertical direction in the pattern or mask image is aligned with the direction of the stroke --- that is, a pattern that looks like horizontal stripes will result in a brush stroke with stripes across it, whereas a pattern of vertical stripes will result in a brush stroke with stripes along its length.
Stroke Patterns
A stroke pattern applies a pattern of color to a brush stroke. You should make sure that each element of any custom stroke pattern palette that you create has a little bit of visual texture to it, rather than having any large, flat areas of color. Depth perception of virtual objects in the Cave requires that your eyes can match up their two views of every object. If an object has no surface texture, it is much harder to match up than one with a little bit of texture to it.
The filename format for stroke pattern palettes is pattern*.jpg.

Stroke Masks
A stroke mask applies a pattern of transparency to a brush stroke. Stroke masks are black-and-white images; where the mask is white, the stroke is visible, and where it is black, the stroke is transparent. You probably want any custom stroke mask palette that you create to have one all-white 64x64 block in it, so that you always have the option of drawing an entirely solid stroke.
The filename format for stroke mask palettes is brushtips*.jpg.


Loading Images
To import images into CavePainting, follow these steps:
- Prepare the slides (and optional masks) in your program of choice
- Rename the files as described above
- Copy the images to a USB flash drive
- Insert the USB flash drive into the Windows machine
- Open the Windows File Browser from the taskbar
- Navigate to your USB flash drive on the left panel of the File Browser
- Copy the image data you wish to transfer
- Open the "CS137 - Student Directories" link on the desktop and navigate to your user directory
- Paste your image files to your user directory
- Eject your USB key
- Start or restart Cavepainting
- Enjoy your data!
Using Images
For instructions on how to use slides, stroke patterns, or stroke masks, see the Use Cavepainting HOWTO.



