Adrian Herbez Rotating Header Image

Posts from ‘February, 2006’

Tex Calc

screenshot of the texture calculator

screenshot of the texture calculator

While Second Life offers everything you need to apply complex textures to your objects on a per-face basis, it can be really tricky to determine the appropriate repetitions and offsets to get a specific portion of the texture onto a specific face.

I’ve created a tool that sidesteps the issue and allows users to interactively click and drag a selection box around a given portion of a texture. The program then calculates the necessary offset / repetition values to have the selected region appear on a face.

To use the program, download the zip file from here. Read the instructions below, or scroll down for a video.

After opening the program, load your texure image (JPG, GIF, BMP, or Targa) by clicking on the “load texture” button. Once you’ve done that, click and drag anywhere in the image to define a rectangular region. As you drag, you’ll see the region you’re selecting highlighted in red. When you let go of the mouse, the program will display the necessary repetition and offset values in the top-right. Using the specified values in SecondLife will give you the selected portion of your texture.

If the highlight color isn’t to your liking, click somewhere in the color swatch region to select a color that you would prefer to use (something that will contrast with your texture), and click on the “dot” button. The color of the selection dot will change to the color you selected, and further selections will be in that color.

You can also change the color of the horizontal and vertical guide lines to provide better contrast. To do that, select a color from the swatch and click the “guide” button.

projects , ,

Node-based crafting mockup

I’ve started in on a project that I’ve been kicking around for awhile- an approach to gameplay based on the node-based interfaces in apps like Maya and Pd.

What I’m thinking is to have a game world in which players can build things by “hacking” (in the Make-magazine sense) things together to create useful items. But rather than having some pre-determined set of possibilities (as in games like Notrium), I plan on having it be completely open-ended (a ‘la Pd), by keeping things as modular as possible.

What I have so far is a working mockup of the object-creation interface, implemented with Python/Pygame. A list of objects is given at the bottom, and the user can click-drag any of them to the workspace to create a node. Then, the user can create linkages from the outputs of a given node to the inputs of another. Links update automatically to maintain themselves as the nodes are moved around the work area, and deleting a node (by clicking on the X) also deletes any linkages attached to it. The nodes themselves are declared in a separate text file and can be easily added to. So far, all that’s stored is the name of the node, the image to use for its icon, and the number of input/output connections. As the object-model grows more complex, I’ll be adding information to the nodes, such as what kind of connections they require (electric, mechanical, etc) and how much of each.

projects ,