x


How to create a 3D object (terrain) using imported data (CSV, txt)?!

Is it possible to have a 3D array describing an object's shape and import it to Unity?! What is more important is that the 3D array is constantly changing and it is required that Unity reads this file constantly and change the generated model accordingly. Any help is highly appreciated.

Please note that the 3D array could be as simple as an CSV file! Thank you.

more ▼

asked Jul 18 '10 at 04:31 AM

Rez gravatar image

Rez
12 2 2 3

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Here are some examples of procedural mesh creation And here is the documentation for the Mesh class used in the examples. As far as reading in the values for the triangle arrays here's some info on reading text data in Unity You could also store the values in a mySQL table and use say, PHP for example to get the values. Not sure if this exactly what your after but it should help :)

more ▼

answered Jul 18 '10 at 05:31 AM

Julian Glenn gravatar image

Julian Glenn
2.6k 5 12 47

+1 to your answer. Julian Can you answer this please? Thanks. http://answers.unity3d.com/questions/15745/checking-for-last-hit-and-changing-teams

Jul 18 '10 at 04:16 PM MikezNesh
(comments are locked)
10|3000 characters needed characters left

Hi Julian,

Thanks for your useful comment. I have looked at the links you sent. I have now got a code which can access a locally stored text file. I still have to do a lot to get the code parse the text. The end goal is to read a CSV file, store the values (which are infact X,Y,Z locations) possibly in an array and then draw it on the scene. Ideally I want the the vertexes (points) to be joined together. Any suggestions on both parsing and drawing?!

Thanks.

more ▼

answered Jul 19 '10 at 08:52 AM

Rez gravatar image

Rez
12 2 2 3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x969
x571
x453
x12

asked: Jul 18 '10 at 04:31 AM

Seen: 2209 times

Last Updated: Jul 18 '10 at 04:31 AM