3D object parallel projection, filtering of facets

Click For Summary

Discussion Overview

The discussion revolves around the filtering of facets in a 3D object for parallel projection visualization. Participants explore algorithms and methods to determine which facets should be rendered on a 2D screen, particularly focusing on the visibility of facets from a specific viewpoint without perspective distortion.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks an algorithm for filtering visible facets of a 3D object projected onto a 2D screen, specifically for parallel projection and including visible back sides of facets.
  • Another participant shares a link to a resource discussing projection concepts, suggesting it may provide relevant insights.
  • A participant outlines a method for handling transparent and opaque objects, detailing steps for sorting points based on their Z-coordinates and determining visibility based on proximity to the screen.
  • A later reply clarifies the need for a simpler approach that does not involve polygon intersections, focusing instead on identifying partially obscured polygons in parallel projection.
  • The original poster describes their specific use case involving a grid computation for a 20-node brick element, emphasizing the need for a filtering solution to extract visible outer faces without needing high performance.
  • The original poster expresses interest in adapting graphics algorithms for their filtering needs, indicating a desire for practical solutions from computer graphics.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a specific algorithm or method for filtering facets, and multiple approaches are discussed without resolution. The discussion remains open to further suggestions and refinements.

Contextual Notes

The discussion highlights limitations related to the complexity of determining visibility in 3D space, particularly in relation to the specific requirements of the original poster's project and the challenges posed by enclosed elements and flipped normals.

Arjan82
Messages
624
Reaction score
619
TL;DR
If you have some object consisting of vertices in 3D and some facets. What algorithm is used to visualize this in any 3D program?
I'm sorry if the wording is a bit clunky, but this is not a common topic for me.

Say you have some 3D object consisting of vertices and facets. There are many tools that can visualize this and they only show its projection on 2D, i.e. on your screen. I presume that you would filter the faces which need to be drawn on the screen before any actual drawing occurs since only the visible facets should be drawn. Could anyone point me to an algorithm that is used to do this filtering?

I'm only interested in parallel projection (i.e. no perspective). And I also want to show the 'back side' of a facet if it is visible.
 
Technology news on Phys.org
X and Y are the screen surface, Z is distance behind screen

A conceptually 'simple' approach for transparent objects:
A) Sort the points by their Z co-ordinate
B) Plot each point starting with the point furthest from the screen

For opaque objects you must remove or suppress any/all points that are obscured by (enclosed within) an opaque polygon that is closer to the screen.
C) Display the points starting with the point closest to the screen
D) For each point of greater Z, if the display point is enclosed within an opaque polygon, discard it.
NOTE: when doing perspective projections, opaque objects are much more difficult because the opaque planes are seldom parallel to the display surface.

These operations would typically be done in a buffer in main memory and sent to the screen when completed. It's is generally faster that way, but you may want to animate the image by generating it in display memory (or displaying the result of each point). This can be useful for debugging.

Overall, use an existing library or public domain code if possible; you will probably spend less time looking than you would doing original coding!

Cheers,
Tom
 
Tom.G said:
D) For each point of greater Z, if the display point is enclosed within an opaque polygon, discard it.
NOTE: when doing perspective projections, opaque objects are much more difficult because the opaque planes are seldom parallel to the display surface.

Yes, this is exactly what I am hoping to do :). But I do not need polygon intersections, I only need to determine if a polygon is (partly) obscured by others. See below.

[edit]: and I don't need perspective projections, only parallel (orthographic projection, is it called?)

Tom.G said:
These operations would typically be done in a buffer in main memory and sent to the screen when completed. It's is generally faster that way, but you may want to animate the image by generating it in display memory (or displaying the result of each point). This can be useful for debugging.

Luckily I don't have to be fast. I'm not trying to draw an interactive moving object.

Actually, what I'm trying to do is a bit of a hack. I have a solution of a computation given on a grid (i.e. vertices + connectivity of a 20-node brick element). The grid is of a volume but I'm only interested in the solution of the outer faces of the outer bricks, 'which I can see' (luckily for me the object is topographically a sphere, so no obscured faces on the outside). Thus I need a 'filter' to get me the faces of the bricks that I need. Unfortunately there is no trivial way to get this out of the solution files I have (normals may be flipped, it is not always the same face of the brick element that is on the outside, there are completely enclosed elements).

So I was thinking if I could steal an algorithm from the graphics department of computer science to get me this filter. I reckoned/thought/hoped that there where algorithms available that do the kind of filtering I need before drawing something on a screen.

Or maybe someone has a better idea :)
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
Replies
6
Views
2K
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
2
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K