In this tutorial, I am going to put a model from the 3D Warehouse into Second Life. I have put up a brief note about why I, or anyone else, can do this on a legal basis (while the copyright to the model is still owned by the original creator). To summarise very briefly, the case is that, by uploading their model to the 3D Warehouse, the copyright owner grants us a perpetual [forever-lasting] permission to do certain things with it.
To use Sketchlife, you should be comfortable with using SketchUp already. If you haven't used SketchUp before, take a few minutes to familiarise yourself with it using its help system for first-time users (look in the Help menu).
I'd like to make a vehicle. With modelling, the difficult part is getting the dimensions right. That's why I'm getting a model from the 3D Warehouse, which has many vehicle models too, not just buildings. Having some dimensions to work from makes the job easy. Apart from that, I could have also imported a model in a range of formats into SketchUp, even photos, and draw from them.
This model is by MarioBlafeR, and can be found here in the 3D Warehouse.
There is too much detail in this model, so I'm going to trim it down a bit. Also, I don't like that hood at the back of the cabin, so I'll get rid of it.
I got rid of various pipes and cylinders underneath the truck, since I could see no purpose for them. We also don't need such a complicated engine.
Now, I'm going to change the front.
I have drawn a rectangle, parallel to the axes, and exactly the size of the cabin. To do that, I used the Line tool, constraining the line using the arrow keys.
You can see this one looks quite a bit different.
I have simplified the design of the cabin by adding more lines using the Line tool, deleting the now obsolete lines, then replicating the change on the other side by firstly deleting what was already there, then moving the wall, copying it (by pressing Ctrl). Then, using the Scale tool, dragging on the middle handle and typing "-1" to reflect it. Note that I cannot do that for Sketchlife prims until Sketchlife becomes smarter. When it does, it will probably also allow distances to be entered into the VCB.
The aim is to us as small number of prims as possible. I'm getting rid of the cabin windows (big deal) to make this easier, and to make space for some Sketchlife logos later.
I am using the Sketchlife Arch tool around the wheels. I find that first putting them in, then scaling vertically is most convenient.
Now, with Sketchlife tools, if you are drawing along an axis, in many cases you can hold down shift to constrain movement along that axis.
The white blocks showing through are the prims I have so far.
Here I have drawn some support lines, using Line and the VCB to make it exact, and now I can snap the Sketchlife prim to these lines.
Now, I would like to have rounded edges at the front of the cabin.
I've done it using the Sketchlife Generalised cylinder tool.
I am putting in prims to finish off the cabin.
I have lifted the seats up a bit, because they are higher in the truck that I'm thinking of.
Here is a nice modelling trick for Sketchlife cylinders. Use the standard Polygon tool, enter "4" into the VCB. Now you can position the circle using its centre.
I replaced the seats by something simpler (three prims each) by moving one seat out of the cabin, by 10 metres on the red axis, to have more freedom moving the camera around. After approximating it with three boxes, I snapped it to the original seat.
To transfer these features onto the model, I first used the Line tool to outline them on the imported image.
To make sure they are symmetrical I have put in some construction lines using the Tape Measure tool, measured some lengths and drew them precisely using Line and the VCB. I'll use a texture to get the grill.
I decided that we're going to have a door only on one side, so it's easier to get in.
Here is the Polygon tool trick again, for the wheels.
(Note the white shape.) These parts were a bit of a challenge. I have approximated them using a part of a generalised cylinder and two box prims. The box prim on top is tapered and sheared.
I really like the fact that once you form a shape, it is easy to copy it to the other four wheels by dragging and snapping.
This one is an arch and four box prims.
Here I'm showing Flexible mode of the Box prim tool.
It gets slightly complicated with these pipes.
...
I proceed, making the rest of the prims.
That looks like all the prims I'll need. Use the Sketchlife Select-All button to select only Sketchlife primitives. I have put them on a different layer and hidden all the other layers. You can also see if any of the prims are invalid. I had a few invalid prims: the back wheels, because I scaled them non-proportionally as a group, while their axes were not perfectly aligned. (Second Life does not support this transformation, and Sketchlife will, therefore, not export such a prim.)
I noticed that when you put some of the groups onto a layer, their content stays on another layer sometimes. The only solution I have is to edit the groups, select all of the content and put it onto the layer that I want, manually.
(And I found a bug in Sketchlife! Removed it.)
So there it is. Fully converted into Sketchlife primitives.
In Second Life, black is pitch-black, it doesn't seem to reflect anything (at least on my screen). So I will choose a dark grey.
Use Ctrl to paint all the faces of a primitive at once. Use the Sketchlife Bucket tool. Don't use the standard Bucket to paint prims (unless you are in group-edit mode for that prim), because there is a bug in SketchUp making that paint invisible to Sketchlife.
Made my own texture. Since uploading stuff costs money, I put all of the textures for the truck onto one image. It doesn't matter for just one model, but if you are making a building, you wouldn't want each small detail to need its own texture file.
Now I position the new texture directly in front of the truck and use the Sketchlife Bucket to transfer it directly. There will be no need to position anything if the faces are parallel like that.
On this face I will need to reposition the texture. To do this, I edit the group, select the face, right-click and choose Texture|Position.
I went through the upload process, which was very quick. Basically, it's just a matter of uploading the textures, and copying and pasting a couple of strings from Sketchlife into Second Life. This is for setting up communication, once for importing the model, and the second time for building it.
Ok, looking good.
It cost L$151 to upload, and it took about 10 seconds to assemble. I think that's good value for money.
Hmmm, some of it didn't link. Maybe there's a bug somewhere. No matter — easily fixed.
Snag: cannot enable physical objects with more than 32 primitives. About a hundred prims will have to go. The model is good, but I can't drive it as a vehicle.
Still, the tutorial shows that you can do a lot with Sketchlife. All of this is theoretically possible in Second Life, but not always practically possible.
If this was a building, the tutorial would end here. But I still want a moving vehicle. So now I shall reduce the prim count down to 32.
So, a lot of restructuring. The fuel tanks can be made with just one prim. Except now the shaft passes right through the fuel tank. That's no good for safety. Get rid of the shaft.
Have a look at the new headlight implementation. They are now just one prim, together.
All that restructuring is good for the model. It's improving somewhat. The texture should be taking more of the work.
The back wheels are now made up of three prims: two hollow cylinders and a box prim.
There is one more optimisation, which I can't do with Sketchlife. I need a hollowed, path-cut box. But that's just one prim, so I can do it in Second Life manually.
Ok, so here is the final version.
I'm giving this model away for free, to promote Sketchlife, with full rights to modify, and the scripts are just free, because if you can modify, you can also copy them, of course. You can pick up a copy at the same desk as for the Skechlife Importer (see the large "Teleport" link at the top of the current page, above the menu).
Evgeni Sergeev
Tuesday 07 July 2009 19:07 (Western Australia Standard Time)