Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

AxelF

"Backface-culling" for points?

This topic is 5533 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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 ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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")

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!