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.