NASA-AMMOS / 3DTilesRendererJS

Renderer for 3D Tiles in Javascript using three.js
https://nasa-ammos.github.io/3DTilesRendererJS/example/bundle/mars.html
Apache License 2.0
1.47k stars 266 forks source link

It seems that LOD is not supported? #543

Closed bbhxwl closed 2 months ago

bbhxwl commented 2 months ago

It seems that LOD is not supported?

gkjohnson commented 2 months ago

You haven't provided any information about your asking about. Is what not supported? All of 3D Tiles is an LoD system.

bbhxwl commented 2 months ago

You haven't provided any information about your asking about. Is what not supported? All of 3D Tiles is an LoD system.

I tested the model I exported using cesiumlab, but it doesn't display properly. I don't know the reason. You can load it using the 3D tiles in your demo.

gkjohnson commented 2 months ago

Without an example model and code or any other information about what warnings or errors or extensions are used there's nothing that can be done. You can see the Feature Complete Milestone for more information on features that aren't yet available.

bbhxwl commented 2 months ago

Without an example model and code or any other information about what warnings or errors or extensions are used there's nothing that can be done. You can see the Feature Complete Milestone for more information on features that aren't yet available.

There were no errors or warnings, he just didn't load the b3DM file

<script setup lang="ts">
import * as THREE from "three"
import {PerspectiveCamera, Scene, Vector2, WebGLRenderer} from "three";
//定义拖动旋转
import {OrbitControls} from "three/examples/jsm/controls/OrbitControls.js"
import { TilesRenderer } from '3d-tiles-renderer';

let scene:Scene;
let camera:PerspectiveCamera;
let renderer:WebGLRenderer;
const viewportSize = new Vector2();
let tilesRenderer:TilesRenderer;
const div=ref<HTMLElement>()

onMounted(()=>{
  if(!div.value)return
  scene= new THREE.Scene();
  viewportSize.set(div.value.clientWidth, div.value.clientHeight);
  camera=new THREE.PerspectiveCamera(75,div.value?.clientWidth/div.value?.clientHeight,0.1,1000);
  renderer = new THREE.WebGLRenderer();
  renderer.setSize(div.value.clientWidth, div.value.clientHeight);
  div.value.appendChild(renderer.domElement);
  const controls = new OrbitControls(camera, renderer.domElement);
  camera.position.z = 5;
  camera.position.y = 5;

  tilesRenderer = new TilesRenderer( './3d/tileset.json' );
  tilesRenderer.setCamera( camera );
  tilesRenderer.setResolutionFromRenderer( camera, renderer );
  scene.add( tilesRenderer.group );

  function renderLoop() {
    controls.update()
    tilesRenderer.update();
    renderer.render( scene, camera );
    requestAnimationFrame(renderLoop);
  }
  renderLoop();

})
</script>

<template>
<div class="w-full h-full" ref="div"></div>
</template>

<style scoped>

</style>

image