PDA

View Full Version : Hidden Line Removal



SED
06-22-2000, 03:09 PM
Does OpenGL provide some support for Hidden Line Removal?

john
06-22-2000, 04:01 PM
No.

That's scene management... a Jedi uses OpenGL for rendering primitivies, never for managing the scene.

SED
06-22-2000, 04:54 PM
Well horse hockey http://www.opengl.org/discussion_boards/ubb/smile.gif

GL_CULL_FACE is close, but only works for a single primitive. Guess I'll have to work on some sort depth scheme, aye. Thanks for the response.

Sean

Serge K
06-22-2000, 07:01 PM
Try this:

Programming with OpenGL: Advanced Rendering : Line Rendering Techniques (http://www.sgi.com/software/opengl/advanced97/notes/node201.html)

Advanced Graphics Programming Techniques Using OpenGL : Line Rendering Techniques (http://reality.sgi.com/blythe/sig99/advanced99/notes/node102.html)

john
06-22-2000, 08:06 PM
I conceed that culling backfaces is vaguely similar, but it isn't. http://www.opengl.org/discussion_boards/ubb/tongue.gif

Culling faces like that is ONLY based on localised primitives when making assumptions about other primitives. It's designed to quickly cull, on a per poloygon level, polys that probably shouldn't won't be seen. Think about a cube... you can cull the back faces based on their normal and never see them, but it ISN"T what you want if the cube is transparent, and even though the normals are pointing AWAY from the user, they're still seen.

My point is... culling polys like this is local management; clipping hidden lines is more to do with scene management.

Why do I say this... well. In order to determine if a line can't be seen, you need to know what it's front of it. *IMMEDIATELY* you're dealing with the scene. You need to know more than just the localised line, and you need to know how the data is constructed. This is entirely beyond OpenGL's scope, beause ALL it cares about is one primitive at a time.

so, yes, in a way you ARE right. close, but no banana. http://www.opengl.org/discussion_boards/ubb/wink.gif

cheers
John

SED
06-22-2000, 09:01 PM
Good stuff Serge. Silhouette, hidden in grey, all the goodies. Thanks for the links.

john, First time I used GL_CULL_FACE was with the infamous cube. I thought I had the hidden line prob whipped. Looked great. Then I added a sphere to the scene, rotated the cube in front of it and found out otherwise http://www.opengl.org/discussion_boards/ubb/smile.gif