Happy Easter!

I decided on Friday that I should really make something seasonal. Deciding this just as the holiday began may not have been the best idea but it beats my usual Christmas schedule of thinking “Hey, I should do a Kcreations Christmas gift!” around February 3rd.

So, in a flurry of desperately hurried development, I made the Kcreations Bondage Egg!

Behold!

Behold!

You can pick it up for free at the Kcreations main store above the Little Shop of Kink in Lineside.

The egg is something you can rez on the ground. If someone sits on it they will be imprisoned inside until someone releases them with a click. When they’re released they’ll be locked into a set of fitted mesh steel shackles in one pose or another. The time they’ll remain restrained for is set at random by the egg, but varies between ten and thirty minutes.

Just a little bit of kinky fun for Easter!

Advertisements

Advanced Materials Texturing

Recently I’ve had a bit of a thing going on with the Lament Configuration box from the Hellraiser series of films. It’s purely platonic, I assure you, but something compelled me to make one. It’s been an interesting little exercise in mesh building, scripting and texturing and I think it makes a good base for a tutorial in texturing.

I’m going to skip over the mesh building and scripting since that’s not so interesting and concentrate purely on the texturing of the box. Also, of course, the Lament Configuration is a copyrighted entity, so just pretend you never heard me mention it and from now on we’re building the entirely original Lachyrmose Combination box.

Mesh components in Lightwave

Mesh components in Lightwave

The designs on each face of the entirely original cube are picked out in brass inset into dark wood. In order to represent this in SL with the materials system we’re going to need to control the diffuse channel (colours), the shine (specular channel), the glossiness (specular exponent), the reflectivity (environmental intensity) and bumpiness (normals) of the surface. This sounds like a lot but in this tutorial all of those textures are derived from just three original images : A brass texture, a wood texture and the pattern on the face.

The Wood Texture

wood002

I created this texture in Lightwave – most 3D and texturing packages will have a “wood grain” or similar texture that you can use to make this kind of image. If you don’t have access to that then feel free to use this one under a CC Attribution license or there are plenty that can be acquired on the internet under similar terms.

I’ve played with the colours a little in a bitmap editor and added a little hint of rippling light on top of the original render, just to give the surface a little more life.

The Brass Texture

BrassII

This texture is derived from an image on Flickr by Jay Hilgert, author of the cool BittBox blog/site. The original is available under a CC Attribution 2.0 license.

I’ve reworked it a fair bit from the original, mainly adjusting the colouring to reflect a weathered brass rather than the original steel. This derivative image is, likewise, available for use under a CC Attribution 2.0 license.

Both this texture and the wood are at 1024 x 1024 pixels – this is larger than the final resolution I want but it’s always wise to work in a higher resolution than you need.

The Face Design

CF001-01

The Lachyrmose Combination box needed an entirely original design for its faces. I made three but we’ll concentrate on just one since the techniques used are the same for all. To produce this image I busted out Adobe Illustrator and the wacom tablet to produce a plain black and white image of the design.

This is it for the artistic part of the build – from now on it’s just going to be mashing these three textures up in different ways to produce the effects we need.

For the rest of the post I’ll be using GIMP, the GNU Image Manipulation Program, and a couple of other utilities to create images from the three original textures. I’m using the GIMP since it should be available to everyone, but other bitmap editors should be able to do all the same things.

The Normal Map

The normal map controls the bumpiness of the surface in SL. As I’ve mentioned in a previous tutorial on materials we can create a normal map from a height map using utilities like xNormal or Knald. xNormal is a free package; Knald is now $99 for a single user license – I used Knald to generate my normal map, but I’ve verified that xNormal does the job just as well.

Since I want the effect of the brass standing just slightly proud of the surface of the box the original pattern image does just fine as a height map. Running it through Knald or xNormal got me a suitable normal map:

CF001-01_normal

 

We’ll be seeing this image again later when we combine it with an alpha layer to control the specular exponent.

Ambient Occlusion

Ambient occlusion is a good way of adding some depth to a surface without having to think too much – it’s almost as good as having radiosity without the huge computational hit. In my workflow, Knald will generate me an AO map along with the normal map – it’s a big time saver. If you don’t have Knald there are a couple of alternaitves:

xNormal has a tool that will generate an AO map from a height map. This tool is nowhere near as good as the height map to normal map tool and the AO textures it makes are pretty poor.

The other alternative is to roll your own in GIMP:

  • Drag the original pattern image into a GIMP window.
  • From the menus select Colours / Invert to change it to a black on white image. Go to Filters / Blur / Gaussian Blur on the menus and apply a 10px blur to the image.
  • Drag another copy of the original pattern into the GIMP window – it’ll add it as a new layer on top of the blurred one
  • Change the blend mode of the new layer to “Lighten Only” (just “Lighten” in most bitmap editors)
  • Save the resulting image as a PNG

CF001-01_occlusion

You can change the look of the image by altering the blur radius, or fade it out a little by adjusting the opacity. This won’t produce a true ambient occlusion map, but it’s pretty close.

The Diffuse Layer

This layer takes the wood texture, brass texture, ambient occlusion and the original pattern and layers them up to produce a final texture. The procedure in GIMP runs along these lines:

  • Drag the wood texture into GIMP to open it as a new image
  • Drag with brass texture into the new image to add it as a new layer
  • Drag the original pattern into the new image to add it as a new layer
  • Ctrl+A, then Ctrl+C to select all of the pattern layer and copy it to the clipboard
  • Hide the pattern layer by clicking on the eye icon next to its entry in the layers palette
  • Select the brass layer and right-click on it. Select Add Layer Mask…
  • GIMP will pop-up a dialogue – select any option and click Apply.
  • GIMP will automatically be in mask editing mode at this point
  • Do Edit / Paste from the menu or Ctrl+V to paste the copy of the pattern layer from the clipboard to the brass layer’s mask
  • The layer palette will show the pasted selection as a floating layer
  • Right-click on this layer and select Anchor Down

This will produce an image with the wood texture as a background and the original pattern rendered in brass over the top. This looks OK but some more life can be added with the ambient occlusion layer. Drag a copy of this image into the image to add it as a layer and set the blend mode to Multiply. This will add an effect of darkening the image around the edges of the brass as if it’s been burned into the wood.

I ended up adding several copies of the AO layer, all with the Multiply blend mode, to deepen the effect further.

CF001_Diffuse

This technique of adding one layer over another with an alpha mask (or Layer Mask in GIMPspeak) is one we’ll be using again to create the other images. I won’t go through all the individual steps again, so refer back to the steps in this section for applying the pattern image as a mask to the brass layer.

The Specular Texture

The specular texture is a greyscale image that controls how much light bounces off each point on the surface. In this example I want the wood areas to be a bit shiny and the brass areas to be a lot shiny. This would be easy enough to achieve but I also want to let a bit of the original dirtiness of the brass texture come through to affect the shine so we need to take a little more time over it.

To produce a greyscale image that reflects the original brass surface is simple enough:

  • Load the original brass texture into GIMP
  • From the menus select Colours / Desaturate to produce a greyscale image
  • Adjust the brightness and contrast of the image to produce one where the lightest parts are white (add brightness) and the darker parts aren’t too dark (lower contrast).

BrassII Specular

Save this image then create a new one at the same 1024 x 1024 resolution in GIMP. Fill this image with a mid-grey colour (RGB 127,127,127 or similar).

Drag the specular brass image in as a new layer and then apply the original pattern to it as a mask. This produces a light textured pattern over a grey background. This will have the effect of adding a middling, smooth shine to the wooden parts of the surface and a bright but slightly dirty shine to the brass parts.

CF001_Specular

The Environmental Intensity

The environmental intensity controls how reflective each part of the surface seems. The SL engine doesn’t do true reflection, of course, it uses something known as Environment Mapping. This is the old-style metallic shine SL used to have before the materials project.

For this surface we want to confine these metallic reflections to just the brass. The procedure for creating this image is the same as for the specular map above only fill the background of the image with black instead of mid-grey.

CF001_SpecExp

The Specular Exponent

The specular exponent controls how glossy each point on the surface is. In this case I wanted the wood to be a bit glossy and the brass to be very glossy. In fact, the requirements mirrored the specular map exactly, so there was no need to create a separate specular exponent map for this project; I just re-used the specular map.

Bringing it all together

Now we have four textures that we have created from the wood/brass/pattern originals:

  • The diffuse texture
  • The normal map
  • The specular and specular exponent map
  • The environmental intensity map

With the exception of the diffuse texture these images still aren’t quite ready for uploading to SL. The materials system uses single images for more than one thing, so you have to pack information into both the colour and alpha channels of an image.

The normal map’s alpha channel controls the specular exponent and the specular map’s alpha channel controls the environmental intensity, so we will need to take some of these images and apply them to others as an alpha map.

Using the procedure outlined above for applying an image as a layer mask to another layer in GIMP, load up the normal map and apply the specular map to it as a layer mask.

 

Resize the image to the final output size using Image / Scale Image, then save the resulting image as a PNG file.

GIMP will have you click through two export dialogues. In the first, Export File, dialog select Merge Visible Layers (the default) and then click on Export. In the second ensure that Save colour values from transparent pixels is selected and click on Save.

This will produce a final normal / specular exponent texture that can be uploaded to SL.

Do the same with the specular map, applying the environmental intensity map to it as a layer mask.

The diffuse mask requires no alpha, just resizing down to an appropriate size.

I have a tendency to forget which maps go in the alpha layers of which other maps, so I wrote myself a little app to streamline this part of the process. It’s nothing you can’t just chew through in GIMP, though – just remember to keep it straight which image goes on which alpha layer. The SL Wiki contains information on the texture channels for reference.

LayerComp

My cheat-sheet app

 

The final results

So, how does it look in SL with two more companion sets of textures for the other faces?

LachrymoseSL

Well, pretty cool, I think. It’s hard to get a real flavour of it in a still image but seeing it in a well lit area it really sells the metal-embedded-in-wood flavour of the thing. The combination of specular reflections and environmental intensity can really make metals look like metals at last.

I hope this tutorial has given you some ideas, or at least shown how you can quite easily go from a simple black and white pattern to a deeply detailed materials surface in SL.

Every image in this post is available under a CC Attribution 2.0 license – remember to credit the original author of the texture from which my brass one is derived – so feel free to take copies and have a play around with them yourself.

Kat’s Un-toolbox : Avastar

I guess this is a slightly odd toolbox post – I’m posting about something I own but don’t use.

Don’t worry, I haven’t snapped and I still class strait jackets as purely recreational garments 😉

Avastar is a plugin for Blender that pretty much brings the SL avatar with all its slider-controlled adjustments into the app for use in building garments and animations. It is a huge and very polished bit of work, better than we have any right to expect for a bit of SL-specific code.

I don’t use it, not because it’s bad, but because I just haven’t fitted it into my workflow yet. It lurks in the background of my creation process, occasionally peeking out and whispering temptations if only I’d take the time to learn how to really use it.

Nevertheless, I don’t begrudge a penny of the money I paid for it because its creator, Gaia Clary, is a vital force in the world of SL content creation. Without her input to the Lindens and the Blender project making things for SL would be much harder than it is now. All of us who make clothing and other things owe her thanks. Also cash.

So I feel that, even if I never use Avastar once, I’ve got my money’s worth out of that purchase ten times over. Every builder in SL should go and give Gaia some of their money right away and thank their lucky stars that she’s had our backs for so long.

Get all the latest news from Machinimatrix.

New Release : Strictly Business

First of all, credit where credit’s due, I have to give my thanks to Jemsyn Fairlady of Darkadia who came up with an actual decent name for this ensemble. Without her input it would probably be called “Vaguely formal domme-ish thing”. Count your blessings.

FD mktplace 1

Bringing this one to the market has been a bit of a saga – fitted mesh went live when it was approaching the end of its cycle and since it allowed a lot more flexibility in the build I decided to go back and rebuild it, so this is the first bit of Kcreations fitted mesh.

I wanted to make better use of the Advanced Lighting Model / materials in this project but I realised early on that there were problems with this. At the moment there’s no way to access things like the normal map, specular map and specular colour from scripts, which is frustrating as it limits what can be managed from a HUD. If you want this to change (and you really do!) then view MATBUG-359 and upvote/watch the feature request.

This scripting limitation meant that, to have different materials settings I needed to distribute separate objects with everything set up differently in each one. Multiply this by three components (shirt, corset, skirt) and five standard sizes and I was rapidly getting to fifty or more wearable meshes for one outfit. Madness!

Fitted mesh let me bring this down by a factor of five and still provide versions in different materials. Throw in a couple of texture packs for those unable to run ALM and it still weighs in at a hefty package, but one that is at least manageable 🙂

Another problem with building for the ALM is that the outfit looks so different from place to place. With a few moderate lights the outfit looks fantastic; worth the extra effort without question. Without lights it looks drab and flat and with too many too-bright lights it washes out in a burst of dazzling specular reflections. Lighting your environment well is going to become more and more important as more and more stuff takes advantage of ALM, so look to your lights early and often!

FD mktplace 2

An advantage of using the ALM is that the diffuse texture of the mesh becomes much less important, at least for outfits like this. This means that the tint of the surface becomes much more powerful. If you wear this outfit in its basic materials-only mode then you’re no longer limited to the 32 coloured textures I provide in a texture pack – you can pick any colour you want from the millions available.

I haven’t included a texture developer’s kit with this release – the number of components make it a bit unwieldy and putting it together would only make an already overdue release even later. All the support is there for it, though, so if anyone does want to make textures for this outfit then drop me a line and I’ll send you everything you need.