Page 1 of 1
Translucent texture and grit
Posted: Sat Sep 11, 2010 3:19 pm
by flure
Hello,
I'm trying to convert a PNG tp a translucent GL_RGB8_A5 texture with grit. In fact I don't even know if it's even possible. I'm trying some parameters, but I'm stuck. I can convert a 32bpp PNG to a 8 color paletted texture, but I don't know how to convert the alpha channel of this PNG to a 5 bits alpha component.
Any help or link would be highly appreciated.
Thank you
flure
Re: Translucent texture and grit
Posted: Sun Sep 12, 2010 1:49 am
by WinterMute
grit doesn't handle DS texture formats. There are some tools around somewhere to do it but right now I'm not sure where, I'll have a look and see what I can find.
Re: Translucent texture and grit
Posted: Sun Sep 12, 2010 1:34 pm
by flure
Ok, meanwhile I figured out a way of not needing grit to handle this texture format.
I export two images : one for the colors, which is converted into a 8 colored paletted image. The second one is a black and white image, converted to a 32 colors paletted image. I then combine them in my DS code to produce a A5I3 texture. Not the most efficient way of doing it, but it works...
Re: Translucent texture and grit
Posted: Sun Sep 12, 2010 1:47 pm
by flure
Argh sometimes I feel really stupid.
I just remembered I had a Gimp plugin which exports to various NDS formats. And guess what ? It can do A5I3... I found it here :
http://weirdfox.com/?id=18
I guess I should give it a try...
Re: Translucent texture and grit
Posted: Tue Sep 14, 2010 1:50 am
by ShotgunNinja
Wow, that's an interesting tool, and it would come in extremely handy. Unfortunately, due to me being back at school, I don't have the time to fool with it now...
But still, I wasn't aware that an A5I3/A3I5 image format existed in libnds... Am I misreading this, is this a new addition, or have I just been an idiot and not looked in the right places?
Either way, I'd like to look into both the plugin and the aforementioned image formats in the near future, so if there are any links or information anyone could provide, I'd appreciate it a lot. Thanks in advance!
~ Shotgun Ninja
Re: Translucent texture and grit
Posted: Tue Sep 14, 2010 9:27 am
by WinterMute
Try not to confuse the hardware with the library. The DS 3D hardware has a few compressed texture formats.
Re: Translucent texture and grit
Posted: Tue Sep 14, 2010 7:54 pm
by flure
Sorry, I mentionned GL_RGB8_A5 and after that A5I3... Can be confusing
ShotgunNinja : A5I3 is the name given in the specs to a texture format with 5 bits of alpha and 3 bits for the index in a 8-color palette. In libnds, this texture format is called GL_RGB8_A5. It's just the same thing