Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp the exporter UIs and add the missing requested export flags support #537

Closed
8 of 9 tasks
sebavan opened this issue Jun 10, 2019 · 11 comments
Closed
8 of 9 tasks

Comments

@sebavan
Copy link
Member

sebavan commented Jun 10, 2019

For both Max/Maya, redesign the exporter UIs.

This should help addressing :

All the above issues have been grouped here to simplify the development of the new UI.

Do not hesitate to add to the list.

@sebavan sebavan added this to the 4.1 milestone Jun 10, 2019
@sebavan sebavan changed the title Revamp the exporter UIs Revamp the exporter UIs and add the missing requested export flags support Jun 10, 2019
@sebavan sebavan added the working on Someone is currently working on this issue label Jun 17, 2019
@Drigax
Copy link
Contributor

Drigax commented Jul 17, 2019

#566 has been checked in, decoupling the Babylon->GLTF exporter from the 3dsMax Babylon exporter implementation.

All that's left to do for 2) is to refactor Maya's exporter to use the shared implementation.

@Drigax
Copy link
Contributor

Drigax commented Aug 16, 2019

With #593 checked in we can finally check off 2)!

@Drigax Drigax added help wanted and removed working on Someone is currently working on this issue labels Aug 21, 2019
@noalak
Copy link
Contributor

noalak commented Sep 26, 2019

I'm currently implementing a solution for the user to specify the extra material attributes in Maya (backface culling, transparency mode, max simultaneous lights and unlit).
Stay tunned for any progress!

@jamespedid
Copy link

Is custom attributes a low hanging fruit that might be able to be taken out quickly? This would provide tremendous value to me. I'd like to contribute if possible, but I don't have either 3D modeling tool.

@deltakosh
Copy link
Contributor

Hey @jamespedid ! @noalak is making a lot of progress and should be able to do a PR really soon.
Form custom attributes, help would definitely appreciated but we cannot help on the 3D modeling license unfortunately

@noalak
Copy link
Contributor

noalak commented Nov 22, 2019

We are working on the export animation only feature (#525).
This issue is related to #632.

The 3dsMax exporter is updated to have 2 extra parameters: ExportAnimations and ExportAnimationsOnly. Those parameters drive the export process in order to export only the geometry and then in another export animation(s).

Find attached an example of the resulting babylon and glTF files elf.zip.

Notice that the glTF animation files use an extension named "AnimationsOnly".
This is the only one reference to an extension, as opposed to what is discussed by @Selmar here KhronosGroup/glTF#1448.
The reuse of an animation (sampler) is supposed to be driven by the channels array according to glTF specs. So we don't see the interest of having an extension specified in each animated node. Maybe I am missing something though.
Anyway, it's a good starting point for the export process.

Now for the import process, our goal is to support the 2 following use cases:

  1. user = anyone: Drag&drop geometry file into the sandbox. Then drag&drop an animation file.
  2. user = developer: Load a geometry file using SceneLoader.Load method. Load an animation file using a new method SceneLoader.ImportAnimation.

Do you confirm the use cases ?

For that, we are planning to load the animation file as a new scene and then clone and retarget the animations to the geometry scene.
The animation scene can after be deleted or kept.
The new animations would either replace or append to previously imported animations. The sandbox would have a default behavior (replace).
The append method could either be smart in order to avoid duplication or not.

This method has the advantage of being format independant (babylon or gltf).

We just need a way to detect that the file being loaded is an animation file.
For glTF we can add an extension that would flag the scene as an animation scene.
For babylon, @deltakosh told us that the animation loading is already done. Do you have a clue on what it is ?

@Selmar
Copy link
Contributor

Selmar commented Nov 22, 2019

How do you retarget the animations? The glTF specification does not guarantee anything about uniqueness in node names. It is for this reason the target id is necessary.

Also, the animation_run.gltf you've given has this defaults and invalid data like this in the gltf, is it an older export?

      "rotation": null,
      "scale": null,

@Selmar
Copy link
Contributor

Selmar commented Nov 22, 2019

Using a target id also allows the user to completely omit the node hierarchy in the animation-only file.

That being said, we already have an implementation for the gltf animation-only export, as described in the post you referenced, perhaps it is worth pushing this upstream? @elpie89

@elpie89
Copy link
Contributor

elpie89 commented Nov 22, 2019

I will push it before the end of the day

Drigax pushed a commit that referenced this issue Nov 27, 2019
* Update layout definition system

* Fix log window size

* Update auto generated layout system

* Fix log window size in exporter form

* Export Babylon attributes for standard material (backfaceCulling, maxSimultaneousLights, unlit)
Add connection to log prints

* Add default babylon attributes automatically at runtime
Add KHR_materials_unlit checkbox

* Fix Transparency mode when exporting a standard material to glTF
Fix base color and metallic roughness textures names when exporting a standard material to glTF

* Add a babylon material node to hold all attributes
Fix diffuse and alpha textures merging when alpha is read from RGB

* Ignore babylon transparency mode value when exporting
Add Node editor (NE) templates
Update Attribute editor (AE) templates

* Export _unlit attribute for PBRMetallicRoughnessMaterial
Export alphaCutOff attribute for Masked StingrayPBS material only
Export merged color texture for Masked StingrayPBS material
Fix default color initialisation when merging textures

* Add sample files

* Move log feature to dedicated internal class
Add log level

* Fix transparencyMode and alpha for Standard and Arnold materials

* Add babylon material attributes to native materials
Export babylon material attributes

* Get arnold material opacity from dedicated attributes

* Add samples for babylon material attributes attached to native materials

* Set an unique ID for babylon attributes of an Arnold material

* //Add the user custom attributes to metadata

* // add custom user attributes in babylon and gltf for the lights, cameras, mesh and materials

* Export custom attributes from nodes and materials

* Do not export null CustomAttributes

* Add samples for custom attributes

* Export custom attributes for instances

* Add support for DoubleSided material

* Fix custom attributes retreivable

* Add alphaCutoff default value for masked materials
Fix diffuse texture bitmap loading in gltf for a standard masked material
Do not export empty metadata array for materials

* //add samples

* Add sample files for DoubleSided material
Fix nb of vertices for back face vertices

* Add alphaCutoff default value for masked materials
Fix nullable metadata cloning

* Update samples for MASK transparency mode

* Format file

* Add automatically babylon attributes to a material when created

* Export custom attributes as extras for lights in glTF
Update sample files and rename objects

* //Add the double sided export in maya
//secured the retrieval of the babylon materials

* Export lights as metadata

* Update samples

* //Fix empty extras

* Clean up

* //Upload and refresh of all the exemples

* Fix opacity color and texture retreival from Arnold material
Fix Standard material conversion when Owner is null
Add safety checks

* Update node and material names in samples

* //Add the parameters to the babylonNode shaderGraph when add manually

* Installer : Add AETemplates and NETemplates for Maya installation

* Update Installer version to 1.3.0
@Drigax
Copy link
Contributor

Drigax commented Nov 27, 2019

Completing Backface Culling, Unlit, Double Sided, Max Simulteous Lights, Custom Attributes and Transparency Mode via #668

also @sebavan lets never batch issues like this again, I don't think its terribly helpful, it just artificially improves metrics

@jamespedid
Copy link

I've noticed that the custom attributes do not export if they are defined on a set in Maya. Is it possible to extend support of custom attributes to these objects as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants