Mar 222010
 

In this tutorial you will learn how to use Oblong Tessellation to get better results with long, skinny sculpts like pipes and chair frames. I use Oblong Tessellation for many other things too, so it’s a useful tool to add to your own knowledge.

The Long and Short of It

A lot of you probably looked at the term “Oblong Tessellation” and went cross-eyed.  Don’t worry. I did too.

But after looking into it, I figured out that it’s just a freakishly complex name for a pretty simple concept.  All we’re doing is rearranging the sculptie’s vertices so that instead of a perfect square 32×32 grid, we have a rectangular grid at 16×64, or 8×128.

Above, you can see the difference between a normal sculpt map and one that uses oblong tessellation.

Why is this useful? Let me break it down for you.

The Pipe Problem

Lets say you want to make a sculptie pipe to import into Second Life. You want this pipe to be long, skinny, and as windy as possible. You decide to use three edge loops per bend to keep the pipe looking nice.

Using the default 32×32 mesh, you come up with something like the image on the left. You wind up with nine or ten bends, which is okay, but not as bendy as you’d like. (Note that if you had accounted for any amount of LoD, you’d have even less bends then that!)

Now take a look at the cross section of this pipe and you’ll begin to see the problem.

There are 32 points on every edge loop, which is a problem in more than one way.

First of all, you don’t need 32 vertices to make something that skinny look round. These are wasted vertices.

Second, sculpties start doing weird things when you have a lot of vertices in a small area. The more points you have in a small area, the more chance you have for jagged edges when you import that sculpt into Second Life.

So. What do we do? We make an oblong sculptie! This is pretty easy to do. When you bring up the dialogue to create a sculptie, by default it shows 8 x 8 faces with 2 levels of multires. Change this to 4 x 16. When you enter the number for Y, initially, it will turn black and the Build button will be greyed out. Usually this just means the dialog wants you to press Enter so it can recalculate your sculpt mesh.

There are a lot of different sizes that you can make your sculptie. For a complete list, look here. Sizes are listed as (face)x(face)x(multirez). However it doesn’t seem like Second Life can handle all of these sizes correctly. The only sizes that I’ve gotten to work (at least with with anything practical) are 8×8(x2) and 4×16(x2), and 4×64(x1).

Look at the cross section of this new sculptie.

Now each edgeloop has half the number of vertices, which is still plenty to make it look round. We aren’t wasting nearly as many points, and we won’t have so many problems with edges becoming choppy.

What’s more is, those points we took from the diameter of our edge loops now go into making the length of the pipe. We can add even more bends. (Or we can work with multires so our pipe doesn’t loose it’s shape at a distance.)

Look at the difference between our original pipe and the oblong pipe. We have a lot more to work with. This doesn’t just apply to pipes. It’ll work for anything that has a long, skinny shape, like the frame of a dining chair, or scaffolding for a building, or a streetlamp, or a pencil twisted in the shape of a heart!

Baking an Oblong Sculptie

Domino’s new primstar scripts automatically assigns your mesh an image sized based on the faces and and subdivision levels that you started with.

So if you started with a mesh with 8 x 8 faces and 2 subdivision levels, it will assign a 64 x 64 image.

If you start with a 4 x 16 mesh and 2 levels of subdivision, it will assign a 32 x 128 image.

In previous versions of my starter tutorials, I instructed people to start without subdivision levels (no multires) because I felt it was easier ( and I STILL feel it’s easier) to start defining a mesh with less vertices.

However, if you start with an 8×8 mesh and no subdivision, your mesh will be assigned a 16×16 image, which isn’t what you want. So now it’s better to start with the 2 levels of subdivision and then manually delete the higher levels if you wish to start with a simpler mesh.

Tips, Tricks, and Notes

Oblong Tesselation is still rather new and while I use it all the time now, I can’t, for the moment, think of any tips specifically related to it.

But as a note, there is some functionality of oblong tessellation that’s still being developed. Particularly the ability to use LESS vertices than the current 1024, which would be useful for certain simple geometric shapes.

Mar 212010
 

In this tutorial you’ll learn how to make objects with more than one sculptie in Blender, and import all of it into Second Life, plus how to make duplicate sculpties in your blender file.

E Pluribus Unum

Sometimes it’s necessary to build an object with more than one sculptie. A knee-high boot, for instance, may need to be attached to more than one bone on the SL skeleton, or an object may have clearly different pieces like a belt and a buckle or a sword with a sheath, or a shape may simply be too complex to do easily with one sculptie.

You can model all of the sculpties you need in the same .blend file to be sure that the two sculpties fit together, and to do useful texture tricks, like having the sculpties cast shadows on each other. (See this tutorial)

Primstar Scripts

Domino’s new Primstar scripts actually include the ability to export multiple sculpties with a script that will let you recreate a multi sculpt object in Second Life.

Once you have things finished the way you want in Blender, bake the sculpt maps for all the sculpties you want to export. Next, select all the sculpt meshes in Object Mode, making sure the root prim is highlighted in bright pink.

Press Ctrl-P and select “Make Parent”. Double check that the other meshes are parented by selecting just the root object and moving it around. If the other objects follow, you’ve got it.

With that root object selected, go to the top menu and select File > Export > Second Life LSL (to dir). Browse to a folder (preferably an empty one) and hit ‘export’. This should save all of your sculpt maps and ONE plain text file with the extension .lsl. Open this lsl file with a program like Notepad, select all the text and copy it.

In world, rez a plain cube on the floor. Upload all of the sculpt maps and add them to the contents of your box. Next, create a new script inside the box, then double-click the new script to edit it. Delete the default script and replace it with the text you copied from the .lsl file.

Hit Save, and after a few seconds, the script will ask you to create a prim, name it “Primstar” and put it into the box. Do that. Then the script will ask you for linking permissions. Once you give the permissions, the script will start recreating your object in world, ending by linking everything together.


Duplicating a Sculptie

If you want to make a single sculptie that will be used on multiple parts of your build, go into Object mode and press Alt-D. And move the new object to where you want it.

This will create a new object, but the mesh for both will remain identical. If you edit the mesh in Edit Mode, both objects with change. If you scale/rotate/move the object in Object Mode, it will only effect the one object.

If the shape you need for a new sculpt mesh is similar to a mesh you already have, but not identical, go to Object Mode and press SHIFT-D instead. This will create a copy, but both the object and the mesh will be separate, so you can edit the new one without effecting the old one.

Currently, the Primstar scripts don’t seem to understand exporting objects with duplicate sculpts. I tried exporting a skull that used a lot of duplicate sculpts for the teeth, and that broke the lsl script pretty bad. xD So keep that in mind if you’re planning on using it.

Adding a Mesh from an Older File

If you have a sculptie from a previous file that you’d like to add/edit in your current one, you can ‘append’ the object.

You may want to save your current file now, in case of error. Now we’ll be using a function in Blender that lets you browse inside another .blend file and select a part to add to your current file. Go to File > Append or Link.

From here, you may actually start inside your current .blend file, which is useless because Blender doesn’t let you append anything from inside your current file. (Can someone explain to me why Blender does this?) Hit “..” until you see the contents of your save directory, then find the .blend file that contains the mesh you want to append and click it, then click “Object”. From here you’ll see a list of the objects in that file. Hopefully you’ve renamed your sculptie objects so that you can easily identify them. Select the one you want, and click “Load Library.”

If you haven’t been doing it already, it’s good practice to rename your objects in Blender

This makes browsing with the Append feature easier, and also lets Primstar name your sculpt maps or you before you export them to your hard drive.

Mar 202010
 

In this tutorial, you will learn some tricks to make your sculpties looks better at a distance, including the “shrinkage” trick.

LOD Can Kill

As you already know, sculpted prims switch between three resolutions depending on your camera’s distance from them in Second Life.

Sometimes the difference in resolution makes such minor differences in the sculptie that you can simply ignore it. However, sometimes the lower LOD levels end up looking bizarre, or you may simply want the sculptie to retain its resolution better.

The sculpties in the image above were all the same mesh in Blender, but the sculpt map image was changed to effect how the the resolution held up at different distances. The screenshot was taken with Object Detail in SL’s Preferences turned almost all the way down.

Remember Multires

Before I get into more technical tips and tricks, I want to remind you about the multires feature in Blender. I had you learn about that for a better reason than just to annoy you. Multires corresponds with Second Life’s LOD (Level of Detail) rendering.

If you start off modeling at the 8×8 resolution (level 1) then your sculptie will have a better chance of retaining it’s basic shape. At the 16x 16 resolution, you should try to include as much detail as you can. The 32 x 32 resolution should only add the most nit-picky details.

If you don’t remember anything about multires, go back to the multires tutorial and read up.

Texture Tricks

Often you can make the decreases in resolution less noticeable by using a high-quality texture on your sculpties. Baking on shadows, for instance, helps to visually define a form, which will make your object appear to be higher resolution than if you were relying on Second Life’s realtime shadow rendering.

To learn more about texturing sculpts in Blender, read this other tutorial.

Shrinkage

There is a more technical trick that will actually help keep your sculpt’s shape at greater distances.You can shrink them.

I don’t mean in SL. In Second Life, you’ll actually be making them bigger.

An Explanation

You see… the distance at which your sculpt loses resolution is relative to how large the sculpt is. The larger the sculpt, the farther away your camera can get before it loses resolution.

So, what we want to do is make the sculpt larger, but make it appear to be the same size.

Yeah, I know. Weird. But it can be done. You’ve probably seen sculpts that do something like it. Several of the freebie sculpts floating around don’t quite fit inside the bounding box when you scale them. Have you noticed? You can stretch and stretch these sculpts, but they they never seem like they stretch far enough! Well we’re going to do this on purpose.

Using Primstar

The new Primstar scripts allow you to shrink your sculptie when you bake the sculpt map.  When you bring up the Bake Sculpt Meshes dialog, you’ll see a box on the right marked “Range.”  The default values for each color value (or axis) are 0 to 255.

What you want to do is increase the values on the left and decrease the values on the right by the same amount.  I chose to increase the left values by 55 and decrease the right values by 55, because those numbers are easy to figure out.  (I’m lazy.)  The larger the difference between the original values and the new ones, the more your sculptie will shrink.

Image Editor Method

You can also do the same thing with some sort of image editor like Photoshop and decrease the color contrast. Some experience in Photoshop is recommended, because I’m going to describe how to do things in Photoshop, since I have practically no experience in any other image editing software.

Open your sculpt map in your image editing application. In Photoshop, the next step is to go to Image > Adjustments > Levels. Ignore Input Levels. You want to change Output Levels, and it needs to be changed by the same amount on both sides. The default values are 0 and 255. Once again, I usually change mine to 55 and 200 since those are easy numbers to figure out. And still. the greater the difference in the new values from the default, the more your sculpt will shrink. Once you’ve decided on your values hit ‘OK.’ Your sculpt map will look slightly greyed.

In some programs, you can use Brightness/Contrast and decrease the contrast, but this is less precise, and it doesn’t seem to do the same thing in Photoshop at all.

Upload your sculpt map and apply it to a sculpted prim. You’ll see it shrink. If you have the original sculpt uploaded, try placing the two next to each other, and stretching your shrunken sculpt so it looks the same size as the original. Then zoom out and watch how their resolution changes.

A Word of Warning

Although this is a neat trick, you can decrease the contrast on the sculpt map too much.

First of all, if your sculpt is not made phantom, the collision box will be as large as the bounding box, not the shrunken sculpt, but also, your sculpt can become deformed.

The image on above shows the same set of sculpts as the first image on this page, only with the Object detail in SL’s Preferences turned to Mid. Notice that the first two sculpts look identical. The third is slightly more choppy looking, and the fourth, obviously, is rather deformed. Below is what the sculpt maps look like:

The less contrast there is, the more values start to run into each other and the more choppy your sculpt will be. If you’ve done a good job with multires and texturing, there usually isn’t any reason to even get as shrunken as the third sculpt. Remember to use this trick wisely. Only when you absolutely need it, and only to the degree it’s needed.

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
 

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 does not currently 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.