Hi, all.
I want to show the movement of particles, so I need to draw the trails of particles, but it seems that the particle system in cesium has no such API.
I see there is an update callback in particle system, but I am not sure if it can help me to draw the trails, because I can not tell which particle I am updating.
I haven’t used it myself but I think the particle system was designed mostly to create visual effects rather than simulate specific behavior. It looks like particles are created as billboards:
So you should theoretically be able to reach in and get that list of particles, even though it’s not exposed by the public API.
Although, you might be able to use a SampledPositionProperty and a Path to draw a path for an individual (or for all?) particles, here’s an example:
Entities have unique id’s so that can help you identify/map individual particles in the update function:
I hope this helped! Feel free to follow up here. I don’t see a lot of people on the forum using the particle system so I’m curious what kind of application you’ve found for it.
I use particle system to visualize the 3D force field physics effect, mainly for the wind field. The movement of the particles are used to represent the force field.
Now I have 3D wind field data for Asia continent. I am planning to put about 50000 particles, because the area is very large. With so many particles(billboards), I wonder whether cesium will take a long time to render them.
So I think the particle system is optimized for this kind of use case, but I don’t know of its specific benchmarks/it will vary depending on whether you’re testing on a desktop, or mobile device etc.
The good news is Cesium has definitely been used to simulate and visualize these sorts of wind fields before. Here’s one I found from a quick google search:
I can see that they’re using geometry/primitives in order to get the maximum performance. So I would try with particles, and if you’re experiencing a slow down, you might try using the primitives directly. This is a good guide on that:
This is awesome! I’m glad you resolved all the issues and have it running, and thanks for posting your code. I imagine it wouldn’t be that hard at this point to add color over time like this wind map (https://blog.mapbox.com/how-i-built-a-wind-map-with-webgl-b63022b5537f), or it based on strength/speed? Then it will look absolutely beautiful!