Closed stefaniapedrazzi closed 5 years ago
The fix should probably target R2019b instead, because it may have consequences for the users to fix the Webots mapping. Is this true?
Yes, i will target 2019b. I don't think that users will have to change anything in the texture mapping, but sensors can behave slightly differently.
The mismatch comes from the different triangulation of the sphere:
The WREN implementation (icosphere) is probably better as all the triangles are about the same size. But it doesn't match the sphere (uv sphere) used by X3D (x3dom) and THREE.js.
I checked in Blender and both primitives UV Sphere
and Icosphere
are available.
If we want to keep the icosphere, then we have to export it as IndexedFaceSet and not as a Sphere geometry.
Yes, let's do this: export our Sphere primitive as mesh for THREE.js.
Linked to #254
During the meeting we discussed to add a flag to the Sphere node specifying if the mapping/triangulation type: icosphere or uv-sphere.
The flag could be called "uv" or "ico"
I have a small preference for "ico".
THREEjs has the IcosahedronGeometry
that corresponds to the icosphere.
So we could maybe use the Sphere node when exporting to x3d (not VRML) instead of the IndexedFaceSet.
Fixed in #407
Describe the Bug The texture mapping for a sphere displayed in Webots doesn't match the X3D texture mapping.
Steps to Reproduce
Expected behavior The sphere texture mapping in WREN should match the X3D one.
Screenshots Webots:
x3dom:
view3dscene:
![textured_shapes_view3dscene](https://user-images.githubusercontent.com/5910449/54345793-0d843780-4644-11e9-927f-a5d24b83fd6d.png)