Tutorial: Removing a Green Screen With Photoshop or GIMP

Welcome to the first of what I hope will be many tutorials to come. Seeing as how this is the question I get asked the most, I thought it only fitting to begin this weekly blogging with a green screen removal tutorial.You will need three things for this lesson:

1. A snapshot taken on a greenscreen (you may download the one I will be working on, or you may set up your own green screen - instructions below - and take one for yourself to work on).

2. Photoshop or GIMP.

3. Patience.

Ready? Great! Let's get started. First, let's learn how to create our own in-world green screen. For those of you who would like to skip ahead, I have provided two seperate tutorials in this post - one will teach you how to remove the green screen in Photoshop, the other will explain the process in GIMP. Please select which you'd like to read: Photoshop | GIMP.

Setting up your own, one prim green screen in world; step-by-step:

1. Rez a box on the ground, right click it and select "Edit from the pie menu.

2. Select the "Object" tab in the edit menu and set the box size to X 10, Y 10, Z 0.010, Rotation X 90*, Path Cut E .500, and Hollow 95.

3. This will give you a two sided, large "wall" and "floor", the base for any screen. Now, select the "Texture" tab in the edit menu.

4. You will see two boxes here, Texture and Color. First, click the texture box. We will need to make it blank.

5. When the texture box opens, select "Blank" from the lower left corner of the menu, and then press "Select". This will make your prim pure white and ready for the green screen color.

6. Next, choose the Color box next to the Texture box.

7. There are three fields in the upper left corner of the color picker that will appear: Red, Green, and Blue. In these fields, enter the following values: Red - 0, Green - 255, Blue - 0. Then press "Select". This will turn your prim a bright shade of green.

8. The final step to creating this green screen prim is to make your prim Full Bright by ticking the "Full Bright" checkbox in the Texture tab of the edit menu. Why do this? It will allow for you to manipulate your in-world lighting settings (Windlight, face lights, scene lighting, etc) without worrying about the light affecting your green screen. This will allow for MUCH simpler removal of the entire screen when post-processing the image. Example:

* Note: If the green screen is "buried" in the ground when you have set the rotation of the prim to X 90, use the positioning arrows to move the prim up until it is no longer buried.

Frequently Asked Question: Why not just use a white screen and the magic wand tool to remove the background?

Simply put, green screens, believe it or not, are MUCH simpler to remove entirely than are white ones. White backgrounds will typically leave white edges around any alpha textures on your avatar (i.e. wispy prim hair edges, transparent skirt prims, etc), which are difficult to remove completely without much more time and technical know-how. A green screen will make it easier to remove the background entirely while still leaving alphaed textures intact. Example:

Now, let's open those images and remove the background! I have provided the image I will be using in this tutorial for download here. Feel free to download it and follow along if you like, or use your own image. Please note, there are two sets of instructions here; one for Photoshop users, one for GIMP users (GIMP is a free alternative to Photoshop and may be downloaded here).

Choose the tutorial you'd like to read: Photoshop | GIMP

To remove the green screen from your photo; Photoshop step-by-step:

In order to be able to follow this tutorial, you will need to know a few basic locations I will be referring to in the Photoshop interface. If any of the terms I use confuse you (i.e. top menu bar, new layer icon, layers tab, etc) please refer to this legend for clarification.

1. To prepare your image for background removal in Photoshop, you will *always* need to start with one very important thing: ensure that the image you are working on is on its own layer and *not* the background layer. To do this: press Ctrl+A, Ctrl+X, and Ctrl+V. This will select, cut, and paste the image you have opened onto a new layer (Layer 1).

2. Now, in the menu bar at the top of your Photoshop window (i.e. the one that says File, Edit, Image, etc) -- press Select > Color Range.

3. The "Color Range" window will display. An eyedropper tool should now be your cursor whenever you move your cursor (mouse) over the image. Use this eyedropper to select the green background in your image, and then press "Okay".

4. You will notice now that a blinking dotted line now appears around all of the green background. This indicates that the background is selected and ready for removal. To remove it, press Ctrl-X to "cut" it from the image.

5. Voila! The green background is removed and we are now left with simply an avatar. But we're not done with this image yet, ohhh no...

Now, in a lot of cases, the above five steps may very well be all you need to fully remove a green screen from an image. However, sometimes, such as with this photo, there will be green screen "leftovers" in the image alpha textures - the wispy blond hair bits and the scarf tassles in this image, for example. We will need to perform a couple of extra steps in order to remove the green from these parts. The techniques shown in the next few steps CAN be adjusted to fit your needs and be used to remove ALL of the green screen from any snapshot you may take using one.

Let's begin with removing the green from the blonde hair.

IMPORTANT NOTE: If your avatar is wearing both black AND colored semi transparent prims (i.e. your avatar has black hair and is wearing a pink dress with semi transparent skirt prims, or has colored hair with a black dress that has semi-transparent prims) you should *ALWAYS* remove the green from the COLORED semi-transparent prims *FIRST*.

1. Create a new layer by choosing from the menu bar Layer > New > Layer and pressing Okay. You can also create a new layer by pressing the "New Layer" icon (it looks like a post-it note) in the bottom right corner of the Layers tab.

2. Change the blending mode of your new layer to "Color". The blending mode is changed using the drop down menu located in the Layers tab, next to the opacity slider.

3. Use your eyedropper tool to select a color from the blonde hair. Then, use a soft-edged paint brush on this new layer to paint the color over the green wispy hair edges. This will essentially change the green hair to the appropriate, matching color.

4. Now, we will need to merge these two layers together. To do this, you will first need to select the original avatar layer. Do this by selecting the avatar layer in your layer list, and choosing Select > Load Selection > Okay in the top menu bar.

5. While the avatar layer is selected (you should see a blinking dotted line surrounding it), select the color layer we painted on. Then, press Ctrl+E.This action will merge the colored layer AND the avatar layer together, while still keeping the avatar outline selected.

6. You'll notice once you merge the two layers that any color that was not painted over the avatar's hair is now showing, rather messily! But have no fear. Because you selected the avatar before merging the two layers, and thus still have the avatar selected, you may now press Ctrl+X and Ctrl+V to cut and paste the avatar from the original layer onto a new layer. Once this is done, you may delete the excess color layer. You are now left with only the avatar again, only this time, the hair edges are the appropriate color!

Now, let's move on to the black scarf tassles. These are actually the easiest bit to fix. Keep in mind that the trick I am about to show you also applies to removing green screen from black hair or black semi transparent prims.

1. Choose Image > Adjust > Hue & Saturation from the menu bar at the top of your screen. This will bring up the Hue/Saturation window. In this window, you will see a drop-down menu (named Edit) consisting of various colors: choose Greens from this drop box. By selecting Greens, you are ensuring that any changes to the hue/saturation you make will ONLY affect the green from the green screen that may be leftover in your image.

2. Once you have selected "Greens" from the drop box, move the Saturation slider all the way left to -100. This will turn any remaining lime green to grey. Next, turn the brightness slider all the way to -100. This will turn the grey to black. Select Okay.

Once you have completed this step (if necessary), you should now be left with only an avatar and a blank background ready to be filled in by anything you choose!

To remove the green screen from your photo; GIMP step-by-step:

In order to be able to follow this tutorial, you will need to know a few basic locations I will be referring to in the GIMP interface. If any of the terms I use confuse you (i.e. top menu bar, new layer icon, layers tab, etc) please refer to this legend for clarification.

1. To prepare your image for background removal in GIMP, you will *always* need to start with one very important thing: ensure that the image you are working on is on its own layer and *not* the background layer. To do this: press Ctrl+A, Ctrl+X, and Ctrl+V. This will select, cut, and paste the image you have opened onto a new, "floating" layer. To turn this "floating" layer into a new layer, right click on it in the layer's tab and select the "New Layer..." option.

2. Now, in the menu bar at the top of your GIMP window (i.e. the one that says File, Edit, Image, etc) -- press Select > By Colour.

3. Your cursom will now change from an arrow to a pointing finger. Use this cursor to select the green background in your image.

4. You will notice now that a blinking dotted line now appears around all of the green background. This indicates that the background is selected and ready for removal. To remove it, press Ctrl-X to "cut" it from the image. Deselect the avatar by pressing Shift+Ctrl+A.

5. Voila! The green background is removed and we are now left with simply an avatar. But we're not done with this image yet, ohhh no...

Now, in a lot of cases, the above five steps may very well be all you need to fully remove a green screen from an image. However, sometimes, such as with this photo, there will be green screen "leftovers" in the image alpha textures - the wispy blond hair bits and the scarf tassles in this image, for example. We will need to perform a couple of extra steps in order to remove the green from these parts. The techniques shown in the next few steps CAN be adjusted to fit your needs and be used to remove ALL of the green screen from any snapshot you may take using one.

Let's begin with removing the green from the blonde hair.

IMPORTANT NOTE: If your avatar is wearing both black AND colored semi transparent prims (i.e. your avatar has black hair and is wearing a pink dress with semi transparent skirt prims, or has colored hair with a black dress that has semi-transparent prims) you should *ALWAYS* remove the green from the COLORED semi-transparent prims *FIRST*.

1. Create a new layer by choosing from the menu bar Layer > New Layer and pressing Okay. You can also create a new layer by pressing the "New Layer" icon (it looks like a post-it note) in the bottom right corner icon menu of the Layers tab.

2. Change the blending mode of your new layer to "Color". The blending mode is changed using the drop down menu located in the Layers tab, next to the opacity slider.

3. Use your eyedropper tool to select a color from the blonde hair (NOTE: You will need to have the avatar layer selected in order to use the eyedropper tool on the blonde hair -- simply click the avatar layer, use the eyedropper tool to select a color, and then switch back to the new layer). Then, use a soft-edged paint brush on this new layer to paint the color over the green wispy hair edges. This will essentially change the green hair to the appropriate, matching color.

4. Now, we will need to merge these two layers together. To do this, you will first need to select the original avatar layer. To do this, right click on your color layer and select Merge Down. This will merge the two layers together into one. You are now left with only the avatar again, only this time, the hair edges are the appropriate color!

Now, let's move on to the black scarf tassles. These are actually the easiest bit to fix. Keep in mind that the trick I am about to show you also applies to removing green screen from black hair or black semi transparent prims.

1. Choose Colors > Hue/Saturation from the menu bar at the top of your screen. This will bring up the Hue/Saturation window. In this window, you will see a pie menu consisting of various colors: choose Greens from this pie menu. By selecting Greens, you are ensuring that any changes to the hue/saturation you make will ONLY affect the green from the green screen that may be leftover in your image.

2. Once you have selected "Greens" from the pie menu, move the Saturation slider all the way left to -100. This will turn any remaining lime green to grey. Next, turn the brightness slider all the way to -100. This will turn the grey to black. Select Okay (Note: You may see some ragged "spots" around the area when you do this -- do not worry; they won't show when zoomed out).

Once you have completed this step (if necessary), you should now be left with only an avatar and a blank background ready to be filled in by anything you choose!

Congratulations! You now have the tools at your disposal to remove a green screen from a Second Life (R) snapshot!

"Where did that drop shadow come from?!" you ask? Ah, well... tune in next Tuesday for that tutorial!

Trackback URL for this post:

http://rezzable.com/trackback/2379

Comments

I've been using a white

I've been using a white screen for a while now..because all the tutorials with the green screen have been for PS. Thanks for including a GIMP version.

I will give it another shot!!

I was going to ask that you

I was going to ask that you do a drop shadow tutorial next.  You read my mind.  Thanks!

I was wondering though - why green?  Why not blue or yellow, etc.?

this is really helpful Ryker

this is really helpful Ryker some great tips  ! some of us like me will really make great use of this tutorial

er, not much sense to

er, not much sense to chopping out the back-ground and then leaving it on white! ;) What about a more interesting scene? Like visiting a pub here in London or something. Nice tut! Is very handy and well presented-and power to the Gimp!

HOMG - thank you Ryker! I've

HOMG - thank you Ryker! I've been doing it the long way... >_< I understand that the green screen is best because of the tones of the skin, is that right?

Well --

Actually, you can use true blue (0, 0, 255) or true green (0, 255, 0) to take photos on; the reason for using these two colors is that they're the least likely to be worn on clothing or to interfere when using the "select color range" technique to remove them from the background. For instance, if you are wearing a green shirt, use a blue screen. If you have blue eyes, use a green screen.

Thank You, Rykerbeeeeeeeeeeee!

Oh, if only I had had this tutorial back in February, when I had to post this monstrosity to the SL Enquirer!  I had tried to do a greenscreen in the back and then take it out, but the black lace in the dress was all still filled with green, so I just changed the green shade in the background. Wahhh!  I had originally planned to put a festive background behind us, but had to scrap that idea due to my inept PS skillz.

why not shoot on a white background in the first place?

So why not shoot on a white background in the first place?

And whats wrong with shooting on, say, the photosphere textures?

And how and where do we buy textures to insert for white background in ps or gimp?

And is this going to cost a lot of money?  Or are there free textures out there for this sort of thing? 

 

yaaay

Thank you for a great tutorial.. I am just begining to use PS and this is incredibly helpful on many levels

Vivianne -Shooting on a white

Vivianne -

Shooting on a white background leaves the problem mentioned above (the white halo around the semi-transparent prims, such as wispy hair textures), and does not allow for easy removal of the background to move the avatar onto a new, desired background of choice. Using a green screen also allows you to add a realistic cast shadow from the avatar to the image.

As far as the background itself goes, that's up to you - you can make one yourself, you can snap images in SL that can serve as background (I typically snap scenery photos in Second Life and use them as backgrounds for my green screen photos), or you can use stock photography that give you permission to do so from sites such as morgue file and deviant art.

Using photo spheres and their backgrounds - that is a choice you have and is entirely up to you. It's all a matter of preference really. I'll be going more into creating backgrounds for your images next week.

Hope this helps!

- R

That does help!  Thanks

That does help!  Thanks Ryker!

Wow thanks, Ryker!

A great tutorial - and a quick fix to a time consuming problem. I can't believe how easy it is. I was shooting on white before this, but no more!

SDK for removing the green screen

I am developing a software through which I want to remove the green background and make the image as the transparent one . I dont want to involve any maniual intercation. I want to give the green background image as the imput and want to have the transparent image as the output.

Thanks

Varun Srivastava

 

What is Rez a box on the ground ???

Hello:  STEP 1 for PHOTOSHOP -- you mention  "Rez a box on the ground, right click it and select "Edit from the pie menu."

What is REZ A BOX ON THE GROUND and what is pie menu in PHOTOSHOP.  I use CS3.  Look forward to your respons at your earliest convenience.

 

@ Anonymous: Hi there! The

@ Anonymous: Hi there! The first 10 steps of this tutorial are only applicable if you are involved in the game of Second Life (www.secondlife.com) and are in need of a greenscreen to shoot pictures on. :) Please click this link for the actual greenscreen removal tutorial:

http://rezzable.com/blog/rykerbeck/tutorial-removing-green-screen-photos...

Enjoy!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code>
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.