Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,388 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Can I get rid of the black border on transp sprite #80840
07/09/06 12:13
07/09/06 12:13
Joined: Aug 2005
Posts: 57
crazycoder Offline OP
Junior Member
crazycoder  Offline OP
Junior Member

Joined: Aug 2005
Posts: 57
Hi all,

I have made a sprite in Photoshop for a window of this house that I'm building in WED.

The image is in BMP and has black areas (which will be transparent in WED) and has colored areas for the rest. My problem is that around my colored areas, there is a black border that WED doesn't take out and that instead should be transparent.

For clarification, WED makes most of the black in the image transparent and works correctly, but leaves all this black lines around my colored areas and looks weird.

Is there a way to take out the black borders around the non-transparent areas?

Thank you.

CrazyCoder

Re: Can I get rid of the black border on transp sp [Re: crazycoder] #80841
07/09/06 12:16
07/09/06 12:16
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
ulillillia Offline
Senior Expert
ulillillia  Offline
Senior Expert

Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
Two ways to do it:

1. Use a TGA file with alpha channel in it to replace it.
2. Set the nofilter flag on to prevent the smoothing effect.

These are the only ways I know of.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials
Re: Can I get rid of the black border on transp sp [Re: ulillillia] #80842
07/09/06 21:44
07/09/06 21:44
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
crazycoder, after converting your bmps to tgas or dds with alpha (yes, forget about bmp and pcx) take a look at WIKI (alpha test sample). That code may save your time.

Re: Can I get rid of the black border on transp sp [Re: Lion_Ts] #80843
07/10/06 09:23
07/10/06 09:23
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Read the manual about the d3d_alphatransparency variable: this is the normal solution. You'll need a different color than black for the background, then. Another solution is the mentioned sprite effect on the Wiki.

While TGA files with alpha channels, or the nofilter flag would solve this problem too, they are not recommended due to their disadvantages.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1