[SOLVED] HDRI cubemaps (PBR)

Is it now possible to load High Danymic Range Environments (for PBR), and if so, which formats are supported and how to set that up?

Thanks,

::mate:

It’s not possible to do HDR just yet. Prefiltered cubemap support is about to go into the Editor (today hopefully) HDR support coming next.

cool! Which format do the cubemaps need to be in? Can I use https://www.knaldtech.com/lys/ (for example) to prefilter them?

Currently you upload 6 individual images and we do the pre-filtering for you. Nearly done…

And these images need/can be in which formats? Do I understabd correctly they’re HdR images? Thanks.

HDR support in the editor won’t be supported just yet. First we want to get. I believe we will support .dds, .hdr and .exr inputs which will be converted to dds for runtime. @mr_f knows more.

Yes, we have filtering in the engine, so you don’t have to use Lys.
We do support HDR cubemaps (both Star-Lord and Seemore demo used them), we just need to prepare server for handling various HDR file formats. If you use engine locally without editor/server, you already can load fp32 DDS files, filter them, encode to RGBM and add edge fixup.
Right now we’re just integrating those things into editor/server.

Final pipeline will be:

  • import 6 images
  • assign these to cubemap asset
  • press to filter
  • use

And later we’re going to add environment probe areas which would automatically assign cubemaps to objects based on their position.

Prefiltered cubemaps is now available in the Editor.

  1. Create a new Cubemap asset
  2. Upload 6 textures
  3. Assign texture to cubemap faces
  4. Press the prefilter button
  5. Open scene settings (bottom left cog)
  6. Assign cubemap to skybox
  7. Use “Physical” material
    8…
  8. PROFIT!!1!
2 Likes

NOTICE: Win Chrome/FF may produce bugs in filtered cubemaps. It’s a known issue with ANGLE: https://code.google.com/p/chromium/issues/detail?id=447419

Seems like they already fixed it in Chrome Canary, and it always worked in IE11 and Linux/Mac browsers.
Hopefully that ANGLE fix will get soon into main Chrome and FF.

Does this issue apply to prefiltered maps as well?

Well, by filtered I mean prefiltered.

I noticed that the resolution of the cubemap seen through refraction is much lower than in reflection, even though it uses the same map. Can I control this somehow?

We’ve enabled experimental support for HDRI cubemaps. You can upload .exr or .hdr files and use them in your cubemaps.

Currently the prefiltered cubemaps generated are lower quality than we’d like. We’re working on improving this.

Sample looking pretty awesome:

1 Like

aw yiss! So I do need 6 .exr still?

Yep, still need to split into 6 images. I’ve been using cmftStudio to convert cross images into faces.

1 Like

What’s the best way to get images into Playcanvas? which format is the most efficient?

For HDR, .hdr of course :slight_smile: there is .exr as well, both work well.
Make sure in cmftStudio you set size of faces to power of two, so they wont get re-scaled on import.

1 Like

thx. what about textures for PBR materials? PNG? 16 bit normal maps? how to best combine channels, what’s the best practice there? thanks!

For normals and glossiness use PNG, not indexed. As those two maps suffer most from lossy compression artefacts.
While other are absolutely fine as JPEG’s.
Combine into channels as you see fit. Bear in mind that JPG does leak sometimes from channel to channel.

Is it possible to channel pack the glossiness in the alpha channel of the normals PNG?
(Couldn’t get this to work, as there’s no channel selection in the normals texture.)