YesNoOk
avatar

Explod transparency (Read 1316 times)

Started by DR119, November 20, 2017, 05:36:40 pm
Share this topic:
Explod transparency
New #1  November 20, 2017, 05:36:40 pm
  • avatar
  • **
I've added an explod with RGB sprites and semi-transparent pixels. However the sprites get rendered without the semi-transparent pixels in the game and it looks terrible. I tried it with trans=add, but it didn't work... Hope somebody can help me
Last Edit: November 29, 2017, 06:09:25 pm by DR119
Re: Explod transparency
#2  November 20, 2017, 09:05:57 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Are the semi-transparent pixels the edge of a solid color outline?  Or is it a multi-color outline?
If it's one color (such as black), well I have a "simple" solution using Photoshop.
Open the sprite, and in a new layer paint the entire background black (or the color of the outline).
Merge the sprite & background layer.  Use the Magic Wand tool on the black background with: 0% tolerence / NO anti-alias / "Contiguous"
At this point you may want to use the function "Select > Modify" to expand the selection by 1 or 2 pixels.
Now press Ctrl+Alt + R ("Refine Selection"), and use the default settings except change "Contrast" to 100%.  This will ensure that the selection does not have anti-alias edges.
Delete the background and you should now have a sprite without semi-transparent pixels.  You may need to use the Eraser tool (pencil mode) to clean up a little.

If you NEED to have that soft edge from the semi-transparent pixels, it will have to be coded as a separate Anim and Explod, layered under the player.
However, you'll still have to follow the steps above to get rid of the semi-transparent pixels in the Player's sprites.

Re: Explod transparency
#3  November 20, 2017, 09:23:29 pm
  • avatar
  • **
Are the semi-transparent pixels the edge of a solid color outline?  Or is it a multi-color outline?
If it's one color (such as black), well I have a "simple" solution using Photoshop.
Open the sprite, and in a new layer paint the entire background black (or the color of the outline).
Merge the sprite & background layer.  Use the Magic Wand tool on the black background with: 0% tolerence / NO anti-alias / "Contiguous"
At this point you may want to use the function "Select > Modify" to expand the selection by 1 or 2 pixels.
Now press Ctrl+Alt + R ("Refine Selection"), and use the default settings except change "Contrast" to 100%.  This will ensure that the selection does not have anti-alias edges.
Delete the background and you should now have a sprite without semi-transparent pixels.  You may need to use the Eraser tool (pencil mode) to clean up a little.

If you NEED to have that soft edge from the semi-transparent pixels, it will have to be coded as a separate Anim and Explod, layered under the player.
However, you'll still have to follow the steps above to get rid of the semi-transparent pixels in the Player's sprites.

Thanks for the clue, but why do I have to get rid of the semi-transparent edge when it's used in an explod? I use Mugen 1.1 with OpenGL and have used images with a semi-transparent edge for the lifebars without any problems. I thought one could use RGB sprites at every point in Mugen 1.1 with OpenGL?
Re: Explod transparency
#4  November 20, 2017, 09:31:14 pm
  • ****
  • Robotics Engineer
    • USA
    • altoiddealer@gmail.com
Eh, nevermind then.  I'm only familiar with 1.0.

Maybe someone knowledgeable with 1.1 can help solve your problem.  Sorry about that!