It is currently Fri Mar 05, 2021 3:04 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject:
PostPosted: Fri Jan 10, 2003 1:00 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by mindplay.

I have been trying out the demo version, and I'm stuck with some concerns about it's 3D sprite support...

The Sprite3D library seems pretty neat - it's exactly what I need, 2D sprites, accellerated with 3D hardware, lots of nice blending options and so on, BUT... none of the example show sprites with semitransparent areas, i.e. an alpha-channel - transparency. Is semitransparent sprites at all possible in PB??

And if it is - how do I get my semitransparent graphics out of photoshop and into PB? it only seems to support BMP files, and photoshop does have options for saving 32-bit BMP files - I would have thought these would include the alphachannel, when you save an image with a single layer, but for some reason it doesn't. When I load the BMP file back into photoshop, it has lost transparency, and instead has a single additional channel which is just black. So how can you make BMPs that preserve transparency?

Please note, I'm not interrested in how to mask out a single color from a 24-bit image - this is not useful, because you get jagged edges, and it looks horrible when zoomed, so .. :wink:

Thanks :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 11, 2003 6:20 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by mindplay.

Can nobody answer? Does PureBasic support semitransparent sprites or not??


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 11, 2003 6:51 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Manolo.

Quote:
Originally posted by mindplay

Can nobody answer? Does PureBasic support semitransparent sprites or not??

Hi,
I dont work with sprites, but I think that te next explanation from the PureBasic Help can help you:

Syntax

DisplayTranslucideSprite(#Sprite, x, y, Intensity)
Description

Display the #Sprite at the specified position on the current screen. The color 0 is considered transparent (this color will not be displayed). The intensity controls the transparency of the sprite over the background. Intensity values can vary from 0 (fully transparent) to 255 (opaque). This effect is also known as 'AlphaBlending'. This command is clipped, so it's perfectly legal to display the sprite outside of the screen.

Regards,
Manolo


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 11, 2003 7:07 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by fred.

Sorry for the late answer and the answer to your question is no, PB doesn't support sprite with 'alpha channel' transparency (256 levels). It just a translucide effect, with 256 unique level. I plan to add this feature in a near future tough.

Fred - AlphaSND


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 11, 2003 7:34 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Kale.

try this post, it has a sample of code dealing with transparent sprites:

http://forums.purebasic.com/english/viewtopic.php?t=4631

--Kale

Getting used to PureBasic and falling in Love! :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jan 19, 2003 3:46 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by mindplay.

Fred,

That's good news :) ... you'll probably need to support an additional file format for loading graphics though, since BMP doesn't support alpha ... if I may suggest, go for a 32-bit uncompressed TGA loader - it's an extremely simple file format, and widely supported in most graphics apps (including photoshop and 3d studio) ... a description of the file format is here:

http://www.organicbit.com/closecombat/formats/tga.html


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jan 19, 2003 11:33 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by fred.

Thanks for your input.

Fred - AlphaSND


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jan 19, 2003 2:48 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by mindplay.

Is there a change log somewhere? I'd like to keep an eye on coming releases, to see when/if this gets implemented ... I'm not registered, but I will, as soon as this one missing feature is implemented - it's the one thing holding me back, everything else is ... pure ... heaven :)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jan 19, 2003 2:55 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by freak.

Go to:

http://www.purebasic.com/

In the news Section, there's everything about the new Updates, there is always a link to a detailed List of changes made.

Timo


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: HwyStar and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye