Announcement

Collapse
No announcement yet.

Using measurement data of real materials in UE4

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using measurement data of real materials in UE4

    Hello,

    I am interested in using measurement data of real materials to create as-close-as-possible replicas in Unreal Engine 4. The materials I examine range from lacquers over plastics to fabric and wood.

    What I have:
    • Spectral measurement data for various viewer / light angles (XRite CxF files)
    • Scanned 'diffuse' textures, using a common desk scanner
    • Measured height data
    • Normal map created from the height data


    I am able to convert the spectral data to sRGB, and use it to color-grade the 'diffuse' scan. I could use some insights on the following questions:
    • How exactly is 'base color' defined in UE4? Is it after all the ideal diffuse color, or something else? Some measured base colors can be found here. How were they measured?
    • How exactly is 'roughness' defined in UE4? Any chance of calculating a roughness value from my measured spectral data?
    • How to distinguish 'roughness' from 'specularity', which is still there? Some measured specular values can be found here. How were they measured?


    If you could give me some hints or point me in the right direction, I'd appreciate it.

    Thanks!
    David

  • #2
    DiffuseColor = lerp( BaseColor, 0, Metallic )
    SpecularColor = lerp( 0.08 * Specular, BaseColor, Metallic )

    Depending on whether specularity was captured BaseColor will either equal the color you scanned or Color - 0.04 (specular reflectance of nonmetals). That's roughly what I used to make that chart. It isn't perfect but pretty close. BaseColor for metals is more straight forward. There are huge databases of index of refraction which can be directly translated into BaseColor. See here http://seblagarde.wordpress.com/2011...lighting-mode/

    Roughness is not reflectivity which is how much light is reflected. Roughness controls where it is reflected, specifically how scattered the reflected light is. Measuring this is extremely difficult over a large area. To do so you would need to capture the BRDF and derive the roughness from that. Unless you are a researcher I wouldn't bother. Here is one such approach for faces http://gl.ict.usc.edu/Research/FaceS...7_SGI_high.pdf

    Comment


    • #3
      Thanks Brian for your reply! I am indeed doing some light research on this, so I not only have to get it to look fantastic (which is easy in UE4, thanks to you guys!) but also as correct as possible

      Important things I take home from what you said:
      • For non-metals, base color is pretty mich equivalent to the old diffuse color.
      • For non-metals, specular reflection is always colorless.
      • For metals, the specular reflections are colored using the base color.
      • For metals, the specular parameter doesn't have any influence at all.

      To capture the specularity, I would measure the direct reflection of a light source of known energy. The proportion of energy that is reflected is the specularity. Is that right or am I missing something?

      Thanks you for the links, these charts sure will come in handy and the paper is a good read. I can easily (or, as easily as something as this can be) approximate the BRDF from the measurement data that I have.
      I found these course notes of 'Real Shading in Unreal Engine 4', where it is stated that Roughness²=alpha from the GGX/Trowbridge-Reitz shading model, amongst others. Can you tell me whether this exact formula is used in the release version?

      Thanks a lot!
      Last edited by Daerst; 06-20-2014, 02:39 AM.

      Comment

      Working...
      X