Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / white oulines around images?

Author
Message
Startopian
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 27th Apr 2003 23:07
I have posted about this on realgametools but I thought I had better post it here as well for maximum exposure.
I have a problem with white outlines around any image I am using on flat planes.

Here is the thread on the realgames forum. It has pictures to demonstrate the problem.

http://www.realgametools.net/forums/index.php?board=14;action=display;threadid=14976

Anyone got any ideas?
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 27th Apr 2003 23:12
Try using PNG files, they support transparency. So simple, and you get nice clean objects

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
Startopian
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 27th Apr 2003 23:45
Tried them, same effect unfortunatley.

rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 28th Apr 2003 00:11
? 0_o ?

I have no clue then... the only thing I can think of is your video card OR you didn't set up the PNG transparency right...

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
Amadeus
23
Years of Service
User Offline
Joined: 20th Apr 2003
Location: United States
Posted: 28th Apr 2003 01:03
I know exactlly what he's talking about, I tried to use a TGA for my main title screen image, and there's a funny white border. This is caused from something called Anti-Allaising. What happens is this: Image is on screen, AA (for short) "blurs" image to make look more detailed at lower quality. Because the borders do not screen-warp (like the old fashioned Mario Bros), the blur goes into the empty screen. There are two ways to correct something like this:
A. Buy decent software like Adobe Photoshop and work in that
B. Export as a .PNG or .GIF file and select a transparency of 255, 255, 255 (AKA White). I hope this will help you, if it doesn't, I'll try to think of something else. PS - What is your video card? Perhaps some OpenGL's can't take the pressure of game development.

Life is a tale told by an idoit, full of sound and fury, signifying nothing. - MacBeth
Startopian
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 28th Apr 2003 14:12
Amadeus, I have a Geforce 3 on one computer and A Geforce 2 Ultra on the other. Both have the same problem. I will check about the transparency of the png file tonight when I get home. This is one of the final problems I have to sort out before the game is complete.

heartbone
23
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 29th Apr 2003 07:50
Startopian try this:
1) Build your module in Full Screen Exclusive mode at desired size (ex: 800 x 600)
2) Load your image bitmaps from source files the exact same dimensons as the screen size. Use the Load Bitmap command.
3) Cut your images from these bitmaps. Use the Get Image x,x,x,x,x,1

Let me know if this helps to eliminate the anti-ailiasing. If not this, something similar will.

The more you see, the more you know.
The more you know, the more you see.
Startopian
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 29th Apr 2003 22:24
Heartbone, I have tried this technique and it still gives the horrid white border. I have included the code I used for you to see. I have tried it in full screen exclusive mode plus others with no effect. I have a Geforce 3 video card so I would doubt it is that, plus I have a second system with a Geforce 2 Ultra with the same results. If you check out the realgames link you will see that the effect only happens with two overlapping plains. 3D objects behind the tree plain work fine and leave no border around the tree. If anyone has managed to texture 2 plains and successfully got them to work with transparency, please let me know. This game is really just waiting for this to be finished. It is a version of Death chase from the speccy and is a warm up for a version of Outrun we would like to try. It's really annoying that this problem is holding us up. It has took about two days to get the game done but we can't finish it properly because it looks horrible. I have emailed Lee from DBS about it but so far have not got a reply, so I am unsure if it is going to be sorted in a future update or not(That's if it is a bug, but I am pretty sure it is now). It is a shame because trying to do the same game with 3D trees would run a lot slower even with low poly trees and would look worse.

Anyway, here is the code. If you want to test it just make an image 800x600 in size and draw anything in the top left corner. If you get it to work, post a picture here or at realgame tools if you find that easier. I will be surprised if anyone does.....

set display mode 800,600,16
load bitmap "tree7.bmp"
get image 1,0,0,194,501,1
cls
make object plain 1,200,400
make object plain 2,800,800
position object 2,0,0,50
texture object 1,1
texture object 2,1
set object transparency 1,1
backdrop on
black=rgb(255,255,255)
color backdrop black
sync on
sync rate 100
position camera 0,0,-600
do
if n<360
inc n
else
n=0
endif
yrotate object 1,n

sync
loop

Cras
23
Years of Service
User Offline
Joined: 15th Oct 2002
Location: United Kingdom
Posted: 29th Apr 2003 23:18
i just tried it on mine, its definitely ur software that ur makin the image in, send me the tree pic and ill play with it in corel photo paint then ill send it back

email: [email protected]
pokey
23
Years of Service
User Offline
Joined: 16th Dec 2002
Location:
Posted: 30th Apr 2003 04:19
What might be the problem is Paintshop pro. If you cut out an image with the AA option turned on (it is by default) it will use the first pencolor to antialias. It's really odd. Try turning AA off before cutting something in PPpro and it should work. Photoshop handles it correctly. Eh well, so does Paintshop, but it's a feature in that program.

But then again, maybe it's not the problem. I do know however I had something similar with images working in Paintshop pro.

greets

Tea is the rear end of vanity
Startopian
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 30th Apr 2003 17:59
Maniac, I will send you the files later as I am at work now and just having a quick check for replys. I still am not convinced it's the image, I already have antialising off because of a problem when making the commando entry for the compo, so it's not that.

Startopian
23
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 2nd May 2003 01:15
By changing the line set object transparency 1,1 to 1,2 in the above code the outline turns black and looks a lot better but in the game code it still is white! I think it may be something to do with how I have placed the background plain. In the game there is a matrix on display plus the backdrop. The image only goes white when the plains overlap. If you get close to a tree with no plain behind it it looks ok. I was already using set object transparency 1,2 in the game code though. This is a strange problem. I have tried 2 images off two different people now who said it worked fine. Both result in the same effect. I might write a little program to wander around a matrix to see it I get the same effect.

Login to post a reply

Server time is: 2026-07-10 19:48:00
Your offset time is: 2026-07-10 19:48:00