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

OMI_ref #85

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

OMI_ref #85

wants to merge 1 commit into from

Conversation

robertlong
Copy link
Member

@robertlong robertlong commented May 19, 2022

@mrmetaverse
Copy link
Member

Practical and super interesting. Curious, could this afford us something like crafting?

@robertlong
Copy link
Member Author

@humbletim stated that node refs should be able to specify a bounding box for the object to fit within. Kinda like <image width="w" height="h" />

@robertlong
Copy link
Member Author

robertlong commented Jun 2, 2022

Yinch and Lyuma requested that nodes be able to load fallbacks for progressive loading.

We need to handle recursion. Either by allowing it with a max depth or disallowing it entirely.

So long as there's no actual cycles recursion should be allowed. Ex. nodes cannot reference themselves but a node can reference another object within it's own document.

@expenses
Copy link

expenses commented Jun 7, 2022

Cool, I like this a lot! I've implemented something similar for https://github.com/expenses/mateversum. Here's an example: https://github.com/expenses/mateversum/blob/master/web/sponza_with_mirror.json

Some things that would be important to me:

  • As well as a 3-dimensional translation field, I'd be great to have a scalar scale field and a rotation field of some kind. As these files would ideally be human-writable, I think that an euler rotation makes the most sense, with each field being a value in degrees. These can be transformed to quaternions after being loaded.
  • I'm not sure if there's a way to specify this in gltf already, but it'd be nice to have a way to specify 'global' textures. Because I'm doing Image Based Lighting (IBL) I want to specify a diffuse cubemap, a specular cubemap and a GGX lookup table.

@madjin
Copy link
Member

madjin commented Jul 14, 2022

Noice, I made a quick example of a Sponza + mirror in Webaverse to compare with (https://github.com/madjin/sponza)
brave_Aef78WvpQ8
More docs on Webaverse scenes: https://docs.webaverse.com/docs/engineering/app/scene/scene-file-quickstart

{
  "objects": [
    {
      "type": "application/light",
      "content": {
        "lightType": "ambient",
        "args": [[255, 255, 255], 2]
      }
    },
    {
      "type": "application/light",
      "content": {
        "lightType": "directional",
        "args": [[255, 255, 255], 2],
        "position": [1, 2, 3]
      }
    },
    {
      "position": [
        0,
        0,
        0
      ],
      "start_url": "https://madjin.github.io/sponza/glTF/Sponza.glb"
    },
    {
      "position": [
        0,
        0,
        -2
      ],
      "start_url": "https://webaverse.github.io/mirror/"
    }
  ]
}

More about Webaverse here: https://github.com/webaverse

@humbletim
Copy link
Contributor

here are a few links to existing "JSON scene dialects" found in the wild.

(hoping we can compare/contrast some of these at a next meeting to help determine which use cases fall in or out of scope of OMI_ref)

@robertlong
Copy link
Member Author

Awesome list! Thanks @humbletim! Can people try to take a look over these by next meeting? We can also go over them then.

@madjin
Copy link
Member

madjin commented Jul 31, 2022

This topic reminds me of A's presentation at a recent M3 demo day: M3 Mixer: A on Metaverse Clipboard
image

Text is the most portable data format. A shows demo of a webxr editor where he spawns cubes, ctrl-c to copy, then ctrl-v to paste in another webxr app. Metaphor for lowest friction interop between programs being the clipboard.

image
View on sketchfab: https://sketchfab.com/3d-models/a-presentation-be95c13d41104bffa84f815c6d6d4d53

@gm3
Copy link

gm3 commented Aug 17, 2022

Great list of metadata examples! Will take a look, cheers!

@humbletim
Copy link
Contributor

@robertlong mentioned discovering Khronos/gLXF (spec currently being drafted)

example of .glxf JSON file:

{
    "asset": {
        "version": 2.0,
        "experience": true
    },
    "assets": [
        {
            "name": "Soccer Player",
            "uri": "soccer_player.gltf",
            "scene": "player"
        },
        {
            "name": "Ball",
            "uri": "ball.gltf",
            "nodes": [ "ball" ],
            "transform": "none"
        }
    ],
    "nodes": [
        {
            "name": "Root Node",
            "children": [ 1, 2 ]
        },
        {
            "name": "Soccer Player Node",
            "asset": 0,
            "translation": [ 0, 0, 0 ]
        },
        {
            "name": "Soccer Ball Node",
            "asset": 1,
            "translation": [ -10, 0, 35 ]
        },
        {
            "name": "Ball Destination Node",
            "translation": [ 51, 0, 80 ]
        },
        {
            "name": "Ball Origin Node",
            "translation": [ -10, 0, 35 ]
        }
    ]
}

@humbletim
Copy link
Contributor

humbletim commented Sep 26, 2022

another interesting example that supports referring to specific named nodes in an external resource.

...
    "name": "Scene.json",
    "objects": [
        {
            "data_ref": "mesh_Cube.json/Cube",
            "dimensions": [
                2.0,
...

@robertlong robertlong marked this pull request as draft January 5, 2023 23:32
@robertlong
Copy link
Member Author

I'm no longer working on this spec and it needs another champion to continue.

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

Successfully merging this pull request may close these issues.

7 participants