Material missing on X3D export #69115

Open
opened 2019-08-24 10:47:23 +02:00 by J. Scherich · 13 comments

System Information
Operating system: Linux
Graphics card:

Blender Version
Broken:
$ blender --version
Blender 2.80 (sub 75)
build date: 2019-07-29
build time: 17:17:04
build commit date: 2019-07-29
build commit time: 14:47
build hash: f6cb5f54494e
build platform: Linux
build type: Release
...

Short description of error
Material missing on X3D export
Exact steps for others to reproduce the error
When i import

https://wdune.ourproject.org/examples/in.x3d

i get

https://wdune.ourproject.org/examples/out.blend

when i export this to X3D i get

https://wdune.ourproject.org/examples/out.x3d

This file do not have a X3D "Material" node, it is shown full white in a X3D viewer
(freewrl. white_dune or view3dscene).
If you manual add a Material node , it is show in a gray color, similar as it is shown in blender.

**System Information** Operating system: Linux Graphics card: **Blender Version** Broken: $ blender --version Blender 2.80 (sub 75) build date: 2019-07-29 build time: 17:17:04 build commit date: 2019-07-29 build commit time: 14:47 build hash: f6cb5f54494e build platform: Linux build type: Release ... **Short description of error** Material missing on X3D export **Exact steps for others to reproduce the error** When i import https://wdune.ourproject.org/examples/in.x3d i get https://wdune.ourproject.org/examples/out.blend when i export this to X3D i get https://wdune.ourproject.org/examples/out.x3d This file do not have a X3D "Material" node, it is shown full white in a X3D viewer (freewrl. white_dune or view3dscene). If you manual add a Material node , it is show in a gray color, similar as it is shown in blender.
Author

Added subscriber: @mufti11

Added subscriber: @mufti11

blender/blender#86115 was marked as duplicate of this issue

blender/blender#86115 was marked as duplicate of this issue

Added subscriber: @dark999

Added subscriber: @dark999

Can you upload directly here attached files (drag and drop or use cloud icon to upload from OS)? external link will can broke in future, thus this report will be unusable

IMO this is a function request not a bug, Blender 2.79 and 2.80 .x3d export addon not export materials (as designed?), in 2.81 import and export addons i had a error

Can you upload directly here attached files (drag and drop or use cloud icon to upload from OS)? external link will can broke in future, thus this report will be unusable IMO this is a function request not a bug, Blender 2.79 and 2.80 .x3d export addon not export materials (as designed?), in 2.81 import and export addons i had a error
Author

Uploaded in.x3d

in.x3d

Uploaded blend file

out.blend

Uploaded X3D output

out.x3d

If i directly export the default box to X3D in blnder 2.79, i t gets a Material node.

out2.x3d

Uploaded in.x3d [in.x3d](https://archive.blender.org/developer/F7701735/in.x3d) Uploaded blend file [out.blend](https://archive.blender.org/developer/F7701738/out.blend) Uploaded X3D output [out.x3d](https://archive.blender.org/developer/F7701742/out.x3d) If i directly export the default box to X3D in blnder 2.79, i t gets a Material node. [out2.x3d](https://archive.blender.org/developer/F7701750/out2.x3d)

Added subscriber: @brutzman

Added subscriber: @brutzman
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

#66534 (X3D export in 2.80 does not save texture) is related

#66534 (X3D export in 2.80 does not save texture) is related

Added subscriber: @kahseng

Added subscriber: @kahseng

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Currently the X3D exporter doesn't handle node based materials at all. Since this ticket has already been marked as a known limitation, I'm setting this ticket to confirmed. Additionally, the H3D Extensions (EXPORT_SCENE_OT_x3d.use_h3d) that was apparently used to previously save shaders is broken. The add-on hasn't been properly update for 2.8x and later as it attempts to use functions that are no longer part of the gpu module.

I've tested this with the current master (2.92).

Traceback (most recent call last):

File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\io_scene_x3d_init_.py", line 240, in execute
return export_x3d.save(context, **keywords)
File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\io_scene_x3d\export_x3d.py", line 1605, in save
name_decorations=name_decorations,
File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\io_scene_x3d\export_x3d.py", line 299, in export
gpu_shader_cache[None] = gpu.export_shader(scene, gpu_shader_dummy_mat)

AttributeError: module 'gpu' has no attribute 'export_shader'

location: <unknown location>:-1
Currently the X3D exporter doesn't handle node based materials at all. Since this ticket has already been marked as a known limitation, I'm setting this ticket to confirmed. Additionally, the H3D Extensions (`EXPORT_SCENE_OT_x3d.use_h3d`) that was apparently used to previously save shaders is broken. The add-on hasn't been properly update for 2.8x and later as it attempts to use functions that are no longer part of the `gpu` module. I've tested this with the current master (2.92). ```lines Traceback (most recent call last): ``` File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\io_scene_x3d\__init__.py", line 240, in execute return export_x3d.save(context, **keywords) File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\io_scene_x3d\export_x3d.py", line 1605, in save name_decorations=name_decorations, File "Z:\01_git\01_contribution\blender-git\build_windows_Full_x64_vc16_Debug\bin\Debug\2.92\scripts\addons\io_scene_x3d\export_x3d.py", line 299, in export gpu_shader_cache[None] = gpu.export_shader(scene, gpu_shader_dummy_mat) ``` AttributeError: module 'gpu' has no attribute 'export_shader' location: <unknown location>:-1 ```
Member

Added subscriber: @Msk610

Added subscriber: @Msk610
Sign in to join this conversation.
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#69115
No description provided.