I have been procrastinating to pen this posting for months as I had otherwise wanted to make it much more technical and specific. Rather, let me generalize my questions which allude to the bigger questions on my mind.
I am familiar with the MDL SDK, its programming, all of its samples and in the usage of the baking + distillation code to create PNG textures on disk + PBR-centric material parameters. No main questions in that regard.
- Let me pose my basic question: does anyone, say internally to the MDL development team, have a “better” example of their own about how to distill down any generic MDL material to a PBR-centric uber-shader? I know that this question could be interpreted in many different ways and hence please excuse the generality of my request. The example code is pretty good but, to me, it has gaping holes in it in terms of what I subconsciously wish it to do. Without getting into absolutes and specifics, it would be nice to see additional examples for AO mappings, geometry displacement (which I’ve been dabbling with lately), clearcoat tint color, how to map environment maps, etc. Ideally I would prefer to give you real world examples of what I feel is missing but, again, I am going to generalize in this porting.
1b) As a side note, there is an excellent glTF PBR material → MDL mapping in the example code, which of course maps over to a custom glTF-centric MDL material.
-
Here’s an internal issue on my mind right now which I could benefit from some hand holding or basic education. Again, let me generalize. “Given any MDL material, for which I could read its source code and learn how it works, what are the basic rules to translate that shader information over to the queries needed to extend the distillation rules for such shaders?”. As an example I was looking at 15mins ago, a DomeSky shader makes reference to ‘Emission’ + associated texture map from which I’d like to make a generalized all-encompassing distillation rule to map over those to a PBR-centric environment map. I do understand that the distillation process is approximate, at best.
-
And let me ask this simple question while I am making this posting. I’m sure I could find this info myself. Are the Normal Maps generated by the distiller in DirectX or OpenGL format for its RGB channels?
-
And let me pose this question just while I am doing a brain dump. Is there a good and definitive example for querying, displaying/editing and sending back MDL parameters to the SDK? I had queued up the following references which touch on this subject. My hesitation in using or cloning this code is that it would be difficult to maintain in the future if and when NVIDIA decides to revise the system, as been happening over the last few years with the evolution of MDL and its related SDK. VRED has recently added in such parameter querying + editing so I was wondering what example code other vendors had used as the basis of their implementations?
traversal\compiled_material_traverser_print.cpp
shared\gui\gui_material_properties.cpp
shared\compiled_material_traverser_base.cpp
df_cuda\example_df_cuda.cpp
mdl-sdk\examples\mdl_sdk\optix7\optix7_mdl.cpp