Hdr environment Texture runs a little differently on the phone

I tried to light the models in the scene using a hdr file, and it runs well on computer brower, but unnormal on mobile browser.

In the computer browser, it show like this:

But in the mobile browser(iphone chrome browser), it show like this:

Forgive me for not being able to use my customer’s model which is in the front image.
But the code is the same as this, which I replace to the model and the hdr url:

how to edit the code to polyfill on the mobile browser?

Yep I can repro on my phone as well

Pinging @sebavan

Can you try to use a env file? (Use a HDR environment (for PBR) - Babylon.js Documentation)

Yup using the env file is definitely the way to go to save both perfs and quality :slight_smile:


Yes, when I use a existing .env file, it runs normal on my phone browser!

then I try to convert my customer’s hdr file to .dds follow the document (I had to use my virtual machine), mabe my computer configuration is a bit low, the Lys cann’t open, and IBLBaker not responsed.

I had try to use the https://github.com/dariomanesku/cmftStudio to export .dds file, then I import it to the babylon sandbox, it has some errors, just like:

I’m not sure if it was caused by my incorrect operation.

did you know this software? if yes, can you give me some suggestion to use it? or can you recommend other software that works on mac for me to convert .hdr file to .dds?

I don’t know it but it is definitely generating incompatible DDS file

Maybe @PatrickRyan can provide some guidance?

@99999, I did some work digging into CMFT today, and the problem with it is that I cannot find a way to write a legacy DDS with CMFT. Babylon only supports legacy headers in DDS files so I also tried taking the CMFT output and run it through both the NVIDIA texture tools and Visual Studio to see if I could convert to legacy headers in the DDS but didn’t find a solution to the issue.

The problem is that converting HDRI into IBL is a very specific problem and there aren’t a lot of stand-alone solutions out there. Right now Lys works best and IBL Baker can do a good job, but their BRDF does not match what we use so there is a shift in the output but one that may not be noticeable based on the source image.

I will scrub the rest of the forum to make sure we remove references to CMFT but feel free to ping me if you have any more questions. Sorry I couldn’t be more help.

Thanks to @Deltakosh @sebavan @PatrickRyan !
I think I can slove this with Lys by using my friend’s computer with window system!

I still can not convert the the hdr file to env file.
With my customer’s permission,I can use the two .hdr files here [hdr.zip|attachment](2.8 MB) .
And can you help me convert the two hdr files to .env files?I know I shouldn’t be like this,If you mind, just ignore what I said.

@99999, I’m happy to help you get unblocked while you work out your pipeline. Here are conversions for your file. I noticed the source images is fairly blown out for both, so you will likely need to adjust exposure in your scene to compensate.

The files were too large for the forum, so I posted them at github. Let me know when you retrieve them and I will take the files down. Let me know if you have any other questions.

Thanks very very much!
I have downloaded the six files.

1 Like