[TODO] Open bugs and tasks from blender/blender-addons #8

Open
opened 2024-08-06 23:47:36 +02:00 by Cedric Steiert · 2 comments
Collaborator

In the old https://projects.blender.org/blender/blender-addons repository are still some open bug reports and feature requests. Even though a lot of them count as known limitation by now, it would be great to get them resolved sometime in the future as at least some users seem to rely on those buggy or missing features.

So to sumarize i'll dump the old open reports here to the new repository for keeping them all in one place collected as low priority TODOs.
To any readers: feel free to propose a PR with a fix for any of them. For other bugs than those listed here please create a new report in this repo.

The below listed tasks got tested with blender 4.2 with addon version 2.3.4 (August 2024).

WRL

confirmed:

  • blender/blender-addons#104505: try to load WRL-File Python: Traceback ( most recent call last:)
    (note: fixed by changes on vertex color loading by Hombre)
  • blender/blender-addons#49799: X3D .wrl file import failure
    (colors partially missing and throws KeyError exception)
    see comment below for discussion details
  • blender/blender-addons#102090: Web3D X3D/VRML2 Boxes inside-out
    (inverted/inside normals instead of outside (compare attached cube to default cube))
  • blender/blender-addons#101959: Web3D X3D: TextureTransform rotations in wrong direction
    (image texture rotated counterclockwise -> rotate uv vector by 180° around Z-axis to solve; info: image and wrl need to be in the same directory; compare to view inside freeWRL)

needs triage/investigation:

  • blender/blender-addons#102195: Web3D VRML/X3D: Solid FALSE not recognized
    (a hacky fix exists already, test and validate that before creating another solution to ensure rendering of all faces when backface culling is enabled; edit: only a viewport issue, not for rendering, thus add a import option called "solidify", if checked use a user defined value as input for solifiy modifier for all objects in file)

X3D

confirmed:

  • blender/blender-addons#95365: x3d import fails for test file with geometry ElevationGrid
    (throws NameError: name 'uv' is not defined)
  • blender/blender-addons#69115: Material missing on X3D export
    (#34: x3d exporter does not save the data of material nodes, like e.g. the base color of principled bsdf shader. Seems like in blender 2.79 h3d export was for that, but now that ain't working. However we could access the values directly over blender api...)
  • blender/blender-addons#66534: X3D export in 2.80 does not save texture
    (#34: x3d exporter does not save data of the image texture node, this was never implemented, thus a feature; related to blender/blender-addons#69115)
  • blender/blender-addons#79991: Export of .x3d files with H3D extensions not working
    (enabling H3D extensions on export throws AttributeError: module 'gpu' has no attribute 'export_shader' due to new blender API; diabled for now)

needs triage/investigation:

  • blender/blender-addons#104437: X3D exports wrong normals
    (probably a feature request regarding normals export)
  • blender/blender-addons#51865: Add generic precision option for text-based formats exporters (e.g. X3D, OBJ...)
    (Feature request: Add generic precision to x3d and obj exporter; check if still relevant and why and if it's possible)
In the old https://projects.blender.org/blender/blender-addons repository are still some open bug reports and feature requests. Even though a lot of them count as known limitation by now, it would be great to get them resolved sometime in the future as at least some users seem to rely on those buggy or missing features. So to sumarize i'll dump the old open reports here to the new repository for keeping them all in one place collected as low priority TODOs. _To any readers: feel free to propose a PR with a fix for any of them. For other bugs than those listed here please create a new report in this repo._ The below listed tasks got tested with `blender 4.2` with addon version `2.3.4` (August 2024). ### WRL **confirmed:** - [x] **blender/blender-addons#104505: try to load WRL-File Python: Traceback ( most recent call last:)** (note: fixed by changes on vertex color loading by Hombre) - [ ] **blender/blender-addons#49799: X3D .wrl file import failure** (colors partially missing and throws `KeyError` exception) see comment below for discussion details - [x] **blender/blender-addons#102090: Web3D X3D/VRML2 Boxes inside-out** (inverted/inside normals instead of outside (compare attached cube to default cube)) - [x] **blender/blender-addons#101959: Web3D X3D: TextureTransform rotations in wrong direction** (image texture rotated counterclockwise -> rotate uv vector by 180° around Z-axis to solve; info: image and wrl need to be in the same directory; compare to view inside freeWRL) **needs triage/investigation:** - [x] **blender/blender-addons#102195: Web3D VRML/X3D: Solid FALSE not recognized** (a hacky fix exists already, test and validate that before creating another solution to ensure rendering of all faces when backface culling is enabled; edit: only a viewport issue, not for rendering, thus add a import option called "solidify", if checked use a user defined value as input for solifiy modifier for all objects in file) ### X3D **confirmed:** - [x] **blender/blender-addons#95365: x3d import fails for test file with geometry ElevationGrid** (throws `NameError: name 'uv' is not defined`) - [ ] **blender/blender-addons#69115: Material missing on X3D export** (#34: x3d exporter does not save the data of material nodes, like e.g. the base color of principled bsdf shader. Seems like in blender 2.79 h3d export was for that, but now that ain't working. However we could access the values directly over blender api...) - [ ] **blender/blender-addons#66534: X3D export in 2.80 does not save texture** (#34: x3d exporter does not save data of the image texture node, this was never implemented, thus a feature; related to https://projects.blender.org/blender/blender-addons/issues/69115) - [ ] **blender/blender-addons#79991: Export of .x3d files with H3D extensions not working** (enabling H3D extensions on export throws `AttributeError: module 'gpu' has no attribute 'export_shader'` due to new blender API; diabled for now) **needs triage/investigation:** - [ ] **blender/blender-addons#104437: X3D exports wrong normals** (probably a feature request regarding normals export) - [ ] **blender/blender-addons#51865: Add generic precision option for text-based formats exporters (e.g. X3D, OBJ...)** (Feature request: Add generic precision to x3d and obj exporter; check if still relevant and why and if it's possible)
Cedric Steiert added the
bug
confirmed
task
known issue
Normal
labels 2024-08-08 17:38:40 +02:00
Author
Collaborator

661.wrl: Keyerror _3 for specific DEF/USE

attached file is from original report.

Python: Traceback (most recent call last): KeyError: '_3'

error message for addon version 2.4.0:

Python: Traceback (most recent call last):
  File "__init__.py", line 135, in execute
    return import_x3d.load(context, **keywords)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 4093, in load
    load_web3d(context, file,
  File "import_x3d.py", line 3955, in load_web3d
    root_node, msg = vrml_parse(filepath)
                     ^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 1334, in vrml_parse
    root.parse(0)
  File "import_x3d.py", line 964, in parse
    new_i = self.__parse(i, IS_PROTO_DATA)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 1178, in __parse
    i = child.parse(i)
        ^^^^^^^^^^^^^^
  File "import_x3d.py", line 964, in parse
    new_i = self.__parse(i, IS_PROTO_DATA)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 1178, in __parse
    i = child.parse(i)
        ^^^^^^^^^^^^^^
  File "import_x3d.py", line 964, in parse
    new_i = self.__parse(i, IS_PROTO_DATA)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 1178, in __parse
    i = child.parse(i)
        ^^^^^^^^^^^^^^
  File "import_x3d.py", line 964, in parse
    new_i = self.__parse(i, IS_PROTO_DATA)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 1178, in __parse
    i = child.parse(i)
        ^^^^^^^^^^^^^^
  File "import_x3d.py", line 964, in parse
    new_i = self.__parse(i, IS_PROTO_DATA)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "import_x3d.py", line 1106, in __parse
    self.reference = self.getDefDict()[key]
                     ~~~~~~~~~~~~~~~~~^^^^^
KeyError: '_3'

the keyerror is caused by these lines in 661.wrl:

  • 523: Definition of _3: Transform{translation -0.9708 -1.358 -0.4028 scale .425 .425 .425 children[Shape{geometry USE _0 appearance DEF _3 Appearance{material Material{diffuseColor .566 .566 .566 transparency 0}}}]}. Apparently the importer does not like inline defs?
  • 694: Use of _3: appearance USE _3 }]}
  • 850: Use of _3: appearance USE _3 }]}

It appears, that inline DEFs (used in context, when something else is in front) can only be used inline as well, not solely like in lines 694 & 850. Maybe (not yet tested) it's caused by the context used itself, as both buggy occurencies have a more complex structure than usual (USE inside of DEF), which could result in USE not getting replaced like it should.
However, adding \n (to make it stand alone) infront of the DEF block in line 523 results in no error: Transform{translation -0.9708 -1.358 -0.4028 scale .425 .425 .425 children[Shape{geometry USE _0 \nappearance DEF _3 Appearance{material Material{diffuseColor .566 .566 .566 transparency 0}}}]}.
However that tbh can't be an actual solution, thus investigation on the code is needed on why this behviour occurs.

952.wrl: Partially missing colors

attached file is from original report.

Here are the colors of half of the mesh missing.

Expected vs. result

grafik
grafik

I assume that here some USEs don't get resolved/applied correctly, thus missing colors (Appearance). Looking at the file structure it appears, that DEF/USE of reused DEFs gets discarded (as in nesting DEF/USE is not supported); if so it is linked to above issue and requires investigation and fixing.

### `661.wrl`: Keyerror _3 for specific DEF/USE _attached file is from original report._ <details> <summary>Python: Traceback (most recent call last): KeyError: '_3'</summary> error message for addon version 2.4.0: ``` Python: Traceback (most recent call last): File "__init__.py", line 135, in execute return import_x3d.load(context, **keywords) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 4093, in load load_web3d(context, file, File "import_x3d.py", line 3955, in load_web3d root_node, msg = vrml_parse(filepath) ^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 1334, in vrml_parse root.parse(0) File "import_x3d.py", line 964, in parse new_i = self.__parse(i, IS_PROTO_DATA) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 1178, in __parse i = child.parse(i) ^^^^^^^^^^^^^^ File "import_x3d.py", line 964, in parse new_i = self.__parse(i, IS_PROTO_DATA) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 1178, in __parse i = child.parse(i) ^^^^^^^^^^^^^^ File "import_x3d.py", line 964, in parse new_i = self.__parse(i, IS_PROTO_DATA) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 1178, in __parse i = child.parse(i) ^^^^^^^^^^^^^^ File "import_x3d.py", line 964, in parse new_i = self.__parse(i, IS_PROTO_DATA) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 1178, in __parse i = child.parse(i) ^^^^^^^^^^^^^^ File "import_x3d.py", line 964, in parse new_i = self.__parse(i, IS_PROTO_DATA) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "import_x3d.py", line 1106, in __parse self.reference = self.getDefDict()[key] ~~~~~~~~~~~~~~~~~^^^^^ KeyError: '_3' ``` </details> the keyerror is caused by these lines in `661.wrl`: - 523: Definition of _3: `Transform{translation -0.9708 -1.358 -0.4028 scale .425 .425 .425 children[Shape{geometry USE _0 appearance DEF _3 Appearance{material Material{diffuseColor .566 .566 .566 transparency 0}}}]}`. Apparently the importer does not like inline defs? - 694: Use of _3: `appearance USE _3 }]}` - 850: Use of _3: `appearance USE _3 }]}` It appears, that inline `DEF`s (used in context, when something else is in front) can only be used inline as well, not solely like in lines 694 & 850. Maybe (not yet tested) it's caused by the context used itself, as both buggy occurencies have a more complex structure than usual (USE inside of DEF), which could result in USE not getting replaced like it should. However, adding `\n` (to make it stand alone) infront of the DEF block in line 523 results in no error: `Transform{translation -0.9708 -1.358 -0.4028 scale .425 .425 .425 children[Shape{geometry USE _0 \nappearance DEF _3 Appearance{material Material{diffuseColor .566 .566 .566 transparency 0}}}]}`. However that tbh can't be an actual solution, thus investigation on the code is needed on why this behviour occurs. ### `952.wrl`: Partially missing colors _attached file is from original report._ Here are the colors of half of the mesh missing. <details> <summary>Expected vs. result</summary> ![grafik](/attachments/5a72400d-631d-4de7-919f-408359a2fbba) ![grafik](/attachments/eb8bc418-2e47-4d92-9649-e1b54c407a18) </details> I assume that here some `USE`s don't get resolved/applied correctly, thus missing colors (Appearance). Looking at the file structure it appears, that DEF/USE of reused DEFs gets discarded (as in nesting DEF/USE is not supported); if so it is linked to above issue and requires investigation and fixing.
Author
Collaborator

H3D Extensions (GLSL Shadercode)

The old way of converting complex node setups to glsl ain't working no more, so...

I propose to create two new options:

  • Use blender shader code: If i reasearched correctly the internal glsl shader code gets saved temporarily to disk when in debug mode, this will require the user to launch blender in that mode to work
  • Translate nodes: There are some basic translation tools, like https://github.com/Bentschi/Blender-GLSL-translator, check them, see what they do and if they're still working. Maybe somewhat can be used to create our own shader code.
### H3D Extensions (GLSL Shadercode) The old way of converting complex node setups to glsl ain't working no more, so... I propose to create two new options: - Use blender shader code: If i reasearched correctly the internal glsl shader code gets saved temporarily to disk when in debug mode, this will require the user to launch blender in that mode to work - Translate nodes: There are some basic translation tools, like https://github.com/Bentschi/Blender-GLSL-translator, check them, see what they do and if they're still working. Maybe somewhat can be used to create our own shader code.
Sign in to join this conversation.
No description provided.