Skip to content

This converts laz file, but in a sort of format unrecognized by the OctreeLoader.  #5

Description

@SpencerCooley

I got this working and I can see that it is pulling from the latest potree converter repository at https://github.com/potree/PotreeConverter .

The output doesn't seem to be compatible when I try and load it in the examples. The generated page doesn't work either.

The first error I get is
OctreeLoader.js:408 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'min')

When I look at the stack trace it looks like it is looking for boundingBox.min . The output of the conversion has min and max directly at the root of metadata.json

let min = new THREE.Vector3(...metadata.boundingBox.min);

I went ahead and manually wrapped min and max with boundingBox like so

boundingBox: {
"max": [
1043.6390000000001,
727.0220000000002,
236.86600000000016
],
"min": [
859.958,
543.341,
53.185
],

That got rid of that error.

The next error after modifying with boundingBox is:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'firstChunkSize')

in OctreeLoader.js
root.hierarchyByteSize = BigInt(metadata.hierarchy.firstChunkSize);

I went ahead and added the following (I just used 16384 as a guess):
"hierarchy": {"firstChunkSize": 16384},

then I repeatedly get

OctreeLoader.js:253 GET http://localhost:8080/pointclouds/test2/chunks/hierarchy.bin 404 (Not Found)

this is because there is no hierarchy.bin file that was generated in the conversion. The chunks directory only has metadata.json and a lot of files numbered s r4202.bin, r4203.bin, etc.. etc..

I am loading like this

	// Load and add point cloud to scene
	Potree.loadPointCloud("../pointclouds/test2/chunks/metadata.json", "test2", e => {
		let scene = viewer.scene;
		let pointcloud = e.pointcloud;
		let material = pointcloud.material;
		// test

		material.activeAttributeName = "rgba";
		material.minSize = 2;
		material.pointSizeType = Potree.PointSizeType.ADAPTIVE;
		// tests

		scene.addPointCloud(pointcloud);
		
		viewer.fitToScreen();

my .laz conversion output directory looks like this;

/chunks

    metadata.json 
    r6.bin
    r424.bin
    etc... etc... 

log.txt
octree.bin
tmpChunkRoots.bin

Do you know if I need to run the conversion another way? Or do I need to specify a particular format when I use Potree.loadPointCloud ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions