Skip to content

Orange Peel

Compare
Choose a tag to compare
@stefanmuller stefanmuller released this 02 Dec 21:48
· 11 commits to main since this release

Refined Material Properties

Even though the vast majority of LEGO parts are made out of plastic, not all parts necessarily look the same. Some parts are more flexible and others are so different you can actually feel it! For example, the antenna 3957 feels much slicker and stickier than the oar/paddle 2542.

I parameterized these different qualities and every part can be described in a new config file called brick_properties.json. For starters, it only includes a handful of parts, but of course, this config can be tweaked and extended by anyone. And since we are open source, I would love to see some pull requests :)

There are 3 parameters:

  • softness
  • graininess
  • roughness

Let's have a look in detail

Softness usually goes hand in hand with how flexible a part is and how easily light scatters inside the material. This results in a less harsh appearance, most noticeably, softer edges with ever so slight hue shifts. In more technical cg terms this means how pronounced the subsurface scattering is.

Graininess is a very common effect, easily visible on slopes. It's a high-frequency bumpy/uneven surface that breaks up reflecting light into a "grainy" looking pattern, hence the name. However, not just slopes feature these, but tons of other pieces as well like minifig accessories. The bow and the feather in the example scene (see readme image) are good examples of this.

Roughness describes how shiny (or rather unshiny if that is a word) a surface is. Classic new LEGO bricks act like a mirror at grazing angles however, there are other parts like the old palm leaves that reflect light much more broadly/unfocused. In reality, this can be seen as a very subtle extra high-frequency version of the graininess parameter above.

No in-depth CG knowledge is required to tune these parameters. The values should be in a 0-1 range and often need to be used in combination to capture the appearance of a given part. The updated MaterialX shading network takes care of translating these parameters from the config file behind the scenes.

There is a new Reload Brickini Nodes shelf tool to help tweak and iterate on these values quickly. You can start a render in Karma, add/modify the properties in the brick_properties.json, and then select the geo node(s) or LDraw Part node(s) directly and press the shelf tool to trigger a refresh.

Release notes in bullet points

  • new brick properties config file (this includes the previous slopes.json)
  • also supports partial graininess for individual faces (needed for parts like the chrome crown or the chest)
  • updated Karma Material to support new material properties
  • updated Brickini LDraw Part to read these new properties
  • new still life soft & grainy scene to showcase the above upgrade
  • updated still-life mixed
  • new shelf tool to reload LDraw Part or Brickini Material nodes (Colors)