IonicWind Software

Aurora Compiler => 3D Graphics => Topic started by: Kale on November 03, 2006, 04:26:31 PM

Title: Have i missed something in this little 3D sprite test?
Post by: Kale on November 03, 2006, 04:26:31 PM
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?
Title: Re: Have i missed something in this little 3D sprite test?
Post by: Kale on November 07, 2006, 09:47:12 AM
Anyone? :-\
Title: Re: Have i missed something in this little 3D sprite test?
Post by: J B Wood (Zumwalt) on November 07, 2006, 10:03:55 AM
I'll take a look at this for you later tonight Kale, been burried.
Title: Re: Have i missed something in this little 3D sprite test?
Post by: Ionic Wind Support Team on November 07, 2006, 10:15:53 AM
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));


Title: Re: Have i missed something in this little 3D sprite test?
Post by: Ionic Wind Support Team on November 07, 2006, 10:20:22 AM
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);

Title: Re: Have i missed something in this little 3D sprite test?
Post by: Kale on November 07, 2006, 11:13:35 AM
Thanks. :)