I want to know Is it possible? (815181)

Hello,

I want to use unity to animate a 3D object, using CFD data collected. I just want to upload or enter some points, maybe 30,000 records, (x,y,z data points) and have it rendered to see what they represent in terms of an animation. Additionally, my files(.txt or .csv) have x, y, z coordinate and velocity.

Recently, I heard i can visualize that using textcomponent or particle system. Unfortunately I don’t know much about these things. Please help me…

Thanks

This is pretty simple actually - your first step will be to just load in your text file and parse it into discrete data points. That will depend on how the text is formatted… but here’s a simple example that will just read a file from a Data folder in your assets folder…

using UnityEngine;
using System.IO;

public class FileReader : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        string path = "Assets/Data/testData.txt";       
        StreamReader reader = new StreamReader(path);
        string theText = reader.ReadToEnd();
        reader.Close();
        print(theText);
    }   
}

Oh, Thank you for your comment!

Could I ask more? I want to visualize data in Scene view. Someone told me using just textcomponent. what is textcomponent? and could i get some tip about visualize data if you know that?

Text component is for rendering text and if you Google Unity text component you can find a lot of info. I’m not sure using text will be the best way to go… I would add a cube, or sphere or something, and move it around based on your input. Can you get your text into Unity?

Sorry for the late reply.
Yes, I succeeded thanks to your help. And I also got my cvs file into Unity. I can see spheres based my csv file. Additionally, I hope to animate my file. Is it possible?

You will have to elaborate more on how your data is structured. How many files you have and what kind of information each one of them stores. Is the velocity constant or by velocity you mean the velocity of a point on a specific frame?

Ah, my file is .txt and .csv file.
They have same information. Information in file is x,y,z coordinate and velocity of a point on a specific frame. And maybe have 20,000 data. As mentioned above, I can see my files in the scene using CSVReader scripts and Plotter scripts from here.(https://sites.psu.edu/bdssblog/2017/04/06/basic-data-visualization-in-unity-scatterplot-creation/)
But, I also want to animate this databall(sphere).