Explainer: Appearance Properties in FreeCAD

FreeCAD 1.0 intro­duced a new, refac­tored mate­r­i­al sys­tem, which includes updat­ed appear­ance prop­er­ties of FreeCAD objects. What was pre­vi­ous­ly one prop­er­ty ‘Shape col­or’ is now six new prop­er­ties in the ‘Shape Appear­ance’ group of prop­er­ties. This arti­cle explains how to set up these prop­er­ties to achieve the desired sur­face look.

There are six appear­ance prop­er­ties, which you can find in the View prop­er­ties -> Object Style group under the Shape Appear­ance umbrel­la. These prop­er­ties are:

  • Dif­fuse Color
  • Ambi­ent Color
  • Spec­u­lar Color
  • Emis­sive Color
  • Shini­ness
  • Trans­paren­cy

Anoth­er way to access the appear­ance prop­er­ties of an object is by open­ing the Appear­ance task pan­el (Ctrl+D short­cut) and click­ing the Appear­ance but­ton, which opens the Mate­r­i­al Prop­er­ties dialog.

These six prop­er­ties define the ‘look’ of an object: its col­or, whether it is shiny or not, and how trans­par­ent it is. On a more tech­ni­cal lev­el, each of these prop­er­ties influ­ences the cal­cu­la­tion of how light inter­acts with an object’s sur­face, and thus how the sur­face looks to an observ­er. Let’s have a look at how each of these prop­er­ties influ­ences the appear­ance of an objec­t’s surface.

Dif­fuse Col­or defines the sur­face’s base col­or when illu­mi­nat­ed. It rep­re­sents how the object scat­ters light even­ly in all direc­tions, inde­pen­dent of the viewer’s angle. In layman’s terms, this defines the col­or of the surface.

Ambi­ent Col­or defines the col­or of a sur­face under indi­rect, uni­form light­ing, rep­re­sent­ing how it appears when illu­mi­nat­ed only by ambi­ent light in a scene, with­out direc­tion­al light, shad­ing, or high­lights. In oth­er words, this defines the col­or of the sur­face hit by indi­rect uni­form light. 

Ambi­ent col­or is much less promi­nent than the dif­fuse col­or. For a typ­i­cal mate­r­i­al like plas­tic, the ambi­ent col­or should be set to a dark­er shade of dif­fuse col­or. So if a dif­fuse col­or of an object is set to bright red RGB (255, 0, 0), the appro­pri­ate ambi­ent col­or could be set to RGB (200, 0, 0). As ambi­ent color’s influ­ence on the sur­face appear­ance is not so pow­er­ful, for most uses in FreeCAD it is OK to leave the default ambi­ent col­or, which is RGB (85, 85, 85).

Spec­u­lar Col­or defines the col­or and inten­si­ty of the bright, mir­ror-like high­lights that appear on shiny or reflec­tive sur­faces when light hits them direct­ly. Basi­cal­ly,  how shiny the sur­face is – bright col­ors define shiny sur­face and dark col­ors define mat­te surface. 

A stan­dard mate­r­i­al like plas­tic, rub­ber, or wood does not influ­ence reflec­tions by its own col­or. So to sim­u­late this, only shades of gray should be used in the spec­u­lar col­or. Met­als like gold or cop­per tint the reflec­tion, so you can use col­or val­ues in the spec­u­lar col­or definition.

Emis­sive Col­or defines the col­or of a sur­face that appears to emit light, inde­pen­dent of exter­nal light­ing, mak­ing the object look self-illu­mi­nat­ed. Note that this does not sim­u­late a light in the FreeCAD 3D space, it only cre­ates an illu­sion of light emis­sion. So even if a bright col­or is set as an emis­sive col­or for a sur­face, oth­er objects in the 3D space will not be influ­enced by this emis­sion. For mate­ri­als that do not emit light, set this prop­er­ty to black RGB (0, 0, 0).

Shini­ness defines the size and sharp­ness of spec­u­lar high­lights on a sur­face. High­er val­ues pro­duce small, sharp high­lights, while low­er val­ues cre­ate broad, soft high­lights. It is close­ly linked to the Spec­u­lar Col­or. While Spec­u­lar Col­or defines the inten­si­ty of reflec­tions, Shini­ness defines their size. It’s best not to set Shini­ness to too low per­cent­age val­ues, as a large part of the sur­face could be cov­ered by spec­u­lar highlights.

Trans­paren­cy defines how much light pass­es through an object, mak­ing it par­tial­ly or ful­ly see-through. Use 0% for opaque sur­faces and 100% for ful­ly trans­par­ent surfaces.

These six core appear­ance prop­er­ties enable FreeCAD users to achieve var­i­ous sur­face inter­ac­tions with light, allow­ing them to sim­u­late the appear­ance of dif­fer­ent types of mate­ri­als. These prop­er­ties are also wide­ly used in the CG (Com­put­er Graph­ics) indus­try, so most ren­der­ing engines should be able to sup­port them.

Note that every FreeCAD mate­r­i­al can have an appear­ance assigned with these basic appear­ance prop­er­ties. If said mate­r­i­al is then applied to an object, the appear­ance prop­er­ties of the object are set from the material’s appear­ance values.

To reit­er­ate, for a typ­i­cal FreeCAD user, set­ting the Dif­fuse Col­or is cru­cial for chang­ing an objec­t’s col­or. This is rough­ly what Shape Col­or did in FreeCAD 0.21 and ear­li­er ver­sions. You can also adjust the gray val­ue of Spec­u­lar Col­or to adjust the reflec­tiv­i­ty of an object. Chang­ing these two val­ues is typ­i­cal­ly suf­fi­cient for most use cases.


Discover more from FreeCAD News

Subscribe to get the latest posts sent to your email.

11 responses to “Explainer: Appearance Properties in FreeCAD”

  1. Ray Huber Avatar
    Ray Huber

    This explain­er was very helpful. 

    It would be great if the expla­na­tions could be added as tooltips in FreeCAD. I was con­fused by this menu before. 

    Also would be great if “Dif­fuse” col­or would be at the top of the menu since that is the most crit­i­cal one

    1. Tomas Polak Avatar

      The tooltips are already being worked on: https://github.com/FreeCAD/FreeCAD/issues/24434

      The answer to the order of prop­er­ties is in the com­ment bellow.

  2. Stefan Hertweck (on Forum aka MTronic) Avatar
    Stefan Hertweck (on Forum aka MTronic)

    Thanks for the info.

    If “Chang­ing these two val­ues is typ­i­cal­ly suf­fi­cient for most use cas­es.”, mean­ing Dif­fuse Col­or and the grey val­ue of Spec­u­lar Col­or, why not list­ing them as the first two list­ed col­or items? Like:
    Diffuse
    Specular
    Ambient
    Emis­sive and so on …
    At the moment it seems to be done alphabetically.

    1. Tomas Polak Avatar

      The order is cur­rent­ly dif­fer­ent at dif­fer­ent places. I already report­ed the issue, but it will not make it into the 1.1 release.

      Dif­fuse and Ambi­ent prop­er­ties will stay next to each oth­er though, because they influ­ence the appear­ance in a some­what relat­ed way.

  3. on Forum aka David69 Avatar
    on Forum aka David69

    may be a Tuto­r­i­al wiki page linked to Pref­er­ences wiki page

  4. Harvey Avatar
    Harvey

    What a won­der­ful and con­cise arti­cle, it would be fan­tas­tic if it were pos­si­ble to access such assis­tance from with­in Freecad at the click of a but­ton right next to the fea­ture itself with­out hav­ing to search for it.

    1. Tomas Polak Avatar
      Tomas Polak

      I am not much of a friend of but­tons in the UI point­ing to lengthy explain­ers. Tooltips, which will be added, should be enough.

  5. saltypaws Avatar
    saltypaws

    This is a fan­tas­tic expla­na­tion. It is a very neat set up to have so many options. I think it would be a good idea to hide the 4 options that are nor­mal­ly not used in “easy” mode.

    1. Tomas Polak Avatar
      Tomas Polak

      Notice that in object Prop­er­ties pan­el, these are grouped under ‘Shape Appear­ance’ — you can change this val­ue and in changes the dif­fuse color.
      This is the ‘easy mode’ solu­tion at least in Prop­er­ties panel.

  6. pelle Avatar
    pelle

    There’s how­ev­er a UX bug (i.e. not a fea­ture, in my opin­ion) when work­ing with appear­ances in FreeCAD: The appear­ance you apply to objects in the 3D view are not applied to Bodys but instead the cur­rent, vis­i­ble sub­fea­ture of the Body. So you typ­i­cal­ly end up hav­ing mul­ti­ple appear­ances for the same object, which is use­less for the major­i­ty of users (and all new­com­ers). This makes FreeCAD behave bug­gy. The same is true for trans­paren­cy. See the fol­low­ing issue: https://github.com/FreeCAD/FreeCAD/issues/24236 .

    Thanks for all these fre­quent blog posts! This makes it enter­tain­ing and valu­able to fol­low the devel­op­ment of this open source project. I guess FreeCAD will evolve a lot in the com­ing years.

    1. Tomas Polak Avatar
      Tomas Polak

      Yes, there are quite a lot of areas regard­ing the new appear­ance sys­tem that need to be ironed out. It will get bet­ter with time.

Discover more from FreeCAD News

Subscribe now to keep reading and get access to the full archive.

Continue reading