dicarlolab / ThreeDWorld

Generator of interactive Unity-based 3D environments with physics
Other
21 stars 4 forks source link

Improving Materials and fixing the MaterialProcessor.cs #63

Closed damro closed 7 years ago

damro commented 7 years ago

The smoothness / roughness is not specified in the .mtl files. Will contact DOSCH about that.

damro commented 7 years ago

After talking to Michael Mara, we learned that the smoothness / roughness parameter in Unity can be inferred from the Ns parameter in .mtl files. However, there isn't a clear formula to convert between both parameters.

So we have to determine this conversion empirically, which means we have to collect some data points to fit a conversion function as follows:

  1. Load the material into Unity
  2. Adjust the smoothness parameter in the Standard shader (Specular Setup) until it looks nice.
  3. Check out the Ns value in the .mtl file
  4. Write down the pair By fitting a curve through the Ns-smoothness-pairs, we should get a reasonable translation of the .mtl Ns parameter to Unity smoothness.

This should be done, before we convert all materials into prefabs to avoid having to redo them all.

damro commented 7 years ago
  1. Create a set of 200 materials adjusting the specular color, metallic and smoothness values.
  2. Regression or distribution of those value for random assignment.
  3. Transparency scalar value in the albedo not assigned in MaterialProcessor.cs
  4. Spaces not recognized in file names.
  5. Materials are overwritten by other imports during simultanous import
  6. Find a way to change materials at runtime and make that part of ProceduralGeneration.cs
damro commented 7 years ago

Progress: All done except 2.

damro commented 7 years ago

Everything done. Look at wiki how random materials can be specified.