After a bit longer than initially anticipated I'm finally done with my image routines rewrite. Yup, there's an entry from June 2007 where I mentioned I was doing a bit of a refactoring... Well now it's done - somewhat more than a year later ;)
The image below is the fruit of my labour. Appreciate it. Appreciate it with great appreciation! The left-hand side is the RGB channels and the right hand side is the opacity channel. The images are from libpng and are in various formats (1bit per pixel to 16bits per pixel). The red gap in the center is the palettised images which I've decided not to support as sharing a common palette between them broke my project structure quite badly.
This rewrite was necessary as I can now export much more complicated textures. I can now support normal maps, specular maps, oppacity-only maps and whole bunch more. You may have noticed that there hasn't been a screenshot with a texture in it for a very long time... well there was a reason for that ;)
A good part of why this rewrite took so long was because an image can be composed of an arbitrary collection of channels of arbitrary types. For instance: the RGB channels are generally |Byte|Byte|Byte| but add a UV displacement map into that and you could get |Byte|Byte|Byte|Float|Float|. That was a really bad example but it illustrates the problem, particularly as the ordering of the channels can also be arbitarty; eg: ABGR or what-have-you.
Expect to see more colourful screenshots from now on.
Later!
The image below is the fruit of my labour. Appreciate it. Appreciate it with great appreciation! The left-hand side is the RGB channels and the right hand side is the opacity channel. The images are from libpng and are in various formats (1bit per pixel to 16bits per pixel). The red gap in the center is the palettised images which I've decided not to support as sharing a common palette between them broke my project structure quite badly.
This rewrite was necessary as I can now export much more complicated textures. I can now support normal maps, specular maps, oppacity-only maps and whole bunch more. You may have noticed that there hasn't been a screenshot with a texture in it for a very long time... well there was a reason for that ;)
A good part of why this rewrite took so long was because an image can be composed of an arbitrary collection of channels of arbitrary types. For instance: the RGB channels are generally |Byte|Byte|Byte| but add a UV displacement map into that and you could get |Byte|Byte|Byte|Float|Float|. That was a really bad example but it illustrates the problem, particularly as the ordering of the channels can also be arbitarty; eg: ABGR or what-have-you.
Expect to see more colourful screenshots from now on.
Later!
2 Comments:
oooh textures FTW!
By Justin Paver, at 10:21 am
Seriously massive WIN!
By Andrew, at 2:51 pm
Post a Comment
<< Home