3D coordinates of a pixel

Hi,

I have to know all 3D coordinates which are visible in my window. Moreover, if an object is semi transparent and there is another object that I can see behind, I have to know also th e 3D coordinates of the object behind.
Do you know how I can do this ? I mean, is there an easier way to do it than ray tracing ?

thanks for your help…
I hope I post this in the good forum, nobody answered me on the beginners forum :slight_smile:

“Picking” may be what you want.

You mean by using gluUnproject function ??
It can help but i need to have all the coordinates that are visible. I mean, if an object is semi transparent and i can see another object behind, i need also the 3D coordinates of this object behind…
this function will need the depth of this object behind to return the 3D coordinates. But i don’t have this one…
or maybe can I reach multiple depth if there is transparencies in my scene ???
glReadPixel can give me multiple values for the same pixel ??

afaik there is just one depth per pixel
the final image doesnt know what was transparent and what was not

so I have to use picking…

I just have to know how it works know :stuck_out_tongue:
can picking give me all the 3D coordinates that I need ???

Aguion, this sounds like it’s harder than it should be. Why do you want to know all of these coordinates? I’m guessing there’s an easier way to solve your high-level problem.

I’m afraid I need this coordinates. I’m working on optical flows in a 3D opengl Scene. and I need all the 3D coordinates to calculate these optical flows…

ouch…

I’m afraid I need this coordinates.
You’re not going to get them through OpenGL.

You could do something with glUnProject, up until you said you needed to get pixel coordinates through transparent objects. OpenGL does not store any of that kind of information, so your only resort is ray-tracing.