当前位置:网站首页>Cesium loading 3D tiles model
Cesium loading 3D tiles model
2022-06-22 06:47:00 【GIS developer】
I have a problem recently , Use the three-dimensional model of tilt Photography Made by Dajiang UAV , It needs to be loaded on the map for display . After exporting from Dajiang's mapping software , The suffix of 3D model file is b3dm, After consulting the data, it is found that , yes 3D Tiles Format .
3D Tiles
3D Tiles It is an open 3D spatial data standard , It is designed to improve the loading and rendering speed of models in large 3D scenes , It can be understood as a tile of a three-dimensional scene . If you want to be in Web The client renders a very large 3D model ( Such as the architectural model of a big city ), If you download all the models to the client and render them , The time consumed in this process is unacceptable to users using ordinary computers . However , In the vast majority of user interactive 3D scenes , Only a small part of the model needs to be rendered , Loading and rendering all 3D models is a great waste of resources ,3D Tiles It provides a good solution to this problem . Organize 3D spatial data into 3D Tiles Format , It can realize on-demand loading and rendering of models , So as to achieve a smooth 3D model browsing experience .3D Tiles It is also a hierarchical model organized in a tree structure , The difference is that the two-dimensional Tile Map divides the two-dimensional space ,3D Tiles Is to divide the three-dimensional space .
Load code
vue And cesium Development environment construction , Reference resources https://blog.csdn.net/GISuuser/article/details/125376282?spm=1001.2014.3001.5501
<template>
<div id="cesiumContainer">
</div>
</template>
<script> import * as Cesium from 'cesium'; export default {
name: 'HelloWorld', props: {
msg: String }, setup(){
window.CESIUM_BASE_URL = '/cesium/'; Cesium.Ion.defaultAccessToken = ' You applied for token'; }, mounted(){
// "cesiumContainer" You need to render the map dom Of id. const viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain() }); let tileSetModel = new Cesium.Cesium3DTileset({
url: "./terra_b3dms/tileset.json" }); tileSetModel.readyPromise.then( tileset=> {
console.log(" Loading complete ") viewer.scene.primitives.add(tileset); viewer.zoomTo(tileset, new Cesium.HeadingPitchRange(0.5, -0.2, tileset.boundingSphere.radius * 1.0)); }).catch(function (error) {
console.log(error); }); } } </script>
<style scoped> #cesiumContainer{
width: 100%; height: 100%; } </style>
In the code , Used 3D Tiles Model , Can be in https://download.csdn.net/download/GISuuser/85708223?spm=1001.2014.3001.5503 download
effect


边栏推荐
猜你喜欢

6. 安装ssh连接工具(用于我们连接实验室的服务器)

MySQL Niuke brush questions

Shengxin literature learning (Part1) -- precision: a approach to transfer predictors of drug response from pre-clinical ...

MySQL-IFNULL处理N/A

Reflection operation annotation

What exactly is the open source office of a large factory like?

实训渗透靶场02|3星vh-lll靶机|vulnhub靶场Node1

EMC solutions

BlockingQueue four sets of APIs

Single cell literature learning (Part3) -- dstg: deconvoluting spatial transcription data through graph based AI
随机推荐
【OpenAirInterface5g】RRC NR解析(一)
QT connect to Alibaba cloud using mqtt protocol
仙人掌之歌——进军To C直播(3)
Dongjiao home development technical service
Tableau 连接mysql详细教程
EMC solutions
Class load memory analysis
June training (day 22) - orderly gathering
Producer and consumer issues
Advanced usage of setting breakpoints during keil debugging
Which is the best agency mode or decoration mode
C技能树评测——用户至上做精品
5g terminal identification Supi, suci and IMSI analysis
Detailed explanation of eight locks
What is JUC
[openairinterface5g] project directory structure
代理模式与装饰模式到底哪家强
Iframe framework, native JS routing
PgSQL batch insert
Event preview edgex developer summit @ Nanjing station is coming!