Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 06/24/26 18:31
Z9 getting Error 058
by flip26. 06/24/26 13:57
Lapsa's very own thread
by Lapsa. 06/20/26 18:18
Ranger by Robert Pardo - now for Zorro
by Smallz. 06/20/26 11:23
Z12 live performance
by jcl. 06/19/26 11:21
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 16,846 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 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,110
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,110
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