Engine prefilter cubemap

Hey there

Does anyone know how to prefilter a cubemap and make a PlayCanvas friendly .dds file without using the Editor?

You should use the newer envAtlas.
Use Texture Tool , load some HDRI image to it. Use the reproject part on the right to project it to envAtlas with RGBP encoding, size 512. Save that as a png.

And then in the engine code, see what this example does (search for helipad)

Thanks, Martin

That works just perfectly when setting it via code! Simple, and neat how it’s a single asset.

Can the envAtlas be used in a manner where it’s serialized into the scene JSON? I tried referencing its asset ID in the settings.render.skybox property. This way, it seems to actually be used but there’s a bit of UV clamping errors resulting in a white pixelated line in one side, visible warped dots top and bottom, and the lighting data doesn’t seem to influence the scene as when setting it with code.

EDIT: Could of course just have a script perform that tiny action on scene initialization… :stuck_out_tongue:

1 Like

Just checked the engine code - that handling bit is not there yet, usually the scene handling is added when the property is exposed in the Editor … which is on a TODO list soonish (not a tiny job to deprecate the old system and use the new one).

1 Like

Oh yeah, it’s always a process… Backwards compatibility and all that - however brilliant the new system is :roll_eyes:

1 Like