"Backface-culling" for points?

Started by
14 comments, last by AxelF 20 years, 12 months ago
Hi, is there a possibility in OpenGL to perform a "backface culling" for points (for example in dependance of a given normal)? Could the GL_EXT_cull_vertex extension work? Thx [edited by - AxelF on April 29, 2003 6:22:51 AM]
Advertisement
No. You could write your own code to perform this operation if you absolutely need to though.

Since points have no front/back face, it has no real meaning to perform backface culling on points (the same goes for lines).
Though you could proably send points as a mesh (say, a set of triangles) and use glPolygonMode with GL_POINTS. This way, triangles will be rendered as points (ie only the triangle corners will be rendered) and you will be able to perform backface culling over the triangles, so you will be able to cull points depending on the triangles'' orientations.

Am I clear ?
Absolutely clear, but this is not appropriate for my problem where I have an unorganized cloud of points.

But nevertheless it makes sense to give points a normal direction and to perform backface culling, for example if you would like to approximate a surface by a cloud of points. Each point would have a normal which corresponds to the surface normal at this point.
Then if "surface" makes sense for your point cloud, I think that "mesh" also makes sense. And a mesh is just what you need for backface culling triangles.

(the con being, with mesh you represent points for "triangle corners" whereas surfaces'' points may rather represent "surface element centers")
Ok, but the case isn''t so simple in my application. I know that the points belong to a surface, and I even have the normals, but I don''t know the "connectivity" (I can''t easily construct the mesh).
quote:Original post by AxelF
Ok, but the case isn''t so simple in my application. I know that the points belong to a surface, and I even have the normals, but I don''t know the "connectivity" (I can''t easily construct the mesh).


Sounds like a job for Marching Cubes.
Just a few questions. What are these points going to be used for in this application? How many of them are there? Will the points move in relation to each other? Will points be created and deleted at runtime?

If you can not get that connectivity, then obviously this can''t work. That''s bad news because it would have made to work much simpler I think.

If you want to cull by normals, you could setup a vertex program that "sorts out" points which normal is not facing the viewer. (I don''t really know how to transform a normal to clip-space but I think it''s a good approximation to just transform it to eye-space).

The first problem being : can you afford vertex programming ? Is your targeted hardware ready for that ?


CheeseGrater : why do you propose marching cubes ? for connectivity ?
quote:Original post by vincoof
CheeseGrater : why do you propose marching cubes ? for connectivity ?


It''s one of the better ways to generate a mesh from a field of 3d values, which seems to be the case here.

Alternatively, if the points are all guaranteed to lie on a convex surface, the Qhull algorithm would work nicely.

This topic is closed to new replies.

Advertisement