Overlapping PNGs with Alpha Channel

If you have trouble getting the game to run, observe anything strange and don't know what to do, or have found a potential bug, then post in this forum.

Overlapping PNGs with Alpha Channel

Postby leezer3 on Mon, 22nd Jun 2009, 20:42

I'm seeing some slightly odd behaviour which appears to be a bug-
I'm playing with transparencies using the alpha channel in PNGs.
I'm aware of the fact that non flat alpha channels have issues, but this is occuring with every image containing an alpha channel.
If I setup an object with two faces at an angle to each other, as the camera gets close to the object the front face completely vanishes if it's texture contains an alpha channel.
I've converted the transparencies to the traditional single color method, so it's no biggy.

I can upload an example object if you need one :)

Cheers

Chris Lees

http://www.bvecornwall.co.uk
leezer3
 
Posts: 33
Joined: Fri, 9th May 2008, 16:14

Re: Overlapping PNGs with Alpha Channel

Postby michelle on Mon, 22nd Jun 2009, 23:51

The Developing for openBVE pages have been recently updated and contain information about using alpha channels in textures on objects. Browse to the Information and tips page in the Objects section, which might shed some light on the behavior you experienced.

Generally speaking, non-parallel faces and alpha don't work well together because of depth sorting issues. If possible, make the faces parallel, use color-key transparency on at least one of the faces, or split the faces into solid-color faces and smaller alpha-faces in order to reduce the overlap region of alpha faces, if that is possible.

I can move the post to the Developers forum if you need further assistance.
User avatar
michelle
Site Admin
 
Posts: 1129
Joined: Mon, 14th Apr 2008, 20:36

Re: [NOT A BUG] Overlapping PNGs with Alpha Channel

Postby leezer3 on Tue, 23rd Jun 2009, 22:31

Ah, had missed that, sorry :)
It's really no biggy, have shifted to standard color transparencies for the bushes in question (I'm using a freeware treegen program, which creates textures with an apha channel).

Cheers

Chris Lees

http://www.bvecornwall.co.uk
leezer3
 
Posts: 33
Joined: Fri, 9th May 2008, 16:14


Return to Technical Support and Bugs

Who is online

Users browsing this forum: No registered users and 0 guests