3D object parallel projection, filtering of facets

In summary, an expert summarizer of content observed that there is no easy way to get a filter that will only show the faces of the objects that need to be drawn on the screen. He or she suggested looking for an existing algorithm or code or stealing one from the graphics department of a computer science school.
  • #1
Arjan82
563
571
TL;DR Summary
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
  • #3
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
 
  • #4
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 :)
 

FAQ: 3D object parallel projection, filtering of facets

What is 3D object parallel projection?

3D object parallel projection is a method of projecting a three-dimensional object onto a two-dimensional surface while maintaining the relative sizes and proportions of the object. It is commonly used in computer graphics to display three-dimensional objects on a two-dimensional screen.

How does parallel projection differ from perspective projection?

Parallel projection differs from perspective projection in that it does not take into account the distance of the object from the viewpoint. This means that parallel projection does not create the illusion of depth or foreshortening, whereas perspective projection does.

What is filtering of facets in 3D object parallel projection?

Filtering of facets refers to the process of smoothing out the edges and surfaces of a 3D object when it is projected onto a two-dimensional surface. This is done to prevent jagged or pixelated edges, and to create a more realistic and visually pleasing representation of the object.

What are the types of filtering used in 3D object parallel projection?

The two main types of filtering used in 3D object parallel projection are point sampling and bilinear interpolation. Point sampling simply takes the color of the closest pixel to the projected point, while bilinear interpolation takes the average of the four closest pixels to create a smoother transition of colors.

Can filtering of facets be adjusted or customized?

Yes, filtering of facets can be adjusted and customized based on the specific needs of the project. Different types of filtering can be used, and parameters such as the size of the filter kernel, the strength of the filter, and the cutoff frequency can be adjusted to achieve the desired result.

Back
Top