-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.2.0: depthWrite disable in map image tiles prevents use of transparent objs on top #99
Comments
This is an interesting quirk, thanks for bringing it to my attention. Transparency is something we definitely need so a fix has to be found. The original ViziCities used to use altitude to sort the layers but this starts to fail when zooming out and results in all sorts of z-buffering issues. Hopefully there's a middle-ground we can find. Out of interest, is the heatmap example online anywhere? I'm really interested in seeing what you've done with it. |
Yes the heatmap usage is online - not greatest configuration and now as a bit of a wip-on-the-side thing at: .. is now also merged in our demo project's master branch but not used in the default conf there yet. that's anyhow where the code was refactored in vizi 0.1 -> 0.2 porting: https://github.com/playsign/fidemo/blob/master/js/client/BlueprintOutputHeatmap.js the z-fight issue we fixed now as a quick first remedy just by setting the camera near clip distance further: "Fix z-fighting, camera.near 30" by @tapanij: playsign/fidemo@1c0c497 |
Nice! I like the demo, the heatmaps are a cool addition that I want to explore for some visualisations myself. Would you mind if I used and credited some of your code to create a more generic heatmap output that isn't predefined for Santander or to use temperature? Regarding the z-fighting, I still see it quite badly on the map tiles when I zoom out and orbit the camera. I suppose you could cap the camera zoom if people don't need to zoom that far. Hopefully we can find a more robust solution that doesn't require forcing tiny differences in the altitude for each layer (I always found that introduced lots of trouble in the past). |
I've been doing a little research and came across these issues in Three.js which might be useful: |
oh I don't think you saw the version with the fix yet: http://130.206.81.111/fidemo/ the version configured for santander & the heatmap is a bit older, didn't have that camera near conf yet. that's the current master of this demo project, very much WIP and there's many things going on but I think you should see there how that fixes / works around the z-fight prob. and by all means do feel free to work on making the heatmap thing generic. that's our plan too and we'll also need that if need it in the current Helsinki config as well but that is not happening yet -- I'll tell immediately if someone here will start it. |
Ah nice, that demo is awesome – love the effect when you click on the map! I'm still not a fan of using altitude fix as it puts a noticeable gap between the layers and introduces problems when you want to zoom in nice and close (things aren't actually placed on the ground any more). Plus it isn't a reliable fix, it still can cause z-fighting at certain zooms anyway. Hopefully we can find another approach that doesn't require physically separating the layers but still allowing for transparency. I hope one of the links above can help there and I'll look into them when I get a moment. |
I'm not entirely sure what's going on in this demo, but it's pretty badass. On Wed, Dec 10, 2014 at 2:33 AM, Toni Alatalo notifications@github.com
|
using an obj with transparent material on top of the map with images doesn't work -- the background shows through the map. apparently as it has depthWrite disabled.
we encountered this when using a 2d heatmap texture (generated with heatmap.js) on top of the map.
made a simple workaround: use a little altitude to sort the image tiles instead. works well for us as a quick hack/fix for now in playsign/vizicities@vizicities:0.2.0...mapImageDepthHack
however didn't make a pullreq as that just changes one hack with another (with other downsides) but just noting for info.
The text was updated successfully, but these errors were encountered: