Hi to all, some problem with exported model. Everything is ok, when i export models without boolean operations, but when model is result of subtraction (made with three-csg": “^1.0.6”), model isn’t displayed at android Scene Viewer (https://arvr.google.com/scene-viewer-preview), but still displayed fine at https://gltf-viewer.donmccurdy.com/
three js version - “0.115.0”, model in attachment merged.gltf (53.9 KB)
but with the latest version 0.116.1 same result.
I see something.
maybe the problem is the android scene viewer
It looks like this is the case. The asset is also rendered fine using BabylonJS sandbox.
@seanwasere, @Mugen87, thanks for the quick answers, i’ll try to ask somebody from ‘android scene viewer’ side. I will inform.
boolean operation is nothing to do with it, simple cube created and exported with three js is not displayed too. pure cube.gltf (2.5 KB)
const meshA = new THREE.Mesh(new THREE.BoxGeometry(1,1,1));
meshA.geometry = new THREE.BufferGeometry().fromGeometry(<THREE.Geometry>meshA.geometry);
attribute color is deleted cause: [Error]
The glTF contains a vertex color, which is not supported by the Scene Viewer specification.
but if use
const meshA = new THREE.Mesh(new THREE.BoxBufferGeometry(1,1,1));
cube is displayed
cube2.gltf (2.3 KB)
@Mugen87 , Hi again, could you tell me please about indexed and non-indexed geometry. Here https://stackoverflow.com/questions/59458494/how-do-i-export-a-gltf-that-works-with-andorid-scene-viewer ‘brianpeiris’ mentions ’ that Scene Viewer also doesn’t like that the geometry is non-indexed’.
And as i wrote above, BoxGeometry is not displayed BOX.gltf (4.9 KB) , but BoxBufferGeometry is displayed fine cube2.gltf (2.3 KB)
The differences not so big, but only GLTF from BoxBufferGeometry has ‘indices’ property
is that sign of indexed geometry ?
and how i can make the BoxGeometry look like BoxBufferGeometry with indices property ?
does something similar on what i want, but simple subtract cube from cube looks no good:
Triangle.gltf (739.0 KB)
This function is unrelated to this issue.
three.js can only export
glTF assets with non-indexed geometry.
However, it was possible to do this in the past. The experimental option
forceIndices was removed from
r116 (see https://github.com/mrdoob/three.js/pull/19113). You can try to use
r115 and set
Nevertheless, this is a really an issue in the viewer and that was one reason why this option was removed from the exporter.