Clipping Plane Always Shows Model as a Shell?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Clipping Plane Always Shows Model as a Shell?

Post by bernd »

wmayer wrote:
Mean while... I do not know how rendering is done... is it possible to render the inner side of a face with different color and properties? Would it be smaller effort?
There is a trick to achieve a similar effect.

In the preferences under Display > 3d view you can enable a backlight and define a different color. If you now select your shape and change its Lighting property from "Two side" to "One side" the inner color changes. However, you still have the shading effect. If you again go to the preferences and switch off the backlight the inner becomes totally black.
Wow, works great here :D
Attachments
screen.jpg
screen.jpg (219.39 KiB) Viewed 2520 times
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Clipping Plane Always Shows Model as a Shell?

Post by yorik »

Note that there is something in coin3D specially for that (called "volumetric rendering" I think, in the simvoleon package), that they use for medical 3D. I didn't have a very deep look at it, but it seems to be there exactly for that purpose (to "fill" the display of cut solids). Not sure how usable it would be for us, but it might be worth having a look.

The above trick with black inner faces is what sketchup does, and what the Arch section plane does too. It is not perfect, though, because in some cases you will have coplanar faces with other objects, and you will "see" the front faces of other objects through the black faces...
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Clipping Plane Always Shows Model as a Shell?

Post by ickby »

I have also read about tricks with the opengl stencil buffer which allows such renderings. Just Google for it. Annother option is to digg into the occ visualisation code to see how they do it.

edit: for example here http://glbook.gamedev.net/GLBOOK/glbook ... vclip.html
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Clipping Plane Always Shows Model as a Shell?

Post by bernd »

Wow thanks for further information in this regard. Is there any chance to add a button to the clipping plane to automaticly switching for the shapes to the one sided Lighning as long as the clipping plane is active. That would be much easier for imported building models (my common modells have around 50 to 15000 objects)
Attachments
screen.jpg
screen.jpg (440.71 KiB) Viewed 2494 times
User avatar
PrzemoF
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Clipping Plane Always Shows Model as a Shell?

Post by PrzemoF »

Option (1) is the one from ickby's link [1]
Option (2) is SoVolumeViz [2]

The option (1) might be better for general cross sections, where the user don't expect to see anything inside a solid, except having a nice looking surface telling that the object is a solid. The option (2) looks like something that I want to have in the FEM wb - it would be perfect to present what's happening inside a mesh. Right now we don't have any option that allows that.

Some observations, that are open to correction:
Option (1) might not be good for presenting volume data (stress, displacement, future heat flow). The example Earth sections from ickby's link are using a single colour mesh.

Option (2) might not produce perfectly flat surface with sharp edges, so it might not be good for typical solid cross section. See this example [3]. The cut through the head doesn't look completely flat even if the cutting volume has a perfectly flat wall.

We probably need both options in FreeCAD. (1) to cap solid cross-sections and (2) to be able to show FEM results.

[1] http://glbook.gamedev.net/GLBOOK/glbook ... vclip.html
[2] http://oivdoc95.vsg3d.com/content/185-examples
[3] http://oivdoc95.vsg3d.com/sites/default ... ders02.png
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Clipping Plane Always Shows Model as a Shell?

Post by yorik »

Yeah, that SoVolumeViz is what I was thinking to.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Clipping Plane Always Shows Model as a Shell?

Post by Kunda1 »

Updated the feature issue #1208 (http://freecadweb.org/tracker/view.php?id=1208#c7714) with the coin3d developments.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
OverkillTASF
Posts: 54
Joined: Wed Dec 06, 2017 5:52 am

Re: Clipping Plane Always Shows Model as a Shell?

Post by OverkillTASF »

Any developments here?

My clipped orthogonal view looks great:
Screenshot_2021-03-24_22-41-56.png
Screenshot_2021-03-24_22-41-56.png (27.87 KiB) Viewed 974 times
but my perspective view is useless:
Screenshot_2021-03-24_22-42-33.png
Screenshot_2021-03-24_22-42-33.png (33.55 KiB) Viewed 974 times
and the techdraw section view ain't good:
Screenshot_2021-03-24_22-43-00.png
Screenshot_2021-03-24_22-43-00.png (13.61 KiB) Viewed 974 times
Post Reply