2D Sprite Question
Sprite Graphics Question
I am working on a 2D DirectX RPG game. I download most of my sprites from:
http://reinerstileset.4players.de/englisch.htm
I must say he does a really good job on his sprites, but the problem I have is with transparency. For example I have a castle.bmp with a transparency of 108, 76, 47. This removes all of the pixels of that color, but it leaves a small line of slightly different pixels around the castle. The shade must change slightly as it approaches the building. I am using Textures in DirectX to display these images. Is there an easier way to fix that other than changing one pixel at a time? I have Adobe Photoshop CS2. Any advice would be greatly appreciated.
I apologize if I posted this in the wrong place.
__________________
Programming video games is my life.
im currently having this problem too, as long as you dont resize it you wont get the edges blended with pixles that should be trasparent, if you need to resize it you could try masking or a format with a aplha channle like a tga, this way you can make the areas around the sprite the same color as the sprite itself but this transparent
Your right it only does it if I resize it. Thank you for the tip, I will try that right now :)
I don't think using a mask will work with DirectX will it?
I've done that using WIN32 before but never DirectX.
I've done that using WIN32 before but never DirectX.
well it happens becouse when you resize it the image blends with neiboring pixles so its not blocky but when you blend with the edges you get the transparent color blended with the image
Quote:Original post by adam23
I don't think using a mask will work with DirectX will it?
I've done that using WIN32 before but never DirectX.
there should be some way to make it work in directx, im using gl so unfortunatly i dont know but you could try asking in the directx forum about masking, or directx can load .tga
I actually had the same problem with Reiner's graphics (amazing for being free) as well. The transperency color is slightly altered if you resize the image causing one or two lines of pixel color that show up. I use Paint Shop Pro and just decrease the color count. You can then resize the image and the trans. color stays the same. After you are finished just increase the color count back to the original. I have done this on virtually every image from his site that I have used and there is usually very little color disturbance in the actual image after changing the color counts.
Hope it helps.
Edit: This is only works when you resize the image before using in it your game. If DirectX alters the size of the image then this will probably not work. Sorry.
Hope it helps.
Edit: This is only works when you resize the image before using in it your game. If DirectX alters the size of the image then this will probably not work. Sorry.
Quote:Original post by shadowcomplex
Edit: This is only works when you resize the image before using in it your game. If DirectX alters the size of the image then this will probably not work. Sorry.
this is where the x^2 textures become a pain
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement