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

Import/export improvements #573

Merged
merged 127 commits into from
May 2, 2024
Merged

Import/export improvements #573

merged 127 commits into from
May 2, 2024

Conversation

andybak
Copy link
Contributor

@andybak andybak commented Nov 27, 2023

  1. Adds an optional .glb export direct from the scene hierarchy using UnityGLTF. Brush stroke node names are changed but other than that the scene is exported as it exists in Unity at runtime
  2. Choice of which export formats are used is now controlled from the Open Brush config file (see below for format. Defaults are as shown.
  3. Platform configs still take priority (USD and FBX aren't supported on mobile etc) but experimental mode now has no effect
  4. LATK support is no longer controlled from compiler flags or platform config

Example "Export" block from the config showing defaults (ExportBinaryFbx and ExportFbxVersion are existing keys)

    "Export": {
      "ExportBinaryFbx": true,
      "ExportFbxVersion": "FBX201400",
      "Formats": {
        "fbx": true,
        "glb": true,
        "newglb": false,
        "json": false,
        "latk": false,
        "obj": true,
        "stl": false,
        "usd": false,
        "wrl": false
      }
    }
  1. Adds option to use UnityGLTF instead of GLTFast for the importer:
  "Import": {
    "UseUnityGltf": true
  }
  1. Lights in GLTF files now import correctly. Previously they had several issues.
  2. Lights in GLTF files now display a UI gizmo in the scene giving a sense of their direction and color. This will eventually be expanded to be a separate light gizmo

@mikeage mikeage added the enhancement Feature added label Nov 28, 2023
@andybak andybak marked this pull request as ready for review December 18, 2023 15:54
Copy link
Member

@mikeage mikeage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config file vs define stuff looks good; I have no opinion (or ability to form an opinion) on the actual UnityGLTF itself

@andybak andybak marked this pull request as draft January 23, 2024 13:10
@andybak andybak marked this pull request as ready for review April 12, 2024 11:44
@andybak andybak requested a review from mikeskydev April 12, 2024 11:50
@andybak andybak requested a review from mikeage April 27, 2024 12:41
Copy link
Member

@mikeage mikeage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good from my POV, but I don't really have any substantive comments about UnityGLTF itself

@andybak andybak changed the title Add optional UnityGLTF import/export Import/export improvements Apr 30, 2024
@mikeage
Copy link
Member

mikeage commented May 2, 2024

Also, prior to merging this, delete the Package cache (as well as the Library caches). I just realized I might have implied only the library caches on discord.

@mikeage
Copy link
Member

mikeage commented May 2, 2024

Assets/Scripts/ModelCatalog.cs(255,33): error CS7036: There is no argument given that corresponds to the required formal parameter 'layerIds' of 'ModelWidget.CreateModelsFromRelativePath(string, string[], TrTransform[], TrTransform[], bool[], uint[], int[])'
Assets/Scripts/ModelCatalog.cs(261,33): error CS7036: There is no argument given that corresponds to the required formal parameter 'layerIds' of 'ModelWidget.CreateModelsFromRelativePath(string, string[], TrTransform[], TrTransform[], bool[], uint[], int[])'

Side effect of #689

@andybak andybak merged commit 33c86d6 into main May 2, 2024
24 of 42 checks passed
@andybak andybak deleted the feature/unity-gltf-export branch May 2, 2024 14:34
mikeage added a commit that referenced this pull request May 2, 2024
This reverts commit 33c86d6.

It appears that this broke the loading of 3D models on the Quest
mikeage added a commit that referenced this pull request May 2, 2024
PR #573 introduced new bundles, and since they weren't signed, the DMG notarization failed.

* Explicitly sign the ktx_unity.bundle and draco_unity.bundle

* Sign all bundles in a loop, rather than listing them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants