Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Blender 2.6 Bug Tracker: Browse

[#25388] Export to X3D generates texture fields in X3D file for objects which have to texture specified. *NEED MORE INFO*

Date:
2010-12-26 23:06
Priority:
3
State:
Closed
Submitted by:
John Coady (jdc)
Assigned to:
Campbell Barton (campbellbarton)
Category:
Import/Export
Status:
Fixed / Closed
Relates to:
Duplicates:
Patches:
 
Summary:
Export to X3D generates texture fields in X3D file for objects which have to texture specified. *NEED MORE INFO*
Detailed description
I performed an Export to X3D on the attached X3D file. The file contains 2 dice objects. The blend file has no texture specified for these objects but the resulting Exported X3D file contains texCoordIndex and TextureCoordinate fields for these objects filled in. Also the color field is set to all white colors which causes the dice to appear white in the X3D player, when they should be colored red.

<Color color="1.000 1.000 1.000, 1.000 1.000 1.000,

This color field is probably unnecessary since the values are all the same and it should be set to null so that the X3D player will use the material specified in the appearance node instead. According to the X3D specifications for IndexedFaceSet object,

"If the color field is NULL, the geometry shall be rendered normally using the Material and texture defined in the Appearance node"

You can find the X3D specifications here:

http://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/index.html

I think the Export to X3D should be generating the following for the Dice objects, without the texCoordIndex, TextureCoordinate and Color fields for the attached blend file.

<Transform DEF="Die_001" translation="3.026864 -0.000000 -0.026406" scale="1.000000 1.000000 1.000000" rotation="0.000001 -1.000000 0.000000 0.610865">
<Shape>
<Appearance>
<Material DEF="MA_Red" diffuseColor="0.996 0.0 0.0" specularColor="0.601 0.601 0.601" emissiveColor="0.0 0.0 0.0"
ambientIntensity="0.333" shininess="0.498" transparency="0.0" />
</Appearance>
<IndexedFaceSet solid="true" creaseAngle="0.524"
colorPerVertex="false" coordIndex="0 1 2 -1, 3 4 5 -1, 6 7 8 -1, 9 10 11 -1, 12 13 14 -1,
<Coordinate DEF="coord_Die_001"
point="0.900000 0.900000 -1.000000, 0.900000 1.000000 -0.900000, 1.000000 0.900000 -0.900000, 0.900000
</IndexedFaceSet>
</Shape>
</Transform>

I am using the latest Blender version 2.55.1 r33893

Followup

Message
  • Date: 2011-01-04 14:50
  • Sender: Campbell Barton
  • Can you attach the blend file please.
  • Date: 2011-01-04 15:16
  • Sender: John Coady
  • I have attached the blend file.
  • Date: 2011-01-04 16:31
  • Sender: Campbell Barton
  • Committed a small fix r34070.
    - no materials uses vertex colors.
    - material with Vertex Color Paint option enabled uses vertex colors.

    I don't think detecting white is really a good solution, too unpredictable, and one almost white vertex could confuse by giving totally different results.

    not exporting TextureCoordinate is a different issue, some people use x3d as an interchange format where UVs will be read into another application and could be useful.
    I think its reasonable that the user removes UVs from their model if they don't want them in the x3d file.

    closing.
 

Attached Files:

Name Date Download
Dice2a.x3d 2010-12-26 23:06 Download
Dice2.blend 2011-01-04 15:16 Download

Changes:

Field Old Value Date By
status_idOpen2011-01-04 16:31campbellbarton
close_dateNone2011-01-04 16:31campbellbarton
StatusInvestigate2011-01-04 16:31campbellbarton
File Added14374: Dice2.blend2011-01-04 15:16jdc
summaryExport to X3D generates texture fields in X3D file for objects which have to texture specified.2011-01-04 14:50campbellbarton
assigned_tonone2010-12-27 10:08ton
StatusNew2010-12-27 10:08ton
File Added14278: Dice2a.x3d2010-12-26 23:06jdc