Particles from a .csv file [which has their x,y,z location]

Hello,

I’m not that new to TD and even though this task sounds quite simple I could not manage it - so, I can use some help, thanks a lot in advance.

Right now I do have a .csv file with 4 columns, 3 is for the x,y,z and 4th for the ID. It has a few hundreds of rows but I don’t think that matters a lot at this point.

All I want to achieve at this point is to create a a particle for each row getting its x,y,z drawn from the .csv file and ID of that row displayed at the top of the particle [maybe this might be the second step to do]

I converted by .csv file to .tsv so my table DAT would read it and then got stuck. I would be very happy if someone could shed some light what should I do next?

I hope my question was clear enough!

Thanks a lot!

as always in TD there are multiple ways of doing things.

My first try would be instancing, where a Geometry COMP generates a new instance of its contents for every row in your DAT. You can give each instance the xyz position from each row, and you can use the ID of that row to instance a corresponding texture from a Texture 3d TOP(texture instancing is set on page Instance2 of the Geo COMP)
There’s an example which does exactly this in the OP Snippets, under TOP → Texture 3D
See also here an older instancing tutorial.

Another approach is using a DAT to SOP to generate a 3d SOP model from your DAT rows. You can also use this generated SOP as input of a Particle SOP to generate particles on each of those points.

Another approach would be writing a vertex shader in a GLSL MAT which uses your data (converted to CHOP data) to position your vertexes accordingly.

Thanks a lot for the response, I’ll try this right away now.

Best wishes.

Hello, I have found the first method most easy and tried to do it. Right now, I finished the instancing tutorial and got stuck in the most important part. I can convert SOP to CHOP and create the particle system as in the example but cannot convert DAT to CHOP in the same way.

It seems I’ll be done if I can say that each column in my table1 is tx, ty and tz as in the SOP to CHOP instancing tutorial - but I couldn’t know how.

I’m also attaching the patch as it is right now, thanks so much really!
t-SNE.toe (7.35 KB)

Well done!
you don’t need to convert to CHOP - the Geo COMP takes either CHOP/DAT (and in latest experimental also SOP) as instancing data.

Here’s your version adapted to show instances on each row of data in your DAT.
t-SNE_dat_instancing.toe (8.74 KB)

Thanks so much!
I loved how simple and intuitional the solution was, I’m loving TD every day a bit more :unamused:

Now I’ll try to display additional text from the table [with a new one] as described above.

Best wishes!