KhronosGroup / glTF-Blender-IO

Blender glTF 2.0 importer and exporter
https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html
Apache License 2.0
1.5k stars 320 forks source link

Allow for export with built-in environment map #335

Open dsinni opened 5 years ago

dsinni commented 5 years ago

I'm not sure how difficult this would be with the current spec, but it would be great if models could be exported with built-in environment maps.

Adding environment maps in some engines/frameworks can be a cumbersome task, especially for those who are not coders. For those who use 3D software for most of their workflow, it seems that exporting the environment with the model may make the most sense, if it's possible.

Just for reference, to quote @emackey:

Not from Blender, currently. Adobe Dimension has that capability, at least internally when publishing to web. They haven't exposed a direct export button though.

It would be great to see this as an export option, possibly utilizing an extension.

Would love your feedback on this.

Thanks!

emackey commented 5 years ago

For reference, the extension in question is EXT_lights_image_based.

There's a sample model called EnvironmentTest. In particular the glTF-IBL subfolder within this sample uses the extension to encode an environment.

BabylonJS will show these environments, here's a demo in gltf-test. The pink-ish environment image surrounding the spheres came from within the glTF, via the extension.

dsinni commented 5 years ago

Rad! Thanks for adding that, @emackey.

nikita1prasolov commented 4 years ago

Very useful feature! I hope it would be implemented

thibka commented 4 years ago

Hey, I'm really interested in this behavior too. If I understand correctly, extensions provide additional features to the gltf exporter, but how does it work? I guess extensions should be installed somehow, but I'm not sure as I can't find any explanation on this :/ Any help would be appreciated!

donmccurdy commented 4 years ago

@thibka extensions provide additional features that are not in the core glTF 2.0 format, if the viewer loading the model supports that extension. This particular extension allows IBL to be stored in the model. However, it has not been implemented by this exporter yet.

In general Khronos (KHR_) extensions are very widely supported, support for other extensions varies.

thibka commented 4 years ago

@donmccurdy Got it, well thanks for answering me :)

Shinmera commented 10 months ago

If anyone is interested in implementing this, I'd be open to sponsor up to USD500 as a bounty for an implementation.