visgl / hubble.gl

A client-side JavaScript library for animating data visualizations and rendering videos.
https://hubble.gl
MIT License
143 stars 29 forks source link

Export videos with the additive layer blend #235

Open Louisbot opened 2 years ago

Louisbot commented 2 years ago

Hi !

I am having an export issue with Hubble.gl for a Kepler.gl map.

You have to know that I don't know anything about coding even JS. My request may seems easy to resolve but I can't find the solution.

So, I made a map (everything is made manually) and i'd like to have this map with the 'additive' layer blend like this

Capture

But when I try to export the map as a video the layer blend goes back to 'normal'

Capture123

It would be really thanksful if someone can help me :)

chrisgervang commented 2 years ago

Unfortunately kepler layer blending doesn't work very well in video export, and so we did not support it.

Reason being, the video needs to interleave the dark basemap to be captured in the video, which would then mean the dark colors are blended with the orange. The main kepler map is simply overlaying layers onto the basemap, so they aren't included in the blend.

For more background on this difference check out https://deck.gl/docs/get-started/using-with-map

Different blending options could be supported for video. We are looking for contributors to investigate this idea and find nice blending options for layers interleaved with the basemap.

Here's a demo of different webgl blending techniques. And here's the blending code kepler.gl ships with. Relevant luma.gl docs. The blending option would be applied to the entire stack of layers and basemap, on the deck object's parameters prop.

Louisbot commented 2 years ago

Thank you for replying !

This means, at the moment I can't export videos with the additive layer blend ?

chrisgervang commented 2 years ago

No, it can't currently be done.

Louisbot commented 2 years ago

I'm sorry to disturb again but about this problem, unfolded.ai found a solution, the video render is great the only problem with it the interval timing which isn't that good (the map isn't fluid).

chrisgervang commented 2 years ago

Can you share what the exported video file looks like from unfolded?