Sculpted Prim Tutorial - Geometric Modelling #1
|
DanielFox Abernathy
Registered User
Join date: 20 Oct 2006
Posts: 212
|
09-14-2007 08:42
Hello! This is the first installment of what I hope will be an informative series on modelling geometric shapes with sculpties using Wings3D. In this installment, we'll be making a sculpty staircase with a little twist  To get started, you'll need a copy of Wings and Omei's excellent Sculpty import/export plugin. I assume you've at least played around a bit in Wings before and have a general grasp of basic camera controls. If you're having trouble getting Wings or the sculpty plugin to work, please do a search and find one of the existing Wings troubleshooting threads. Here's a quick hotkey reference, just in case: x, y, z - Look down the x, y, or z axis v, e, f, b - enter vertex, edge, face, and object selection mode o - toggle orthographic view r - reset view a - aim camera at current selection space - deselect current selection One important step you will need to perform before following along with this tutorial: in Wings, go to Edit, Preferences, Advanced, and make sure Advanced Menus is checked. Attached is the 16x16 grid this tutorial will use. Good luck and have fun! Post your staircase creation snapshots in this thread! I'm also looking for feedback as to what you'd like to see made in my next tutorial. Please keep it relatively simple  If the video is huge and blurry, go to the lower right corner of the video window and click on the arrow, and select 'double size'. Then it will be small and blurry. http://video.google.com/videoplay?docid=5695483392055008122
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-14-2007 10:28
Daniel, this is great! I learned quite a few new things. I also have some questions because I would have done some things differently. The first is your use of the 128x128 mesh, even though you are essentially modeling at 16x16. It sounded like you were doing that because of a limitation in the importer. It's true that the importer doesn't support down-sizing a 128x128 bitmap to 16x16. But you can do that in your 2D image editor. Once you have a 16x16 mesh, you can export it at 16x16 if you want to keep it that way. (Note that even with the current release candidate viewer, it's best to keep uploading sculpties to SL at 128x128, since there is still a problem with lossless decoding of small images.) If you modeled without doubled-up vertices, you wouldn't have the vertex selection hassles. Is there some other reason I am missing for working at 128x128?
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-14-2007 10:39
My second question is about your advice to routinely override the default centering when exporting. If the centering you use is generally better than the exporter's current default, I should change the default. But the centering you used in your tutorial loses one bit of spatial resolution in each dimension, for no obvious (to me) gain. Can you elaborate on that?
|
Lexus Bosch
Registered User
Join date: 14 Aug 2007
Posts: 58
|
09-14-2007 10:42
Very impressive, ty for sharing this!
|
DanielFox Abernathy
Registered User
Join date: 20 Oct 2006
Posts: 212
|
09-14-2007 10:56
Well there's the issue of the top/bottom rows; so when you import a 16x16 bitmap, you get a 16x14 grid. And unfortunately I was unable to import a 16x16 or 32x32 bitmap in 'plane mode' because the importer seems to fail whenever I try.
In any case, the collapsing of vertices upon themselves is a useful technique in sculpty modelling and it comes up again and again; the stiffer and more resilient to LOD you need a specific detail on a sculpty to be, the more vertices you want to collapse to the points that make up that detail; so the reverse-selection method is good to know.
|
DanielFox Abernathy
Registered User
Join date: 20 Oct 2006
Posts: 212
|
09-14-2007 11:19
Sure Omei. Considering the basic usage of a sculpty staircase usually involves phantom mode and an invisible collision ramp, I'm not so concerned about the physical bounding box; heck its going to be phantom, it might as well not have one at all. The main issue for filling the bounding box completely is positioning and resizing. If your bounding box is full, then you know if you have a sculpty of 1m width, your staircase is 1m wide. If your sculpty is 1m tall, your staircase is 1m tall.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
09-14-2007 12:00
Excellent tutorial, Daniel. Great stuff.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-14-2007 12:29
From: DanielFox Abernathy Well there's the issue of the top/bottom rows; so when you import a 16x16 bitmap, you get a 16x14 grid. And unfortunately I was unable to import a 16x16 or 32x32 bitmap in 'plane mode' because the importer seems to fail whenever I try. Can you post the sculpty bitmap that you can't import? I don't know how to reproduce this problem, but if I can have an example, I will fix it. From: someone In any case, the collapsing of vertices upon themselves is a useful technique in sculpty modelling and it comes up again and again; the stiffer and more resilient to LOD you need a specific detail on a sculpty to be, the more vertices you want to collapse to the points that make up that detail; so the reverse-selection method is good to know. I agree completely. The reverse selection method is one of the new things I learned from your tutorial. And doubling up vertices on sharp edges is necessary to preserve LOD. But if you are doubling up _all_ the vertices, then it seems preferable to model using a smaller mesh and let the exporter do the doubling. For example, a lot of Wings operations will be _very_ much slower at 128x128 than at 64x64.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-14-2007 12:47
From: DanielFox Abernathy Sure Omei. Considering the basic usage of a sculpty staircase usually involves phantom mode and an invisible collision ramp, I'm not so concerned about the physical bounding box; heck its going to be phantom, it might as well not have one at all. The main issue for filling the bounding box completely is positioning and resizing. If your bounding box is full, then you know if you have a sculpty of 1m width, your staircase is 1m wide. If your sculpty is 1m tall, your staircase is 1m tall. I'm not clear here. The sculpty bitmap format doesn't preserve the overall scaling of a Wings model. For example, if you were to take your finished staircase and uniformly scale it to be twice as big (say 2 units in all directions instead of 1) and then export it, it would be imported into SL with the same size as the original 1-unit one. But maybe I misunderstood your motivation for demonstrating the bounding box technique. If it was to demonstrate a technique that can be useful in some circumstances, I understand that. Let me make my question more specific. Do you think I should change the exporter's scaling to do something different than it does now?
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
09-14-2007 14:01
From: DanielFox Abernathy the stiffer and more resilient to LOD you need a specific detail on a sculpty to be, the more vertices you want to collapse to the points that make up that detail The LOD levels always come from the same pixels. By collapsing vertices you are reducing the area available for texturing at higher LODs. You'll see texture changes as the LOD level does too. LOD 1 .A | | | .C LOD 2 .A | .B | .C So at LOD 1 the texture from A-C is used. With B collapsed to C on LOD 2 the A-C texture is just taken from A-B, the B-C part is collapsed. So you'll get texture changes as the LOD changes  The way around it is to model with the A C points and position B at the midpoint rather than collapsing it into C. This maintains the straight line look at LOD 2 but gives better texture mapping as the points are more evenly spaced.
|
DanielFox Abernathy
Registered User
Join date: 20 Oct 2006
Posts: 212
|
09-14-2007 19:37
Omei: Very true, but there's an inherent loss of information in a sculpty at 16x16 and at 32x32, because the end rows are significant. This is not an importer issue; its just the sculpty format itself. At 64x64 we can store all the data of a sculpty, but then our vertices are doubled. And at 128x128 we can't export our imported sculpt. Perhaps if the importer allowed you to specify the import resolution, 8x8, 16x16, or 32x32, independent of the actual size of the bmp being imported; this would also solve the problem of not being able to re-export an imported 128x128 sculpt map. As for the bounding box / recentering issue; please don't take my comments as criticism, I'm not saying the rescale/recenter features are useless or buggy, I'm just presenting a workflow that doesn't use them. Even if you don't scale to the bounding box, I prefer to just see where my object lies inside the bounding box, and adjust as as needed. If i need to recenter it, I like to see how its recentered - the 'recenter' export option essentially is changing vertex data but you never see the results until you upload your sculpt to SecondLife. Before lossless uploads in the RC, this involved logging out, opening the texture upload tool, uploading it, copying down the UUID, restarting SecondLife; a real pain in the butt. And if the bounding box or the center of rotation of your sculpt was wrong, you had to do it all over again. So I came to rely on the "what you see is what you get" method. Attached is a 32x32 sculpt that crashes the importer when I try to import it with 'plane' mode. Domino: I'm aware of this, for simplicity I am showing basic modelling with the 16x16 grid so that people have the fewest points to worry about. The trick in geometric modelling is keeping track of the "most significant vertices" - when you model with the 16x16, you're only dealing with those. If you need a continuous UV for texturing after you have your basic shape, you can uncollapse the vertices in photoshop with a blur and I can show that technique. I know a lot of you folks with sculpty experience are going "But why didn't you do this! But you should of done that" and I understand. Its hard decision to figure out how much information to present to people that may have never even used Wings before or even may never have made a sculpty before. I'm trying to keep things simple in a manner that gives people crisp, LOD-resilient results. We can cover LOD management and UV space continuity in another installment. That is if anybody wants another one 
|
DanielFox Abernathy
Registered User
Join date: 20 Oct 2006
Posts: 212
|
09-14-2007 20:17
Omei here's a visual demonstration of one of the reasons I choose to control the bounding box myself. It seems as if the exporter is taking the average position of the vertices comprising an object instead of calculating the exact geometric center of an object. Consider this ladder - it was exported with the 'allow resizing' and 'allow recentering' options checked. Then I scaled it to a 1 unit bounding box, and exported it without those options.
The resulting sculpt exported with recentering doesn't fill its bounding box. Its center of rotation is not correct; it seems as if the weight of the additional vertices to the left side of the ladder (which make up the comb) pull the model to the right.
If you explicitly handle the bounding box yourself, you can see it is perfect.
I can see situations where you might want to calculate the center of the object by the average method, and situations where you might want to calculate it by geometric center, so I am not going to call this an export 'bug', its just not the behavior I want in this case
|
Jeffery Beckersted
Registered User
Join date: 9 Apr 2006
Posts: 21
|
09-15-2007 09:56
Thank you so much for the great tutorial Daniel, I think getting stuff out there like this is great and will bring more people onboard the sculpty bandwagon. I hope it also may lead to creation of more complex sculpty based content for SL.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-15-2007 14:16
From: DanielFox Abernathy Attached is a 32x32 sculpt that crashes the importer when I try to import it with 'plane' mode. Thanks, Daniel. I checked it out. Turns out it doesn't have anything to do with the 32x32 size per se. This .bmp file is unusual in that it has one more word of bitmap data than it should. The bitmap parser for the general case noticed this, and balked. The parser for the sphere is a special case, and just happened to be coded in a way that it didn't notice the extra data. Since there must be some tool you have that (sometimes?) tacks on extra data, I'll make the importer ignore this in the next release. In the meantime, if you have any bitmap files that the importer can't open, try opening it in some (other?) program and re-saving it. Both the Gimp and Windows Paint removed the extra bytes when they saved the file, although if I didn't make any edits in Paint before saving, it saved an exact copy of the original.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-15-2007 14:46
From: DanielFox Abernathy Omei: Very true, but there's an inherent loss of information in a sculpty at 16x16 and at 32x32, because the end rows are significant. This is not an importer issue; its just the sculpty format itself. At 64x64 we can store all the data of a sculpty, but then our vertices are doubled. And at 128x128 we can't export our imported sculpt. Perhaps if the importer allowed you to specify the import resolution, 8x8, 16x16, or 32x32, independent of the actual size of the bmp being imported; this would also solve the problem of not being able to re-export an imported 128x128 sculpt map. Here's my current plans for the handling of resolution in future versions. * I viewed the option to export at 128x128 as a temporary kludge, to make the best of a bad situation wrt the lossy compression issue. Once lossless compression becomes widely available, I intend to remove tyhe 128x128 option unless someone comes up with a reason to keep it. In any case, it won't be the default any more. I expect that the default export resolution will revert to being the same as the modeling resolution. (Except for the next point.) * It seems to me that the best way to handle the 33rd row and column that can't be represented in the 32x32 bitmap is to add import/export support for a 33x33 modeling resolution. The exporter would export this as a 64x64 bitmap, and the importer would automatically import 64x64 bitmaps as a 33x33 mesh. I would have done this already, but it involves enough work that I was waiting to see if anybody really cared about it. My guess is that lossless compression will awaken new interest in "geometrical" sculpties, and that will in turn make the 33x33 modeling option more relevent. * With those two changes, I figured the ability to change resolution during importing wouldn't add enough value to make it worth the development effort, particularly when it is so easy to do in a 2D paint program. If it turns out that a good way to make some sculpties is to do rough modeling at a low resolution, and then increase the resolution one or more times as detail is added, I would be inclined to add a separate command in Wings to do that, rather than making it an import option. Anyway, those are my current thoughts. If you have a different take on anything, I am most interested in discussing it.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-15-2007 15:05
From: DanielFox Abernathy Omei here's a visual demonstration of one of the reasons I choose to control the bounding box myself. It seems as if the exporter is taking the average position of the vertices comprising an object instead of calculating the exact geometric center of an object. Consider this ladder - it was exported with the 'allow resizing' and 'allow recentering' options checked. Then I scaled it to a 1 unit bounding box, and exported it without those options. The resulting sculpt exported with recentering doesn't fill its bounding box. Its center of rotation is not correct; it seems as if the weight of the additional vertices to the left side of the ladder (which make up the comb) pull the model to the right. If you explicitly handle the bounding box yourself, you can see it is perfect. I can see situations where you might want to calculate the center of the object by the average method, and situations where you might want to calculate it by geometric center, so I am not going to call this an export 'bug', its just not the behavior I want in this case Thank you for the example, Daniel. You are right that the current recentering calculates the center as being the average of the vertices. You might not be willing to call it a bug, but as I think about it, I'm coming to consider this to be a defect that needs fixing. The whole purpose for recentering by default is to make the best use of the limited 8-bit precision. (Early on, numerous people reported exporting a model that was far away from the origin, and wondering why it was so poorly rendered in SL.) With that objective in mind, the best choice of center point in each dimension is the average of the minimum and maximum values in that dimension, not the average over all the vertices. Although precision is not the reason you chose to override the default for the ladder, properly maximixing the precision would also have given you the result you preferred.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
09-15-2007 15:16
From: Omei Turnbull With that objective in mind, the best choice of center point in each dimension is the average of the minimum and maximum values in that dimension, not the average over all the vertices. With the Blender scripts I use the min and max in each dimension. This raised another issue, when doing animated sculpties you need all the sculpties to have the same centre and scale. I handle this in Blender by allowing bake to work across all selected objects. I use the min and max of all selected objects to get the scale factors.
|
DanielFox Abernathy
Registered User
Join date: 20 Oct 2006
Posts: 212
|
09-15-2007 20:24
Omei, the bitmap was created in Photoshop, so - I don't know what to say. I also noticed that the importer really hates 32 bit BMPs also. Maybe a message to the effect of "Incompatible BMP format" would help explain things to the user instead of silent failure.
I would love it if recenter/resize still remained an optional feature even if the behavior is changed. I modelled half a gear, with a half-hole (see attached)
You can see it only occupies the top half of the 1 unit bounding box, so that when you put two of them together and flip one 180, they both have the same exact center. Link two together and put a targetomega in whichever one is root and they rotate together perfectly. Another example of a time where you wouldn't want automatic bounding box calculation is making the wick of a candle or torch sit at the origin so the sculpty can run a particle system without a secondary positioning prim. Yes, you sacrifice a bit of precision, but in practice, I haven't really noticed this to be a problem. The giant hit you take in LOD walking ten meters from an object is much, much, much worse than any tiny 8 bit precision issues.
64x64 being the only import/export format would be fine with me. In fact I don't see any reason for 128x128 either. Most people are going to want to take the sculpt into a paint program, convert to .TGA and add an alpha channel to keep the SL client from displaying their sculpt map to all the world on mod permissions items anyway. While they are there they can resize to 128x128 if they need it.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
Selection problem in Wings
09-16-2007 12:33
Daniel, in your tutorial you mentioned that vertex selection was not completely reliable. I hadn't noticed this before, but I thought I would take a look at it with the intent of submitting a patch to fix it. But even reproducing your tutorial sequence as best I can, I can't make the selection fail the way you show. Can you give me any more details on reproducing it?
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-16-2007 13:14
From: DanielFox Abernathy Omei, the bitmap was created in Photoshop, so - I don't know what to say. I also noticed that the importer really hates 32 bit BMPs also. Maybe a message to the effect of "Incompatible BMP format" would help explain things to the user instead of silent failure. Good suggestion. I'll plan on adding that in the next release. From: someone I would love it if recenter/resize still remained an optional feature even if the behavior is changed. I modelled half a gear, with a half-hole (see attached) It will definitely continue to be an option. I asked about your not using the defaults for the staircase only to question whether there was a better default behavior. From: someone ... The giant hit you take in LOD walking ten meters from an object is much, much, much worse than any tiny 8 bit precision issues. I agree that precision isn't a significant issue for the sculpties I've seen you make. But that isn't universally true. For example, I made a teapot with a small rounded knob on the top. (The knob you would use to lift the top.) LOD was of course an issue for prominent edges, but there were ways to manage it. But precision limitations, for which there was no work-around, kept the knob from being round. If I had wanted to sell it, I would have had to use a second prim for the knob.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
09-16-2007 14:29
From: Omei Turnbull But precision limitations, for which there was no work-around, kept the knob from being round. The only way to predict that I've found is to scale the sculptie to a multiple (256 *) of the snap grid. In Blender I scale to 2.56 in each dimension and then snap to a 0.1 grid. I correct any precision errors as best I can while still snapping verts to the grid then scale back to original size.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-16-2007 15:07
That's a good suggestion, Domino. I hadn't been aware of a snap grid in Wings 3D, but I see it is there. So this technique is applicable in Wings as well. But in the case of the Wings exporter, you wouldn't want to rescale between snapping and exporting, or your vertices would be subject to shifting again as the coordinates get quantized to 8 bits during the export. I haven't tackled Blender yet, so I haven't been following your work with it closely. I know you have a technique for creating sculpties via a UV map. Is there not also an export method that works directly from a model that is built with an appropriate rectangular mesh?
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
09-16-2007 15:58
From: Omei Turnbull I haven't tackled Blender yet, so I haven't been following your work with it closely. I know you have a technique for creating sculpties via a UV map. Is there not also an export method that works directly from a model that is built with an appropriate rectangular mesh? I'm not sure why you think it's a useful option. Subdividing a plane will give an appropriate rectangular mesh complete with UV map. I could do a version of the scripts that read a rectangular mesh and generates the UV points on the fly when baking the vertex info, but it seems a lot of work for a less complete method. I tend to want the UV map anyway for texture baking so seems pointless spending time coding to eliminate a useful thing.
|
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
|
09-16-2007 16:10
If you say it's not a useful technique in Blender, I'll take your word for it.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
09-16-2007 16:58
From: Omei Turnbull If you say it's not a useful technique in Blender, I'll take your word for it. I don't know if it's useful or not. Maybe I'm missing something as all I can think you mean is hard coding the uv map into the script for a rectangular mesh. That saves a little time but no more than loading a uv ready base sculptie does. It loses a lot of flexibility though. With an editable UV map you can save a lot of editing shifting things around if you find yourself a few verts short somewhere. Just edit the uv map, bake, save & reimport and you have a new topology with extra verts where you need them. So while I think it may be useful as a time saver, the alternative of having a uv map is more useful. Unless I am missing something 
|