Point cloud with dynamic opacity for each point depending on value and animated time

Hi there,

I have a point cloud of several thousand points with x,y,z-coordinates, time and magnitude (seismic data) and I want to generate an animation where these points seem to “appear” e.g. as sphere-glyphs (of a size related to magnitude) and then slowly fade out.

I’m currently trying to import each point as a separate object via Python and then adding animation tracks for each one depending on its associated values, but I was also wondering, if there is a more elegant solution when treating all points as a single point-cloud and somehow adjusting the behavior globally by the time and magnitude data for each point.
Or maybe there already is a useful plugin for such things somewhere?

I’d be grateful for any helpful suggestions!

Looks like something to do with the point gaussian representation

I will have a look at it. I suspect you are talking about the “use opacity/scale array” functionality? I would have to find a way to couple these settings to the animation time, since the opacity would not be controlled by a static point array, but a dynamic one based on the current animation time.

My problem in my python approach is, that for a small number of points I can dynamically create the separate sphere objects and could then create specific animation tracks for each, but for a large number of separate objects the point generation seems to take ages (e.g. hasn’t finished up to now).

Easy to do with the animation view.

I’m very sorry, but I don’t think that this was a helpful answer.

For the record and for somebody else who this might be helpful for, this is how I have it somewhat working now:

  1. Create all points as separate objects with a certain naming convention:
    # create a new 'Sphere'
        sphere_Objects[i] = Sphere(registrationName='Sphere_'+str(dates[i])+"_"+str(magnitudes[i]))
        # Properties modified on sphere1
        print("creating sphere: Sphere"+str(i)+" "+str(xPositions[i]))
        sphere_Objects[i].Center = [float(xPositions[i]), float(yPositions[i]), float(zPositions[i])]
        sphere_Objects[i].Radius = 5.0
        sphere_Objects[i].ThetaResolution = 12
        # show data in view
        sphere_Display[i] = Show(sphere_Objects[i], renderView1, 'GeometryRepresentation')

This takes quite a while, but is then eventually saved to a *.pvsm state file.
Animation keyframes COULD be added right at this time, but for some reason the *.pvsm state does not seem to store the animation data. Therefore:

  1. Re-read all points in a second script, getting the “activation times” from their names and adding the keyframes now:
for obj in objects:
    if "Sphere" in parts[0]:
        track1 = GetAnimationTrack("Opacity",0,realobj) # property of active source
        # set keyframes, in this example only for track1:
        kf0 = CompositeKeyFrame()
        kf0.Interpolation = 'Ramp'
#and so forth

It is ugly, I know, but it got the job done.

Still not following, you can vary the opacity over time on any source using the animation view.

Peek 2021-10-18 15-07

Yes, you are completely right. I was just looking for a way to do what you are showing, but automatically for thousands of points with a different (pulse-like) opacity curve with different times of onset. Doing this manually is just not feasible for that many points.

But it is really slow with so many different objects, that is why I was also looking for some more “flexible” point-cloud modification which might be more efficient.

1 Like