Where to? Top > CSV Script Projects > Point Cloud Skinning - Script t6
.blend file | Trial and Results
This page last modified: 2009/04/17
The scripting finished: 2007/11/29
An image showing how Script t6 skins.

How does Script t6 Skin Point Cloud?

Let me call the script that I'm going to show you here Script t6. It can give you a result as you can see in the right image. Script t6 still doesn't have the ability to avoid the intersection of faces and it is that I'm just going to add to the next script by improving Script t6.

Here are briefly the steps that Script t6 takes

+1. Selecting a vertex as a center vertex
+2. Gathering vertices around the center vertex
+3. Calculating an average nornal from the gathered vertices
+4. Calculating angles to decide the rotation order
+5. Making faces simply based on the order
+6. Checking internal angles
+7. Checking two adjacent triangles
+8. Registering the final faces to FacesManager
+9. Selecting another vertex as a center and repeating the steps of +1 to +8.

The details and images are following

Script t6 starts with selecting a vertex as a center vertex (+1). Then t6 measures the distance between each vertex and the center, and gathers the vertices that have shorter distance than a threshold, MaxAroundDist (+2). In the image above, the gathered vertices are located inside of the sphere-shaped yellow region. Next t6 calculates an average normal from the gathered vertices (+3). The normal is orthogonal to the direction to which the vertices spread.

Consider a plane that is orthogonal to the normal and look down the vertices from the top view of the plane to consider a 2D way (+4). Then t6 calculates angles between each vertex and the base line and decide the rotation order. t6 makes faces simply based on the order (+5).

After making faces simply, t6 measures the angle between two adjacent vertices around the center vertex and checks if the angle is too small or too large (+6). And if it is too small, t6 ignores the vertex that makes the angle, and if it is too large, t6 doesn't make a face there. This can avoid making a quite sharp face and can make the final faces look good.

Next t6 checks if two adjacent triangles have a good shape and reorganizes them if it is better (+7). This can also make the final faces look good. Finally, t6 registers the final faces that have been made through the steps of +1 to +7 to FacesManager (+8). FacesManager is a class that I made in Python to manage faces and please visit here for more details. These steps of +1 to +8 are a cycle to skin vertices around a center vertex, so t6 selects another vertex as a center vertex again and repeats the steps until all vertices have been treated (+9). That is all of how Script t6 skins point cloud.

 

 

.blend File

Some parts of the details are still not explained, so here is a .blend file that includes the whole codes of t6 and a skinned point cloud.

Trial and results

You can see the results of the skinning that t6 produced at here.

Copyright (C) 2006 - 2019 Hans.P.G. All Rights Reserved. Hans.P.G. | Contact
inserted by FC2 system