Oriented "billboards" - is Batched Geometries a solution for this?

Hello,

We’re using Cesium for a business case where a large set of entities move around in the globe, pretty much like the Lots of Sensors demo. Most folks get by using billboards due to their inherent performance.

I was trying to figure out how to put “billboard-like” primitive world-aligned to the direction vector of our entities - that is, oriented in space to the actual direction where the entity is going, and in the same plane.

From b19 onwards, Cesium now supports batched geometries, and it feels like a natural solution for this, but I can’t quite get the concept to work.

Hence, a little guidance request: is there a similar example of something similar? If not, what would the broad steps be to accomplish this goal?

Thanks for any input you may come up with!

Best

Hugo

If I’m understanding you correctly, what you want is to have a bunch of moving billboards which are pointing in the direction of travel. Since everything is moving, geometry batching is not the solution yet, since it’s mainly for static data. However, billboards themselves support rotation. If you set the alignedAxis property on each billboard to the velocity vector (in earth fixed), then the billboards will do exactly what you want as they move. If you don’t know the velocity, you can use finite differencing by just taking the normalized vector of currentPosition - lastPosition.

Hope that helps, or let me know if I misunderstood your goal.

Matthew,

Thank you so much for your answer.

I guest that’s exactly what I want. I had toyed around with alignedAxis, but didn’t get the results I wanted (most possibly because I wasn’t inputting the right vector, and this got horribly misaligned), so I ended up using “rotation” - which is nice if you see the globe top-down, but looses its effect in more skew perspectives.

I’ll try it out - many thanks.

On yet another note: is alignedAxis interpolatable?

Best Regards,

Yes, alignedAxis can be interpolatable, assuming you are using the DataSource/CZML layer. At the scene layer, it’s just a single value that you would be responsible for updating each frame.

Matthew, thanks for the answer.

In the meantime, I’ve been toying around with the alignedAxis property, but ended up concluding that it wasn’t fit for my needs - my envisioned effect would be having the billboard icons in the same plane as the flight/route path: tilted, rotated, or turned accordingly - and playing with alignedAxis won’t do that: in the end, it’s still a billboard, and it will be facing the camera head-on.

So, even if not the most optimized solution, I should probably go another route. What would you consider would be the best approach?

Thanks once again,

Hugo

Ahh, I understand. There’s no good way to do this right now, other than with custom code. In the future, you could do it with models.

I figured :slight_smile:

Thanks once again for the patience and help - i’ll try to hack something until then.

Best

Hugo,

I was wondering if you were able to find a solution that worked for this? I am working on a similar project and any help would be greatly appreciated.