Deck.gl: 3D Path in TripsLayer

Created on 10 May 2019  路  13Comments  路  Source: visgl/deck.gl

I want to render flying particle on the map which move along a 3D trajectory (such as arcs). In my understanding, the trip-layer is build on path-layer and render segements' color. So I'm thinking to create 3D path (lat, log, altitude) and create particle effects.
How can I deal with that? I tryed to modify shaders vertex.glsl but failed. Who can give some advice? Thanks.

One possible look is:
https://armsglobe.chromeexperiments.com/

question

Most helpful comment

@SymbolixAU I would suggest adding a new attribute. This is not hard to do from where I stand - the main reason it was not implemented was backward compatibility. Maybe in 7.1 we can add a new prop getTimestamps to this layer:

TripLayer({
  getPath: ... // returns array of [x, y, z]
  getTimestamps: ... // returns array of timestamps
});

And if getTimestamps is not provided, we interpret the results from getPath as [x, y, timestamp].

All 13 comments

you can take a look at our ArcLayer as a start

The PathLayer is already 3D.

For the particle effect, creating your own custom layer is the way to go. If you share your custom shader we may be able to help you troubleshoot.

The PathLayer is already 3D.

For the particle effect, creating your own custom layer is the way to go. If you share your custom shader we may be able to help you troubleshoot.

In my understaning, the Trip-layer is (x, y, time) version of Path-layer (x, y, height). The thrid dimension of path-layer is replaced by time in trip-layer. I hope to create a (x, y, height, time) trip-layer. Is that possible?

@YuhangGu You will need to extend the PathLayer, not the TripLayer. See developer guide regarding custom layers.

I tryed to modify shaders vertex.glsl but failed.

Without you providing your code sample, all we can give you is abstract advice.

Would I be right in assuming one would also need to extend the Tesselator layer so the position values can accept 4 values?

@SymbolixAU I would suggest adding a new attribute. This is not hard to do from where I stand - the main reason it was not implemented was backward compatibility. Maybe in 7.1 we can add a new prop getTimestamps to this layer:

TripLayer({
  getPath: ... // returns array of [x, y, z]
  getTimestamps: ... // returns array of timestamps
});

And if getTimestamps is not provided, we interpret the results from getPath as [x, y, timestamp].

Is there any chance this could be implemented any time soon? It would be an extremely useful feature

@harisbal We are working on releasing 7.1.0 this week which will include https://github.com/uber/deck.gl/pull/3140, a prerequisite for rendering arbitrary 3D paths. We will be able to work on this feature after the release.

@Pessimistress - thanks for https://github.com/uber/deck.gl/pull/3192 - this is a great feature

The getTimestamps API is now available in TripsLayer as of 7.1.1

@Pessimistress thank you so much :)

@Pessimistress thank you so much for the efforts!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rjimenezda picture rjimenezda  路  3Comments

TareqAlqutami picture TareqAlqutami  路  3Comments

nagix picture nagix  路  3Comments

jianhuang01 picture jianhuang01  路  3Comments

SymbolixAU picture SymbolixAU  路  4Comments