PiBoSo Official Forum

GP Bikes => General Discussion => Topic started by: TFC on January 26, 2016, 08:19:19 PM

Title: 2d Trees With Alpha
Post by: TFC on January 26, 2016, 08:19:19 PM
Hey hey!  ;D

So in anticipation of MX Bikes beta 4 here.. And as a track maker the one thing I've found to be a huge visual let down are 2d trees as for some reason I can't seem to avoid the alpha bleeding / z-buffer / sort order / alpha halo around the edges of the texture on certain faces. Up close it's not a huge problem but the further away you get you have white trees if they're too detailed.. I'm sure you've all seen it, also affecting PiBoSo's very own 3d grass..

My question is, on the daily development thread a while back for all sims was something along the lines of 'Improved Alpha Mip Mapping' and some stuff about 3d grass. I've seen a few videos online recently specifically Soramame Speed Park (https://www.youtube.com/watch?v=Qm14fbz0OGg) where there seems to be no apparent problem with the trees. Now I'm fairly sure this track is a couple of years old, so either GPB beta 7 or 7b fixed it or it's being remade, or this track never had that problem, and if so how?

Any ideas welcome, if the latest changes have fixed it in GPB then I'll be even more excited for MXB beta 4 as I have a few tracks that lacking good trees I'm reluctant to finish.

Title: Re: 2d Trees With Alpha
Post by: Hawk on January 26, 2016, 09:28:03 PM
Are you sure it's not just your graphics settings? I cannot remember ever having that problem, unless I just haven't noticed it?  :-\

Hawk.
Title: Re: 2d Trees With Alpha
Post by: TFC on January 26, 2016, 10:28:03 PM
Thanks Hawk but unfortunately it's not a graphics setting thing - see http://forum.mx-bikes.com/index.php?topic=104.120

And https://www.youtube.com/watch?v=CnIErqM5nLM the track in this video has a big problem with the trees, as have most tracks I've seen videos of.

Just hoping it's fixed in the latest GPB beta as that means it should be fixed in MXB too :)
Title: Re: 2d Trees With Alpha
Post by: Hawk on January 26, 2016, 10:50:57 PM
Quote from: TheFatController on January 26, 2016, 10:28:03 PM
Thanks Hawk but unfortunately it's not a graphics setting thing - see http://forum.mx-bikes.com/index.php?topic=104.120

And https://www.youtube.com/watch?v=CnIErqM5nLM the track in this video has a big problem with the trees, as have most tracks I've seen videos of.

Just hoping it's fixed in the latest GPB beta as that means it should be fixed in MXB too :)

Yes I see what you mean. But it's strange that only certain trees seem to be affected? Others, even most of those far in the distance don't seem to be affected apart from the odd few.... but yes very strange.

Hawk.
Title: Re: 2d Trees With Alpha
Post by: doubledragoncc on January 26, 2016, 11:01:12 PM
I get the same on Brno with the trees and have tried ALL settings in Nvidea panel and game, stays the same.?

DD
Title: Re: 2d Trees With Alpha
Post by: h106frp on January 27, 2016, 12:51:15 AM
Is this possibly the same problem/solution?

http://www.robinwood.com/Catalog/Technical/SL-Tuts/SLPages/WhiteHalo1.html (http://www.robinwood.com/Catalog/Technical/SL-Tuts/SLPages/WhiteHalo1.html)
Title: Re: 2d Trees With Alpha
Post by: TFC on January 27, 2016, 08:14:08 AM
Thanks, I think I've read every tutorial I could find on the subject and have a neat plugin for gimp that does the same thing.

The problem definitely isn't in the texture as if you look at the first picture I posted in the MXB thread in the first post here, that tree is using the same texture on all faces and maybe half the faces don't suffer with the problem. PiBoSo and Snappe also explain why it happens. I was just curious to know if it's been fixed for GPB latest beta and if not, how did the guy who made Soramame get the trees perfect?
Title: Re: 2d Trees With Alpha
Post by: Hawk on January 27, 2016, 10:48:38 AM
Quote from: TheFatController on January 27, 2016, 08:14:08 AM
Thanks, I think I've read every tutorial I could find on the subject and have a neat plugin for gimp that does the same thing.

The problem definitely isn't in the texture as if you look at the first picture I posted in the MXB thread in the first post here, that tree is using the same texture on all faces and maybe half the faces don't suffer with the problem. PiBoSo and Snappe also explain why it happens. I was just curious to know if it's been fixed for GPB latest beta and if not, how did the guy who made Soramame get the trees perfect?

Could it be that the texture has been saved/created in 16bit and your using 32 bit(or is that 24bit in GPB? Brain freeze! Hehe)? Or vice versa?  :-\

Just a thought.  ;)

Hawk.
Title: Re: 2d Trees With Alpha
Post by: TFC on January 27, 2016, 10:58:53 AM
Thanks Hawk mate, I appreciate the ideas. Next time I do objects I'll be sure to double check bit depth, but I think a tga with an alpha layer automatically becomes 32.. I'm not sure. Looked for a solution for over a year so have forgotten most of what I've tried! :(