We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Problems with textures and "z-near" with
Page Index Toggle Pages: 1
Problems with textures and "z-near" with (Read 827 times)
Problems with textures and "z-near" with
Jun 7th, 2006, 1:16am
 
I have the following problem with 3D in my current projekt:

In the OPENGL mode, the textures of imported .obj
files are not displayed. in P3D the textures are drawn.

but in P3D I have the problem, that objects with transparencies, which are situated before the .obj object are not rendered. (By rotating the objekts in a side-view the textures can be seen, but only in positions without a .opj objekt behind it) ... just strange.

besides I have the problem that in OPENGL objects in front of the zero-layer are not displayed rather cut of by a specific z-value. can the z-near value perhaps be modified in OPENGL, in order to begin further ahead with rendering?

i have testet this on several computers both Mac and PC and also with diffrent graphics cards.


... three small questions with a large effect for my diploma projekt
Re: Problems with textures and "z-near"
Reply #1 - Jun 7th, 2006, 12:19pm
 
No idea why you're having troubles with textures in opengl mode I'm afraid.

For transparency issues, you could try hint(ENABLE_DEPTH_SORT); which might be able to solve the problem for most cases.

The perspective() command will let you change the z-near and z-far values.

Re: Problems with textures and "z-near"
Reply #2 - Jun 7th, 2006, 5:03pm
 
This is really a tricky problem.

some funktions are working in P3D but some not and vice versa in OPENGL. the perspective() command works in P3D but not in OPENGL. but in P3D i have still problems with the transparency.

with hint(ENABLE_DEPTH_SORT) the complete .opj no longer is drawn - no textures, no lines.

I have some pictures in my blog for better understanding my problem. it would be great if you could take a look. unfortunally my code is to complex to post.

www.humanmonitoring.de/blog
loginname: guest16
password: hmguest16
Re: Problems with textures and "z-near"
Reply #3 - Jun 7th, 2006, 5:43pm
 
I also do not know why you are having problems with textures in OpenGL mode. I haven't run into similar problems.

As for the z depth problem, perhaps play around with the order in which you draw the objects?  Maybe make sure you draw the ground plane first and then the spheres in order from furthest to nearest?  Usually, when I have problems with transparent objects in OpenGL, I make those objects extend Comparable and draw them based on their z depth.  Maybe that might help?

I have also used perspective with success in OpenGL.  Maybe something is broken in the most recent build.  Have you tried bouncing back a few versions, maybe 109 or so, and see if perspective works on that version?
Page Index Toggle Pages: 1