drake

How to use HDR environment map with Meshcat


I want to make the Meshcat lighting visually appealing for sharing as HTML. Ideally, this would be achievable with an environment lighting map. I saw that Meshcat has a property called SetEnvironmentMap, but it doesn't seem to like my .hdr files. Can I use that method to achieve what I want?


Solution

  • We don't currently have support to pass .hdr images through Meshcat (see issue #20366). Since the issue was posted, our Meshcat server implementation has evolved enough that the obstacle to supporting .hdr images has probably shrunk. But it would still require some coding on the meshcat side as well.

    Passing a png version of your hdr does work, but, as you've no doubt noticed, the dynamic range of the lighting is significantly reduced. :(

    At this point, there's little you can do. You might ping the linked issue above to see if that helps bump it up priority lists.

    Sorry for the not overly helpful response. But, at the very least, it means you know you're not doing anything wrong.