如何在Google地图上添加3d对象作为标记,就像Uber一样 [英] How can I add a 3d object as a marker on Google Maps like Uber does
问题描述
我想添加一个3D标记,用于在地图上显示像Uber一样的旋转,但我找不到有关在Google Maps SDK for iOS上添加3d对象的任何信息。
I want to add a 3d marker for showing cars on map with rotation like Uber does but I can't find any information on adding 3d objects on Google Maps SDK for iOS.
非常感谢任何帮助。
显然没有人看到OP和我看到的东西所以这里是<优步=https://www.dropbox.com/s/sngka80y99c9kh3/uber-cropped.mov?dl=0 =noreferrer>视频优步汽车转向90度。逐帧播放,你会发现它不是一个简单的图像旋转。要么优步经历了每辆车的360度角度的麻烦,要么它真的是3D模型。对我来说,制作每张车的360张图片看起来很愚蠢。
Apparently no one is seeing what OP and I are seeing so here's a video of a Uber car turning 90 degrees. Play it frame by frame and you'll notice that it's not a simple image rotation. Either Uber went through the trouble of doing ~360 angles of each vehicles, or it really is a 3D model. Doing 360 images of every car seems foolish to me.
推荐答案
据我所知,他们没有使用3D对象。它们也没有在不同角度的400辆汽车图像之间制作动画。他们正在混合使用旋转图像资源,并在不同角度对约50-70个汽车图像进行动画制作。幻觉是完美的,因为它确实看起来像他们使用的3D汽车模型!
From what I can tell, they are not using 3D objects. They are also not animating between 400 images of a car at a different angle. They're doing a mix of rotating image assets and animating between ~50-70 images of a car at different angles. The illusion is perfect because it really does look like they used 3D car models !
看看这辆优步汽车拐弯处的GIF(
Look at this GIF of a Uber car turning a corner (Dropbox link):
我们可以清楚地看到阴影和汽车的视角不会像汽车的旋转一样频繁更新。
We can clearly see that that the shadow and the car's view angle doesn't update as often as the car's rotation.
在这里,我以不同的角度覆盖了2辆汽车的图像,但是使用相同的汽车图像:
Here I overlaid 2 images of the car at different angles, but using the same car image:
我们可以看到地图旋转了~5度,但汽车图像非常清晰,因为它没有改变,只是旋转了。
We can see that the map is rotated ~5 degrees but the car image is perfectly clear because it hasn't changed, it was simply rotated.
这篇关于如何在Google地图上添加3d对象作为标记,就像Uber一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!