X3D export in 2.80 does not save texture #66534

Open
opened 2019-07-07 16:18:40 +02:00 by Nigel Johnson · 19 comments

System Information
Operating system: Darwin-18.6.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro Vega 64 OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.9.26

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-04 22:24, hash: blender/blender@fdcfc263e9
Worked: (optional)

Short description of error
Need the same output as in 2.79 for uploading to Shapeways, but exporting in 2.80 does not export texture information correctly.

Exact steps for others to reproduce the error
I imported an OBJ file from my scanner software
Processed it with some booleans
Did not retexture anything that got removed
Completely flattened file (apply all modifiers and removed all other objects) because "selection only" doesn't work either (see #66533)
File -> export -> X3D
Save
Zip x3d file and png from OBJ
Upload to Shapeways
The texture is not rendered

**System Information** Operating system: Darwin-18.6.0-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro Vega 64 OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.9.26 **Blender Version** Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-04 22:24, hash: `blender/blender@fdcfc263e9` Worked: (optional) **Short description of error** Need the same output as in 2.79 for uploading to Shapeways, but exporting in 2.80 does not export texture information correctly. **Exact steps for others to reproduce the error** I imported an OBJ file from my scanner software Processed it with some booleans Did not retexture anything that got removed Completely flattened file (apply all modifiers and removed all other objects) because "selection only" doesn't work either (see #66533) File -> export -> X3D Save Zip x3d file and png from OBJ Upload to Shapeways The texture is not rendered
Author

Added subscriber: @nigeljohnson73

Added subscriber: @nigeljohnson73

Added subscriber: @MaciejJutrzenka

Added subscriber: @MaciejJutrzenka

Does it happen in 2.81?

Does it happen in 2.81?

Added subscriber: @JonasElbers

Added subscriber: @JonasElbers

Different user, but a similar end result with 2.81.

Blender Version
2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: 26bd5ebd42e3, type: Release

The material uses Principled BSDF with a texture attached. It shows up correctly inside Blender.
blenderx3d.PNG

This is the excerpt from the exported .x3d from Blender 2.81, both the ImageTexture as well as the TextureTransform tags are missing from the exported file:

...
<Appearance>
	<Material DEF="MA_Material_002"
		diffuseColor="1.000 1.000 1.000"
		specularColor="0.401 0.401 0.401"
		emissiveColor="0.000 0.000 0.000"
		ambientIntensity="0.333"
		shininess="0.098"
		transparency="0.0"
		/>
</Appearance>
...

This is the expected output as it was with 2.79:

...
<Appearance>
	<ImageTexture DEF="texture.bmp"
		url='"texture.bmp" "C:/path/to/texture.bmp"'
		/>
	<TextureTransform 
		translation="0.000000 0.000000"
		scale="1.000000 1.000000"
		rotation="0.000000"
		/>
	<Material DEF="MA_Material_002"
		diffuseColor="1.000 1.000 1.000"
		specularColor="0.401 0.401 0.401"
		emissiveColor="0.000 0.000 0.000"
		ambientIntensity="0.333"
		shininess="0.098"
		transparency="0.0"
		/>
</Appearance>
...
Different user, but a similar end result with 2.81. **Blender Version** 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: 26bd5ebd42e3, type: Release The material uses Principled BSDF with a texture attached. It shows up correctly inside Blender. ![blenderx3d.PNG](https://archive.blender.org/developer/F8169724/blenderx3d.PNG) This is the excerpt from the exported .x3d from Blender 2.81, both the ImageTexture as well as the TextureTransform tags are missing from the exported file: ``` ... <Appearance> <Material DEF="MA_Material_002" diffuseColor="1.000 1.000 1.000" specularColor="0.401 0.401 0.401" emissiveColor="0.000 0.000 0.000" ambientIntensity="0.333" shininess="0.098" transparency="0.0" /> </Appearance> ... ``` This is the expected output as it was with 2.79: ``` ... <Appearance> <ImageTexture DEF="texture.bmp" url='"texture.bmp" "C:/path/to/texture.bmp"' /> <TextureTransform translation="0.000000 0.000000" scale="1.000000 1.000000" rotation="0.000000" /> <Material DEF="MA_Material_002" diffuseColor="1.000 1.000 1.000" specularColor="0.401 0.401 0.401" emissiveColor="0.000 0.000 0.000" ambientIntensity="0.333" shininess="0.098" transparency="0.0" /> </Appearance> ... ```
Member

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Added subscriber: @brutzman

Added subscriber: @brutzman

A quick update as this remains relevant for 2.82. I have also attached simple example files for 2.79 and 2.82 and their respective x3d results.

Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: blender/blender@375c7dc4ca

x3d_texture_2.82.blend
x3d_texture_2.82.x3d

x3d_texture_2.79.blend
x3d_texture_2.79.x3d

A quick update as this remains relevant for 2.82. I have also attached simple example files for 2.79 and 2.82 and their respective x3d results. Blender Version Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: `blender/blender@375c7dc4ca` [x3d_texture_2.82.blend](https://archive.blender.org/developer/F8462844/x3d_texture_2.82.blend) [x3d_texture_2.82.x3d](https://archive.blender.org/developer/F8462847/x3d_texture_2.82.x3d) [x3d_texture_2.79.blend](https://archive.blender.org/developer/F8462845/x3d_texture_2.79.blend) [x3d_texture_2.79.x3d](https://archive.blender.org/developer/F8462846/x3d_texture_2.79.x3d)

I have had some success with integrating some of the changes from https://developer.blender.org/D7200 (lines 436ff.).
With these changes the texture file is exported as expected. I have not done a lot of testing and some parts of my changes are very likely wrong/not ideal e.g. I'm not sure what mesh_material_tex- [x] should be assigned to, repeat_x/y and rot have been commented out as a result.

diff.txt

I have had some success with integrating some of the changes from https://developer.blender.org/D7200 (lines 436ff.). With these changes the texture file is exported as expected. I have not done a lot of testing and some parts of my changes are very likely wrong/not ideal e.g. I'm not sure what mesh_material_tex- [x] should be assigned to, repeat_x/y and rot have been commented out as a result. [diff.txt](https://archive.blender.org/developer/F8462960/diff.txt)

Added subscriber: @kateler

Added subscriber: @kateler

Added subscriber: @MasterJames

Added subscriber: @MasterJames

This makes exporting to Shapeways.com with color textures impossible with Blender 2.82a. It unfortunately makes Blender an unusable toy vs game changing tool.
I'd raise the priority on this one and fix this before these kinds of embarrassments become more publicly known. It's really hard to recover from the damage they do to the respect of the CG community in general.

This makes exporting to Shapeways.com with color textures impossible with Blender 2.82a. It unfortunately makes Blender an unusable toy vs game changing tool. I'd raise the priority on this one and fix this before these kinds of embarrassments become more publicly known. It's really hard to recover from the damage they do to the respect of the CG community in general.
Member

Added subscribers: @kambi, @lichtwerk

Added subscribers: @kambi, @lichtwerk
Member

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Member

Can confirm, this was one of the lower prio TODOs when porting to 2.8, see e8da70ab73
Will have to call this a Known Issue though [it is kind of known not to be implemented....]

Hopefully someone steps up sooner than later...
Maybe @kambi is interested?

Can confirm, this was one of the lower prio TODOs when porting to 2.8, see e8da70ab73 Will have to call this a Known Issue though [it is kind of known not to be implemented....] Hopefully someone steps up sooner than later... Maybe @kambi is interested?

Added subscriber: @michalis-3

Added subscriber: @michalis-3

Hopefully someone steps up sooner than later...
Maybe @michalis-3 Kamburelis (kambi) is interested?

Not in the immediate future, I'm afraid.

Too much work, too little time :). And, while I care about X3D, I also use glTF 2.0, and practically speaking the glTF 2.0 exporter already satisfies my use-cases more.

I would be grateful to anyone that tackles this, and I can do some testing.

Note about the more distant future:

> Hopefully someone steps up sooner than later... > Maybe @michalis-3 Kamburelis (kambi) is interested? Not in the immediate future, I'm afraid. Too much work, too little time :). And, while I care about X3D, I also use glTF 2.0, and practically speaking the glTF 2.0 exporter already satisfies my use-cases more. I would be grateful to anyone that tackles this, and I can do some testing. Note about the more distant future: * The X3D exporter output can be upgraded one day to generate X3Dv4 ( https://github.com/michaliskambi/x3d-tests/wiki/X3D-version-4:-New-features-of-materials,-lights-and-textures ). X3Dv4, with PhysicalMaterial, and textures attached to "material slots" (like baseTexture, metallicRoughnessTexture), is a much closer match to Blender's concept of "Principled BSDF" materials designed using Blender nodes. * But this is a note for later. Right now my changes to introduce PhysicalMaterial to X3Dv4 are not yet even finished in X3Dv4 :)

Added subscriber: @kahseng

Added subscriber: @kahseng

A bit sad to see this issue being dragged through the Blender versions (up to 2.92.0 now) way back from 2.79.
Maybe this addon should be removed from the default installation if there is no interest/no resources available to make it work with the version it is being included in? As it stands I find it a bit misleading to see the possibility to export into the X3D format from a fresh Blender install not knowing that this addon has been broken given the lack of support for materials since it last worked in 2.79 (2017).

A bit sad to see this issue being dragged through the Blender versions (up to 2.92.0 now) way back from 2.79. Maybe this addon should be removed from the default installation if there is no interest/no resources available to make it work with the version it is being included in? As it stands I find it a bit misleading to see the possibility to export into the X3D format from a fresh Blender install not knowing that this addon has been broken given the lack of support for materials since it last worked in 2.79 (2017).
Sign in to join this conversation.
No Milestone
No project
No Assignees
10 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#66534
No description provided.