castle-engine/castle-model-viewer

For X3D 4.0, fields have changed, per Holger. Fixes needed for tovrmlx3d.

Closed this issue · 1 comments

"As it turn out you have set X3D version of FlowerProto file, to 4.0, but the file contains a ComposedCubeMapTexture. In X3D4.0 there are changes in the field names to this texture, see:

https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/environmentalTexturing.html#ComposedCubeMapTexture

Either go back to 3.3 or do changes the field names." -- Holger Seelig

I'm going to check if I posted this to the right place, brb.

$ ~/Downloads/view3dscene-4.3.0-win64-x86_64/view3dscene/tovrmlx3d.exe --validate ball.x3d
tovrmlx3d: Warning: X3D: Unknown X3D field name (indicated by containerField value) "backTexture" by node "ImageTexture" inside node "ComposedCubeMapTexture"
tovrmlx3d: Warning: X3D: Unknown X3D field name (indicated by containerField value) "bottomTexture" by node "ImageTexture" inside node "ComposedCubeMapTexture"
tovrmlx3d: Warning: X3D: Unknown X3D field name (indicated by containerField value) "frontTexture" by node "ImageTexture" inside node "ComposedCubeMapTexture"
tovrmlx3d: Warning: X3D: Unknown X3D field name (indicated by containerField value) "leftTexture" by node "ImageTexture" inside node "ComposedCubeMapTexture"
tovrmlx3d: Warning: X3D: Unknown X3D field name (indicated by containerField value) "rightTexture" by node "ImageTexture" inside node "ComposedCubeMapTexture"
tovrmlx3d: Warning: X3D: Unknown X3D field name (indicated by containerField value) "topTexture" by node "ImageTexture" inside node "ComposedCubeMapTexture"
Exception "Exception":
Validation failed (consult the warnings above), exiting with non-zero status

Thanks, fixed, tested on https://github.com/castle-engine/demo-models/blob/master/cube_environment_mapping/cubemap_composed_x3d4_names.x3dv .

CGE/view3dscene will for now accept both field names in X3D >= 4.0 (back or backTexture). For older X3D versions, only the older names are valid. (We could change it in the future to be even more tolerant, based on user reports.)

As usual, please give Jenkins a few hours and then the "snapshot" version from https://castle-engine.io/view3dscene.php will contain this fix.