Transparent plane and Picking

Started by atreyu64, August 13, 2013, 12:01:19 PM

Previous topic - Next topic

atreyu64

Hi,


After my Transparent plane and Polyline overlap problem, I'm trying to pick my transparent billboards.
Picking itself seems to work well on billboards, but my concern is once more about transparency. When I pick a plane on a transparent area of its texture, it is considered as picked anyway.
This behaviour was expectable and is pretty logical, but I would need my planes not to be picked on their transparent areas.

Do you think there is a way to do it using jPCT picking methods, or I'll rather have to implement it from scratch by myself ? If so, how to check the right picked color of an object in order to check if it is completely transparent ?


Thanks in advance, regards,


Sylvain

EgonOlsen

You can't do this with the build-in picking methods. They are geometry based and they don't care about the texture. You could use build-in method in the first step and if something has been picked, you could try to read the pixel color at that point via direct GL calls...but you can only read the final color, not if there is something 'transparent' at that point.

atreyu64

Ok I see, maybe I'll try to make my own picking system one day but I have to learn a lot of things first...

Thanks for your answer !