Mar 072010
 

Multires!

In older versions of these tutorials, I introduced LOD and multires in a short section in the previous tutorial. However, with the new Primstar scripts, I’ve decided to create a separate and more detailed tutorial on this rather important topic.

LOD

LOD stands for Level of Detail, and refers to a function of Second Life, OpenSim, or any other game where a mesh becomes less detailed the further away you get from it. This is important in games as it helps decrease the resources needed to render the game’s graphics.

Multires

Multires is an option inside Blender that lets you switch to lower levels of mesh detail, which corresponds nicely with Second Life’s LOD.

To make… a box.

There is a certain set of video tutorials that explain multires by having the viewers create a box. Although a box might be a silly example, it serves the purpose, and it introduces some useful editing techniques.

So I’m going to use the box example, but with a few variations that I think make it easier. So go back into blender. Delete your old sculpt, and if you’d like, save the file as something new.

Now create a new sculpt mesh. Make it a cylinder with multires subdivision, just like the previous one. In the Edit Buttons, click “Set Solid” (marked in green) to give the mesh sharp edges instead of smooth ones.

Now switch to the top view (NUM7), go into edit mode (TAB), then deselect everything (A). Then with the Box Select tool (B) select the bottom part of the circle, like the first image below. Then, making sure proportional falloff is OFF, press S to scale, Y to scale along the Y axis, then press 0, then ENTER. You should end up with a straight line of vertices, like the second image below.

Now select some vertices on one side and press S, X, 0 to make on of the sides of our box. Keep doing this until you have a square or rectangle that looks something like the third image above.

Now lets also cap off the top and bottom. To do this, go to the front view (NUM1) and select the top and bottom edge loops. Then press S, SHIFT-Z, 0. This scales everything except the Z axis down to a point.

Then make sure the top a bottom are flat. Use the Box Select tool to select the top point you just made and the next edge loop and scale Z to 0. (S, Z, 0) Do the same for the bottom.

Note: To anyone with OCD, I apologize for my terrible box. As you can see, it isn’t very even. I did this on purpose, though. Lets bake this sculpt and upload it to the grid.

Tada! Up close, this cube looks pretty good, right? But as we zoom further away, the corners start doing weird things. You’ve probably seen similar behavior in a lot of sculpties in Second Life. (Though hopefully not on anything as simple as a box!)

So what do we do about it?

A Better Box

Go back to blender and in Edit Mode, find the tab labeled “Multires”. If you look for the ‘level’ button, (marked in green) You’ll see that currently, you are on multires level 3.

What does this mean? Well… click on the left side of this button to switch to level 2, then level 1. You’ll see your cube lose a lot of its vertices, and as you can see from the picture on the left, my cube no longer looks like a cube. It looks exactly how it looked in world when I zoomed out.

So what would happen if I made it look like a cube at Multires level 1? Lets do that.

I even decided to line up the middle vertices to make it look pretty. Anyway. Lets switch back to level 2.

Woah. Hey what happened here?

Well, Blender multires likes to help “correct” your mesh if one multires level is very different from another. Level 1 may have been that perfect box, but level 3 was still the old box, so Blender tried to create a “happy medium.”

In a lot of cases this behavior is what you want, but sometimes, especially with geometric shapes, you don’t want this at all.

So… lets fix this. Hit CTRL-Z to undo, going back to our nice level1 box.

Now since Blender still thinks multires level 3 and 2 should be our old box, the easiest way to fix it is to delete the higher levels. In the multires tab, find the button called “Del Higher” (marked in green) and click it to get rid of the higher levels. All of the options below should vanish. Next, click on the drop box currently marked “Catmull-Clark” and switch it to “Simple Subdiv.”

What does that mean?

The options in the drop box are different methods of subdividing a mesh. Simple subdivision adds vertices by dividing each edge exactly in half. This is good for meshes with a lot of straight edges.

Catmull-Clark is fairly well-known algorithm developed by Edwin Catmull (of Pixar) and Jim Clark (see Wikipedia). I don’t know the technical details of how it works. Only that it’s currently the best algorithm for smoothing a mesh.

So with Simple Subdiv selected, click “Add Level” twice, and you should get something that looks like this from the top.

Now if you bake the sculptie and upload it to the grid, you’ll have a cube that holds up well, even at a distance.

REMEMBER to upload your sculpt map with “Lossless Compression” checked!

Personally, I’m feeling lazy, so I’m not going to upload it.  _I_ know it would hold up.  You’re probably convinced too, and I don’t really have any practical use for this sculpted cube.

Don’t consider the time wasted, though.  You’ve learned some valuable skills and a VERY valuable lesson. Right?

Just in case you need a reminder, here it is again:

The moral of the story, and some tips

The box held up better when built at a lower multires level, and the same is true of ALL other sculpties.

If a sculpt is simple enough, like most organic shapes, I’ll start sculpting it at multires level 1. For more complex sculpties, like furniture, I’ll start with multires level 2. I never, ever, EVER start with multires level 3. Sure, you can make really complex sculpties at that level, but if your object turns into a birds nest when you walk three feet away, it’s not really worth it.

START WITH A LOWER MULTIRES LEVEL.  This ONE principle leads to better LOD and cleaner meshes.  While there are other tricks that can help along side it, nothing can substitute for it.

Tips:

Working from a lower multires level is actually useful for more than just LOD. It lets you establish the basic shape of a sculpt while you have less vertices to worry about. Ultimately, this can help you create a cleaner sculptie.

Sometimes adding a multires level with Catmull-Clark subdivision will smooth out a sculpt too much for what you need. When this is the case, try using Simple Subdivision, then click the “smooth” button in the Mesh Tools panel to round things out a little. This also works if only part of the mesh needs to be smooth. Just select the vertices you want to round out and click the smooth button a few times.

Mar 072010
 

Start Sculpting!

This tutorial assumes that you already have Blender, python, and Primstar installed.

It also assumes that you have learned how to move the camera in Blender, and the use basic editing hotkeys (Grab, Rotate, and Scale, along with the X, Y, and Z constraints).

If you haven’t done either of these, check out the previous tutorials:

Starter 1: Installing Blender and PrimstarStarter 1: Installation
Starter 2: Blender 3D Basics

Open up Blender, if you haven’t already, and lets get started.

Split Screen

Before we go too far, I’m going to have you split your view area.

Hover your cursor over the edge between your 3D View area and the top menu. When your cursor changes to the double-arrow resize cursor, right-click and select “Split Area.” (Click the image on the right to enlarge.) Then place the split line somewhere in the middle of your 3D View division. You’ll now have two identical 3D Views.

Of course, you can change the angle of each division separately now to see different sides of your mesh at once, however, you can also change the divisions to show something else entirely.

On the bottom left of each of your 3D views, you will see a tiny menu with an image that looks like a grid. If you click it, it will give you a list. You’ll see that your current division type is named ’3D VIEW’. Oh my gosh.


Most of the other types are irrelevant to sculpties, but I want you to change the right division from the 3D View, to the UV/Image Editor. Right now there isn’t anything in the UV/Image Editor, but this window will probably become one of your best friends in the long run. This division setup is actually very common for making sculpts. Eventually you may want to make it part of your default settings.
You may notice that EACH division has that same menu. The default division on the top is named User Preferences. The default division on the bottom is the Buttons Window.

Adding a Sculpt Mesh

Right now, everything in your 3D space is useless for making sculpts. Tap A once or twice to select it all, and tap the delete key to get rid of it.

Adding a sculpt mesh to our 3d space (or scene) is made ridiculously easy by the Primstar scripts. With your cursor in the 3D View, tap SPACEBAR, and then go to Add > Mesh > Sculpt Mesh.

If “Sculpt Mesh” is not an option in the menu, then chances are that the Primstar scripts didn’t get installed properly. Read the Primstar documentation for more information, or go to their website and ask for help on their forums.

You’re then presented with a dialog. Click on the Shape field to choose which shape you want to start with. For this tutorial, start with a Cylinder).

There are a lot of other options for your sculptie. For now, I want you to change Subsurf to Multires (marked in red). Check “default” and then click “Build”.

In previous versions of this tutorial, I had users get rid of the subdivision (or ‘multires’) levels. This does not work with the new Primstar scripts, as the number of faces and multires levels determines the size of the sculpt map created for your mesh in order to support Oblong Tessellation.Because of this, and because I wanted to add more detail about the intricacies of Multires, I decided to address that topic in a separate tutorial.

Edit Mode

Blender works in several different modes. Luckily you only need to know about two. You are currently in Object Mode. You can only select entire objects in your 3DView.

The other mode we need is Edit Mode, which will allow us to move individual vertices on our cylinder. Tapping the TAB key toggles between Object Mode and Edit Mode. Switch to Edit Mode now.

The lower division of your screen is the Buttons division. The menu of the button division lets you look at different button sets, depending on what you want to do. Tap F9 or select the Editing button in the Buttons menu if you aren’t already looking at the Edit buttons.

Lets also turn off that annoying axis thing by clicking this hand icon:

Selecting Vertices

You’ll notice that you can select individual vertices by right-clicking, and you can also shift-click to select additional vertices. But there are other selection tools that make selecting a lot of vertices very easy.

Press B once to start Box Selection mode. Your cursor will become a cross hair, and you can click and drag to define an area to select.
If you press B twice, you’ll start Brush Selection mode, which will change your cursor into a circle that you can use to ‘paint’ your selection. You can make your brush larger or smaller by using your scroll wheel.
Finally, if you hold down ALT and right-click on one of the lines (or edges) of your mesh, you can select an edge loop.

All of these methods of selecting vertices will be useful while you’re forming your sculptie.

Proportional Edit Falloff

The next thing you will want to know about is Proportional Edit Falloff, as it cuts down on a lot of work.

Select a few vertices using whatever method you’d like and press G, R, or S, to manipulate them. Notice how, by default, Blender only moves the vertices you have selected. We can change this default behavior by using Proportional Falloff.
Depending on your screen resolution, the Proportional Falloff icon may be hidden because of the split screen. Use the mouse wheel to click on the 3D View menu and drag it to the left until you see the icon.

Find the icon that looks like a donut (shown above) and select either On or Connected. (All of our vertices are connected, so either mode works the same.) You’re now presented with another menu, but we’ll play with that later. Make sure all of your vertices are deselected (tap A) and then choose one vertex on one edge of your mesh. Tap G to grab and watch what happens! Now try R and S.

You can change the area size that the falloff effects by tapping Page Up or Page Down.

Now fiddle with that other menu to the right of the falloff button.

Now select an entire row of vertices by using the Box Select tool, or Alt-Right-Click on a horizontal edge. Now scale (S) to see what happens. Try making a chess piece or a table leg.

After you’ve finished your mesh, we need to convert it to a sculpt map image. We’ll be doing this by using the Primstar scripts.

Baking

Before we get any further, you should rename your object to something meaningful. I’ve marked in yellow the Object name field on the image to the left. Click on the image to enlarge it.

Your object is probably named something like “Cylinder.” I’ve already renamed this mesh to “pawn.”

I have to admit, I often skip this step, but naming your objects has a lot of advantages.  For one, if you name the object, the Primstar scripts will automatically name your sculpt map by the same name. It also helps with organization later, if you have a file with many different objects and you need to keep track of them.

The Bake Script

Anyway. Go to the top menu. Select Render > Bake Sculpt Meshes (marked in red). You’ll now be presented with the Primstar bake dialog. There are a lot of options, but the defaults should be fine, so just click the Bake button (marked in yellow).

You should now see a rainbow image in your UV/Image Editor division.

Now all you need to do is save the image. In the UV/Image Editor menu, go to Image > Save As. (Marked in green.)

Browse to your desired save folder and save the sculpt map.

Importing into Second Life (or other Grids)

Log into Second Life, or your grid of choice and go to File > upload image and select your sculpt. In the preview menu, select Preview as: sculpted prim, and it will show you a preview of your sculpt. If something looks wrong and you can’t figure out why, contact me.

These screenshots were actually taken in a grid called Avatar Hangout. Uploads there are free, which is convenient for tutorials. (And for experimenting! I recommend finding a grid with free uploads if you want to try things out without spending money.)

Anyway. build a default box on the ground somewhere. Make sure that you’re seeing the advanced tabs (click on More>>), then go to the Object tab (marked in green). Now change the Building Block Type to Sculpted (marked in yellow). Now you can replace the default sculpt mesh with the one you just uploaded.

This is my sculptie imported into the grid. Notice it looks pretty much exactly as it did in Blender up close, but as I zoom away from it, it loses a lot of detail. This is referred to as LOD. With Blender, we can actually have almost complete control over how these different detail levels look. So lets go on to the next tutorial: Multires.

Mar 012010
 

Blender Basics for Second Life Sculpties

It was a grand occasion one summer day back in 1997. I was an ambitious 14-year-old who wanted to get a head start in 3D modeling. I had installed Blender 3D for the very first time on my computer, and had just opened it up. What I saw was something similar to the image on the left.

What did I do from there?
I stared at the screen for two minutes before shutting down Blender and going back to playing video games.

The moral of the story is: Blender is complex. I will not lie here. However there is GOOD NEWS for you Second Life sculptors.

The news is this:
You don’t have to learn all of Blender to make sculpties and what you need to learn is PRETTY EASY!

You should already have Blender, Python, and the Domino scripts installed. If not, back up one tutorial.

Also, in order to make life easier, you should have a full-size keyboard with numpad, and a two-button mouse (preferably with a scroll wheel). If you are using a laptop keyboard, either buy a full usb keyboard, or at least a usb numpad. If you’re using a 1-button Mac mouse, I’d recommend getting a cheap mouse from Wal-Mart or something, but you can use the typical mouse/keyboard combinations if you feel so inclined.

Blender Windows

Blender’s interface uses a rather unique window setup. I won’t get into the complex details in this tutorial, but I need to explain a few things.

When you first start up Blender, you will have three divisions, or windows (Shown here. Click to enlarge).

So how is this important to you right now? Your cursor’s location determines which division is ‘active.’ The active division will respond to all mouse and keyboard commands, so if things on your screen appear to be unresponsive, first check your cursor position.

Blender Camera Controls

The NUMPAD is your friend for camera control. If ever you don’t know which way you’re pointed, just tap 1, 3, or 7 on your numpad and it will show you the front, side, or top respectively. If you ever need to see opposite side of your sculpt, simply hold the CTRL key in combination with the numbers.

The numbers at the top of your keyboard don’t control your camera. Instead they switch between ‘layers’ in Blender. If you press one of these keys, your mesh may disappear. Don’t worry. Just press 1 at the top of your keyboard to return to layer 1.

Your mouse wheel is your other camera controller. Scrolling with the wheel predictably zooms in and out on your 3D view. Clicking and dragging with the wheel will rotate the camera around a set center point. If you hold SHIFT while clicking and dragging with the wheel, the camera will pan along the current view plane.

Remember: If your view doesn’t respond to the keypad, check your cursor position.

If you have no mouse wheel, there are alternate camera controls:
ALT+LClick/Drag — Rotate
ALT+SHIFT+LClick/Drag — Pan
ALT+CTRL+LClick/Drag — Zoom

Basic Editing in Blender

Before we get into making actual sculpts, we need to get familiar with the basic editing hotkeys. They are fairly straight-forward.

Selection:

Right now, you have three objects on your screen. A box, a camera (pyramid thing), and a light (circle-thing). To select one of these objects, Right-Click on it, and it will get a pink outline. To select more than one, SHIFT+Right-Click on each in turn. You can also SHIFT+Right-Click on a selected object to deselect it.

To toggle between selecting ALL objects on screen and NONE of the objects on screen, tap the A key.

Object Manipulation:

The hotkeys for basic object manipulation are really straight forward.

G – grabs the current selection (picks it up so you can move it)
R – rotates the current selection
S – scales the current selection

Tap one of these keys ONCE. This will only begin a rotation, scaling, or move. At this point, your manipulation is ACTIVE. Left-click to set the manipulation or Right-click to cancel it.

Also, you probably noticed that S will scale your object in all directions (every axis). If you want to scale in only ONE direction (axis), while scaling is ACTIVE, press either X, Y, or Z. These represent your X, Y, and Z axes. Also, if you press SHIFT + X, Y, or Z you can scale in all but one direction.

Blender also allows you to use the X, Y, and Z modifiers while grabbing (G) and rotating (R) your selections. Try them all out to see what they do.

Mar 012010
 

Installing what you need

There are three things that you need to install on your computer before you can make sculpties in Blender:

Blender 3d 2.49b
The Python software
The Primstar sculptie scripts

Installation is… fairly straightforward if you do it right, but unfortunately, there are two steps that are easy to mess up, and can make things very difficult, so I had to write up this short tutorial.

Go figure.

Primstar 1 does not work with 64 bit versions of Blender and Python. Please download the 32 bit versions even if you have a 64 bit operating system

Installing Blender

Download Blender 3d 2.49b from here.  For now, Primstar does not work with Blender 2.5x.  The people at Machanimatrix are working on a new version of the scripts, but for now, we’ll have to stick to the older version of Blender.

Installing Blender is fairly easy. For the most part just follow the instructions. However, there is ONE thing that Windows XP users will have to change

There is a point during installation that asks you where you want to store the user data files. By default, the ‘Application Folder’ is selected. Switch this to the “Installation Directory. This will save you some hassle in a bit.

After that, just wrap up the installation as normal.

Python

Download Python 2.6.6 from here.

For the current stable version of Blender (2.49) you’ll want to download the latest 2.6 build of Python. Do NOT download 3.1 or 2.7. Install normally.

Domino’s Primstar Scripts

Download the scripts from here.

Installing the Primstar scripts is probably the most troublesome of the three. Go into your file explorer, and navigate to the Blender data directory. You’re looking for the .blender/scripts folder.

.blender is a “hidden folder.” If you can’t see it, you may need to change your settings to show hidden files and folders.

In the Windows file explorer, go to Tools > Folder Options, and in the View tab check “show hidden files and folders.

In the Mac OSX, type the following in the Terminal:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Try looking for the folder in the following directories:
Linux: ~/.blender/scripts
Mac: /Applications/blender/blender.app/Contents/MacOS/.blender/scripts/
Windows XP: c:\Program Files\Blender Foundation\Blender\.blender\scripts
Windows Vista: C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\.blender\scripts

Mac OS users will probably have a particularly hard time finding the correct folder, as apparently, you can’t get to it by any conventional route. Either search for the exact directory in the Finder, or else look at this video tutorial to learn how to set up Blender to use an additional user-defined scripts folder.

Once you’ve found the scripts directory, find the folder called “primstar” inside the zip file you downloaded and copy the whole folder into the blender scripts directory. If you’ve installed Domino’s scripts previously, you might have to find the old ones and delete them manually. Now you’re ready to start Blender.