Results 1 to 10 of 30

Thread: Tutorial about generating transparent PNG's for use as tokens in a VTT or similar.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post Simple cut out method

    Right, so lets say you have a pic off the web thats a non copyright image, CC or otherwise able to rip. Its RGB like a JPEG image and you want to make it into a PNG token with a cut out shape. Heres an example. HiRes pics from here http://grin.hq.nasa.gov/subject.html but I am using smaller versioned ones for examples.

    You could do this in a number of ways but this is the way I use. Starting with the X36 plane pic, look for a color that is definitely not in the image - like bright red. Get the single line tool and draw around it. What I tend to do is put the start point down near to where I want to start but a little away from the edge I am trying to follow. Then drag out the line and put the end point down exactly where I need it. Then without moving the mouse, start a new line and drag back to the starting point again but this time set the end point down exactly where it needs to be. The reason I do it this way is that you dont have to guess the angle exactly in one go. Like image below but end point 3 past the corner. Note, turn off anti aliasing for the line. Let it have jaggy edges. Otherwise it will blend red into the image and we will want to pick up the red in a mo.
    Last edited by Redrobes; 02-22-2009 at 07:47 AM.

  2. #2
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    So you have lined out the whole plane, use the selection magic wand tool and set the match color tolerance really high and pick a point in the background region of the plane. It should select all the background and up to but not including the red line. If its not hitting that then you need to adjust the tolerance. Normally something really high like 100 or so should do it tho if the red is sufficiently different to the image. Once that has done its thing then you can use the selection menu and use the expand selection by a few pixels - the number of pixels depends on the line size but basically set it to half the line width. If you have the 'marching ants' selection border showing it should now run through the middle of the red lines. Select the fill tool and set the fill match to none. Ie. Fill everything. Put that down in the background area and it should fill everything in the selection area giving a solid red background.
    Last edited by Redrobes; 02-22-2009 at 07:49 AM.

  3. #3
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Touch up any missing little bits and then use the brightness tool to increase brightness by a large margin - like 50% or something like that.

    Then select the fill tool again, set the match tolerance to 0 and set the color to black. Fill the light red area to black.

    Now make the image greyscale using the color menu. Then use the brightness control again and add 127 brightness and 100% contrast. This should make everything not black into white. A touch of soften to smooth the edges down and your done.
    Last edited by Redrobes; 02-22-2009 at 07:50 AM.

  4. #4
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Here is an example of the X36 token.
    Last edited by Redrobes; 02-22-2009 at 07:51 AM.

  5. #5
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    So that was a simple shape that had straight lines to cut out. How about something harder. This is not so bad *if* you can get a picture with a background color that is constant so that we can differentiate the image from its background. Images with a constant black or white background are best, then ones with all solid color. Here is the old and now burnt up Mir Space Station. Its pretty complicated to cut out but we can do most of that previous cut out process on it.
    Last edited by Redrobes; 02-22-2009 at 07:52 AM.

  6. #6
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Take a copy of the color image and make a greyscale version of it. Soften it a little with a slight blur - maybe a few times. This reduces any noise in the image but you don't want to do it so that it looks very blurry. Now take that brightness option again and add as much brightness as you can with 100% contrast. In this case it was a lot - about 124. The more you can add without the background showing through the better. It depends on the pic in question though this one is with a near black background that allows us to go quite high. Once done then blur it a bit more and do again. This will expand the white to fill in small holes. By this point you can probably get out a brush and touch up the odd black dot in white and the odd white dot in black and remove stuff you don't want like the white in bottom right corner.

    Once its all solid black and white use the selection tool again on the white. Then contract the selection by a few pixels. We do this because we expanded the white earlier and we have been real aggressive in getting everything into the white areas. The amount to contract is a few pixels depending on the size of image and original color difference. Then invert the selection and flood the background with a match of 'none' again like before. Blur the edges just a little and save out the final alpha mask.
    Last edited by Redrobes; 02-22-2009 at 07:53 AM.

  7. #7
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Here is an example of the Mir station token on a background.
    Last edited by Redrobes; 02-22-2009 at 07:54 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •