Making a Skybox

Having acquired a set of textures for making a warehouse I decided to adapt these to make a skybox.  My first decision was how big to make it, did I make one about 20 m. by 10 m. which would easily fit above a minimum 512 sq. m. parcel of land ( 32 m x 16 m)  or did I go for a bigger box perhaps 20 m x 30 m?  The maximum size I could make, while still allowing it all to be linked together, seems to be limited by SL to 30 m x 30 m. You may wonder why I am setting sizes in multiples of 10m, this is to allow the maximum size for the fewest number of prims as the land on which the skybox will go is unlikely to have a large number of prims so the fewer the better.

Building in opensim

beachhouse_001

I thought I would try to build a simple beach house in opensim to see how easy it was.

I managed to produce a house but there were one or two issues/points which occurred to me as I built it.

  • The base of the house can be a single prim because they are not restricted to 10 metres;
  • There are only a few textures available with the default server so I had to download some from second life and import them into opensim – fortunately at no cost lol;
  • Things go together easily as long you set the base prim to simple coordinates and make sure that it’s rotation is set to zero to provide a base set of coordinates to allow all the other parts to be lined up easily;
  • There is no issue with using a lot of prims as the region will allow 45000 so together with the possibility of larger prims this makes life easier.

Creating trees on open sim

First try at a papaya tree

First try at a papaya tree

I wanted to create a simple tree using a tree texture set up on three prims.

The first time I followed the following procedure:

  • create a prim 10m high 10m wide and 5m deep
  • set all the sides to transparent using the texture tab in edit
  • locate a convenient texture – in this case a papaya texture comes in the default set-up
  • in the texture tab select a single side and put the texture on the two 10×10 m sides – once “select texture” is selected and a side identified by clicking on it, any texture picked up only goes on that side
  • change the depth 0.01m leaving a very thin prim with textures on the two main faces
  • in the edit object tab place the prim in an easy to remember location e.g. 94m in the X direction
  • drag out a copy of the prim along the x-axis to give two copies, three prims in all
  • rotate the last prim by 60 degrees around the Z-axis from the object tab and change it’s x-coordinate back to 94m (or what ever it was in your system)
  • rotate the other prim through 120 degrees and move it back
  • link the three prims together by selecting them all together in edit (edit one and shift click on the others to pick them up) and using link in the tools menu

You now have a papaya tree to grow on your region.

I noticed that the client would not allow full transparency to be set and this can result in some ugly lines around the prims.  To get round this set the intial prim to transparent by using a clear texture rather than setting the transparency.

Fitting houses to plot sizes

I have been building some house and the idea has been to make them as low prim as possible and also to make them fit onto standard plots. To do this I need to remind myself about plot sizes and the prims they allow.

For the smaller plot sizes:

Plot size
(sq. m.)
Maximum
prims
Typical
Dimensions
512 117 32×16
1024 234 42×32
2048 468 64×32
4096 937 64×64
8192 1875

If you only have 117 prims available then you don’t want a house that will use all your prims even if it fits on the plot.

My medium beach house will fit comfortably onto a 32 x 16 plot leaving enough space to climb the steps. It is 35 prims so there are plenty left over for furnishings. It includes a lockable front door which sets itself to the owner when rezzed. The owner can then add other users to allow them access or simply unlock the door to allow all inside.

Building a low prim house

As I have very few prims on an openspace island I am always looking for ways to save prims. I have tried building a small house in as few prims as possible.

The roof consists of one cube narrowed at one end to provide a triangle cross section and then hollowed to give a roof space. Two more rectangular prims textured to look like a wall make up the ends of the house.

At the back of the house are two prims, one for the wall and one for the window. The house front needs four prims – the wall and the window – the door and the small widow above it.

The base of the house was one more prim.

Finally I needed to make four steps which I  made from two cut cubes giving me two more prims.

Total for the whole house 12 prims. I then textured the various parts using free textures. Brown stone walls a tiled roof and a wooden floor. The base was grey stone. The windows and door were white textures.

The most difficult thing about building the house was to line up the sections and to avoid editing the wrong parts of the house. First thing I did was to set the base so it was level and lined up with specific rotations and positioning and it’s dimensions were a little smaller than the roof to allow a roof overhang.. Then I set the rotations of the all the other parts so they were lined up with respect to this. I then built the walls making them a little smaller than the roof so they lined up with the base. I worked out the X and Y positions for the parts, moved them almost in place by eye and then typed in the  final coordinates to round off the values and get things fully lined up.

Once I had positioned a section I locked it so that I could not edit it by mistake. I tried to join all the parts into one object and this worked for the most part except for the door which refused to work properly.

Making my trees flexi

Having made some trees I thought i might like to make them move in the wind and a little research on the matter showed that I needed to make the prims flexi. So I went into SL and selected a tree for edit. It was at this point that I found I could only change the position, rotation and size of the object and any other changes had to be done on the individual prims.

I did not want to destroy any of the trees so I made a copy, using edit and shift move. I then unlinked the prims and pulled one of them away from the rest of the tree. I could now work on making this prim flexi.

To do this i needed to open the features tab in edit and click the “Flexible path” box which opened a series of categories that I could set values against:

  • Softness – which controls the rigidity of the flexible object – 0 is very hard and the object acts as if hinged at the base and 3.0 makes it very floppy – my trees needed to give a leaf and small branch movement so i found a value of 1.0 worked well. Higher values made the tree bend over like a floppy bush – not what I wanted.
  • Gravity – is a measure of how hard the prim is pulled down when it is flexed – 10.0 gives a massive pull downward – 0.0 has no pull at all – -10.0 pulls it upward with a large force – I wanted a moderate downward force so I settled on a value of 3.0. Initially I set to high a value here and the tree just bent over and stayed there.
  • Drag – gives a sort of friction effect which slows down how the prim reacts to a force – 0.0 allows an instant response to a force – I settled on a value of 3.0 .
  • Wind – provides a force to bend the prim which simulates the effect of the wind. Wind is a measurable quantity and the higher this value is set for the prim the more it will respond to a given wind. It is wind that I want my tree to respond to and i found a value of 0.2 worked well.
  • Tension - sets a value governing the way the prim straightens out after being moved – a value of 10 causes rapid snap back and 0 will allow the prim to stay bent. I found that my trees needed to snap back fairly quickly so I gave this a value of 8.0.
  • Forces - which can be set in the X,Y and Z directions and act much like the wind but can be set to a fixed value so the force is not weather dependent. I wanted my trees to react to the wind so i set these all to 0.0

These values were a little hit and miss and I need to explore how they affect things in a little more detail as their effects seem to interact to some extent.

Finally I used this “flexi-prim” to build a 4 prim tree as before.

Putting together some low prim stuff

Our island is an openspace island so we do not have an inexhaustible supply of prims. This means that any structures we build must be low prim. So I have had a go at producing low prim garden stuff e.g. a three prim gazebo , a three prim bench seat and a two prim raised bed or planter (if you change it’s size and re texture).

This got me into the swing of linking objects together and finding that if i wanted to edit the combined objects by changing one of the dimensions I needed to unlink the prims or edit them separately.

Talking about swings, I obtained a script from the Free Script Library which allowed me to set a back and forth rotation through a given angle. I chose to rotate 20 degrees back and forth. I created a narrow wooden cylinder and placed the script in it. Then I added a narrow hollowed out rectangular structure to hang down as the supports of the swing and gave this a steel texture so the supports looked like steel wires. Finally I added a seat at the bottom of the support, gave this a suitable texture, linked the whole thing together; rotating support last and hung the swing from the gazebo.

The three prim swing operates by touch, first touch sets it going and next touch stops it. I have found that sometimes you need to right click on it and choose touch from the pie menu as it does not always respond. I need to take a more detailed look at the script to see if I can sort this.

I was surprised at how relatively easy it is to get going with building and using scripts in SL thanks to the generosity of people who have written basic scripts and made them freely available to others. In this spirit I have mad all my stuff free to copy, not that anybody would want it :-)

Building Trees

I have obtained some free textures for trees and tried building a tree. I made a thin prim which was 10m x 10m x 0.01m. I then textured using one of the tree textures back and front on the 10×10 sides but this left the other four (thin) sides still showing. To deal with this I wrote a simple script which set the opacity of each of the sides, the two large sides to full opacity and the other four thin sides to full transparency.

I set the sides by trial and error. I found that the opacity did not reset itself back to opaque if I removed the code which set it transparent. I needed to explicitly set the opacity for each side. This left me with a flat surface textured either side with a tree.

Next I copied the prim by going into edit, holding down shift and moving the prim. The I superimposed the prims on top of one another and rotated one through 90 degrees and finally selecting both prims (edit left click for the first and then ctrl click for the second, finally using Tools: Link) and making them into one object.

This gave me a two prim tree which was OK but it was too easy to look at from edge on for one of the prims so it could not be seen properly. To remedy this I copied the tree as before, superimposed it on it’s copy and rotated one through 45 degrees. Finally by linking these I had a four prim tree which looked fairly realistic from all angles.

Once I had done this I could use it as a template for further trees. It was just a matter of choosing a different texture and replacing the old textures with the new one. It was easier to do this if the two trees were different in colour.

I finally ended up with three light green bushy trees and two dark green bushy trees. All of which are fully modifiable.

Some useful information on scripting

I have been taking a look at an interesting post about scripting animations on “A View From Another Life“  blog. I have been having a go at setting up a small waterfall and a stream across the beach. These are looking ok with the animations I have so far but this post may help me to add some additional material and make the water look “more real”. I am going to try out the scripts and report back on this post.

Building a waterfall

I have put together a waterfall which consists of a cliff face, jutting out from some boulders at the end of the island, and a moving waterfall with two pools. One at the top of the cliff and one at the bottom. I just need to excavate the terrain below the bottom pool to give more depth to the water. Both pools also have some mist and spray generated by simple scripting.

Follow

Get every new post delivered to your Inbox.