Results 1 to 10 of 30

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

Threaded View

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

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

    This is part tutorial or at least the process by which I achieve them, part call for people to add how they do them and part gratuitous attempt to get rep points to recover my place with GP and keep ahead of Ascention. Ok not really, but since I know your all thinking that I thought id mention it first

    A chap who is using my app has discovered that to make tokens you need to make transparent images and is worried that he will spend half a lifetime drawing alpha transparency masks for all the images he wants to use. He is making a sci-fi world so I thought id use some non copyright NASA images to show what can be done and why its not going to take as long as one might initially think if you know a few tricks.

    I use PSP 7 which is old enough that it does not cope with transparent PNGs natively apart from the type which has a single color index assigned to clear - like GIF say. I believe its actually better to deal with the alpha mask or transparency layer as a separate image but then I am forced to. PSP7 can deal with images with transparency but it lacks the capability to save them in PNG format. I believe that later versions do not lack this file format problem and Gimp / PS users definitely don't have an issue. Also, image magick can deal with them easily too though I know I am of a small minority of people which use it.

    So back to basics and to recap some things which many will already know but its good to be complete here. Most image file formats have color information and no transparency information at all. These formats have red green and blue info or RGB. The common formats in this category are JPEG and BMP and both of these two can have full color images - like 16 million colors or so. Next up is GIF which holds 256 colors max - known as a color index format. You can optionally assign one of them to the transparent color. Then when viewed with the right viewer - like a web page browser (firefox / IE etc) it appears with 255 palette of discreet colours out of the 16 million possible and the one assigned to clear showing the background of the web page through the image. But that GIF is either totally clear or totally opaque. PNG has many colour options but the one we focus on is the RGBA where it has a channel called the Alpha channel and that is a greyscale layer assigned to transparency. So it can show any of the 16 million colors and it can also show them as fully opaque, fully transparent and also anything in between. In a VTT or stamp based tool you can use this effect to have image tokens which have a shape and fades - like fading out shadow portions of the image.
    Last edited by Redrobes; 02-22-2009 at 09:15 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
  •