// 1. 引入 PLYLoader import { PLYLoader } from 'three/examples/jsm/loaders/PLYLoader'; // 2. 创建加载器 const loader = new PLYLoader(); // 3. 加载斯坦福兔子模型 loader.load('stanford-bunny.ply', function(geometry) { // 计算法线(用于光照) geometry.computeVertexNormals(); // 居中模型 geometry.center(); // 创建材质 const material = new THREE.MeshNormalMaterial(); // 创建网格 const mesh = new THREE.Mesh(geometry, material); // 调整大小和位置 mesh.scale.set(8, 8, 8); mesh.position.y = -0.8; // 添加到场景 scene.add(mesh); }); // PLY 格式特点: // - 多边形文件格式 (Polygon File Format) // - 支持点云和网格 // - 文本/二进制两种格式 // - 包含顶点坐标 + 面片索引
Stanford 3D Scanning Repository
官网: graphics.stanford.edu/data/3Dscanrep/
经典模型:
• Bunny - 陶瓷兔子, 69,451 三角形
• Dragon - 龙雕像, 871,414 三角形
• Buddha - 佛像, 1,087,716 三角形
• Lucy - 天使像, 28,055,742 三角形
扫描设备: Cyberware 3030 MS 激光扫描仪