Jump to content
  • 0

Opacity/Transparency


Bloxed

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   2
  • Joined:  06/30/13
  • Last Seen:  

how to adjust or make the transparency of a sprite? O_O

 

just like the Rune of power?

 

screenSelcouthRO060.jpg

 

Thnx :D

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   393
  • Joined:  11/09/11
  • Last Seen:  

There are two problems when you are new to TGA sprites:

 

1. Understanding the TGA format (which requires general understanding of digital graphics).

 

2. Knowing the process and common errors linked to RO TGA sprites creation.

 

1- TGAs are 32 bits images. 8 bit images (which are the ones we usually use for sprites, in bitmap format) store the color in a color table or palette (something you already know due to your recent problem with a color mess up). However, TGA images, and all RGB (3 channels, red green blue) images actually, store the color information in the same image. So the pixel in these images stores the color value (it's not a pixel with a number that refers to an index of a color stored in a color table, in an external file called palette. The pixel itself stores the color).

 

Three channel images have 24 bits (RGB), however, TGA images we use in RO are 32 bits images, which means we are using an extra channel. This channel is known as Alpha channel (32 bits = RGBA, red green blue alpha), and it stores the opacity information. So each pixel doesn't only store an RGB color, but also the opacity value (this is what let us apply different opacity values to all pixels, instead of all pixels sharing the same opacity value, which is what happens when we use 8 bits bmp images and modify the opacity via ActOR). We only use one single alpha channel per frame.

 

2. We open our frame in Photoshop, go to the Channels tab (in the layers window), click on new channel, and this channel should be called Alpha 1 probably or something like that. In this channel, we don't draw the sprite, we just specify what is visible and what not. Pure white is 100% opaque, pure black is 0% opaque (transparent).

 

So what we first do, is select the background in the RGB channel, then go to the alpha channel, and paint the selection with black, and by inverting the selection, we will get the shape of our sprite. We shall paint it with white or grey, depending on the opacity we want to apply. In the example you put, it would be grey.

 

When we finish, we have to twirl it vertically (not with the rotation tool, we have to select it and apply a vertical twirl). Then save it as a TGA image. Open your sprite in ActOR (if you don't have one yet, open any sprite that is similar to your is size and frame number, as well as in function obviously). Select the frame in the bottom menu and click on replace frame. Load your TGA image. Do this for all frames, delete frames that aren't needed. All the frames must be TGA.

 

Once you finished, save your sprite. If you are in ActOR 1, open it with ActOR2. In ActOR 2, run the script 8 to 32 bits. It will change the SprType value in all your actor frames, so it won't give an error ingame when you use the sprite.

 

It should work with this. Feel free to ask if there is a problem.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   393
  • Joined:  11/09/11
  • Last Seen:  

This result can be attained either by using a TGA sprite or (easier choice) by modifying the RGBA value of the image in the act. You would be changing the alpha value. In Actor, channels are ordered this way ABGR (AABBGGRR). This means that if a image has 00###### as a ARGB value, it will be fully transparent, meanwhile if it is FF######, it will be fully opaque.

 

If you want to apply the same opacity value to the full image, I recommend you to use actor. Otherwise, make a TGA sprite.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   2
  • Joined:  06/30/13
  • Last Seen:  

This result can be attained either by using a TGA sprite or (easier choice) by modifying the RGBA value of the image in the act. You would be changing the alpha value. In Actor, channels are ordered this way ABGR (AABBGGRR). This means that if a image has 00###### as a ARGB value, it will be fully transparent, meanwhile if it is FF######, it will be fully opaque.

 

If you want to apply the same opacity value to the full image, I recommend you to use actor. Otherwise, make a TGA sprite.

 

Big thanks sir!! :D

 

btw how to make TGA sprites? xD im new to TGA Sprites :D

 

thnx again...  /thx

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  13
  • Reputation:   2
  • Joined:  06/30/13
  • Last Seen:  

There are two problems when you are new to TGA sprites:

 

1. Understanding the TGA format (which requires general understanding of digital graphics).

 

2. Knowing the process and common errors linked to RO TGA sprites creation.

 

1- TGAs are 32 bits images. 8 bit images (which are the ones we usually use for sprites, in bitmap format) store the color in a color table or palette (something you already know due to your recent problem with a color mess up). However, TGA images, and all RGB (3 channels, red green blue) images actually, store the color information in the same image. So the pixel in these images stores the color value (it's not a pixel with a number that refers to an index of a color stored in a color table, in an external file called palette. The pixel itself stores the color).

 

Three channel images have 24 bits (RGB), however, TGA images we use in RO are 32 bits images, which means we are using an extra channel. This channel is known as Alpha channel (32 bits = RGBA, red green blue alpha), and it stores the opacity information. So each pixel doesn't only store an RGB color, but also the opacity value (this is what let us apply different opacity values to all pixels, instead of all pixels sharing the same opacity value, which is what happens when we use 8 bits bmp images and modify the opacity via ActOR). We only use one single alpha channel per frame.

 

2. We open our frame in Photoshop, go to the Channels tab (in the layers window), click on new channel, and this channel should be called Alpha 1 probably or something like that. In this channel, we don't draw the sprite, we just specify what is visible and what not. Pure white is 100% opaque, pure black is 0% opaque (transparent).

 

So what we first do, is select the background in the RGB channel, then go to the alpha channel, and paint the selection with black, and by inverting the selection, we will get the shape of our sprite. We shall paint it with white or grey, depending on the opacity we want to apply. In the example you put, it would be grey.

 

When we finish, we have to twirl it vertically (not with the rotation tool, we have to select it and apply a vertical twirl). Then save it as a TGA image. Open your sprite in ActOR (if you don't have one yet, open any sprite that is similar to your is size and frame number, as well as in function obviously). Select the frame in the bottom menu and click on replace frame. Load your TGA image. Do this for all frames, delete frames that aren't needed. All the frames must be TGA.

 

Once you finished, save your sprite. If you are in ActOR 1, open it with ActOR2. In ActOR 2, run the script 8 to 32 bits. It will change the SprType value in all your actor frames, so it won't give an error ingame when you use the sprite.

 

It should work with this. Feel free to ask if there is a problem.

O.O Big thanks sir!! Really helpful :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...