Unity Tutorial and Troubleshooting on Visualizing Point Cloud Data in VR
By: Mandy He (2022)
Unity Experience Expected: None
Note: This tutorial expects that you have already downloaded Unity
Step 1: Set up a new Unity Project for VR
Note that if you choose to follow the youtube tutorial, there is a custom Unity VR Template that the tutorial teaches you how to download and use in the last 2 minutes of the tutorial. This template can be very handy since you don't have to go through the process of adding the XR Interaction Toolkit each time.
Step 2: DataBall Prefab
Create a prefab:
According to the tutorial linked above "create a prefab object by right-clicking in the Project window, under Assets, and selecting Create -> Prefab in the menu that opens up, and name it something meaningful, like DataBall." Then populate it with a sphere
Note that you can also do this by right-clicking in the hierarchy to create a sphere and then dragging it into your assets
Step 4: Import CSV Data
Step 5: DataPlotter
Step 6: Point Holder
Create an empty GameObject called PointHolder.
Create an empty GameObject by right-clicking in the hierarchy, and clicking "create empty." Then name it PointHolder
Delete the sphere from the Hierarchy
Step 7: Plotter
Create another empty GameObject called Plotter.
Make the DataPlotter script a component of the Plotter GameObject.
Then drag the Databall prefab into the Point Prefab slot and the PointHolder GameObject into the Point Holder slot. (You will see the slot glow blue when you try to fill it with something).
Make sure to make the inputfile the name of your data file (whatever it is saved as in your resources folder)
Change Column X to 1, Column Y to 2 and Column Z to 3. (Note that this is because "0" is the index of the point but we want the actual locations of the point along the x, y, and z axis
Press the play button and after shifting around a bit you should see what is in the picture at the left.
Here are some potential tips and answers to potential questions to guide you through the scatterplot tutorial: