Thursday, October 24, 2013

Creator Resource - Prim Generator

This tutorial is available at: Creator Resource - Prim Generator



PRIM GENERATOR - TABLE OF CONTENTS



Welcome everybody. I am Auryn Beorn and I'll be your instructor for this class.

First concepts


Prim Generator is an user friendly inworld tool that will allow you to create sculpted prims with ease from our buildings made with regular prims (and some more.)

The basic idea of use is to rez the "*NN* Prim Generator v2.02" object, which is a panel showing a display with several shapes and numbers, and then click the button of the shape that we want to use in our build. This will make the panel to rez the desired shape. From that moment, we edit this shape with the "Edit" controls from SL as we would do with any other prim, and keep clicking buttons for other shapes, editing them... until we have our final build, ready to be turned into a sculpt prim.


The basic version allows us only to build by using regular prims, and a couple of special shapes, "Round Box" and "Round Rect". All the prims rezzed by Prim Generator contain a script: We'll talk about this later.

Also, these regular prims are limited in the smoothness they are generated with (a detail we'll also talk about.)

It is by acquiring some plugins that we can increase our library of shapes to work with, as well as the smoothness of the shapes themselves.

What's the first important detail to take into account?

The amount of slots we have available, and which name Prim Generator uses for them.

Prim Generator allows us to have up to 32 "slots" to fill with our shapes. Some shapes will require more slots than others. The smoother the shape, the more slots it will require.

Prim Generator calls these slots "vertices", but since this term already means something for sculpted prims, we'll refer to them always as slots.

Now, here it is when Prim Generator shows its main strength: the ease of use.

As for regular prims, it supports boxes, cylinders, spheres, torus and tubes.

Not all transformations are supported... but we have not to worry about it! The script contained in each prim that we rez from its panel, will revert the shape if we try to apply a transformation that is not supported.

Let me show an example.

I'm clicking the panel to get a torus.


This basic torus is colored SALMON and will use THREE slots.

Now, when I've rezzed the torus, Prim Generator has said in chat:

[14:32:03] *NN* Prim Generator v2.02: [Torus] Vertices Count: 2-3  Modyfiable: Path Cut, Hole Size, Profile Cut, Taper  NoMod: Hollow, Skew, Twist, Top Shear, Radius, Revolutions

This means that all the properties falling under "NoMod" ("Locked" in previous versions), that is, "Hollow", "Skew", "Twist", "Top Shear", "Radius" and "Revolutions" are not supported for the torus.

What will happen if we try to change any of this "NoMod" properties in the prims generated by Prim Generator?

As you can see now, as I try to apply Skew...


... as soon as I release the mouse from the "Skew" up-arrow, the script will detect that this is a non supported change, and will revert "Skew" to 0.

Depending of the shape, you have more or less "NoMod" (locked) properties. This means that, for example, boxes don't have the "hollow" locked, but torus do.

Prim Generator will always say which ones when we click the panel to get a new prim. The allowed ones under "Modyfiable" and the non supported ones under "NoMod".

Another nice detail it has is that if, an example, we begin with this torus, colored in SALMON, so using THREE slots as we can see in the panel... (yes! the panel is always telling us, for a given shape, if it has a specific color, how many slots is going to use)

... and now we path cut it this way...


... the shape is going to change color, to indicate us the new total of slots that is using! (blue, so two, in this case.)

For the same building block type (box, cylinder, etc.) some transformations will require more slots than others, and Prim Generator will always recolor the shape according to this!

All this ease of use is possible thanks to the scripts that the generated shapes have within when rezzed from the panel.

This has a major advantage that we'll see next, but before... a warning.

There it is an option labeled as "DEL" in the panel.


When we click it, Prim Generator asks to us if we want to delete all the prims contained in 100 meters radius.


If we say yes, since those prims contain a script, and it's the script the one saying to the prim to be deleted... Once the prims are gone... they are gone FOREVER.

They will not go to your trash folder.

And why do we have to be aware of this?

Because if we've made a mistake in our build, there's NO WAY to recover the original build from the generated sculpt map. We should build everything AGAIN, FROM SCRATCH.

So we don't want to use this "DEL" function, unless we really know what we're doing. Normally, we want to link the build created with Prim Generator's blocks and take it to inventory instead :-)

If we've made a mistake and have to fix it, we can always rez the build from inventory... Prim Generator will acknowledge it so we can continue working from it!

It matters not if those building blocks are linked or not, actually. Also, any Prim Generator building block you rez after restoring your build, linked or not to your build, will be acknowledged as a part of the build. The building blocks are acknowledged as a part of the same built if they are within 100 meters of the panel.


Q/A for the first section


Q: Do the plug-ins have these certain features blocked?
A: What the plugins allow you is to have smoother shapes, and a bigger library of shapes which includes not only the regular prims, but also sculpts, like the rocks plugin (which has several predefined sculpted rocks.) The transformations that are locked in the base system for the regular prims, they continue to be locked in the "smooth" plugins.

Q: So, are you saying, this tool supports making sculpts to a maximum of 32 "slots"?
A: Yes, and the sculpts it has in the library of shapes of the plugins use 1-2-3 slots. You can combine them with your regular prims, which is helpful for example to create a sculpted couch, since you can mix regular prims in its construction with rounded cushions, as there are rounded sculpts in a specific plugin for them :-)

Q: So the plugin shapes are those we can't make ourselves with the core system. A way around odd shapes? And is there a limit on plugins you can plug in?
A: Let's say, a plugin is a library of shapes that the creator releases, so they can be combined with the rest of shapes you can work with this, and there's no limit of plugins you can use. I have all of them rezzed and they don't interfere with each other: they work together. There are a few ones that don't need from Prim Generator to work, like the plants generator, or Word Generator. You may have them around with Prim Generator, and they don't interfere either.


Using our already made builds with Prim Generator


Now that we're aware of this, let's talk about the major advantage: we can use our already made builds with Prim Generator.

How?

Proceeding this way. Click the panel to get a BOX.


Right click it to edit, click now the "Content" tab. Copy the script "Tsumiki Box v2" that you can see inside the box to your inventory. You copy the script in your inventory by clicking on it in the "Content" tab, and dragging it to your inventory, to the folder where you want it saved.


Now rez a BOX. (When I've said "Rez a BOX" I mean exactly that: rez a box - not generating another box from Prim Generator - I mean *rez* a box, the way we always rez a box.)


Right click it to edit, click its "Content" tab. Drop this "Tsumiki Box v2" script that you should have now in your inventory within the "Content" tab of this freshly rezzed box.


And there it is! Your regular box is now recognizable under Prim Generator :-)

Also, you all should have seen that the box has turned to yellow as soon as you've dropped the script.

Why is it important to be able to do this? So we don't have to rebuild again our previously made prim-builds: we should only drop a copy of each script in each prim (so, going into edit linked parts).

IMPORTANT: When dropping Prim Generator scripts in our previously made builds, so we can convert them into sculpt prims, keep in mind this detail: Boxes should get in contents the "Tsumiki Box v2" script, cylinders, the "Tsumiki Cylinder v2" script, and so on.

NOTE: If we SHIFT COPY an already rezzed Prim Generator shape, no matter if regular or from the other plugins... it will be acknowledged as a part of our build.

NOTE: The shapes in the build don't need to be "together" as in "touching the other prims". We can do something like this...


... and it all will be a part of the same sculpted prim.

Q: Will this allow phantom to be linked to non phantom?
A: That has nothing to do with the sculpting tool you use. The topic is covered here, the rewriting of the "Linking Phantom and non phantom prims" class (version 3!)


Generating our sculpt map


Let's talk now about the process of generating the sculpt map, and how to manipulate the bounding box in Prim Generator. If you don't know what "bounding box" means, please check the "Introduction to Sculpted Prims" class, where this topic is thoroughly covered.

When we have finished our build, we should click the "GENERATE" word in the panel.


This will calculate the total of slots used, showing its progress over the panel:


and if this total is less or equal than 32, it will show a menu with several options:


Generate!This calculates the MINIMAL bounding box at X = 0, Y = 0, Z = 0 rotation that CONTAINS the whole build
x1.5This calculates a bounding box 1.5 times the minimal for the same size of the build
x2This calculates a bounding box 2 times the minimal for the same size of the build
x3This calculates a bounding box 3 times the minimal for the same size of the build
x4This calculates a bounding box 4 times the minimal for the same size of the build

The x1.5, x2, x3 and x4 options could be useful, for example, to create nano-jewelry, as it was discussed in the "Introduction to Sculpted Prims" class.

We select one of these options, and after some seconds, when Prim Generator is calculating (which will lock the panel):


we obtain both a link in chat AND a popup asking us to open a website link:


Suggestion: Disregard the popup, for the link with the generated sculpt map could not load in the internal browser. Copy the link from chat and paste it in an external browser. Then right click over the image, select "Save Image As..." from your browser menu, and make sure you save it as PNG.

IMPORTANT NOTE: As soon as you generate a new sculpt map, the previous link will be no longer valid. Remember to download your maps before generating new ones!

The default options (x1.5, x2, etc.) are not enough for us to manipulate the bounding box in all cases. What if we wanted to create a door that pivots around the hinge?


Manipulating the Bounding Box


Well, let me show :-)

Let's assume that this is the door we want to convert into sculpt prim by using Prim Generator:


We click the "0" in the Prim Generator panel, and a special box is rezzed.


Prim Generator will say:

[03:49] *NN* Prim Generator v2.02: [Dummy] Vertices Count: 0  The dummy box to adjust the range of the sculpted map.

This "dummy box" ... is in fact... the bounding box!

It's not the best choice for the name, I know!

So now, all that we have to do is resize the "dummy" (BOUNDING BOX), move it to make sure that our door will pivot around the hinge... and then, click "GENERATE" in the panel.


The generated sculpt map will be the door that, visually, will pivot around the hinge :-)


Smoother shapes? How?


Now, this is important... Let me show a sample of the generated shapes. This is how the generated sculpt shapes look like when created with the basic Prim Generator system:


All round shapes are generated with 8 sides per slice.

In SculptCrafter, if we wanted a different number of sides/faces for a cylinder than 8, we had to change the description to a number indicating the number of faces.

In Prim Generator, we need one or more plugins, it being the "Smooth shapes" one the first to consider. So if we want a cylinder, torus or tube being smoother, we have to rez it... from the smooth shapes plugin panel.


Notice that the plugin panels have no "Generate" button, nor they have "Dummy" (bounding box) or "Delete" buttons. The plugin panels give us more shapes, but we still need the basic panel to obtain the sculpt map, or the bounding box functionality. The plugin panels remind us indeed that we need the main Prim Generator panel for this to work, by printing an owner message each time we rez it:

[08:54] *NN* Prim Generator Smooth Add-On v1.00: This is add-on of Prim Generator. Please use with Prim Generator.

Now, if, for example, we click the shape pointed at in the picture:


Prim Generator says:

[08:59] *NN* Prim Generator Smooth Add-On v1.00: [Holed Cylinder] (12 sides) Vertices Count: 2-4  Modyfiable: Path Cut, Hollow, Twist, Taper, Top Shear  Locked: Hollow Shape, Slice

Of course, smoother shapes mean more slots used in the sculpt map. In this case, the addition of the smoother cylinder will have a cost of four slots from the total of 32 that we have available. Smoothness always means more faces of the sculpt prim used to give that detail, and so, less available space for the rest of prims we want to include.


What about texturing?


Texturing sculpt prims is not easy, and texturing sculpt prims produced by using programs such as Prim Generator or Sculpt Crafter is even more complex if possible, if we don't want to be constrained to having the same texture applied to each and every face. Normally, the latter is what's done: have the texture applied to each face, and for that, it's required to change the number of repeats of the texture. The reasons are way far from the scope of this class. We'll just use the texture repeats by using one of the provided scripts with Prim Generator, or change those repeats manually in the "Texture" tab the way Prim Generator suggests to us after it has generated the sculpt map and given to us the URL to download it from:

[09:41] *NN* Prim Generator v2.02: Success! When you upload the sculpt map, make sure "Use lossless compression" is check.
[09:41] *NN* Prim Generator v2.02: Prim Size: <1.24889, 1.33330, 1.00000>  Texture: Repeats=<4, 32> Offset=<0.5, 0.5> or Repeats=<1, 8> Offset=<0.0, 0.5> or Repeats=<1, 16> Offset=<0.0, 0.5>
[09:41] *NN* Prim Generator v2.02: Sclupted Map URL -> http://naonao.biz/cgibin/image.cgi?aHR0cDovL3NpbTIzMzcuYWduaS5saW5kZW5sYWIuY29tOjEyMDQ2L2NhcC8wNGIwZTZhMi01MzBlLWQ4YmEtNzYyZi02MmQwMjk0YTVjZjU=

In here, Prim Generator is telling us the texture repeats and offsets in this line:

[09:41] *NN* Prim Generator v2.02: Prim Size: <1.24889, 1.33330, 1.00000>  Texture: Repeats=<4, 32> Offset=<0.5, 0.5> or Repeats=<1, 8> Offset=<0.0, 0.5> or Repeats=<1, 16> Offset=<0.0, 0.5>

So, three suggestions to try with our sculpt prim:

Horizontal Repeats = 4
Vertical Repeats = 32
Horizontal Offset = 0.5
Vertical Offset = 0.5

Horizontal Repeats = 1
Vertical Repeats = 8
Horizontal Offset = 0.0
Vertical Offset = 0.5

Horizontal Repeats = 1
Vertical Repeats = 16
Horizontal Offset = 0.0
Vertical Offset = 0.5

Note: If you hadn't realized before, Prim Generator also tells you in that line the size of the prim that will be the sculpt prim using the generated sculpt map. Next to where it says "Prim Size", it tells you the size the prim should have:

[09:41] *NN* Prim Generator v2.02: Prim Size: <1.24889, 1.33330, 1.00000>  Texture: Repeats=<4, 32> Offset=<0.5, 0.5> or Repeats=<1, 8> Offset=<0.0, 0.5> or Repeats=<1, 16> Offset=<0.0, 0.5>

So in this case, it would be a sculpt prim with size X = 1.24889, Y = 1.3333, Z = 1.0.

Having a look again at how the generated shapes look, one of the few suggestions that may come in handy here is, if you use round shapes and boxes... Make Prim Generator to generate a sculpt with the round shapes on one side, and the boxed shapes on the other side.


The reason is that you can find a number of repeats that looks good with round shapes, but then that could look ugly in the boxes you could have in the same sculpt.

One more detail, and class is finished! I promise!

You sure have realized that the texture, for example, in boxes, looks "broken" in a couple of (opposed) faces. This is unavoidable in Prim Generator. Sculpt Crafter will texture them nicely if you use up to 42 of them.


Since rotating the box in your build will make the broken faces to rotate in the generated sculpt, Prim Generator shows you which the "broken" faces will be once you generate the sculpt in its native building blocks. It shows the broken faces like a "grid":


This is useful to know, because we could rotate and hide those faces when we're for example using Prim Generator to generate a fence or other kind of build where those broken faces could be hidden, so only the "pretty faces" are visible.


2013 Final Note: We could go over explaining how the textures are applied in this kind of sculpt prims, why those number of repeats always show, and how we could use that information to create textures that will give us more flexibility in the appearance we show for our sculpt prims. I explained how to do this in a class that made a lot of people's heads to spin (and a few that took that class, now sell it as if it had been their occurrence.)

Honestly, nowadays, with all the advantages that mesh presents with respect to texturing, I have my choice quite clear: if you need custom texturing that goes further from changing texture repeats, then don't go for sculpt prims: go for mesh. You'll save yourself a lot of unnecessary headaches.


And this is all for this class :-)

I wish that you come away with new knowledge.

Thank you all for coming.

-- Auryn Beorn

Creator Resource - Introduction to Sculpt Prims

This tutorial is currently at Creator Resource - Introduction to Sculpt Prims



It's true that sculpt prims aren't as widely used as they were even in 2012 since mesh finally became the standard in furniture and clothing. However, sculpt prims are still a valid building tool, and creators have to learn about them, to know what they are, their advantages, their inconveniences, and how to use them.

Hopefully, the content of this class will clarify many questions about them.

INTRODUCTION TO SCULPTED PRIMS


Welcome everybody. I am Auryn Beorn and I'll be your instructor for this class.

When I started teaching SculptCrafter, I began class doing always a short reminder of what a sculpted prim is, and its limits, to then focus the attention in this tool.

But after near a year teaching it, I've added so much material coming from all what students asked about because they didn't know, and it was so necessary to know... that I've realized this has to be separate, and a prerequisite for the SculptCrafter class... as well as for other classes regarding creating sculpted prims that I've started teaching, like the generics for "Prim Generator".

So...
  • What is a sculpted prim?
  • What can we expect from them?
  • What are their limits?
  • What is the bounding box?
  • How the nano jewelry is created?
  • And LOD? What does that mean?
  • Which tools do we have to create sculpted prims and what can we expect from them?

This class will answer all those questions, essential for any builder, and will be a sure prerequisite for all my classes about tools to create sculpted prims.

Also, after the first experiences in this class, I've decided to separate the "linking phantom and non phantom prims" section in a different class. We were already running over two hours!

WHAT A SCULPTED PRIM IS AND ITS LIMITS


We have several basic building block types (box, cylinder, sphere, torus, etc.) that we may resize, rotate and "torture" a bit (by changing taper, path cut, hollow, twist...), and then we have a special building block type: Sculpted.

This one allows us to create more complex shapes than the ones we can achieve with the rest of the prims, and requires from an application to create them, so we can "import" them to SL.

Nowadays we also have mesh, but mesh could be seen as a separate object type, for we can't, for example, change the building block type of a prim from box, to mesh. That can't be done. However, from box to sculpt, we can do this.

When we choose that building block type, the "Edit" window changes, showing us the following: a "rainbow" texture and a few options below ("Mirror", "Inside-out" and the stitching mode).


This "rainbow texture" is what defines the shape of the sculpted prim, and it's called "the sculpt map". Each dot in that texture defines a point in the 3D space. The RGB components of that dot are interpreted as the coordinates of the point or "vertex", relative to the bounding box.

Up to here, I guess you were familiar with this, right? :-)

How many vertices a sculpt prim may have may depend of the configuration of the sculpt map. A valid sculpt map may have several resolutions like 32x32 or 16x64. We will stick to this basic idea: a sculpt prim may have 1024 faces, that are distributed in rows of the same length. At times, we may hear that each one of those rows is called "slice" (for example, Sculpt Studio uses this name.)

As soon as we select the "Sculpted" building block type, SL shows us an apple: that's the default sculpted prim. To change it, we have to click the "rainbow texture" and select a sculpt map from our inventory, or we can drag and drop a full perms (or a copy/no modify/transfer) map on to the rainbow texture box.

How do we obtain sculpt maps? We may for example, buy them from other creators. And we also may create sculpt maps, with specific tools. We'll talk later about which tools we may use to create sculpt prims.

Apart from this "rainbow texture" (sculpt map), which defines the shape of the sculpted prim, we need also to apply a texture for the sculpted prim. This, as usual, is found under the "Texture" tab in the "Edit" window.


So, yes, to create a sculpted prim, we need TWO textures: one it's the sculpt map itself, then, the texture to texture this sculpt prim.

Note: At times, students asked the following: "Are sculpted prims more laggy than regular ones, for they need two textures?"

The answer is, sculpt prims are more laggy than regular ones, but not because they need two textures. The sculpt map is a very tiny file that is transferred quickly to your computer, almost instantly (however, I've seen sculpt maps as crazy as 1024x1024... when 32x32 or 64x64 top would have been enough). What may cause client side lag is the rendering of the sculpts, because your computer is going to be busy decoding the map to represent the corresponding 3D shape.


STITCHING TYPE


And what does the "stitching type" means? This refers to the way that the dots in the edges of the sculpt map connect in the 3D shape... or don't connect at all!

Remember that a sculpt map, as we've seen is a texture: we're talking about a 2-Dimensional entity: the rectangle that the texture is, and rectangles... have edges.

Four edges: top-left-bottom-right.

But now, this rectangle is mapped into a 3-D shape... so if we want to "close" the shape, we may have to "stitch" the edges of the rectangle, when they are applied to the 3D shape.

Where do we set the stitching type, to begin with? We set it under "Stitching type":


And how does this stitching behave? This is better understood by showing how the four different stitching types are applied, which we're going to see now. Some types are not completely obvious, so also a representation in wireframe mode (CTRL SHIFT R) will be shown.

Note: The keys that bring wireframe mode up behave as a toggle. CTRL SHIFT R turns wireframe mode on, CTRL SHIFT R again turn wireframe mode off, so we're back to our normal SL.

Stitching Type: Sphere

When we select this one, the left and right edges of the rectangle that is the sculpt map are going to "stitch" to each other, and the top and bottom edges will stitch as a single point. The corresponding 3D vertices are stitched. Let's check this in the apple:


Stitching Type: Torus

When we select this one, the left and right edges of the rectangle that is the sculpt map are going to "stitch" to each other, and the top and bottom edges will also stitch to each other. As a torus would do :-)


Stitching Type: Plane

This and "none" are the same, that's why latest viewers unified this under "Plane/None". What happens with this one is that all the edges will be left un-stitched. Sculpt maps created with tools like SculptCrafter will have this stitching type, but it's also common to find it in sculpt maps for blankets, rugs, tablecloth and other sorts of "horizontal-only" objects, so to speak (not a coincidence... these 3-D shapes don't need to "close"!)


Stitching Type: Cylinder

Finally, the "cylinder" stitching type will make stitch the left and right edges of the rectangle that is the sculpt map, but as a difference with the sphere stitching type, the top and bottom edges will remain un-stitched.


If we purchase sculpt maps from other creators, usually, they indicate us which one of the four types to select. But don't worry if that is not specified anywhere: we have just four to choose among, and the one that makes the shape look right... that is the good one! :-)

The MIRROR option


This can be better understood with an example.

If you consider this sculpted shelf:


by rotating it we may adapt it to different configurations in a room:


but what if I wanted to have a SYMMETRICAL shape?

When working with regular prims, by changing the parameters of the prim (path cut, taper, etc) we can obtain the symmetrical shape of a given one... but we don't have those parameters when working with sculpted prims!

Well, that's what the "mirror" option is for :-)

It will mirror the shape by flipping the X axis of the sculpt map... like this one.


So when you have built, say, a wing, you can use this option to get the symmetrical (mirrored) one. Or shoes. Or any other application that you have in mind, and requires of a mirrored shape :-)

Note: At times, a few students asked, because they thought that by clicking the "Mirror" option, this would create another sculpt prim, mirrored... This is not what happens! Ticking this option mirrors the existent sculpt prim. If you want to have mirror and non mirrored one together, you need two prims (one for the normal sculpt, the other for the mirrored one.)

The INSIDE-OUT option


Understanding what the inside-out option is for will require of some explanations.

As you can see whenever you enter into "Wireframe" mode (CTRL SHIFT R), everything in SL is made of triangles. Triangles, in theory, have TWO faces, but SL only applies the texture to one of these faces.

Which one?

Imagine that each triangle has an arrow pointing "outside" the surface. Those arrows are called "normals." The faces that are "outside" are the ones that have the texture applied. When we tick "Inside-out", the normals get inverted. That is, the arrows point to the opposite direction. SL interprets this as the "inside" being the "outside" and thus textures those faces. The faces that were "inside".


For example, in the picture below we have the same gem to the left and to the right. The gem to the left has no changes, while the gem to the right has "Inside-Out" ticked, so the faces textured are the inner ones:


In a way, it is like flipping a sock inside-out :-)

You can find further (and more technical) references about what a sculpted prim is in the following links:

http://wiki.secondlife.com/wiki/Sculpted_Prims:_Technical_Explanation
http://wiki.secondlife.com/wiki/Sculpted_Prims_Creators_Guide

IMPORTANT! CHECK THAT YOU UPLOAD USING LOSSLESS COMPRESSION!


When we upload a sculpt map to SL, we have to make sure that we have ticked the box saying "Use lossless compression"! If we don't check this, our sculpt will look deformed and we'll have to upload it again.

Since sometimes a picture talks a thousand words... Let me show how dramatic it may be, to forget "Use lossless compression" checked :-)


This little check box highlighted in the picture is what we should never forget!

If I've achieved to make you all scared at how broken the poor sculpt looks... please, remember ALWAYS to have checked "Use lossless compression" when uploading sculpt maps! The only way to fix this is to UPLOAD AGAIN the map, this time, with the checkbox marked.

As a short note here, this is worth it to mention: Check it always when you upgrade your viewer. It's an option that, for some reason, might get unchecked if you change viewer. So specially if you change to another viewer, make sure it's checked... The setting could have got lost.

At least, I've convinced you all that we have to check this, right? :-)

Note: At times, students asked «Why does the "Upload using lossless" option exist, if we have to tick the box always?»

Well, not all the times! There are more small textures you may want to upload, not only sculpt maps. For example, typical particle textures will be 64x64 or 128x128 images, and in those cases, you may want to upload them compressed with loss compression, so they use less space in the server (and also need less time to be transferred.)


And here comes a very important concept.

THE BOUNDING BOX


The bounding box is the box that "wraps" the sculpted prim. When we change the size of a sculpted prim, we're changing the size of the bounding box. Let me show what I mean.

You all see this apple in front of me, and the partially transparent cube surrounding it, yes?


The apple, and the cube, have the same size.

If we rez a box, and turn it into sculpt, the visible part of the sculpt, usually, does not use all the size of the box. But for the server, the sculpt has the boundaries of the box. Although we see an apple, the server sees the box: That box is the BOUNDING BOX.

Graham Dartmouth uses a very graphical way of explaining this concept also: if you think of sculpting like beginning with an initial (rectangular) block of stone, and you begin carving (sculpting) it so you end up with a statue... The statue will be smaller, but the initial block of stone will be... the bounding box.

So a sculpt, visibly, will be, as much, as big as the bounding box, but usually smaller.

Depending of the application that we're using, we can CHANGE the size of the bounding box, and this may have important uses as we're seeing next. Also, by the end we'll talk about which applications allow us to change the size of the bounding box, as not all of them do. At times I may write just BB for Bounding Box, to type it faster.

Now we're going to see a couple of applications of understanding what the bounding box is :-)

CREATING NANO JEWELRY


This knowledge about what the bounding box is will show us now, quickly, the principle behind creating nano jewelry.


Ok, now let's explain what this model here means... (the one in the picture above).

Again, I have a box, and now a gem, that have the same size. But as you all can see, the visible gem is quite small compared to the box. Same size, but visible gem, quite smaller.

I'll explain next how this can be done, but before... If now I resize this set... I think... You all are going to say "oh of course! The VISIBLE gem is going to get VERY small, because the real size is bigger!", yes?

Let's prove it :-)

We know that the minimum size for prims in SL is 0.01... but... that is for the BB! Not for what's visible. If the visible is smaller... It can get REALLY tiny when we downsize the BB!


Can you see now the gem? (the tiny dot to the right of the initial gem's bounding box, kept as visual reference to compare.) And this isn't yet the minimum size possible for the BB.

Remember that when we work with such small sizes, we have to use CTRL 0 to zoom in (and then CTRL 9 to restore the camera.)

So that's the trick for nano-jewelry: the visible gem is (way) smaller than the BB. When designing the gem in the sculpt program, it was made so the bounding box was bigger around.

When you read in advertisements from sculpt creators "nano maps", they refer to this: sculpt prims that, visibly, are (way) smaller than what the BB is. The more empty space the bounding box has, the more, VISUALLY, you'll be able to reduce your sculpted prim.

So this idea, visible part smaller than the BB is clear, yes? :-)

Now, how to do this in the sculpt program?

The first that we need to know is that offworld sculpting programs will allow us to manipulate the sculpt prim in the BB (Blender, Maya, 3DS Max... even Rokuro and Tokoroten.) Not all the inworld programs will allow this, tho.

Sculpt Studio, Sculpt Crafter and Prim Generator allow this, to mention the ones I work with.

But Prim Oven does NOT allow to manipulate the bounding box. So we could not use Prim Oven to make nano jewelry, or even, to make doors pivoting around an hinge, as I'll show next.

Don't worry now about the features that each program could have: I'll talk about them to conclude the class with.

I'm going to show what I mean with "manipulating the bounding box" with Sculpt Studio.

Please keep in mind that this is not a class on Sculpt Studio, it's just a quick demonstration of the idea. Refer to the material you have about the tools for the detailed "how", as they're not the focus of this class :-)

Let me quickly rez a mat with just 8 slices:


Let's assume this is my future sculpt. Now I have to define the BB in Sculpt Studio, and this tool rezzes it.


I can tell it to auto adjust, yes, and it does it.


But now, I can make this box bigger... with the edit window, as I would resize any other box. That's how I have manipulated the BB.


Do you see that when I do this, the sculpt I'll get, will be as the gem? (that is, that the visible sculpt is going to be smaller than the BB.)

So I can manipulate the BB to create a nano-gem.

And I can even move the sculpt in the BB!

Like this...


And why would I move the BB off from its center?

We're going to see right now an example, another application of being able of manipulating the sculpt prim inside the BB.

CREATING DOORS THAT PIVOT AROUND AN HINGE


Note: This material is developed in more detail in its own entry. It covers the concept of "door" in SL, and explains how to create doors that would rotate around the hinge, from boxes to sculpts and mesh. It also explains the foundation of "door scripts", so builders know what they're looking for exactly when it comes to give interactivity to doors.


We can't finish a class about sculpted prims without mentioning an important concept that we have to take care of, when working with sculpts: LOD.

BUT... WHAT DOES LOD MEAN?


LOD is the abbreviation of Level Of Detail, and it refers to the detail that the client (your viewer) will render for a sculpted prim. The closer we are of a sculpted prim, the more detail our viewer will render for that sculpted prim and the reverse: the further from that sculpted prim, the less detail our viewer will render.

But sometimes, when we zoom out, instead of simply losing detail (say, a circle is now seen as an octagon), the sculpted prim completely loses the shape.

Like... This shelf I've just rezzed.


This one breaks very badly as we walk away from it!


This happens when the sculpted prim is not designed taking into account what we'll call "LOD levels". Usually, "a bad LOD" means "a poorly created sculpted prim".

What happens with LOD is what we can see in the picture:


At LOD level 1, that is, when we're "close" to the sculpted prim, our viewer renders all the vertices specified in the sculpt map, and we see the shape as is.

But when we zoom out, the viewer renders only the points at LOD level 2, that is, every fourth vertex from the sculpt map. The shape loses definition, but if it's well crafted, it should not break, just be more polygonal (like, a sphere looks like an octagon - just because the viewer renders less points, but if well crafted, we still see a pot, like here, not a broken thing like the shelf.)

Things may get even worse by zooming further, since the viewer will render only the points at LOD level 3, that is, every 16th vertex from the sculpt map. The shape loses even more definition.

When working with tools like SculptCrafter, Prim Generator, Prim Oven... we have to expect this for small bounding boxes, since the miracle of packing so many prims comes precissely at the expense of losing LOD in this case.

There's a workaround that consists on changing the debug setting renderVolumeLODFactor, raising it up to 4.0, but we have to take into account that this workaround is client side: not all the residents even know where the debug settings are, so we should not put on the residents side the responsibility for our sculpted prims looking good (not skew and broken) no matter the distance.

Depending of the tool, we may work the shape so it's LOD-resistant... or we can do nothing at all to fix it, if the shape breaks.

Offworld tools will allow you to manipulate each vertex and see the LODs, so in these ones we should be able to create sculpts that don't break with the distance.

When it comes to inworld tools, it might not be possible.

In Sculpt Studio, we can also manipulate each vertex individually, so we should be able of creating sculpts that don't break with the distance.

SculptCrafter has the LOD plugin, which basically multiplies by 4 the total of vertices to make sure that we will have shapes that don't break at LOD 2 (but this could "mess" the texturing - this bit is covered in the "SculptCrafter: Plugins" class.)

Prim Generator allows this by creating a bigger BB than the required (this bit is covered in the "Prim Generator" class.)

TOOLS TO CREATE SCULPTED PRIMS


Ok, so we know now a lot of things about sculpted prims... And *how* do we create them?

We create them by using a program that allows to export a 3-D shape in a sculpt map. There are inworld programs (that is, we work the sculpt *in* SL) and offworld programs.

Both inworld and offworld programs create *the sculpt map* that you have to later apply in a sculpted prim, so you get the actual sculpt :-)

Offworld programs like Blender, Maya, 3DS Max... allow us to create all type of sculpted objects, but these programs usually have a steep learning curve.

Some specific kind of shapes are much more easily created with other applications, and perhaps we just need to learn these for some basic uses. To help you, I've prepared a list that shows which kind of shapes we can work best with which program, features and limits.

The first to mention are the revolution and extrusion shapes like glasses, bottles, candles, pots, stars, hearts... All those shapes are (very easily) created with Rokuro and Tokoroten.

Then we have Sculpt Studio. You may create any kind of sculpted prim with it. It's an inworld tool that works in "slices". The idea is, think of your 3D object, imagine how you would slice it, and work those slices. This is very close to "real sculpting" in an offline application such as Blender.

However, there are other builds that are benefited of some specific inworld tools: builds made of blocks such as furniture, stairs and fences, to mention some.

Here it is where we have several tools to choose... I personally prefer to have as many tools as possible, since each one has a specific advantage that the others don't have... but the following information will also help you take an informed decision if your budget is limited and you have to decide one among all.

PRIM OVEN
  • We can work only with boxes and cylinders (which allow only path cut, taper and top shear - we can't use the rest: hollow, twist, slice.)
  • It "packs" up to 16 prims in one sculpt prim.
  • The bounding box fits the size of the build, but we can't make it have a custom size - to make pivot doors, etc, we have to import the map in Blender and manipulate it there.
  • Also, the data is output to chat: we have to save this in an external text editor and then open it with our browser.

PRIM GENERATOR
  • It allows boxes, cylinders, spheres, torus and tubes as shapes, and many transformations for them.
  • We can "pack", per sculpt, up to 32 prims.
  • Also, we CAN manipulate the BB and we can move the build within the BB.
  • The sculpt map is a PNG file that we have to download from the creator's website.

SCULPTCRAFTER
  • It allows boxes, cylinders and spheres.
  • In this one we can "pack", per sculpt, up to 42 normal boxes, 64 if planks (texture "broken" in two sides) or 85 if spikes (full tapered boxes.)
  • Also, we may move the build inside the BB.
  • But for a custom BB size, we need a plugin apart.
  • The sculpt map is a BMP file that we have to download from their website.

So I hope that knowing this, helps you taking an informed decision if you have to choose one.

I wish that you come away with new knowledge. Thank you all for coming.

-- Auryn Beorn