BabylonJS / Editor

Community managed visual editor for Babylon.js
http://editor.babylonjs.com/
813 stars 232 forks source link

PBRMaterial clearcoat can't save/export #155

Closed jpionnie closed 4 years ago

jpionnie commented 4 years ago

Hi everyone, I report that editor can't restore the clear coat parameter of the materials (applied on a .glb).

The saved project: Screen_clearcoat_01

When close and reopen : Screen_clearcoat_02 Same when export project template.

However, the parameter is well saved in the .editorproject : Screen_clearcoat_03

Any idea ?

Thanks in advance

julien-moreau commented 4 years ago

Ouch! I’m fixing ASAP! To help me, is the material coming from the gltf model and modified in the editor? Or was the material added in the editor then assigned to the model? Thanks for reporting!

julien-moreau commented 4 years ago

@jpionnie fixed! I'm releasing the 3.2.0 ASAP :) You'll get notified by the editor when updated Thanks again for reporting!

jpionnie commented 4 years ago

Thanks for you quick feedback and fix ! :) The material is coming from the gltf model yes.

jpionnie commented 4 years ago

@julien-moreau It seems the clear coat still disappears when i use "export Project template" or "export final scene and asset" (.babylon or .glb), can you check ?

julien-moreau commented 4 years ago

I reopened and will check if it is also fixed :)

julien-moreau commented 4 years ago

Good catch! It looks like the GLTF loader supports clear coat using the "KHR materials clearcoat" extension. Anyway, the GLTF serializer of babylon.js (used by the editor to export to gltf/glb) doesn't support it. Let's ping @bghgary for more informations

jpionnie commented 4 years ago

Thanks you for your answer, do you think I need to open a issue on BabylonJS github directly ?

julien-moreau commented 4 years ago

Let’s wait for Gary then post an issue on the BabylonJS repository if you have no answer :)

julien-moreau commented 4 years ago

Or you can ask on the forum now here: https://forum.babylonjs.com/

bghgary commented 4 years ago

Clear coat for glTF is experimental at this point. I don't think we will consider adding it to the export until it has at least been ratified.

julien-moreau commented 4 years ago

Thanks for your answer! @jpionnie I suggest that you use the .babylon format for your final export. Is that ok for you? Or do you have to use gltf for your final export?

jpionnie commented 4 years ago

@bghgary Thanks you for your answer !! Ok I understand but it's too bad, clear coat is used in many areas (automotive, architecture...) and that's a major feature I need in my pipeline (and probably not only mine I think). Is there a way to manually add (even experimentally) this feature in the glTF/GLB format (and recognized by BabylonJS) ?

@julien-moreau Thanks you for your help, glTF/GLB with draco compression is a very powerfull and universal format that can be used almost everywhere. To my knowledge there is no way to add draco compression to .babylon format and without compression it's too heavy to be appropriate to my needs (large and scalable web project). So I would like to export on glTF/GLB if possible.

-> For explain my situation, I currently work on workflows for production of 3D web projects and I search to optimize 3D assets production. In a perfect world I would like to achieve a full scene export in an editor without "code editing" in final engine (adding manually lightmap, materials, lighting, etc).

Graphic designer team is generally not able to "code" the full appearance of their 3D assets (apply texture, material, lighting...), and when they are able : the iterations is too long and heavy for large scene. Babylon JS editor is a very promising solution : but for large project it's actually not flexible enough to develop complex and custom systems (for dev team). So I am looking for a way to properly export 3D assets directly usable by the development team without worrying about the correct appearance of a model/scene (excluding post process etc).

I also explored functionality on Babylon exporter (3Ds max exporter by exemple) but it doesn't give enough visual feedback to validate an asset, and it still missing somes graphics features.

Sorry if I stray from the subject, but I think it will help to understand my situation and help me to move towards the right solution. I will post in the right place afterwards if necessary.

Thank you again for your help.

julien-moreau commented 4 years ago

@jpionnie unfortunately I'll not be able to find a solution for the next release :( The only solution here is to be able to write some code to configure the materials (by using the Code Editor of the editor for example)

bghgary commented 4 years ago

Is there a way to manually add (even experimentally) this feature in the glTF/GLB format (and recognized by BabylonJS) ?

I'm not sure what you mean by manual, but if you mean add it by editing the glTF (it's just a JSON), that should be possible. Just be aware that since the spec is not ratified, it can change.