April 23, 2024, 02:10:10 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Have i missed something in this little 3D sprite test?

Started by Kale, November 03, 2006, 04:26:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kale

Have i missed something in this little 3D sprite test? For some reason the middle of the Aurora logo when drawn on-screen is missing!

Also, when the logo is rotating, there seems to be alot of 'jaggies' around the image. Is there a way to filter the sprite to smooth out this effect?


J B Wood (Zumwalt)

I'll take a look at this for you later tonight Kale, been burried.

Ionic Wind Support Team

November 07, 2006, 10:15:53 AM #3 Last Edit: November 07, 2006, 10:30:18 AM by Paul Turley
The default color key for sprites is the alpha channel of the image.  Change it when loading:

MySprite.Load(Screen, CurDir + "\\Media\\Logo.png",256,256,1,RGBA(0,0,0,0));


Ionic Wind Support Team

Ionic Wind Support Team

November 07, 2006, 10:20:22 AM #4 Last Edit: November 07, 2006, 10:29:20 AM by Paul Turley
Actually I should explain more.

3D sprites have more advanced color keying than 2D.  The default is white, no alpha, which uses the alpha bits of the image itself (see docs).  The alpha bits are important.  A value of zero turns off color keying so the above should be:

MySprite.Load(Screen, CurDir + "\\Media\\Logo.png",256,256,1,0);

If you wanted opaque black to be the color key then the color would be RGBA(0,0,0,255);

Ionic Wind Support Team