I performed an Export to X3D of a blend file from within blender. The resulting X3D file provided TextureCoordinate and texCoordIndex data for a number of shapes but it did not provide the corresponding ImageTexture to go with the shape. For instance Export to X3D provided the following for an object in a blend scene.
<Transform DEF="basic_head" translation="2.261384 1.403721 -1.451316" scale="1.000000 1.000000 1.000000" rotation="-1.000000 0.000000 0.000000 2.035401"> <Shape> <Appearance> <Material DEF="MA_head_001" diffuseColor="0.8 0.591 0.465" specularColor="0.001 0.001 0.001" emissiveColor="0.0 0.0 0.0" ambientIntensity="0.333" shininess="0.293" transparency="0.0" /> </Appearance> <IndexedFaceSet solid="true" creaseAngle="0.524" texCoordIndex="0, 1, 2, 3, -1, 4, 5, 6, 7, -1, 8, 9, 10, 11, -1, coordIndex="1 17 3 2 -1, 4 18 1 2 -1, 3 17 15 5 -1, 16 18 4 6 -1, <Coordinate DEF="coord_basic_head" point="0.000000 -0.237473 0.048861, 0.000000 -0.247780 0.136251, 0.000000 -0.233152 0.240777, <TextureCoordinate point="0.498 0.766, 0.522 0.768, 0.564 0.816, 0.498 0.836, 0.431 0.816, 0.473 0.768, 0.498 0.766, 0.498 0.836, 0.564 0.816, </IndexedFaceSet> </Shape> </Transform>
But the ImageTexture in the Appearance node for the Shape is missing, even though the texCoordIndex and TextureCoordinate data is provided in the IndexedFaceSet for the Shape. Blender Export to X3D should be providing the ImageTexture if there is one available, something like this.
<Transform DEF="basic_head" translation="2.261384 1.403721 -1.451316" scale="1.000000 1.000000 1.000000" rotation="-1.000000 0.000000 0.000000 2.035401"> <Shape> <Appearance> <Material DEF="MA_head_001" diffuseColor="0.8 0.591 0.465" specularColor="0.001 0.001 0.001" emissiveColor="0.0 0.0 0.0" ambientIntensity="0.333" shininess="0.293" transparency="0.0" /> <ImageTexture url='"../textures/07_face.jpg"'/> </Appearance> <IndexedFaceSet solid="true" creaseAngle="0.524" texCoordIndex="0, 1, 2, 3, -1, 4, 5, 6, 7, -1, 8, 9, 10, 11, -1, coordIndex="1 17 3 2 -1, 4 18 1 2 -1, 3 17 15 5 -1, 16 18 4 6 -1, <Coordinate DEF="coord_basic_head" point="0.000000 -0.237473 0.048861, 0.000000 -0.247780 0.136251, 0.000000 -0.233152 0.240777, <TextureCoordinate point="0.498 0.766, 0.522 0.768, 0.564 0.816, 0.498 0.836, 0.431 0.816, 0.473 0.768, 0.498 0.766, 0.498 0.836, 0.564 0.816, </IndexedFaceSet> </Shape> </Transform>
Attached is the blend file to recreate this bug. It was taken from the "Blender Foundations" book in chapter 9. When you export this blend file from the latest version of blender 2.55.1 you will see that many of the IndexedFaceSet nodes contain texture information but there is no corresponding texture file specified in the corresponding Appearance node.
I am using Blender Version 2.55.1 r33646
|