Skip to content
This repository has been archived by the owner on Oct 19, 2020. It is now read-only.

Convert scene structure to data3d #133

Open
3 of 11 tasks
ghost opened this issue Apr 23, 2018 · 3 comments
Open
3 of 11 tasks

Convert scene structure to data3d #133

ghost opened this issue Apr 23, 2018 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Apr 23, 2018

Scope

  • The scene structure is the JSON representation of a scene where the models are either expressed in parameters or linked in as gz.data3d.buffer
  • Before the models can be processed (e.g. exported as some format), they need to be converted to a 3d model in the data3d format, which looks something like this:
"meshes": {
    "foo": {
        "positions": [4,0,0,0,0,0,0,0,4,0,0,4,4,0,4,4,0,0],
        "normals": [0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0],
        "uvs": [-3.1,-8.55,-3.1,-12.55,0.9,-12.55,0.9,-12.55,0.9,-8.55,-3.1,-8.55],
        "material": "foo",
        ...
    },
   ...
}
  • The materials may need to be resolved using the default materials library
  • It's currently not possible to use the 3dio-js API in a meaningful standalone fashion

Behaviour

  • Method in 3dio-js where i can put in scene structure JSON and get data3d JSON

Implications

  • No breaking changes to existing stuff necessary

Steps

  • Separate param model resolver from aframe param model components (so called "architectural toolkit")
  • Call param model resolvers
  • Strategy for supporting "custom meshes", meaning objects that data3d meshes that are linked into the scene structure by path on S3 (update this issue when finished)
    Update: It turns out 3dio-js has functions for loading the sceneStructure from s3 bucket paths (aka "keys"). Added calls to storage.get to recursive scenestructure-to-data3d for now (scene/structure/to-data3d.js)
  • Refactor storage.get to not only work for files with data3d.buffer/json extension and file format Make storage.get work for getting any data out of s3 storage #140 ?
  • Eval if we need to flatten hierarchy and do so if necessary
  • resolve materials from standard lib and s3 paths ("keys")
  • Call utils/data3d/encode-binary
  • compile list of all material textures recursively
  • consider adding options to include furniture and other parts of the models or not (like editor)
  • Support baked models
  • Extensive testing and bugfixing to avoid breakage
@ghost ghost added the feature label Apr 23, 2018
@ghost ghost assigned frederic-schwarz and ghost Apr 23, 2018
@ghost ghost mentioned this issue Apr 23, 2018
@ghost
Copy link
Author

ghost commented Apr 23, 2018

@frederic-schwarz FYI

@ghost
Copy link
Author

ghost commented Apr 27, 2018

updated to reflect progress

@ghost
Copy link
Author

ghost commented May 31, 2018

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

No branches or pull requests

1 participant