Search code examples
androidaugmented-realityarcoresceneform

ARCore – SFA file format's parameters


Looking inside the sfa dele we have some configurations.

One of then is the metallicFactor

On the Google I/O Video about Sceneform it's say that it can go from 0 to 255 and we normally should use from 0 to 1.

My first question, on the code we should use: 0, 0.2, 0.4, 1 or 0, 20, 40, 255?

Second, using one of the Sceneform Sample for Android I try to change this values for the Sun in the "solarSystem" sample. But for any go the changes it looks the same. What I'm missing?

Someone has a example from the minimum value to the maximum value to see how it should look (Only changing the metallic factor. without change roughness)?


Solution

  • metallicFactor scales metallicRoughness to control the metallicity of the material:

    metallicFactor  <float_value>   
    

    Use 0.0 for non-metallic materials:

    metallicFactor: 0.0;
    

    Use 1.0 for metallic materials:

    metallicFactor: 1.0; // Normalised 1.0 is similar to 255 in 8-bit color scale
    

    So in the code we need to use: 0.0, 0.2, 0.4 and 1.0 respectively.

    Hope this helps.