3D display artefacts
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
3D display artefacts
Hi,
I have a problem with the 3D display of my model in the main window.
I have a frame, consisting of 8 ribs, for a vessel with rotational symmetry. The ribs are a polar array of the defining rib, rotated about the z-axis. One section of the rib outline is a straight but tilted line, which therefore defines a cone outline of the vessel in that area.
The skin in that area ("cover") is to be a thin sheet. So I created a sketch. I tried to directly use external geometry from the defining rib, but this seems not possible ("belongs to another object, can't link"). I believe the proper way is a shape binder of the defining rib (Is that right?). With that, I have the external geometry and can create the crosssection of the cover as a rectangle in the sketch:
When I rotate this sketch about the z-axis, I believe I get a cover that just about touches the rib at the symmetry plane of the rib, at the edges there will be an intersection of a few micrometers, because of the curvature of the cover. I was surprised to find that the edges of the ribs actually seem to protrude completely through the cover (i.e. an intersection of a millimeter), which is incomprehensible to me:
When I look at the place of the intersection from below, I find I can actually see the edge as a line:
However, when I zoom in, the line disappears:
This is what might have been expected form the beginning, after all, there should be an intersection visible. However, when I increate the cover's z coordinate to resolve the intersection, I need to do that by many tenths of a millimeter, which is absurd.
What's going on here? Is that an artefakt of the cone-shaped cover being approximated by polygonal surfaces? This appears not to be the case, as at the position of the sketch I find an edge of the cone polygons, so at least there the display should be correct, but it isn't.
How can I control these artefacts? Whether the artefacts show up depends on the view direction and the zoom level.
Cheers Peter
I have a problem with the 3D display of my model in the main window.
I have a frame, consisting of 8 ribs, for a vessel with rotational symmetry. The ribs are a polar array of the defining rib, rotated about the z-axis. One section of the rib outline is a straight but tilted line, which therefore defines a cone outline of the vessel in that area.
The skin in that area ("cover") is to be a thin sheet. So I created a sketch. I tried to directly use external geometry from the defining rib, but this seems not possible ("belongs to another object, can't link"). I believe the proper way is a shape binder of the defining rib (Is that right?). With that, I have the external geometry and can create the crosssection of the cover as a rectangle in the sketch:
When I rotate this sketch about the z-axis, I believe I get a cover that just about touches the rib at the symmetry plane of the rib, at the edges there will be an intersection of a few micrometers, because of the curvature of the cover. I was surprised to find that the edges of the ribs actually seem to protrude completely through the cover (i.e. an intersection of a millimeter), which is incomprehensible to me:
When I look at the place of the intersection from below, I find I can actually see the edge as a line:
However, when I zoom in, the line disappears:
This is what might have been expected form the beginning, after all, there should be an intersection visible. However, when I increate the cover's z coordinate to resolve the intersection, I need to do that by many tenths of a millimeter, which is absurd.
What's going on here? Is that an artefakt of the cone-shaped cover being approximated by polygonal surfaces? This appears not to be the case, as at the position of the sketch I find an edge of the cone polygons, so at least there the display should be correct, but it isn't.
How can I control these artefacts? Whether the artefacts show up depends on the view direction and the zoom level.
Cheers Peter
- Attachments
-
- problem.FCStd
- (48.57 KiB) Downloaded 20 times
- papyblaise
- Veteran
- Posts: 8011
- Joined: Thu Jun 13, 2019 4:28 pm
- Location: France
Re: 3D display artefacts
it's just a visual problem, a very thin "skin" does not seem to cover the support below, only at a large zoom,
if we zoom as closely as possible, the transparency disappears
if we zoom as closely as possible, the transparency disappears
Re: 3D display artefacts
I don't think that there is a real problem, it is only a visual thing: The seams are not zoomed, they have a certain pixel thickness. If you zoom out, they can well shine through, but the surface still remains intact.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: 3D display artefacts
I would accept this as the explanation for the view issue arising when looking from below, but
for the view from above it does not make sense. Any properly implemented hidden-object algorithm had to find that these lines are hidden, and therefore are not to be displayed. Now, a z-buffer type algorithm has a limited resolution, given by the number of bits alotted for each pixel. If z-buffer is indeed used for hidden-line removal, is the number of bits used that low?? If so, is there a way to increase it?If you zoom out, they can well shine through, but the surface still remains intact.
Cheers Peter
PS.: I know there is no problem with these artefacts within FreeCAD. However, I like to use screenshots for presenting models, so much more convenient than rendering/raytracing each time. Screenshots with these artefacts from above are useless for that.
Re: 3D display artefacts
Seems these artefacts are unrelated to the peculiarities of my model. I created an extremely simple situation where they occur.
From the Part workbench, I create two cubes. One I leave with default parameters, the other one's thickness (Height) I reduce to a Millimeter, then elevate it to z=10mm (i.e. on top and touching the unmodified cube). I also enlarge length and width a bit. Nothing spectacular happens. But when you zoom out enough, the unmodified cube becomes visible through the one on top:
Cheers Peter
From the Part workbench, I create two cubes. One I leave with default parameters, the other one's thickness (Height) I reduce to a Millimeter, then elevate it to z=10mm (i.e. on top and touching the unmodified cube). I also enlarge length and width a bit. Nothing spectacular happens. But when you zoom out enough, the unmodified cube becomes visible through the one on top:
Cheers Peter
- Attachments
-
- test.FCStd
- (8.79 KiB) Downloaded 20 times
Re: 3D display artefacts
It sounds as if you have good knowledge of such implementations. Care to help out to improve this?perot wrote: ↑Tue Nov 23, 2021 2:09 pm Any properly implemented hidden-object algorithm had to find that these lines are hidden, and therefore are not to be displayed. Now, a z-buffer type algorithm has a limited resolution, given by the number of bits alotted for each pixel. If z-buffer is indeed used for hidden-line removal, is the number of bits used that low?? If so, is there a way to increase it?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- Shalmeneser
- Veteran
- Posts: 9580
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: 3D display artefacts
Revolve001 : z-offset = 1 mm (just for visualization)
- Shalmeneser
- Veteran
- Posts: 9580
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: 3D display artefacts
Btw, your 1st sketch is overly-complex.
- Attachments
-
- Capture du 2021-11-23 22-30-07.png (1.93 KiB) Viewed 1388 times
-
- problem_SHALM.FCStd
- (86 KiB) Downloaded 16 times
Re: 3D display artefacts
That's absurd. How should that work? There are lots of other items (of course not included in the problem.FCStd) visible outside to which the positional relationship would be completely wrong, and in a good resolution screenshot this is not just visible but very obvious.
Why? By what criteria? Who are you to stipulate what is overly-complex, and what not?Btw, your 1st sketch is overly-complex.
It works, that's what's important.
I think I finally understand what you wanted to express here. I like the technique and may employ it next time I have a more complex sketch. Thanks for the hint.problem_SHALM.FCStd
What I do not like though are posts where the author has turned their statement into a riddle to be solved, and where at the end I can never be sure to have understood it correctly.
Re: 3D display artefacts
Unfortunately my knowledge is incomplete and probably outdated. I have dabbled in 3D graphics programming a fair bit in the 1980s and 90s, but I think even then my 3D graphics knowledge was far from comprehensive. I'm sure new techniques have been invented since. So even though I probably have a bit of a head start compared to most people in the forum, the learning curve would be steep for me too.chrisb wrote: ↑Tue Nov 23, 2021 2:43 pmIt sounds as if you have good knowledge of such implementations. Care to help out to improve this?perot wrote: ↑Tue Nov 23, 2021 2:09 pm Any properly implemented hidden-object algorithm had to find that these lines are hidden, and therefore are not to be displayed. Now, a z-buffer type algorithm has a limited resolution, given by the number of bits alotted for each pixel. If z-buffer is indeed used for hidden-line removal, is the number of bits used that low?? If so, is there a way to increase it?
I may try anyway if it bugs me enough.
Cheers Peter