• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by J_Stuck · Oct 21, 2021 at 03:22 PM · meshdata

Point cloud data to mesh

Is it possible to generate a script in Unity that will construct a meshed object from imported point cloud data?

Thank you in advance!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by guubebra · Oct 21, 2021 at 09:40 PM

Yes! If you want to create a mesh out of the point cloud just read the point cloud data and store the coordinates of each point in an array. That way you can create the mesh runtime by passing the vertices to unity: https://docs.unity3d.com/ScriptReference/Mesh.html. You can use MeshTopology to change the rendering to point, and then create a geometry shader to better visualize each point (by placing a triangle in each vertex for example, https://answers.unity.com/questions/1437520/implementing-a-geometry-shader-for-a-pointcloud.html this might help).

But if you want to reconstruct the content in the point cloud by making actual planes and connected triangles, you need to search some techniques like marching cubes if I'm not mistaken, this might help https://youtu.be/M3iI2l0ltbE.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image J_Stuck · Nov 12, 2021 at 03:53 PM 0
Share

My apologies for the delay in responding - @guubebra this helped a lot and worked!

avatar image
0

Answer by J_Stuck · Nov 12, 2021 at 04:12 PM

Thank you for your reply - it helped massively!

I am now coming up against another problem: trying to store and imported data from two separate csv files (1 that holds the x, y, z, coordinates of a vertex, and the other that holds the information to construct triangles between each vertex) that will allow me to construct a 10 vertex tetrahedron. How would I go about doing this?

I am trying to import from two files that are of the following structure:

alt text

my current way of storing the two sets of data are:

 // Read in Node and Element data
         NodeList = CSVReader.Read(inputfile_Nodes);
         ElementList = CSVReader.Read(inputfile_Elements);
 
 
     
 // List for holding data from CSV reader
     private List<Dictionary<string, object>> NodeList;
     private List<Dictionary<string, object>> ElementList;


I have tried to combine the two dictionaries by trying to search for the corresponding 'Key' in the Node List that matches the corresponding 'Value' in the Element List. Any help would be greatly appreciated.


node-and-element-list.png (57.2 kB)
Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

145 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Reading mesh data without Unity making a copy 1 Answer

Reading all the Collsion-Data for specific physical interactions 3 Answers

Animation data for non mesh purposes 1 Answer

How does appdata_base work? 0 Answers

Script attached to mesh affects all meshes? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges