Archive for the ‘MV-SL-Tutorials’ Category

Second Life Prim Lights – 3

Saturday, July 10th, 2010

Full-bright and Glow

This is the last article in my short (and rather infrequent) series about lights in Second Life. I’m going to take a look at two elements of textures which are often used in conjunction with lights, and which are also widely misunderstood and misused.

Let’s start with Full-bright. This can be switched on or off on the Texture tab of the Build dialog, and applies to the currently selected texture, or to all the textures on the currently selected object if you haven’t selected an  individual face.

What does it actually do? The most obvious effect is that during SL ‘night’ the texture will appear bright (as the name of the option suggests). During daylight the effect is, predictably, less obvious. In fact, sometimes the object might actually appear to be darker in daylight.

Here is the same scene in both day and night. The picture on the wall has full-bright set on it, and you can probably see that the picture is displayed identically in both light settings.

Full-bright example

Let’s step back a moment. How does Second Life create the ‘night-time’ effect? Well, apart from changing the sky, it obviously makes all the objects in the world darker. It does this by taking the colour which they should be, and blending it with the ‘nighttime’ colours.

What might be less obvious, is that it does something similar during daylight. It takes the colours, and adjusts them according to the current lighting. This is how you get the distinctive orange lighting effect at sunset that some people  complained about when Windlight was first released.

When you set a texture to full-bright, this blending is switched off for that texture, so it always displayed at it’s actual colour, regardless of the current lighting. At night, this has the effect of making the object seem to light up — in fact, it is simply not being darkened.

So much for full-bright. Now what about its companion, Glow? Unlike full-bright, this is exactly what it says. When you set a glow value for an object, it acquires a glowing halo around it. This can range from a subtle, barely visible aura, up to a near-blinding glare.

Glow example

Transparency tends to lessen the effect of glow slightly (the lower row in the picture has transparency applied).

Under most circumstances, using low values is best, usually no more than about 0.25, and often less than that.

One thing to be aware of is that if two glowing objects overlap in the viewer, the glow effect is doubled. This is not always what you want to happen, so you probably need to be careful if you place glowing objects close together.

Overlapped glow example

Another unfortunate effect that I’ve often seen is where the glow is being used with an object which has a partially-transparent texture. For the glow to show up in this case it needs to be set quite high. When the texture is fully loaded, the effect is subtle and often beautiful. Unfortunately, while the texture is still being loaded, the glow is in full force, and often overwhelmingly bright. There is not much that can be done about this, but if you intend to use this kind of effect, you should be aware of this pitfall.

Partially-rezzed glow example

Glow and full-bright work very effectively together when creating a light. As a simple example, rez a prim, set its transparency to 25 (if you set it too high you will lose some of the effect), then switch full-bright on and set the glow to 0.2. The result will, of course, not actually illumine the surroundings unless you set the Light feature on, but this kind of ‘fake light’ can give the illusion of there being more lights than SL actually supports, especially if you use several of these in conjunction with a single ‘real’ light.

Full-bright and glow lighting example

Some SL photographers make use of a interesting effect which happens when an avatar stands in front of a ‘glowing’ texture. This is easier to show than to describe, although the effect is quite subtle, and is caused by the glow slightly spilling over the edges of anything in front of it. Here are ‘without’ and ‘with’ glow versions (this is a rather exaggerated version, with the glow set quite high to make the effect obvious):

Photo-glow effect

However, if you intend to save your photos, there is an issue to be aware of, which is that the Second Life snapshots tend not to capture glow correctly. For example, the scene of streetlights on a wall (above) was captured using my computer’s screen-capture, rather than the Second Life screenshot, which looked like this:

Glow snapshot problem

Finally, ‘glow’ works best when it is used for subtle effect, and with some restraint. Whatever you do with ‘glow’, please don’t do this:

Glow abuse example

Dark SF Textures – Set 2

Monday, May 31st, 2010

This is my second set of textures with a dark science-fiction theme (think ‘Quake’, or similar games). Lots of metal plates and piping, and a few lights and control boxes thrown in. All the textures are 512 x 512, and you can view them all at the Texture Gallery.

To buy this set, either visit the main store in-world, or the XstreetSL page:

XstreetSL Page

Main Store

A Not-So-Brief Guide to SLurls

Thursday, May 20th, 2010

This started out as ‘A Brief Guide…’, but I found that there was more to say about them than I thought!

If you are familiar with SecondLife, you will certainly have come across SLurls. In-world, they appear as hyperlinks (you can see them as such in chat or in notices, amongst other places). They look like normal web addresses, like this:

http://slurl.com/secondlife/Ling/183/113/54

When you click on them in-world, instead of launching a browser they will display a landmark, from which you can teleport to the location.

So far, not very interesting. Where things get a little more interesting is when you come across an SLurl on a normal web-page, outside of Second Life. If you click on one of these, you will end up on a web-page that shows the Second Life world map, highlighting the location that the SLurl points at:

What happens when you click on the ‘Teleport’ button depends on whether you have Second Life installed, and (if it’s installed), whether it is running at the time.

If Second Life is already running, a landmark for the location will be displayed for you in the Viewer.

If you have Second Life installed, but it is not currently running, it will be launched, and when you log-in you will be taken directly to the location indicated by the SLurl (although the exact details of what happens will depend on the browser you are using, and possibly the Second Life Viewer as well).

One thing to note is that SLurls work like landmarks, in that if the location has a fixed teleport point, you will be taken there, rather than to the exact location specified in the SLurl.

This is all quite straight-forward, even if it takes several paragraphs to explain. But what if you want to create your own SLurls?

There are three ways to do this. Let’s take the simplest one first. In Second Life, visit the location that you want the SLurl to point to, open up the World Map, and click the ‘Copy SLurl’ button that you should find somewhere near the bottom of the right-hand side.

This will copy the SLurl to the clipboard — you can open up a text or document editor, and simply paste it in.

If you are using Viewer 2, you will also find a ‘Copy SLurl’ option on any landmarks that are stored in your inventory. Right-click the landmark to open the menu that has this option:

Speaking of Viewer 2, it uses a different style of SLurl, and takes you to a different web-page (if you click on an SLurl outside Second Life), but you still get a world map with a teleport button. The main difference is that the web-page is in Viewer 2 style.

If you are interested, here are examples of the old and the new versions:

Old version: http://slurl.com/secondlife/Ling/183/113/54

New version: http://maps.secondlife.com/secondlife/Ling/183/113/54

Ok, so much for the easiest way of creating SLurls. The second way is slightly more complicated, but adds some very nice features.

Before you begin, you’ll need to know the details of the location that you want the SLurl to point to. To do this, visit the location in Second Life, then open up the world map and take a note of the region name, and the x, y, and z values for the location.

Now visit the SLurl website, simply by using your favourite browser to go to http://maps.secondlife.com (or http://slurl.com if you prefer the old version). On this page you will see a ‘Build your own SLurls’ link, near the top right. This will take you to a new page with various edit boxes on it.

Fill in the Region name, and the x, y, and z boxes, with the values you noted earlier.

For now, leave the other boxes empty, and click the ‘Generate’ button. Your SLurl will appear in the edit box at the bottom. Test it by clicking the ‘Go’ button. You should be taken to a new page showing the World Map for the location which you entered.

Returning to the Build SLurl page, select the generated SLurl, copy it, and paste to wherever you want to use it.

This SLurl will be exactly the same as the one generated by the World Map inside Second Life. However, you can improve on this by filling in the other edit boxes on the Build SLurl page.

The Window Title is the simplest. If you enter some text here and generate an SLurl, when you visit the World Map using it you will see the title appear on the ‘pop-up’ marker for the location.

The Window Message works in a very similar way, adding some descriptive text to the pop-up.

The Window Image is more complicated. For this to work, you need to be able to specify the web address of a picture. If you have your own web-site, you can upload a picture to your site, then fill in the address for it here.

Generate the SLurl again, and click ‘Go’, and now you should see your picture in place of the default picture. As far as I can tell, any size of picture will be accepted (within reason!).

Using the Picture and Description together can be a good advertising tool if you are a Second Life merchant. Here’s an example of what I could do to advertise one of my prefabs:

View the Medieval Farmhouse in-world

I mentioned that there were three ways to create an SLurl, but so far I’ve only shown you two ways. The third way is to construct one manually. This would be a whole post in its own right, but if you are familiar with URLs it isn’t too difficult to roll your own SLurl.

I won’t go into details, but here is a quick breakdown, using the Version 2 format, and taking my ‘Medieval Farmhouse’ SLurl as an example (see the link above):

The basic template is this:

http://maps.secondlife.com/secondlife/Region/x/y/z?img=[address]&title=[title]&msg=[description]

The first part is the basic URL:

http://maps.secondlife.com/secondlife

This is followed by the Region name and the x, y, z values:

/Ling/193/113/54

There are then three optional parameters: img, title, and msg (the description):

img=http%3A//www.templarcreations.com/blogpics/blog_prefab_0001a.png

title=Medieval%20Farmhouse

msg=22%20prims%2C%2016m%20x%2016m%2C%20L%24250

As you can see, the ‘msg’ parameter can easily get messy, because you have to replace any special characters.

And finally … the Teleport button on the World Map page conceals another URL, but in a different format, like this: secondlife://Ling/193/113/54. It is possible to link directly to a location using this format. This will by-pass the
World Map, and (assuming that Second Life is installed) go straight to Second Life. It probably isn’t a good idea to use this, because it is not exactly user-friendly, and if the user doesn’t have Second Life installed, instead of ending up on the World Map page (which will lead them to more information about Second Life) it will simply display an error. On the other hand, for Second Life users it gives more direct access (I can imagine it being used to create a web-page of useful landmarks, for example).

Medieval Textures and Farmhouse

Saturday, May 8th, 2010

Not one, but two new releases. They are closely related though — one is a set of Medieval Village textures, and the other is a Medieval Farmhouse which makes use of some of those textures.

The Medieval Village texture set consists of 34 textures, including both transparent and non-transparent versions of the four textures which incorporate windows. (The Farmhouse uses the non-transparent versions, in case you were wondering).

Note: These are the same textures that were freebies in the recent TextureMania hunt. The only difference is that the thatch texture has been replaced, and the transparent windows have been added.

The farmhouse is a small prefab, only 22 prims, and covering 16m x 16m, so it should fit comfortably even inside a small 512m parcel (unless it is a very oddly shaped parcel).

A few samples:


As usual, they are available in-world at the main store, and on-line on the Xstreet website:

Templar Creations Main Store (look outside for the Medieval Farmhouse)

XStreet – Medieval Village Textures
XStreet – Medieval Farmhouse

Exhibition Hall Textures – Set 1

Monday, May 3rd, 2010

I recently completed a small commission project, building an exhibition hall for the Geneva Motor Show:

I created a number of textures specifically for this, and I’ve taken these and improved them a bit (I think!), added some additional ones, and am now releasing them as a new texture set.

Here’s a few samples, and an example of them in use:

As usual, you’ll find them on XStreet, and in-world at the Main Store:

XStreet Page

Templar Creations Main Store

Second Life Viewer 2.0 — Some Brief Tips

Monday, April 5th, 2010

I don’t like it, you don’t like it, but LL is determined to force it down our throats. There’s plenty of discussion elsewhere about the pros and cons of the new Viewer 2.0, so I won’t pick that up here. Instead, I’ll just bring a few tips that might make your experience a little bit better.

Skins
Because I’m a builder, I’m approaching this mainly from the point of view of a creator in Second Life, but my first tip is one that will be useful for anyone: download the Starlight skin!

Let me explain (if you don’t already know). Viewer 2.0 comes with the ability to change ‘skins’ — in other words, the appearance of the interface. At the moment, unfortunately, they don’t seem to have put in place an easy mechanism for installing and switching between skins, so for now it is a case of copying and renaming folders. If you are comfortable with doing this, there is already one third-party skin which is well worth having, which is the Starlight skin created by Hitomi Tiponi.

Starlight, Viewer 2.0 skin

The most significant thing that is does is to change the right-hand slidebar so that it overlays the main viewer screen, rather than squashing the display. This squashing of the display seems to be a major complaint about the new Viewer (and I certainly don’t like it myself, and find it very disconcerting and distracting), so a fix to this is more than welcome.

Viewer 2.0 Starlight sidebar

Debug Menu

If you do regular building or scripting in Second Life, you probably find the Advanced/Debug menu invaluable. Under Viewer 2.0, the Advanced menu can be summoned up using the traditional CTRL+ALT+D incantation. At the bottom of this menu you will find a ‘Developer Menu’ option — select this, and a Developer menu (essentially the old Debug menu) will appear, will the old familiar options in it.

Activate Group

Bizarrely, this seems to be a well-hidden option, unless I am missing something obvious (which is always possible). To get to this, open the sidebar, and select the Groups tab. It is not immediately obvious, but there is a right-click menu available for the group names, and this menu has the ‘Activate’ option.

It took me quite a while to find that one…

Shared Media

Possibly the only reason to really celebrate the arrival of Viewer 2.0 is that we finally have the long-awaited HTML-on-a-prim. Some people have reported problems with getting this to work, but so far it has worked impeccably for me.

To display a resource from the web (usually a webpage), create a new prim and size it appropriately. Select a single face before continuing. On the texture tab of the build menu, there is a new ‘Media’ option at the bottom, with a small plus sign. Click the plus, and a new dialog will appear. Fill in the URL of the page you want to display, and click Apply.

Shared media on build dialog

If all goes well, the page should display on the selected face of the prim. The page will be fully active — if there are links, they can be clicked on.

Note that you can apply different media sources to different faces. Here’s a cube running two YouTube videos simultaneously:

Shared media example

For a jaw-dropping example (and a hint of what might now be possible), try applying http://collabedit.com/ to a prim face, then clicking the ‘Click here to create a new document’ button.

In a few seconds you will have a document which you can edit directly from Second Life. On a prim.

Editing on a prim

What’s more, it’s collaborative, so in theory someone else can edit the same document with you (I’ll admit that I haven’t had a chance to try the ‘collaborative’ part, so I’m not sure how or even whether it will work…once I find out, I’ll let you know).

Second Life Prim Lights – 2

Wednesday, March 24th, 2010

After the previous introduction to prim lights, let’s look at some technical (but not too technical!) background, and a few things about the lighting system which are not immediately obvious:

The graphics system which Second Life uses (OpenGL if you are interested) only allows 6 lights to be visible at any time. If a new light becomes visible, one of the other lights will be disabled, so you should avoid having too many lights too close together.

(As an aside, this is one of the reasons why some people complain about facelights, and especially about facelights which make use of multiple lights — every one of those lights uses up one of the available lights.)

A light has no visible appearance. When you turn a prim into a light by ticking the ‘Light’ checkbox on the Features tab, the prim itself doesn’t change in any other way, it simply has an invisible light-source attached to it. This light source will move with the prim, but is otherwise completely unaffected by anything that you do to the prim, apart from changes to the actual light parameters.

This means that the size and the shape of the prim have absolutely no effect on the light, because the light source is always a single point at the centre of the prim. This might not be what you expect. For example, if you turn on light for a prim cube, then stretch the prim out into a long rectangle, you won’t get an elongated light-source, you will still get a sphere of light originating at the centre of the prim (well … not exactly a sphere — see this previous post if you want to know more about that).

Light example

The light is not blocked by prims. Ok, it isn’t quite as simple as that…

Lights won’t illumine prim faces which are facing away from the light-source. This sometimes makes it look as if the light is blocked by prims. Suppose there is a wall in-between you and the light source. You won’t see any light on your side of the wall, because it is facing away from the light, and it looks as if the wall is blocking the light. However, if the light is low  enough, you will see light on the ground outside the wall.

This is easier to show than explain, so here is an example. The small cube on the right-hand side of the wall is the light-source. You can see that it lights up the floor on both sides of the wall, but doesn’t light up the side of the wall which faces away from it (the wall is standing directly on the floor):

Blocked light example

Another effect of this is that the prim itself is not illumined, because all the visible sides of the prim are facing away from the light. To make it actually look like a light-source you can turn on full-bright for it, and perhaps apply a small amount of glow (a setting of 0.02 is usually sufficient).

Finally, prim lights don’t cast shadows (except as an experimental feature in some third party viewers). If you want to provide a shadow effect, the usual way to do this is by texturing the surface that you want the shadow to appear on, or by creating a thin ‘shadow’ prim with a semi-transparent shadow texture.

Second Life Prim Lights – 1

Thursday, March 18th, 2010

In Second Life constructions few things are more misused and misunderstood than lights, full-bright, and glow. In this post, I’ll start looking at lights (!), and I will cover full-bright and glow in subsequent posts.

To begin with, let’s create a simple light. Start by rezzing a sphere, which will act as the light source. On the third tab of the Build dialog (Features) you will see the light options in the lower half. Tick the ‘Light’ checkbox, and the sphere will start to cast light (you might want to set your environment to midnight to see this to best effect).

Features tab on the Build dialog

You’ll notice that the sphere doesn’t light up in any way — it still looks like a plain plywood sphere. I’ll talk more about this in the next post, but in the meantime you can make it more realistic by going to the texture tab, setting the texture to blank, turning on Full-bright, and setting the Glow value to something like 0.02. You could also set the transparency (try a value of 25.0).

There are four basic parameters for lights, as you can see on the build dialog. The first is the colour. Clicking the colour square will bring up the standard colour selector.

The Intensity value is simply how bright the light is, and can take values from 0 (where the light is effectively off) to 1.0, at which point the light is at its brightest.

Well…”brightest” is perhaps misleading. You’ll notice that even at maximum intensity the light isn’t really very bright. It’s possible to create an even brighter light by putting a second light source right next to the first one. The light from both will combine where they overlap, and become even brighter.

The only problem with this is that you are using up another of your very limited number of lights (more on that in the next post).

The Radius value is, predictably, the size of the area that the light will be cast over. This isn’t a precise value, because there is a certain ‘fuzziness’ at the edges. It can range from 0.0 to 20.0.

The Falloff value describes how quickly the light ‘fades’ as it approaches the radius limit. In theory, a Falloff of 0.0 will stay at full intensity right to the edge, whereas a Falloff of 2.0 (yes, it goes to 2.0, don’t ask me why!) will fade away very quickly.

In practice, the Falloff is a much more subtle effect, and combines with the Radius value (which also has a rather subtle impact). Experimenting with them is the only way to really understand what their final effect is.

And that’s your basic light. More next time…

Not An Introduction to Second Life Prim Lights

Tuesday, December 1st, 2009

This is dedicated to those knowledgeable and helpful folk over on the SL Universe forums, without whom this post might never have been written.

This is not the post I was going to write.

I was going to give an introduction to using Second Life prim lights. Because I needed some illustrative snapshots, I created a simple prim, activated the light feature, and started taking pictures.

At which point I realised that after five years in Second Life there are still things that I don’t know, one of them being that lights don’t quite work how I expected.

As an example, here’s a cube which has been turned into a light-source. You can see it lighting up the floor, as expected:

Well…maybe not quite as expected. Why does the light have such a peculiarly elongated and patterned appearance?

What’s happening is that the light is revealing some of the underlying structure in the Second Life world. Turning on wireframe (this is in the Advanced menu, if you want to try it yourself) gives an indication of what is going on. I won’t post a picture, because a static picture of the wireframe view is just a confusing mass of lines. If you try it yourself, though, you will notice that the lines and intersections (technically known as vertices) match the pattern of the light. When a light shines on a prim, the appearance is changed at the nearest vertex.

Let’s move the cube so that it is ‘between’ vertices:

The light fades. It doesn’t vanish altogether, but it is certainly less visible.

If the cube is moved again, over the next vertex, the full light returns:

If the light follows the vertices, what happens if the prim that the light is shining on is resized? Given what we’ve just seen, it’s perhaps unsurprising that resizing the prim will change the appearance of the light:

This has the odd result that resizing the light prim has no effect on the light that it casts, whereas resizing the prim that the light falls on does have an effect!

So, when you are trying to set up lights in Second Life, you have more to think about than you might have imagined. The position of the lights in relation to the prims that they are illuminating, and the size and shape of the prims that the light falls on, all have an impact on the final appearance of the lights.

In the next article in this series I will go back and write the post I originally intended, and give more of a basic introduction to lights.

Textures – A Few Quick Tips

Friday, November 20th, 2009

Some hints and tips that might make working with textures quicker and more efficient.

1. Instantly apply a texture

…without even opening the Build dialog! Simply drag a texture from your inventory onto the surface that you want to texture. The texture will instantly be applied to that face. Obviously this will only work on prims that you have modify permissions for.

2. Applying a texture to multiple faces

In the Build menu, tick ‘Select Texture’ as usual, and select the first face. Then hold down the Shift key and click on any other faces that you want to texture, even on completely different prims. Then apply the texture that you want, via the Texture tab. The texture will be applied to all the selected faces.

The only catch to this is that sometimes Second Life is a bit flaky about actually texturing all the selected faces, so don’t unselect straight away, and simply re-apply the texture if it doesn’t ‘take’ to all the faces.

3. Using the dropper

On the Texture tab, click the texture image to bring up the texture selection dialog. There is a small ‘dropper’ icon at the bottom of this. Click this icon, then click on any other prim face, and the texture from that face will be selected for the current face. This will only work to pick up textures that you have copy permissions for.

4. Choose between the texture selection dialog or your inventory

There are two ways to directly get a texture onto the texture tab (and hence on to the selected prim or face), either by dragging a texture from your inventory onto the texture image, or by clicking the texture image to call up the texture selection dialog.

Both have their pros and cons.

The Texture Selection dialog will search through your Inventory, and will only show you the textures or snapshots that you can apply as a texture. It will hide everything else, including textures that you cannot use (probably because you don’t have copy permissions for them). This is useful, but if you have an
inventory of any size it can take some time for the list of textures to fill up.

If you use your inventory instead, you don’t have this delay, but of course you will be shown everything, including textures/snapshots that you cannot actually use. If you try to drag these onto the texture image, the cursor will change to a ‘stop’ icon to show that you cannot use them.

5. Use the Library

Down at the bottom of your inventory is a folder called Library, which contains a default collection of stuff that Linden supplies to every avatar (they sometimes add to this collection, so it’s a good idea to take an occasional look here for new things). It includes a useful and varied collection of textures. Before you spend your hard-earned Linden Dollars buying a new texture, look here first, to see if there is already something which suits your needs.


6. Use the Library’s default transparent and media textures.

If you need a fully transparent texture, or a texture to display videos on (a subject which is beyond the scope of this blog entry), the Library has default textures for these (they are at the top of the Library ‘tree’, not in the Textures folder). The advantage to using these is that they are very likely to already be in the viewer’s cache, and hence won’t need to be downloaded, which means that they will rez much faster.

8. Use the bumpmaps and colors

I’ve mentioned this in a previous post, but it’s worth repeating: experiment with the bumpmaps option on the Texture tab. Using bumpmaps, and applying colors, can create good textures without making use of a texture image at all (simply change the default ‘plywood’ texture to ‘blank’), or can create useful variations of existing textures.

Also worth repeating is the example to illustrate this technique: