[futurebasic] Re: [FB] Use of PNG Alpha channels for OpenGL

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2008 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Sat, 19 Jan 2008 23:34:28 -0500
On Jan 19, 2008, at 4:43 PM, Brian Stevens wrote:

>
> On Jan 18, 2008, at 3:03 PM, andy@... wrote:
>>
>> Has anyone already tried to do this and have some code to share?
>>
> RC has lots of experience with graphics writing Compositor, so  
> maybe we can persuade him to chime in here with some ideas. I  
> haven't even considered this and don't have time right now or I would.
>
> RC---Andy is developing a game and not a Compositor.
>
> Brian S


As of CoreImage, anybody with 5 minutes and XCode awareness can make  
a compositor. :(    ;)   Knew Andy was game making, he sends me  
stuff, sometimes for debugging help, sometimes for lookee here,  
"Wow!" factors. :)  Interesting stuff.

I see where RP answered this already.

No reason though why a PICT, PNG, TIFF, or Photoshop file couldn't  
have the alpha in offset.0 as usual (with r,g,b at offset.1 offset.2,  
offset.3) and then one can pack the texture using a regular or custom  
pixelwhacking approach extracting or blockmoving pixel info into the  
texture handle. But you have to know your handle bytes, and then  
there are various inversions possible if you don't set the specifiers  
just right.

Of all the things I've suffered with working with OpenGL though,  
texture packing can be one of the more finicky.

At CompUSA tonight, going out of business sale, I got 2 cool books  
tonight, $15 from $30 already, and 40 percent more off, for $9 each :  
Focus On: 3D Terrrain Programming and Focus On : Curves and Surfaces,  
each with CD. They are for game developers but I've been wanting to  
stick a terrain maker into Compositor for ages. 'Kitchen Sink The  
Titanic' time. :)

For the coolest thing I've seen in ages, check this out, Seam Carving/ 
Seam Insertion...a way of enlarging or shrinking images while keeping  
important elements unchanged! (Liquid Resizing). I'll be working up  
the algorithms in FB soon, but if anyone wants to beat me, that's  
mighty fine. :) (Gimp has a nice library for this, might can tap into  
that)

Inventors Explanation/Demo: http://www.youtube.com/watch?v=6NcIJXTlugc
Online Demo: http://www.swieskowski.net/carve/
Wiki: http://en.wikipedia.org/wiki/Seam_carving

r
c