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

WIP: add GTLFReader #2479

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

WIP: add GTLFReader #2479

wants to merge 1 commit into from

Conversation

daker
Copy link
Collaborator

@daker daker commented Jun 14, 2022

Context

This is a draft PR, a starting point to learn what's missing to render the GLTF correctly

Results

  • What versions of glTF format should we support? (both or just 2.0 ?)
  • Load glTF (.gltf) with separate resources: .bin (geometry, animation, skins) and .jpg or .png image files
  • Load glTF (.gltf) with embedded resources (as Data URIs)
  • Load glTF geometry compressed with the Draco library
  • Load binary glTF (.glb) using the binary container format
  • Handle animations loading
  • Handle skins loading
  • Handle lights loading
  • Extensions support? what is the minimal set of extensions to support?
  • ORM Texture support in vtk.js ([Feature] Add for support for combined ORM Texture #2961)

Changes

  • Documentation and TypeScript definitions were updated to match those changes

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

@daker

This comment was marked as resolved.

@supriome
Copy link

supriome commented Jul 7, 2022

Hi @daker , Any progress there?

@daker

This comment was marked as resolved.

@floryst floryst moved this from To do to Paused in vtk.js roadmap Sep 8, 2022
@jourdain
Copy link
Collaborator

Hi @daker,

I may start looking into it. Do you have a feel of how much more work needs to go into it?
Does your code mostly work but fails in some use cases? Basically I just want to have a feel on what kind of help you are looking for knowing that I'm looking for a glb loader...

Do you think we can reformat/rebase and merge it in its current state, or would it be better to work on the same branch until X and Y are solved? If so, knowing what X and Y are would be great.

Thanks for your hard work pushing vtk.js forward,

Seb

@daker
Copy link
Collaborator Author

daker commented Sep 14, 2022

I have updated the description with a list of questions/features to be addressed. Basically the loader is able to parse the gltf with simple embedded resources like the box or colored box.

As you can see on the images, there is something missing in the code to render those boxes correctly, @finetjul told me that faces/cells do not seem to be made of the right point ids, i am not good on this part.

#210 (comment)

My idea is to have a simple SceneLoader that will act like this :
Scene[$sceneId] -> Nodes -> Node -> Actors -> Actor (load texture and apply materials)-> Add the actor to the renderer

I would suggest to work on a branch, once we have a basic SceneLoader with basic parsing and rendering then we can merge and iterate over with adding animations and extensions depending on what we have decided.

@jourdain
Copy link
Collaborator

Sounds good, thanks for the update.

@daker
Copy link
Collaborator Author

daker commented Dec 4, 2023

@jourdain I am back working on this, i made some very good progress, no animation, lights , cameras, skins, morph or extensions so far

The ORM textures are slow to display since they are computed(using canvas) by extracting the channels from a the combined texture, this should be done by the GPU like in vtk c++ by providing a setORMTexture (FYI @martinken)

screen-capture.2.webm

@jourdain
Copy link
Collaborator

jourdain commented Dec 4, 2023

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

Successfully merging this pull request may close these issues.

None yet

3 participants