Page 1 of 1

Overlapping PNGs with Alpha Channel

PostPosted: Mon, 22nd Jun 2009, 20:42
by leezer3
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

Re: Overlapping PNGs with Alpha Channel

PostPosted: Mon, 22nd Jun 2009, 23:51
by michelle
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.

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

PostPosted: Tue, 23rd Jun 2009, 22:31
by leezer3
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