The magic of the convex hull and sculpts

Back in November I moved into a rock. This is SL after all, so why not? It’s been interesting, the house tucked away under a wooded garden, sekrit elevator and all. However, it did mean the wood and garden generally got ignored when I was home; the trees, campfire, gazebo and so on languishing without use.

Livin’ on a rock/Livin’ on a prim-based rock (with apologies to Livin’ in a Box)

So I decided it was time to return to a more normal style of living and try a few experiments to see what I could come up with. Essentially, I wanted to see what could be achieved using a new in-world tool I’d recently received and when using the convex hull physics shape to produce a reasonably detailed house build with a reasonably low Land Impact – preferably around the same as the house I was leaving (28).

Sunrise: a view from over the dance floor taking in the patio and lounge

The House

Given the house is in a wood…or copse, really….I wanted something that was fairly open-plan and which at least partially blended into the surroundings I also wanted something that allowed me to continue to enjoy SL sunsets when at home. The result is a west-facing, 2-room affair built on two sides of the small pond I already had in the middle of the copse, which also connects with my “dance floor rock” (what’s a house without it’s own dance floor?) via a stone patio whereon sits my beloved PrimPossible concert grand.

The lounge opens onto the patio, and provides enough room for sitting and conversation, focused on the view to the west (over the pond) or the fireplace (lifted and remodelled slightly from the “old” place. The bedroom sits to the north side of the pond, connect to the lounge, and provides enough room for a bed (not that I actually sleep in SL and pixel bonking is so passé!), and room for my cunningly disguised (and soon to be defunct) SLM Magic Box and not-so-cunningly disguised rental server.

The Lounge & bedroom beyond

I wanted the place to be fairly open to the surroundings – no doors or much in the way of windows between the “garden” and the house itself. This lead to a design that is relatively open-plan, with railings and open-slat wood panels as well as wood-framed windows to the back (east side), and stone walls and columns to add a little contrast to the place. In particularly, I wanted to have a roof, but not one that closed me off from the world or used skylights to give me a view of the stars.

Lounge rails

The Build

The total prim count / Land Impact for the house is 30, which I think is a pretty good figure, given the relative complexity of elements within the build (particularly the railings, wooden wall panels, roof and window frames). Had these been prim items, then the total “cost” of the house would have been massively higher. But they’re not – nor are they simply sculpt maps I’ve created externally to SL (I actually wouldn’t have a clue as to where to begin) or purchased elsewhere for re-use. They were created almost entirely in-world, allowing me to have railings, window frames, panels and roof sections all for a Land Impact of just 12.

Sculpt Generator

I created the “wooden” elements of the house using the “NN Prim Generator” by Naonao Watanabe. For those not familiar with it, this is a clever piece of scripting that allows prim-built objects to be used as models to generate sculpt maps which can be imported into SL.It comes in three flavours: one that can use prims to generate “regular” , “natural” (for rocks, etc), and a plant generator. I have the “regular” unit, which can create shapes suitable for building, which came to me as an unexpected gift (*hugs Mika warmly*).

Roof: from 32 prims to 1

There are limitations to using this tool; the total number of vertices within the resultant sculpt map must not exceed 32, for example. This means that you’re effectively limited to a maximum of 32 prims per item from which you intend to generate a sculpt map, and the number may actually be a lot lower depending on the complexity of the shapes (prims) used to create the item. This may all sound complicated, but the Prim Generator itself makes it easy for you by displaying the vertices counts for all available prim types.

Naonao Watanabe’s Prim Generator

To create an object, you simply click on the required shape on the generator, which will rez the required object (pre-scripted), and start building, selecting  and sizing new shapes as required.

The documentation supplied with the unit, together with one of the supplied examples, suggests that it is possible to pre-texture items as well. However, I confess that I’ve yet to try this out – assuming I’m understanding things correctly – as for my purposes, it was enough to be able to texture my constructs post-build.

When you have created an object you wish to “convert” to a sculpt, click on the GENERATE button on the Prim Generator. This performs a series of confirmatory checks to ensure your item is within the tool’s overall constraints and then pops-up a menu allowing you to generate / scale-and-generate the required sculpt map, which you can then obtain from an external web page and save to your hard drive. All that’s then required is for you to generate a default sculpt in-world, upload the map, apply it to the sculpt and size the item accordingly.

One thing I would recommend, however, is that if your Viewer supports temporary uploads, you initially use this to check that everything is fine with the resultant sculpt map when imported and the sculp properly sized, just in case you’ve missed any overlaps or have unexpected gaps in joins, etc.

Through the trees at sunset – the bedroom and lounge beyond

Using the Prim Generator enabled me to produce detailed roof, railings and window frames for a total Land Impact of 12.

Convex Hull

The other magical trick that people are starting to increasingly use in SL building, and which I employed in this house, is that of the convex hull physics shape. This was introduced as a part of the mesh roll-out, and in the right circumstances can dramatically reduce the Land Impact of a prim build / linkset.

Ciaran Laval has written an excellent piece on the use of the convex hull form, so I’m not going to repeat all the ins and outs here. Suffice it to say that so long as you are working with fairly simple prim shapes, and avoid the complexities of scripts, you can make some substantial savings on elements of the build.

In my case, the base, solid walls, fireplace, floors and “window glass” of the new house are all simple prims – 35 in all for a Land Impact of 35. However, by converting the linkset to a convex hull physics shape via the Build floater (by selecting CONVEX HULL from the drop-down menu in the FEATURES tab – see below), I could immediately reduce this to a Land Impact of 18.

From one linkset, 35 prims, Land Impact 35….
…to one linkset, 35 prims, Land Impact 18.

Who said mesh wasn’t good for SL? :).

Obviously, prim-to-convex hull conversion will not work in every instance – it is possible for the Land Impact to go up as a result of such a conversion. However, with a judicious application of the option within a build, it is possible to bring about a reasonable reduction in Land Impact in a lot of situations. Some things that should be avoided are: linking complex shapes in the linkset to be converted (such as sculpts) or including scripts (if you use a rez faux system, for example, be sure to delete the rezzing script in the convex hull shape linkset once you’ve rezzed a new copy of your build).

Sunset. The lights come on…

I’m pretty pleased with what I’ve achieved; I think the new place suits its location among the trees, and gives me space to entertain friends and the freedom to make sure the garden and dance floor are more properly used. As to the prim generator – I’m liable to be using that for one or two other ideas as well, while the use of the convex hull shape is already helping me to lighten the load some of my other builds have on Land Impact.

…and time to relax and chat with a friend…

Images captured using Exodus 12.01.03 with deferred render, shadows, ambient occlusion and DoF active, but no gamma correction.

6 thoughts on “The magic of the convex hull and sculpts

  1. When reducing land impacts by changing the physics type, you only have to set one prim in the linkset to either ‘none’ or convex hull’ to get any potential land impact benefits.

    Works best with collections of cubes, watch out if your link set has a tube or anything in as that could cause the LI to sky rocket and your object / house to suddenly find itself back in your inventory. (the increase can be dramatic!)

    The best you can achieve is a 50% prim reduction for all cubes. Cuts and hollows will at worst stay at 1 prim each. Everything else will increase the final Li. So for sanity’s sake it can be easier to sort your build into cubes vs the rest and have 2 link sets.

    On average I’m finding about a 1/3rd prim saving overall on my builds, sometimes where you would use a single cube and cut/hollow its actually easier on your build to use 2 prims. Fingers crossed the Lab leave this behaviour intact or it’s going to be a real headache to untangle.


    1. Maileage will vary depending on the Build. Cuts and hollows don’t always leave the value unchanged; again it comes down to the complexity of the original prim For example, I have a fireplace comprising 4 prims, all originally cubes; two are simply stretched, one is hollowed, one is hollowed & cut; when converted to convex hull the resultant Land Impact for the fireplace linkset is 2. Prims that are initially more tortured to start with (toruses, tubes, etc.), don’t fair that well when converted.

      As I’d used only basic cubes in this build, I achieved nigh-on a 50% reduction (as indeed I’ve managed on some of my commercial builds), but people will find mileage will likely vary depending on what they have in the original linkset. As with everything, the key to the magic is experimentation!


  2. I wrote an article recently breaking down the convex hull switchover process:

    And Ciaran Laval somewhat ‘outed’ the method to the public before that in a blog or blog comment that I have been since unable to re-find… (making me wonder if it was somebody else?)

    Its a great trick a lot of us could get benefit from following.

    Another secret of it is that items, or at least true-mesh items, use less prims the smaller they get…
    – Scale down your build, and you’ll get back about 10% of your prims by going from ‘SL norm’ to ‘1:1 scale avatar’.

    On sculpty tools, there are a couple more on the market as well, but Generate is currently the best for lower prim counts. One secret of generate is that you can make many of the resulting sculpties use planar mapping – allowing for highly detailed texturing.
    – And if your sculpty doesn’t work for it, remake it after rotating the parts that came out wrong to a new angle – sometimes resolving the issue.



      1. Yup, Ciaran’s article is linked-to above :); it’s something he and I were discussing when he was having a play-around with his builds :).


    1. I may well be tapping you in-world; I’m having problems getting my head around using Generator and textures other than using the approach described here! 🙂


Comments are closed.