added documentation for materials

This commit is contained in:
mschuetz 2014-02-14 14:55:44 +01:00
parent a70f600809
commit 3510853fdf
6 changed files with 28 additions and 2 deletions

View File

@ -1,9 +1,10 @@
# Documentation
* [File Format Description](./file_format.md)
* [Materials and Rendermodes](./materials_and_rendermodes.md)
* [How Does Loading Nodes Work?](./how_does_loading_nodes_work.md)
## Introduction
## Introduction
Potree is a WebGL based viewer for large point clouds. The idea is that, similar to Google Maps, only visible parts up to a certain level of detail
will be loaded and displayed. In order to achieve this, points are partitioned into an octree.

View File

@ -34,7 +34,7 @@ Stores information about the pointcloud in JSON format.
The property "pointAttributes" indicates how each point is stored. At the moment, you should stick to the format given in the example below. "POSITION_CARTESIAN" and "COLOR_PACKED" means that each point is stored as 3 32bit floats for x,y and z coordinates and 4 unsigned bytes for r,g,b and a colors.
The hierarchy property contains all nodes and the number of points in each node. The nodes must be stored top to bottom, i.e. root at the beginning and leafs at the end.
The hierarchy property contains all nodes and the number of points in each node. The nodes must be stored top to bottom, i.e. root at the beginning and leaf-nodes at the end.
{
"octreeDir": "data",

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,25 @@
# Materials And Rendermodes
The default material for point clouds is an instance of PointCloudMaterial with the name "pointCloud".
In order to change its attributes, you have to retrieve it by calling:
var material = MaterialManager.getMaterial("pointCloud");
There are 3 rendermodes available:
* <b>FIXED_CIRCLE</b>
Render points as circles with a fixed size. The pointSize attribute indicates the pixel diameter.
* <b>WEIGHTED_CIRCLE</b>
Render points as circles with a size depending on the distance to the viewer.
* <b>FILTERED_SPLAT</b>
Interpolates between overlapping points. High quality but very slow.
You can change the render mode by calling
material.renderMode = PointCloudRenderMode.FIXED_CIRCLE;
| ![](./images/lion_fixed_circles.jpg "") | ![](./images/lion_weighted_circles.jpg "") | ![](./images/lion_filtered_splats.jpg "") |
| --------------------------------------- | ------------------------------------------ | ----------------------------------------- |
| FIXED_CIRCLES with point-size 2. All points have pixel diameter 2.| WEIGHTED_CIRCLES with point-size 1. Size varies depending on distance from camera. | FILTERED_SPLATS with point-size 1. In this mode, points have the same size as with WEIGHTED_CIRCLES, but overlapping points are interpolated. |