[solved] what does new 3D option "Transparent objects" do?

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

[solved] what does new 3D option "Transparent objects" do?

Post by uwestoehr »

git commit ea8d3bb2 implemented the new option "Transparent objects". What does this exactly do? (I want to describe it in the Wiki.)
wmayer wrote: .
Last edited by uwestoehr on Tue Apr 14, 2020 4:26 pm, edited 1 time in total.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: what does new 3D option "Transparent objects" do?

Post by uwestoehr »

Thanks. I described this now in the Wiki so far but do not understand the following:

* where in FreeCAD do we have non-solid objects?
* what are "backfacing polygons"?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: what does new 3D option "Transparent objects" do?

Post by openBrain »

uwestoehr wrote: Tue Apr 14, 2020 2:42 pm * where in FreeCAD do we have non-solid objects?
I think lone faces or meshes are non-solid objects for example
* what are "backfacing polygons"?
I guess this are polygons whose back faces are visible by the user, like the black ones in the case of the issue #4285. But really I'm not sure. :|
chrisb
Veteran
Posts: 54309
Joined: Tue Mar 17, 2015 9:14 am

Re: what does new 3D option "Transparent objects" do?

Post by chrisb »

uwestoehr wrote: Tue Apr 14, 2020 2:42 pm * where in FreeCAD do we have non-solid objects?
At least faces, not sure whether sketches and wires should count as objects.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: what does new 3D option "Transparent objects" do?

Post by uwestoehr »

openBrain wrote: Tue Apr 14, 2020 3:28 pm I think lone faces or meshes are non-solid objects for example
But why do have faces (2D objects) have 2 different types of polygons that can be rendered in two passes? :?
For meshes what are the backfacing polygons? I think a mesh is a concatenation of polygons. So is maybe the direction of their normal vector the difference?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: what does new 3D option "Transparent objects" do?

Post by openBrain »

uwestoehr wrote: Tue Apr 14, 2020 3:51 pm But why do have faces (2D objects) have 2 different types of polygons that can be rendered in two passes? :?
I don't think they have 2 types of polygon. Just their back face is visible. And (I couldn't explain technically why, we're talking about a GL thing) it seems that rendering them in a one pass process can trigger artifacts (I don't know which ones, I never saw a single one).
For meshes what are the backfacing polygons? I think a mesh is a concatenation of polygons. So is maybe the direction of their normal vector the difference?
That's it. For meshes the back faces are on the "negative side" according the normals. ;)
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: what does new 3D option "Transparent objects" do?

Post by uwestoehr »

openBrain wrote: Tue Apr 14, 2020 4:06 pm That's it. For meshes the back faces are on the "negative side" according the normals. ;)
OK, I think I got the idea and try to explain this in the Wiki.

However, maybe Werner has some further input for me?
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: what does new 3D option "Transparent objects" do?

Post by openBrain »

Here's an example generated with a transparent mesh cube (top face has been removed, but it doesn't change anything). Artifact is on bottom left of the cube in "one pass" and disappears in "two pass" mode. ;)
HTH
transparent.gif
transparent.gif (598.02 KiB) Viewed 607 times
Last edited by openBrain on Tue Apr 14, 2020 4:39 pm, edited 1 time in total.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: what does new 3D option "Transparent objects" do?

Post by uwestoehr »

openBrain wrote: Tue Apr 14, 2020 4:19 pm Here's an example generated with a transparent mesh cube
Cool. This explains it better than with words.
Post Reply