Hey everyone, this is my first post to the forums I hope i don’t waste too much of your time!
Long story short we’ve been trying to recreate the PBRMaterial in NME. We need to recreate things such as lightmap application and do so as accurate as possible to the reference PBRMaterial. We’re also looking to replicate how PBRMaterial displays HDR lightmaps with RGBD data.
You can probably tell we got pretty far already (Playground) (left is PBRMaterial, right is our NME)
Here’s an imgur album of relevant screenshots with notes: Imgur: The magic of the Internet
The scene is a loaded .gltf file, the materials and textures came loaded in as-is. The only difference is that they both have the lightmap loaded in and displaying, the lightmap is tagged to use RGBD, left camera is PBRMaterial right is our NME shader. The .env is a converted .hdr HDR map that we’ve used in the past without issue.
We ran into plenty of roadblocks, one is that empty texture nodes do wonky things when left blank, they’ll usually break the PBR block so I had to include multiple failsafes to make sure blank texture nodes aren’t influencing the results. Other quirks include bump strength needing to be exaggerated greatly on our metal material in order to match with the reference but the wood material does not.
We did some digging into the PBRMaterial code and how it applies lightmaps and I do believe we have a faithful setup in our NME setup. Unfortunately no matter the combination of linear or gamma converts we try we always end up with coloring that’s just slightly off. Even worse, the NME material does not respond to image processing (like exposure) accurately
You can find most of our findings in the imgur album detailed out.
I do think my main concern right now is whether or not we’re doing the lightmap application correctly or if we still need to do some tweak to get it matching exactly. The AO and bump mapping situation are manageable but the lightmaps needs to be accurate as possible, the closer the better!