Where we experience some technical problems…

And we’re back! Thanks to all the people who have been visiting Enlades while we were on a break.

For this post I’d hoped to be doing an update on some of the things we’ve been working on in our regions. However, we’ve experienced a couple of problems recently. I thought it would be useful to share them to give a perspective on some of the issues you can encounter when running your own virtual environment.

In my previous post on Prim hair I showed that I was following Natalia Zelmanov’s tutorials. Whilst I was working on my hair prims I encountered a bug that has been documented in Mantis previously. (Mantis is the OpenSim reporting system).

Thom managed to replicate the behaviour a couple of times before he found the Mantis reports. Apparently this particular issue had been fixed in a previous OpenSim release but we are experiencing the same behaviour. As of this time there hasn’t been an official confirmation but there is a helpful reply in the comments on a workaround to use. I include the link to Thom’s report here for information. Editing linked objects…

The next problem that came along was a bit more complicated and took a morning of research. If you’ve been, or are, a Second Life resident you might recall owning or seeing televisions for streaming media, in particular YouTube videos. For those that haven’t; I include a link to a product currently being sold on SL’s Marketplace: Flat screen SL t.v

I have to admit that it was with complete ignorance that I decided I wanted to make a media prim that played a favourite YouTube video. Unfortunately, I wasn’t aware that there had been a serious issue in 2010 when YouTube changed from Flash to mp4. This had caused a large problem for streaming in virtual worlds.

My error was that I made an assumption that cutting and pasting the URL and using that with the Freeview script, available on OpenSimulator’s website, was sufficient [insert laughter here]. It quickly became apparent that wasn’t going to work. After looking around for information I found out how you can stream media, and the issues last year with YouTube, via the SL wiki pages and forums.

This was helpful for background knowledge, but, it didn’t actually provide a workable solution I could use. Obviously there is a way, or more than one, to do this. An example I did find was what looks a complex method of playing around with something called ‘token authentication’. I have absolutely no idea what that is and felt unconfident at trying to use it. It is also possible to rip a video, save to your hard drive and then stream it yourself. I have some problems with doing that and would prefer to have an alternative.

For people in Second Life, (and other places where it is enabled) on Viewer 2.0 there is another option of using shared media. This facility was mentioned as coming to OpenSim in an interview with Justin Clark-Casey on the Hypergrid Business website back in July 2010; following on from that though I have been unable to find any further information on developments.

Whilst these things are, for the most part, minor problems when taken on an individual basis, one of the biggest challenges is in finding the right information. I think that highlighting these instances is useful to give an accurate picture of (virtual) life using OpenSim. And with fingers crossed on integrated solutions coming along in the near future.

Advertisements

Different kinds of triangle shapes

Recently I was looking for the best way to create a regular prim in the shape of an equilateral triangle (i.e. a triangle in which all three sides are equal). I specifically needed this kind of triangle to make a floor panel for a six-sided structure, which can be made out of six identical triangles (see image 1). Let’s look at a couple of ways to create a triangle.

hexagon with six triangles

Image 1. Putting the last floor segment in

Using the Prism building block type

This is the method I ended up using for my floor panel. It just involves two quick steps:

  1. Create a simple box.
  2. When the box rezzes, and with the box still selected, click on the Object tab in the build tool. Locate the “Building block type” selection list, and change its value to Prism. (image 2)

    Image 2. Selecting the Prism building block type gives you a triangle-shaped prism.

I used this method, because it instantly gives you an equilateral triangle. It will stay equilateral as long as you keep the shape’s X and Y sizes equal, and it will rotate neatly around the triangle’s center (also called centroid or center of gravity). This is an important difference with other ways to make a triangle, as we will see below.

Using the Prism default shape

An obvious way to make a triangle is to take the second shape in the list of available base shapes. Confusingly, this shape is called Prism too. Please note the difference between the Prism building block type (which we used in the previous paragraph), and the Prism shape, which actually uses a Box as its building block type (image 3).

Image 3. The Prism shape creates a different kind of triangle

The box you get has been sheared and tapered to create the triangular shape. This is okay for triangle shapes that need a 90-degree angle. However, an equilateral triangle has three 60-degree angles, and the 90-degree angle in this shape will not change when you resize the prim. (see image 4)

Image 4. Sizing the prim does not change the 90-degree angle

Calculating the right triangle size

The 90-degree angle is caused by the Top shear value. When you change the top shear X and Y values back to zero, the triangle starts to look better. It’s too tall though: to change it into a perfect equilateral triangle, you need to calculate the height of the prim. If you want to try this, do the following (see image 5).

  1. Create a default box (sized 0.5 x 0.5 x 0.5).
  2. Make sure the Top shear values are zero.
  3. Set the Taper X value to 1.00.
  4. Change the Z size value (the triangle’s height) to 0.433.

Image 5. For a box-based triangle, check Taper, Top Shear and Height

The height calculation is not difficult, but it takes some extra work, compared to the first method. Besides this, there is another drawback of this approach. This becomes apparent when you need to rotate some triangles in order to create a pattern. If you use this type of triangle, it won’t stay aligned with adjacent triangles, because it has an awkward center of rotation. Since the shape is still based on a box, it will rotate around the center of the box (image 6), rather than the center of the triangle, which you get with the prism building block (image 7).

Image 6. A box-based triangle doesn't rotate neatly around the center

Image 7. A prism-based triangle rotates around the triangle centroid

Conclusion

For equilateral triangles, start with the Prism building block type. For triangles with a right angle, use the Prism default shape.

Happy building with triangles!