Home About Calender Contact Advertise

Saturday, 3 August 2013

How to Create 3D Images for Second Life

ad+1

24flp40.jpg 

Trying to find the best way to turn Second Life snapshots into 3D anaglyph images is something I have been working on for a while. A few simple attempts demonstrated it was possible and from there I have tried to improve upon the technique.

The method is essentially to take two snapshots and then tweak them in Gimp to produce the anaglyph image. Although I have used Gimp it shouldn’t be too difficult to adapt this for Photoshop.
If you want to create 3D anaglyph images in RL then you need to use two cameras spaced about eye distance apart (around 3 inches), and find a technique so the cameras each take a photo simultaneously of the same subject. This will imitate in the finished 3D image the depth of field the eyes use to create spatial awareness.

There are online tutorials that use duplicates of one image to produce 3D images but the results are not that great, so for this reason a method needed to be found to create two almost identical images in Second Life that also imitated the eye’s depth of field awareness. In other words a method is needed to take two almost identical snapshots with the SL equivalent of 3 inches spacing between them.

Spacing Images: Method One

Once you have decided on the subject for your 3D image position the SL camera and take the first snapshot. You now want to pan the camera slightly to either the left or the right. Click on View on your SL viewer to open the Orbit/Zoom Pan camera controls window. To the left there will be arrows to rotate the camera, and to the right arrows to pan the camera. Tap either the right or left pan arrow very lightly to move the camera gently to the side. Take the second snapshot.

vq5ete.jpg

If you have zoomed in quite close to the subject of your image sometimes using the camera rotation arrows can work better than panning the camera. There is some trial and error in creating 3D images but a little experience will help to reduce this.

Spacing Images: Method Two

Spacing the snapshots to use for 3D images works best with accurate camera controls so I have developed a simple camera hud based on Azurei Ash’s camera script. You can collect a free copy of the hud from the Marketplace.

When you wear the hud you will see a hollow blue square in the centre of your screen. This can be used to centre your subject. Click the square and it will turn red and move the camera to the default starting position. Use your keyboard’s arrow keys and the PageUp and PageDown keys to position the camera for the first snapshot. Tapping either the right or left arrow keys whilst holding down Shift will pan the camera by small and precise increments, making taking snapshots for your 3D images much easier. You can read more about the hud on the post named Camera Control for 3D Images.

Creating the 3D Image

Once you’ve taken the snapshots and saved them to your hard drive, start Gimp and open the first snapshot. Open the second snapshot as a layer. Viewing the completed image through 3D glasses can make the image appear quite dark, so both the layers may need adjusting.


15oyw54.jpg


5e5w5w.jpg

With the first layer selected, go to Colours > Brightness-Contrast and enter settings you are satisfied with. In the example here I adjusted the brightness to 27 and the contrast to 20.

2ir6lok.jpg

Now go to Colours > Hue-Saturation. Subdued colours or an almost monochrome appearance can work well with 3D images, but here I chose to ramp up the colour saturation to around 68. As I mentioned earlier, there is some trial and error involved in this technique as well as personal judgement. A lot will depend on what you want from your 3D image as well as the snapshots you started with.

290sqj6.jpg

Whatever adjustments you made to the first layer will now need to be applied exactly to the second layer.

Adjusting Colour Curves

Now we are going to adjust the colour curves of each layer to make one red and the other cyan.
With the top layer selected, go to Colours > Curves and a window will open. From the Channels drop down menu select red and drag the point on the diagonal line down to the bottom right. Click OK.


6dsigm.jpg

The top layer should now have a cyan appearance.

ol445.jpg

Hide the top layer and make the second layer active. Go to Colours > Curves, and this time select the green channel. Drag the point in the diagonal line down to the lower right as before. Select the blue channel and drag the point to the lower right and click OK.

20g1xu0.jpg

This layer should now be red.

293gbqd.jpg

Click the eye icon next to the top layer to make it visible again, and make it the active layer. At the top of the Layers panel you should be able to see that the Mode of the top layer is Normal. click the downward facing arrow to the right of this and select Screen as the new layer mode.

Your snapshots should now look something like an anaglyph 3D image, although you may need to move one of the layers to the left or right whilst wearing your 3D glasses. If after moving the layer your image still doesn’t look 3D you may need to undo a few steps. Go back to before you adjusted the colour curves of each layer, then lower the top layer. Now repeat the colour curves steps again and change the top layer’s mode to Screen.

Gimp Plugin

If all the colour adjustments seem too much trouble then the whole process is made much simpler with the Gimp Make-anaglyph Plugin. Not only does it speed up the process of creating 3D images from your SL snapshots but the final images are much better. Once you have installed this plugin you will see a ‘Stereo’ option on your image window menu. Instead of adjusting the colour levels as above click on Stereo > Make Anaglyph and a small window will appear. Click ok and you’re done. There’s also no need to change the layer mode to screen.

Merge the two layers and crop any messy edges that may have appeared after moving one of the layers, then name and save your completed image.

24flp40.jpg

Tips on Improving your 3D images

Creating 3D images from SL snapshots isn’t a precise science and there are a number of variables that will depend on not only the subject matter but the person taking the pics. I have found however there are a few guidelines that can improve the final 3D images.

1/ Because scale in SL does not always match how we see scale in RL it is advisable to take more than two snapshots so you can decide which are the best to use for your 3D image. Whereas in RL pics should be taken about 3 inches apart to simulate the distance between the eyes that creates stereo vision, this distance can be greater in SL.

By using the Gimp plugin you can choose 2 of the snapshots you have taken, quickly see if they work as a 3D image then either replace one layer, or go ahead and make the necessary adjustments to both layers.

2/ Second Life 3D images work best if there is a good contrast of light and shading in the two snapshots. Relying on the default SL daytime settings is ok but they don’t really provide this contrast. Using the environmental settings and at least adjusting the east angle of the light source can make a difference. Adding your own light source to a scene can also help if you are able to rez items on the sim.

3/ Having your graphic’s draw distance set to max doesn’t always add to the finished image. In fact backgrounds can get confusing so I tend to keep my draw distance to around 250m. This is especially useful if the image is focused on something in the foreground, rather than say a scenic view.

4/ If after using the Make anaglyph plugin the image doesn't look 3D, try undoing this step and lowering the top layer. Click on Stereo again.

The red layer should be towards the right. Sometimes it may appear more to the left. Try moving the layer to the right before undoing the Make Anaglyph step and lowering the top layer.

5/ It is a good idea to lock the clouds in the environment editor because you want the scene to be static, and clouds can change quite quickly in Second Life. It is important for there to be no movement in the snapshots because they will show from one image to the next and affect the finished 3D image.

0 comments:

Post a Comment

Home About Calender Contact Advertise
Copyright © 2014 SL-Inspiration | All Rights Reserved. Design By Blogger Templates