Closed Amoki closed 3 years ago
Could I get that model to debug with?
Sent in private!
I haven't been able to reproduce this bug, at least using this viewer setup: https://gist.github.com/xeolabs/8047d833b2699098ff251868053a556c
Could you post a minimal HTML page that shows this issue?
I just retried on commit (https://github.com/xeokit/xeokit-sdk/commit/cbde67749e34242259d046d02e8a43eac51794d1) with the following code and the bug is still here:
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
</head>
<body>
<div>
<canvas id="app" style="height: 100vh;width: 100vw"></canvas>
</div>
<script type="module">
import { Viewer } from "./node_modules/@xeokit/xeokit-sdk/src/viewer/Viewer.js";
import {ViewCullPlugin} from "./node_modules/@xeokit/xeokit-sdk/src/plugins/ViewCullPlugin/ViewCullPlugin.js";
import { XKTLoaderPlugin } from "./node_modules/@xeokit/xeokit-sdk/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js";
const viewer = new Viewer({
canvasId: "app",
transparent: true
});
new ViewCullPlugin(viewer, {
maxTreeDepth: 20
});
const xktLoader = new XKTLoaderPlugin(viewer);
const model = xktLoader.load({
src: "./model.xkt",
edges: true,
});
model.once("loaded", () => viewer.cameraFlight.flyTo(model));
</script>
</body>
</html>
I found the reason :-
After hacking the renderer to disabler backface culling, the faces appear:
We don't want to enable backfaces to work around these kinds of meshes - it would reduce rendering performance too much.
Some faces aren't shown when they should be.