How to plot a 3D model from a set of 3D points?

Hey guys,

My goal is to develop a 3D Scanning system using only Unity. Thus, i need to read a set of 3D points from a .txt file and show to the user the reconstructed object.

What is the best way to gerenate this reconstructed object? I thought Unity could plot a 3D graph or plot 3d points in a simple way but its being hard to find a good solution to this problem.

Thanks in advance.

This specific problem is the one of the major ones for 3D scanning and the algorithms used to generate a model from points for each of the professional tools are usually considered industrial secrets.

As Unity is not designed to do this it has no built in utilities for doing exactly what you want.

If you just want to show the points you can use a particle system and use SetParticles to explicitly place particles at each point.

Or you can make a “polygon soup” mesh from the point data and use a geometry shader to expand each vertex into a screen facing quad.

Or you can look online for an open source 3D scanning application or meshing paper and implement a technique for generating a mesh yourself.

1 Like

I was able to get point cloud manipulation (cleaning, denoising, features detection and even mesh generation) working in Unity by using the C++ PCL Library but we didn’t get far down that path.
Basically you would need a C# wrapper to make it work in Unity but it seems no-one made one.
The method I followed is explained here :wink: http://www.pcl-users.org/PCL-in-DotNet-td3666816.html
Good luck :slight_smile:

Cheerz!

1 Like

I bet you could write a marching cubes algorithm with works in unity. The algorithms makes a 3D mesh out of 3D points in space.

http://paulbourke.net/geometry/polygonise/

2 Likes

Thank you very much for your replies. I’ll take a look in some of the works cited here. At least now i know that this is not a simple task. Maybe I should take some time to develop my own solution.

See you! :wink:

That’s a nice work! I will think about implementing an algorithm like that depending on my free time! Thanks!

1 Like