Author Topic: Advanced texturing  (Read 134 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 952
    • zapsolution
Advanced texturing
« on: September 15, 2018, 08:04:49 pm »
Mike

This is a LP model, using only one single mesh, however due to the use of state of the art texture materials the model looks like a detailed HP's.

So far the new OR shader is doing a very good job, however we are missing a few more map support:
map_Ke (emissive)
map_Ns (roughness)

see the "Mapping of mtl slots to shading models" here
https://github.com/AnalyticalGraphicsInc/obj2gltf

« Last Edit: September 15, 2018, 08:14:05 pm by Patrice Terrier »
Patrice
(Always working with the latest Windows version available...)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 777
Re: Advanced texturing
« Reply #1 on: September 16, 2018, 08:24:22 am »
OMG Patrice,

Praised be our Lord that's opening up your eyes and your heart to modern OpenGL pipelining and texturing! :D

Yes, I know this model, and actually it was the model that made me extend AO from the ambient-only to the ambient-and-diffuse channels in our uber-shader. :)

While we're at it, let me note that the model's box-like "windows" have bad normal mapping over the grates (or fins) as you can see in your own screenshot. I believe the normal map grate areas were painted manually in Photoshop or Gimp, which resulted in the normals being "bent" so unnaturally that they certainly need further correction before the model is released publicly. Or such extreme normals may also be due to some glitch in Blender where this normal map may have been baked originally by the model author. (actually everything that's of such pure yellow color is abnormal to tangent-space normal mapping in the world coordinate system)

Luckily, such correction can be done easily in CrazyBump. If the map is loaded as a normal map rather than diffuse decal, CrazyBump would recalc its coloration properly in those areas in response to the repositioning of its +/- intensity and fine detail sliders. Such a temporary normal map image can then be re-saved on disk, and its color-corrected grate areas, copy-pasted into the original normal map using Photoshop, Gimp, or Paint.NET image editors. The other areas in the original normal map are more or less good to go without correction.

Regarding the map_Ns, map_Ke and github stuff, I'm familiar with this project too in relation to the glTF 3D file format. However, you should probably realize it yourself that neither map_Ns, nor map_Ke, nor vertex colors are part of the original Wavefront OBJ format specification.

But!

Both 3ds Max, which is an industry-wide professional tool, and Blender, which may be regarded as semi-professional despite its extremely weird and unintuitive user interface, recognize and support map_Ke and vertex colors (those come as three extra [0 to 1] floating-point RGB values following the vertex coords in each v vertex declaration in the .OBJ file) directly in both .OBJ import and export. Blender also loads, saves and renders correctly map_Ns statements that it recognizes as part of modern metalness/roughness PBR specification.

I think since those extensions to the classic Wavefront OBJ file specs are good for 3ds Max and Blender, it's also a reason good enough for us to support them in ObjReader without any #meta decorations as well.

I'll see what I can do in this regard. :)
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Michael Lobko-Lobanovsky

  • Administrator
  • *****
  • Posts: 777
Re: Advanced texturing
« Reply #2 on: September 16, 2018, 03:11:20 pm »
OK, here comes my Mech with:
  • some UVs on front side of ground mesh fixed;
  • full set of ground mesh textures added;
  • ground mesh smoothed at 89o to improve normal-mapped lighting; and
  • neutral bump added to bones mesh to enable other textures available in this material.
Concrete has been turned into mud to justify the buried feet.
« Last Edit: September 16, 2018, 05:38:50 pm by Patrice Terrier »
Mike
(3.6GHz Intel Core i5 Quad w/ 16GB RAM, nVidia GTX 1060Ti w/ 6GB VRAM, Windows 7 Ultimate Sp1)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 952
    • zapsolution
Re: Advanced texturing
« Reply #3 on: September 16, 2018, 05:38:08 pm »
Ok, thank you for the reworked material.
I have updated the official version with the new one.
Patrice
(Always working with the latest Windows version available...)