repeating elements within a sculpt? - SLUniverse Forums
Navigation » SLUniverse Forums > Development Discussion and Support > Content Creation » repeating elements within a sculpt?

Content Creation Discuss building, scripting, and other forms of content creation for SL.

 
Reply
 
LinkBack Thread Tools Display Modes
Old 05-15-2009, 09:54 PM   #1 (permalink)
Junior Member
 
Truthseeker's Avatar
woot teh FOOK?!?!?
 
Join Date: Mar 2009
Posts: 26
My Mood:
Question repeating elements within a sculpt?

ok, so I'm making this thingy in Blender, and, if possible, I'd like to repeat one chunk of it (the bit that's selected in the attached images) without having to sit there pushing around vertices one at a time...

repeating elements within a sculpt?-repeat-.jpg
repeating elements within a sculpt?-repeat-2.jpg

Is there a way to do that in Blender? Some 'copy&paste' (or whatever) type operation that would allow me to apply the changes I made to one piece of my sculpt to another?

Am I being even remotely clear?
Truthseeker is offline   Reply With Quote
Old 05-15-2009, 10:51 PM   #2 (permalink)
Exotic Made-up Monster
 
Aki Shichiroji's Avatar
 
Join Date: Aug 2007
Location: Toronto
Posts: 2,559
My Mood:
SL Join Date: 7/22/2006
Business: Organica
if tehre is some means of applying changes in that manner along multiple sections of one sculpt, I'm not aware of it.

There are limited things you can do en-masse. For instance, if the whole thing is one vertical cylinder, you can select the verts you want to change in a similar way and expand them along the x and y axis. I've found using the snap hotkey helps quite a bit - just keep an eye on the degree to which you are transforming your verts and apply them equally, if you want a similar expansion all 'round.

In fact, the majority of what I do as far as repeating elements gets done as a combination between 'eyeing it' and writing down all the transformations i need, from piece to piece.
Aki Shichiroji is offline   Reply With Quote
Old 05-16-2009, 12:04 AM   #3 (permalink)
exp(ln(Gearhead))
 
Aodhan McDunnough's Avatar
 
Join Date: Jun 2007
Location: Philippines
Posts: 6,567
My Mood:
SL Join Date: March 28, 2006
Business: Aodhan's Forge
Blog Entries: 2
What I would do are either:

1. Make multiple copies of the shape I need then use it as a guide to shape the sculpty.

2. Build the identical items on the sculpty by doing transformations on two areas at the same time.
Aodhan McDunnough is offline   Reply With Quote
Old 05-16-2009, 12:57 PM   #4 (permalink)
Senior Member
 
Miriel Enfield's Avatar
Behold, the power of flopsy ears.
 
Join Date: Sep 2007
Posts: 2,526
Good news: yes, you can do this! It requires a bit of messing around with the UV map, but that's not so hard. (Actually, there's probably a modifier or something somewhere that lets you do it without this, but that's beyond me.)

I'm not a good teacher, and I'm sure I'll mess up my terminology a bit, but I'll try to explain this as best I can.

On a baked sculpt map, each pixel represents a particular vertex. SL looks at the top row of pixels and renders those as the top row of vertices, at the middle row of pixels and renders those as the middle row of vertices, and so on. This is how sculpties work.

But in Blender, before you bake, your UV map has a bit more flexibility. A certain segment of your mesh may be assigned to the top part of the UV map, for instance. If you just leave it there, it will be baked as the pixels at the top, and SL will render it using the top vertices. But if you move it on the UV map -- say, to the middle -- it will be baked into the middle of the image, and SL will render it using the middle vertices. And what can be moved can be copied and then moved.

I'll give an example, complete with pictures. Let's say I want to make three flat planes, side by side and apparently three objects, out of a single sculptie. You don't really need this technique for this particular task, but it's an easy example for me to make, and so it's what you get. I'm lazy, you see.

First, I slap down my sculptie (I'm using an oblong one) and figure out how long I want my original plane (the one I'll be copying) to be. Then I pinch the ends of it, because I want this to look like separate objects.


You'll notice that I'm in editing mode, my entire mesh is selected (it's yellow), and my entire UV map is visible in magenta. When in editing mode, selected portions of the mesh are visible in the UV window. Their UV coordinates (the stuff in magenta) are not selected by default, so you can't do anything with them but look. To actually select them (a prerequisite to manipulating them, which I'll be doing in a minute), you have to go over in the UV window and select them. This is done in basically the same manner as selecting stuff in the 3D view window. If I go over into the UV window and hit a -- the "select all" hotkey -- this happens:


See, now it's yellow. However, no matter how much of the UV map is or is not selected, only the parts of the mesh that are selected in the 3D view will be visible in the UV window. So, if I don't touch the UV map but deselect part of the mesh itself, I get this:


You see? That top part of the UV map is assigned to the selected portions of the mesh, so it's visible. But the bottom part is assigned to parts of the mesh that are unselected, so you can't see them.

Anyway, I've got my plane highlighted. Let me tidy it up a bit, first, by just moving those vertex rows I shrunk down to points. I want rectangular planes, not pointy things.


Much better. Now, to duplicate it. Highlight the part of the mesh you want to copy and hit shift-d. The original will be unselected, but you'll immediately get a copy that is selected. The copy will follow your mouse until you left click, at which point it will stay where you left it, so it's easy to move it out of the way. Because we're making three panes, I made two copies, and moved them off to the side.


You'll notice that they're all occupying the same space on the UV map. This is a problem -- for sculpties, a given spot on the map should only ever be assigned to one set of polygons -- but I'll be fixing it next. As a note, you can tell when sections of the map are overlapping, because they're a stronger magenta than the rest. Like in this picture below. The bottom coordinates only represent one part of the mesh, but the top coordinates represent the original plane and the two copies I made.


I'm going to be selecting each copy, one at a time, and moving it to a free space on the UV map. In this case, I'll be moving it down. The original can stay where it is, but let's move the first copy. First, I highlight it in the 3D view, so that I can access its UV coordinates. Then I make sure the UV coordinates themselves are selected, so that I can manipulate them. I can now, just like in the 3D window, hit "g" to move them around, "s" to scale them, and "r" to rotate them (though I won't be scaling or rotating them).

One of the issues I face now, however, is knowing how far to move the coordinates. I don't want them to overlap with the coordinates of the original plane, but since the original plane isn't selected in the 3D window, its coordinates aren't visible in the UV window, and so I don't know where it ends. Luckily, the UV window has a cursor, which can be placed by left clicking. You can use this as a guide, to mark the bottom of the original plane.

So, before I move anything, my screen looks like this, with the UV window cursor circled in red:


Then, while in the UV window, I hit "g" and move that highlight section, and get this:


Again, I circled the cursor. You'll notice that I put a bit of space (two pixels, the height of one of the squares in the UV coordinates) between the top and the cursor. This is because I'm doing the trick where I make a single sculptie look like multiple objects. As you know, that trick relies on having a line -- a real line, with no volume -- between the two "separate objects." That line is a row of faces, shrunk down to nothing, but it wasn't duplicated when I made my copies of the planes. Each plane has points of vertices at its end, but the edges actually connecting those points are missing in the mesh. You can even see the lack of lines connecting each plane. However, if I leave space for those faces -- just enough blank space for one row of them -- it will work out fine when it bakes, and SL will add the faces on its own. (The version of Domino's scripts I use has a "fill holes" option when baking, which I always use. I'm not sure how it will work if you don't do this, though it may end up okay.)

If you're not doing the separate object trick, you don't need to do this: you can line the coordinates up exactly, with no blank spaces in between.

Another thing: Blender has a few options to make adjusting UV maps easier. If you go into the UV window, there's the UV drop down (or drop up, in this case) menu. "Snap to Pixels" will make your coordinates, well, snap to pixels when you move anything. For a sculpt map of normal dimensions, each square in the UV coordinates is two pixels high and two pixels wide. Meanwhile, "Layout Clipped to Image Size" will keep your coordinates within the black box. Here, have a picture:


Back to the mesh. I move the second copy down to its own space, and now I'm left with a final problem: instead of overlapping with the original plane, the two copies are now overlapping with the unused bottom of the original mesh.

No worries. I just delete the unused vertices, leaving me with this. If you look closely at the UV map, you can see the blank spaces I left. There's also some blank space at the bottom, which wound up being unused, because each plane didn't quite take up 1/3 of the height of the sculptie. No worries; it'll be invisible when rendered in SL.


Here it is baked, if you're curious about how the map came out:


And here it is in SL, in all of its boring, plywood covered glory:


A word of warning: you can't get around every sculptie limitation using this. SL will still build every sculptie by deforming a regular grid of vertices. If you don't take this into account -- by leaving blank spaces on the UV map for volume-less lines to go, for instance -- you may get a nasty surprise when you export to SL.

That said, this technique has uses beyond just making a brand new sculptie. If you have a section you want to duplicate in an otherwise fine sculptie, duplicate that part of the mesh in the 3D window, move it somewhere free on the UV map, and then delete (in the 3D window) the vertices it replaces. It's quick and easy once you get the hang of it, and I use it all the time.

So... I hope that was helpful, not too incoherent, that my (probably wrong in places) terminology didn't prove too confusing, and that Cris doesn't get mad at me for posting a bajillion huge images in this thread.

Last edited by Miriel Enfield; 05-16-2009 at 01:13 PM.
Miriel Enfield is offline   Reply With Quote
3 Users Said Thanks :
Old 05-16-2009, 07:29 PM   #5 (permalink)
Junior Member
 
Truthseeker's Avatar
woot teh FOOK?!?!?
 
Join Date: Mar 2009
Posts: 26
My Mood:
Thanks so much, Miriel, for putting together such a detailed explanation! The pics are super-helpful.

I knew something like this *had* to be possible, but I was stumped by the fact that a sculpt-mesh has a fixed number of vertices/faces (so duplicating didn't seem to be an option, but now I see how that works), but also the fact that I wanted a single, contiguous mesh, since for this piece, I wanted it all as one sculpt...

I'll post a pic once I've figured out how to apply this new knowledge xD

Last edited by Truthseeker; 05-16-2009 at 07:38 PM.
Truthseeker is offline   Reply With Quote
1 User Said Yay!:
Old 05-20-2009, 10:59 AM   #6 (permalink)
Junior Member
 
Truthseeker's Avatar
woot teh FOOK?!?!?
 
Join Date: Mar 2009
Posts: 26
My Mood:
Talking

HaHAAAAAAA!! Success!! As promised, here's a coupla pics. It's actually a stack of 2 prims, and the lower one still needs some work, since it looks pretty squished. Also it'll look better (I hope) once I've baked a proper texture for it. This is just a standard square one, repeated 4x16...

repeating elements within a sculpt?-success-_001.jpg

repeating elements within a sculpt?-success-_002.jpg


Thanks again for your help!
Truthseeker is offline   Reply With Quote
1 User Said Yay!:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On