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

GLTF model to check after PBR + animation integration #628

Open
skoudoro opened this issue Jul 14, 2022 · 2 comments
Open

GLTF model to check after PBR + animation integration #628

skoudoro opened this issue Jul 14, 2022 · 2 comments
Assignees
Labels
type:Bug Fix Something isn't working

Comments

@skoudoro
Copy link
Contributor

Hello @xtanion ,
While importing various models I was facing the below issues

  1. After importing the models they aren't clearly visible as you can see below (I don't know whether it is related to importing or light or something else)

    1. BoomBox:
      BoomBox

    2. BarramundiFish:
      BarramundiFish

  2. Unicode❤♻Test:
    It seems pygltflib is unable to decode the Unicode characters

Traceback (most recent call last):
  File "d:\FuryWorkspace\fury\docs\tutorials\01_introductory\viz_gltf.py", line 28, in <module>
    gltf_obj = glTF(filename, apply_normals=True)
    self.gltf = GLTF2().load(filename)
  File "D:\FuryWorkspace\fury-env\lib\site-packages\pygltflib\__init__.py", line 1102, in load
    obj = cls.load_json(fname)
  File "D:\FuryWorkspace\fury-env\lib\site-packages\pygltflib\__init__.py", line 1050, in load_json
    obj = cls.gltf_from_json(f.read())
  File "C:\Users\ganim\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 285: character maps to <undefined>
  1. Fox:
    glTF type doesn't display any model
    image
    Do we support the .glb file??
    Because when I try to import Fox in glTF-Binary tmode it throws the below error
Traceback (most recent call last):
  File "d:\FuryWorkspace\fury\docs\tutorials\01_introductory\viz_gltf.py", line 28, in <module>
    gltf_obj = glTF(filename, apply_normals=True)
  File "gltf.py", line 49, in __init__
    self.inspect_scene(0)
  File "gltf.py", line 82, in inspect_scene
    self.transverse_node(node_id, self.init_transform)
  File "gltf.py", line 120, in transverse_node
    self.load_mesh(mesh_id, next_matrix)
  File "gltf.py", line 146, in load_mesh
    vertices = self.get_acc_data(attributes.POSITION)
  File "gltf.py", line 209, in get_acc_data
    return self.get_buff_array(buff_id, d_type['dtype'], byte_length,
  File "gltf.py", line 247, in get_buff_array
    if uri.startswith('data:application/octet-stream;base64') or \
AttributeError: 'NoneType' object has no attribute 'startswith'

the uri is None. Yes, It is correct because the .glb file doesn't have any separate bin files for the buffer.

Also if we don't provide any mode to read_viz_gltf, the glTF mode isn't selected as the default.
This is because of this line in fetcher.py where you are choosing the last type, so considering file order glTF will always be at the top (in windows as per I know) than the other glTF-* type files.

I will continue to import another type of models too and let you know if I found something.

Originally posted by @ganimtron-10 in #600 (comment)

@skoudoro skoudoro added the type:Bug Fix Something isn't working label Jul 14, 2022
@chisarie
Copy link

Hello! It seems that this issue is caused by missing lights. Is there any plans to add lighting to the current Fury API?
One could take inspiration from the API structure of the pyrender project: https://pyrender.readthedocs.io/en/latest/api/index.html#lighting

@skoudoro
Copy link
Contributor Author

Hi @chisarie,

Yes, we plan to add different lighting but by default, there is a light so that why the result is strange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Fix Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants