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 / That good old PNG problem

Author
Message
Lucka
21
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 1st Oct 2014 23:07
Every time is the same..
Every 3/4 years this problem come back from hell!

I can't find out a solution on the forum, so i ASK here:

I make a PLANE, i texture it with a .png pic.
the half top of the image is transparent.

i got a BLACK LINE in the top border of the plane..

I use other plane with other .png pic with no problem, same settings, same kind of .png, same TRANSPARENCY.

But those planes have the BLACK LINE.

Someone already knows HOW to remove the black line?

Thx!!

Lucka - gawteam coder - www.gawgames.com
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 1st Oct 2014 23:23
I don't understand why people don't post a picture when they have transparency issues...

Try using a .tga file instead...

Lucka
21
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 1st Oct 2014 23:50 Edited at: 1st Oct 2014 23:51
The line looks like "wireframe" mode ON.
But it is setted OFF (when is ON i get 5 lines globally, frame + diagonal)



Targa doesn't works fne..

Lucka - gawteam coder - www.gawgames.com
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Oct 2014 01:10
Well, that one heck of an image

From the looks of it, it does not look like a ^2 image... but little can be told from that shot lol

Going to leave this for someone with more experience...

GL!

Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 2nd Oct 2014 03:20
I would check that that row of pixels is actually 100% transparent open the png in Photoshop or Gimp and color pick from the alpha channel should be absolutely black 0,0,0 anything else will leave visual artefacts

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Oct 2014 04:38
Thsi is not really desired, but try this quickly:


Does the problem go away if you do that?

I like offending people. People who get offended should be offended. -- Linus Torvalds
Lucka
21
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 2nd Oct 2014 15:06 Edited at: 2nd Oct 2014 15:20
SOLVED! (again)

I try to explain for future users:

If you make a tranaparent picture with something IN, like a cloud for example, with all transparent around, you get no problem.
If some part of the opaque is near the frame you get a bad line on the opposite border..

Ok, my english is SO BAD i must put an image to explain




Ok, this stupid imageshack want to me to PAY for not resizing image..
BUT, if you are BRAVE enough, you can see a little green line over the second textured plain..

Lucka - gawteam coder - www.gawgames.com
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 2nd Oct 2014 16:56
[[You can upload images here using the attachment field. You can take screenshots of your program using the Print Screen button, which will copy the screen to the clipboard]]

I have seen this problem in a number of development tools. I hope you find the solution you are looking for. Please try the additional transparency modes:

Set Object Transparency ObjectID, 1
Set Object Transparency ObjectID, 2
Set Object Transparency ObjectID, 3
Set Object Transparency ObjectID, 4
Set Object Transparency ObjectID, 5
Set Object Transparency ObjectID, 6

Please post up the texture image you are using so it can be analysed.

Ortu
DBPro Master
18
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 2nd Oct 2014 18:14
Hmm, if this is a textured plane, it looks like it is wrapping the texture. You might try scrolling the texture by 1px vertical using scroll object texture, or set the texture mode to clamp (no wrap / no tile). I believe that is mode 2 using set object texture

Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 3rd Oct 2014 18:36
Quote: "Hmm, if this is a textured plane, it looks like it is wrapping the texture."

This.
The default texturing mode used by DBPro is to wrap texture coordinates around when they reach their extremes. Since you usually map textures from 0..1 issues like this will occur because 1 wraps around to 0 again.
You can set the wrapping mode to clamp or border colour instead (which requires a custom shader). Or alter your plane so that it has UV coordinates 0 through 0.999999... (you have to find the maximum floating point value that is interpreted as less than 1, presumably a zero with 7 trailing nines).


"Why do programmers get Halloween and Christmas mixed up?"
Lucka
21
Years of Service
User Offline
Joined: 1st Oct 2004
Location:
Posted: 4th Oct 2014 17:05
It's enough to have a transparent line "around" the texture.
For my problem, i simply canceled a line (1px tall) from the bottom of the texture.

THAT line was wrapped in the top border of my plane.
Now, is not.

Lucka - gawteam coder - www.gawgames.com

Login to post a reply

Server time is: 2026-07-18 03:11:47
Your offset time is: 2026-07-18 03:11:47