Translucent texture and grit

Post Reply
flure
Posts: 16
Joined: Sat Feb 21, 2009 11:51 pm

Translucent texture and grit

Post by flure » Sat Sep 11, 2010 3:19 pm

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

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Translucent texture and grit

Post by WinterMute » Sun Sep 12, 2010 1:49 am

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.
Help keep devkitPro toolchains free, Donate today

Personal Blog

flure
Posts: 16
Joined: Sat Feb 21, 2009 11:51 pm

Re: Translucent texture and grit

Post by flure » Sun Sep 12, 2010 1:34 pm

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...

flure
Posts: 16
Joined: Sat Feb 21, 2009 11:51 pm

Re: Translucent texture and grit

Post by flure » Sun Sep 12, 2010 1:47 pm

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...

ShotgunNinja
Posts: 34
Joined: Tue May 11, 2010 2:29 am

Re: Translucent texture and grit

Post by ShotgunNinja » Tue Sep 14, 2010 1:50 am

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

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Translucent texture and grit

Post by WinterMute » Tue Sep 14, 2010 9:27 am

Try not to confuse the hardware with the library. The DS 3D hardware has a few compressed texture formats.
Help keep devkitPro toolchains free, Donate today

Personal Blog

flure
Posts: 16
Joined: Sat Feb 21, 2009 11:51 pm

Re: Translucent texture and grit

Post by flure » Tue Sep 14, 2010 7:54 pm

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 ;)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests