• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Potree point cloud viewer library core components for easier integration in a three.js project.

Potree Core 2.0

npm version GitHub version

  • This project was originally based on Potree Viewer 1.6 and is now since version 2.0 based on the shiukaheng fork of the Potree-Loader.
  • Potree is a web based pouint cloud visualizer project created by Markus Schütz.
  • This project contains only the main parts of the potree project adapted to be more easily used as a independent library, the code was adapted from the original repositorys.
  • Support for pointclouds from LAS, LAZ, Binary files.
  • Some features require support for the following GL extensions
    • EXT_frag_depth, WEBGL_depth_texture, OES_vertex_array_object

Demo

Example

  • The project can be build running the commands npm install and npm run build.
  • Download the potree build from the build folder or add it to your project using NPM.
  • Include it alonside the worker folder in your project (can be found on the source folder).
  • The build is a ES module, that can be imported to other projects, threejs should be available as a peer dependency.
  • Bellow its a fully functional example of how to use this wrapper to load potree point clouds to a three.js project
const scene = new Scene();
const camera = new PerspectiveCamera(60, 1, 0.1, 10000);

const canvas = document.getElementById("canvas");

const renderer = new WebGLRenderer({canvas:canvas});

const geometry = new BoxGeometry(1, 1, 1);
const material = new MeshBasicMaterial({color: 0x00ff00});
const cube = new Mesh(geometry, material);
scene.add(cube);

const controls = new OrbitControls(camera, canvas);
camera.position.z = 10;

const pointClouds = [];

const baseUrl = "data/test/";
const potree = new Potree();
potree.loadPointCloud("cloud.js", url => `${baseUrl}${url}`,).then(function(pco) {
   scene.add(pco);
	pointClouds.push(pco);
});

function loop()
{
   potree.updatePointClouds(pointClouds, camera, renderer);

	controls.update();
	renderer.render(scene, camera);

	requestAnimationFrame(loop);
};
loop();

Notes

  • Since potree-core is meant to be used as library and not as a full software as potree some features are not available.
  • EDL shading is not supported by potree core.
  • Removed classification and clipping functionality.
  • Removed Arena 4D point cloud support.
  • Removed Entwine Point Tile file support.
  • GUI elements were removed from the library
    • PotreeViewer
    • Controls, Input, GUI, Tools
    • Anotations, Actions, ProfileRequest
    • Potree.startQuery, Potree.endQuery and Potree.resolveQueries
    • Potree.timerQueries
    • Potree.MOUSE, Potree.CameraMode
    • PotreeRenderer, RepRenderer, Potree.Renderer
      • JQuery, TWEEN and Proj4 dependencies

Potree Converter

  • Use the (Potree Converter)[https://github.com/potree/PotreeConverter/releases] tool to create point cloud data from LAS, ZLAS or BIN point cloud files
  • Potree Converter 1.8 creates a multi file structure with each node as an individual file.
  • Potree Converter 2.1 creates a single file for all points and separates files for hierarchy index, its faster to create files. Requires a HTTP server configured for file streaming.
  • Tool to create hierarquical structure used for point-cloud rendering using potree-core.
  • There are two main versions 2.1 witch generates 4 contained files with point data, hierarchy,
  • To generate a folder output from a input file run the command .\PotreeConverter '..\input.laz' -o ../output

TXT2LAS

  • The potree converter tool only supports las and laz files, so textural file formats such as .pts, .xyz, have to be first converted into a supported format.
  • The TXT2LAS tool from the (LASTools)[https://github.com/LAStools/LAStools] repository can be used for this effect.
  • To run the tool use the command .\txt2las64 -i input.pts -ipts -parse xyziRGB -set_scale 0.001 0.001 0.001 -set_version 1.4 -o output.laz

To Do

  • Supports logarithmic depth buffer (just by enabling it on the threejs renderer), useful for large scale visualization.
  • Point clouds are automatically updated, frustum culling is used to avoid unnecessary updates (better update performance for multiple point clouds).

More Repositories

1

nunuStudio

Web powered cross-platform 3D, WebXR game engine.
JavaScript
2,116
star
2

geo-three

Tile based geographic world map visualization library for threejs
TypeScript
700
star
3

tello-ros2

ROS2 node for DJI Tello and Visual SLAM for mapping of indoor environments.
C++
139
star
4

aruco

Aruco marker detector and pose estimation for AR and Robotics with ROS support
C++
130
star
5

enva-xr

WebXR AR occlusion, lighting, interaction and physics with three.js
JavaScript
115
star
6

vkCraft

Minecraft clone written with C++ and Vulkan, node structure for infinite world chunks.
C++
52
star
7

monodepth

Python ROS depth estimation from RGB image based on code from the paper "High Quality Monocular Depth Estimation via Transfer Learning"
Python
52
star
8

dartboy

Game boy color emulator written in Dart using Flutter for cross platform (Desktop, Mobile) user interface.
Dart
39
star
9

IDKwGL

WebGL 3D rendering framework w/ support for file loaders, multiple material types and basic AABB physics.
JavaScript
20
star
10

syncinput

Synchronous keyboard and mouse input for web applications. Useful for games and canvas / webgl synchronous content in web applications.
TypeScript
20
star
11

escher.js

2D graphics canvas framework for easier interactive web graphics.
JavaScript
19
star
12

constellations

Particle collision with quad-tree experiment inspired by games like Eufloria and Auralux.
Java
13
star
13

car-tracker-flutter

Car tracker GPS flutter based mobile application for A11, ST-901, GT01, and GT09 SMS based trackers.
Dart
10
star
14

gotracer

Multi-threaded software raytracer written in golang.
Go
8
star
15

car-tracker-ionic

Mobile web based application to track car GPS position for A11, ST-901, GT01, and GT09 SMS based trackers.
TypeScript
7
star
16

max-clique

Graph theory experiments for the maximum clique problem using python.
Python
7
star
17

checkers

Checkers board recognition computer vision system using OpenCV
C++
4
star
18

semeionNet

A set of machine learning experiments with the semeion and MNIST handwritten digit dataset using tensorflow
Python
3
star
19

wallrunner

Wallrunner is meat boy like platform game. Mobile and desktop crossplatform game source code.
Java
3
star
20

covisim

COVID-19 virus data dashboard and statistical simulation of the virus spread
JavaScript
3
star
21

street-monitor

Road vehicle and pedestrians tracker to monitor street activity.
C++
3
star
22

tentone

Public profile special repository, no code to see here!
Brainfuck
2
star
23

webkinect

Provides access to Microsoft kinect sensor data (skeleton, color camera and depth camera) from HTTP using WebSockets..
C#
2
star
24

ganimator

2D animation system designed to produce content for games. Only supports LibGDX for now.
Java
2
star
25

xenoparticles

Real-time fluid-like particle simulation using the xenomai framework.
C++
2
star
26

depthset

Depth image dataset generator from 3D models for machine learning experiments.
JavaScript
2
star
27

crosstabtalk

Browser tab/window local message communication library for cross-tab data exchange and syncronization.
JavaScript
2
star
28

image-geometry

Triangulated image geometry generator from transparent images for three.js
JavaScript
2
star
29

rubix-solver

Rubix cube detector and solver using computer vision.
C++
2
star
30

heist

Heist to the museum, project for the Distributed Systems course, in the University of Aveiro
Java
1
star
31

mssql-uuid

Go implementation of MS SQL Server Uniqueidentifier type.
Go
1
star
32

cork

Cork stopper quality analysis and comparison vision system using RGB shadow decomposition for industrial application.
C++
1
star
33

bomberguy

Bomberman like game.
C#
1
star
34

retris

Tetris game written in rust w/ macroquad.
Rust
1
star