iPhone 动画球体
我想在 opengles 2.0 中构建一个动画球体。基本上我想要一个透明的球体,上面有随机移动的小图像。我知道如何制作球体并在其上映射纹理。我不知道如何添加动画图像。有什么建议吗?
I would like to build a sphere in opengles 2.0 that is animated. Basically I want to have a transparent sphere on which I have small images moving around randomly. I know how to make a sphere and to map a texture on it. I don't know how to add the animated images. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种解决方案是将图像作为单独的对象而不是单个球体的一部分。如果球体是完美的圆形,则每个图像可能是从球体侧面拍摄的方形块。然后,可以像任何其他对象一样对图像进行渲染和动画处理,而不是尝试将它们全部映射到一个对象上。
可以通过更改对象的纹理坐标来对纹理进行动画处理,但我不确定这是否适用于您的情况。运动受到更多限制,因为您要么必须将整个纹理作为一个整体移动,要么使用多个纹理层和坐标集。
One solution would be for the images to be individual objects rather than part of a single sphere. If the sphere is perfectly round, each image could be a square patch taken from the side of a sphere. The images could then be rendered and animated like any other object, rather than attempting to map them all onto one object.
It's possible to animate textures by changing the texture coordinates of the object, but I'm not sure if that'll work in your case. The motion is much more limited as you either have to move the whole texture as one piece or use multiple texture layers and sets of coordinates.