Point Cloud animation

science
point-cloud
animation

(Tomer Nussbaum) #1

Hi there,

Is it possible create point cloud animation?
and what is the best way to do that?

Thnx,
Tomer

(Details: I have an astronomical simulation data which I want to upload.
position and id for every particle through time)


#2

Animated point clouds would be cool


#3

It might be possible using morph targets, but the number of points must remain constant.

It would need a tool to build an FBX file from a series of point clouds.

@marc or @waleguene would know best :wink:


(Tomer Nussbaum) #4

Hey James,

That is a start, If you can add a transparent color, it will be great for my models.
I think that blender has some xyz to FBX method.
(and if you can support xyz animation file, it might be easier)


(Tomer Nussbaum) #5

Hey,

I wish to solve this, and write a python fbx_file_writer.
Any chance to get one txt ascii .FBX file that works on your platform?
All the files I have doesn't work on your system. :frowning:

It may be valuable to many scientific projects (physics, chemistry and biology).

Also, I found this .xyz files which do look promising as they are simple and used widely.
XYZ_testfile.xyz (813.7 KB)


#6

Regarding the XYZ file, it can be converted and displayed on Sketchfab:

XYZ Testfile → ASC by James on Sketchfab

We support point clouds in the .ASC format, which each point on a line like:

x y z R G B

I took that file and just removed the "Au " from each line and your "blah 200" lines, and changed the file extension.


(Tomer Nussbaum) #7

Thanx for your response.
The thing is xyz files, are particle animation files.
so each "blah 200" lines is another snapshot in time.

I wish to write py code that has particles positions through time and transform it to something Sketchfab could handle. Do you have any tips for me?

Thnx,
Tomer


#8

Ah I see. I'm afraid that's a bit beyond me.

@marc or @waleguene any ideas for converting a series of point clouds into an FBX or Blender animation?


(Mrchlblng) #9

@tomer_nussbaum @james,

I've been toying quickly with your xyz sample: https://sketchfab.com/models/abd8f730453e4a44a4d5008e0b70311a?maxDevicePixelRatio=0.4
The result is not fantastic but it's moving (a bit).
I'm not really sure I'd like to make XYZ support publicly available as right now it feels more like a hack that really what the format is made for. Also as the format allows to have "frames" with different number of points, I used a visibility approach instead of a morphing approach and the loading/rendering is suffering.

I'd love to see more scientific content on the platform but not in a hackish way if possible. Could you be more specific about the data you'd like to display on sketchfab (number of points in each frame, number of frames, etc)?
I feel like relying on FBX woudl also be cumbersome (as it requires to install the SDK).


(Tomer Nussbaum) #10

Hey,
Thank you for your quick response!

I've suggested xyz files since I saw it in default 3d file used for chemical and biological simulations.
But I'm open to other simple file formats as well (creating FBX files from simulations is less simple :smile: ).

Specifically about astronomical data, in many cases we wish to trace points. (point is Stars, Dark matter and gas) and to see how they move through time.
On the first stage we have around million points per frame in average, we can lower the amount untill around 20k per frame. Frame number can be between 30 or 1000 frames, depends on the simulation. Also, number of particles is not constant (stars are formed through the simulation)
The secound stage may require FBX or something because we would like to add also spheres around some of the stars and things like that. 3rd stage is the savvy stage, in which we can show amazing 3D simulation of the moon crashes into earth and see many physical characteristics in it (the awesome vision).

But lets start on the first stage, this is couple of examples to let you feel what we are trying to do:
One frame:

VELA_V2_07 - a0.160 - 20kpc - Stars by Tomer Nussbaum on Sketchfab


Galaxy Merger Model by jnaiman on Sketchfab


VELA_V2_07 - a0.160 - 20kpc - Mesh by Tomer Nussbaum on Sketchfab

"Animation test":

Test of Moving spheres by jnaiman on Sketchfab

There is more to talk, but I think I cover the basics.

Thanks again,
Tomer


(Mrchlblng) #11

Hey @tomer_nussbaum,

I've been thinking of a generic approach for declaring simple animations on sketchfab.
It would be very nice if you could provide me with some or all successive frames (in whatever static format support by sketchfab) of an animation you'd like to upload (you could email it to support at sketchfab.com).

Completely unrelated, but I'd would be curious to know what numerical methods you are using to generate your animations; could it be SPH?


#12

Thanks for all the work on this


(Tomer Nussbaum) #13

Hey,

First, thnx a lot for your work on this.

I've done some work and I am sending you a mail to the support.
There are 2 major types of file we currently export to. one is a point cloud ply, second is sph txt file, which also include id for each particle at the beginning. currently, we don't need interpolation between the frames (we have couple of simulations with 1000 frames, so we are ok here), If you can do "on the way", that it's great.

There are couple of different numerical methods "we" use ("we" here is the cosmological and some astrophysical community). I'm using AMR with N-body simulation together called ART and I think Jill use SPH version called GADGET, There are other types of simulation, with different approaches.

I've sent u some big files, but I can make them smaller by taking 1% and writing this as binary code instead of txt. Lets make a deal, tell me what animation file format to write, the python exporter is on me. :smile:


(Mrchlblng) #14

Hi @tomer_nussbaum,

thanks a lot for you data samples!
I've quickly processed the ply and here is the 'current' result:

point_cloud_processed by mrchlblng on Sketchfab

It's really heavy right now so I don't know if that's really usable as is. We'll need to discuss how viable this approach is to see if it makes sense to release it to everyone (right now it's just a hack extending what we've done for timeslice, showing/hiding data at each frame).


(Tomer Nussbaum) #15

I think I can cut this by factor of 100 per frame (maybe maybe even 1/1000 of the number of points), without damaging the animation. Would it be enough to make it better?

Also, is there a difference between binary ply to ascii ply for u?
and, is it slow due to each frame, or all together? I mean if there are less points per frame, would it make the animation faster?

I think it can do the work after the cutoff.


(Mrchlblng) #16

Hey @tomer_nussbaum,

the way the hack works is that I added a file describing the animation. It simply consists of one line per frame where each line is

time filename: the time for the frame and the filename to load for this specific time.

The processing concatenate all frames in the same scene describing when each specific file should be shown in time (but everything is loaded at once in the viewer).

So to answer your 2 questions:
1. the heavyness comes from the total of all models being loaded (and I think that dividing each frame by 100 should be enough to have something way smoother)
2. it doesn't matter what format is used for a single frame as long as it is supported on sketchfab (using binary ply will simply be faster when you upload it)


(Tomer Nussbaum) #17

Great!

Can you email me example of the files, so I'll try writing something by myself?

About answer #2, just to be sure, you say there is no difference at all between a zip file of text ply files to binary ply? just size issues?


(Mrchlblng) #18

At the moment the file I added simply contains:

0 VELA_v2_070.160_range5.0kpc_1.0000pre_Stars.ply
1 VELA_v2_070.170_range5.0kpc_1.0000pre_Stars.ply
2 VELA_v2_070.180_range5.0kpc_1.0000pre_Stars.ply
3 VELA_v2_070.190_range5.0kpc_1.0000pre_Stars.ply
4 VELA_v2_070.200_range5.0kpc_1.0000pre_Stars.ply
5 VELA_v2_070.210_range5.0kpc_1.0000pre_Stars.ply
6 VELA_v2_070.220_range5.0kpc_1.0000pre_Stars.ply
7 VELA_v2_070.230_range5.0kpc_1.0000pre_Stars.ply
8 VELA_v2_070.240_range5.0kpc_1.0000pre_Stars.ply
9 VELA_v2_070.250_range5.0kpc_1.0000pre_Stars.ply
10 VELA_v2_070.260_range5.0kpc_1.0000pre_Stars.ply
11 VELA_v2_070.270_range5.0kpc_1.0000pre_Stars.ply
12 VELA_v2_070.280_range5.0kpc_1.0000pre_Stars.ply
13 VELA_v2_070.290_range5.0kpc_1.0000pre_Stars.ply
14 VELA_v2_070.300_range5.0kpc_1.0000pre_Stars.ply

So one reason that the animation is a bit sluggish (on top of the model being very heavy) is also because every frame has a duration of 1 second.
However, this feature is not supported yet on sketchfab. I preprocessed the data in an internal format and uploaded the result on sketchfab for you to see. We did not discuss the fact that this should be exposed yet so please consider that this is still an experiment at the moment.

Regarding ply, the filesize of a binary ply should be much smaller than the ascii ply so hopefully the final package should be smaller but that's probably not a big deal.


(Tomer Nussbaum) #19

hey,

Can I upload one example and test it? If true, could you send me some example that I can upload (I would like to know what is necessary like the "time filename" file name).

I really want to create one good example for this animation, so that we can see if it is worth the hard work.
(I have one great example that we can show at a astronomical conference happening few weeks from now)

Thnx,
Tomer


(Mrchlblng) #20

@tomer_nussbaum,

I'm afraid, you'd have to send your data to support and then we'd happily preprocess and upload on sketchfab (we can transfer it to your account).

The block in my previous really is what I wrote to create the animation. To make the animation more fluent that should probably have been

0     VELA_v2_070.160_range5.0kpc_1.0000pre_Stars.ply
0.333 VELA_v2_070.170_range5.0kpc_1.0000pre_Stars.ply
0.666 VELA_v2_070.180_range5.0kpc_1.0000pre_Stars.ply
1     VELA_v2_070.190_range5.0kpc_1.0000pre_Stars.ply
1.333 VELA_v2_070.200_range5.0kpc_1.0000pre_Stars.ply