完全卡住了——需要模型但没有可用的——该怎么办?
所以我有这个课程,我必须在 OpenGL 中制作一个简单的游戏。 我想创造太空入侵者(基本上)。
那么我究竟应该如何让屏幕上出现的东西看上去看起来很不错呢? :( 最后,我找到了一些代码,可以让我导入 3DS 对象。我想这很甜蜜,然后将其放入一个类中,使其更加模块化和可用(http ://www.spacesimulator.net/tut4_3dsloader.html)。
但是,我使用的程序 (Cheetah3d) 错误地导出了 uv 贴图和/或用于读取 .bmp 的代码不是演示附带的代码。整个画面都很奇怪。很难解释。
所以我提出了我的问题。我应该使用什么解决方案来绘制对象?老实说,我是否应该花几个小时猜测顶点来制造一艘太空入侵船?然后也尝试将合适的纹理映射到该对象?我使用的代码很好地绘制了无纹理的对象,但我无法开始将纹理映射到它,因为我不知道哪些顶点对应于哪些多边形等。
非常感谢您对我应该做什么的任何建议。 :D
So I've got this class where I have to make a simple game in OpenGL.
I want to make space invanders (basically).
So how in the world should I make anything appear on my screen that looks decent at all? :(
I found some code, finally, that let me import a 3DS object. It was sweet I thought and went and put it in a class to make it a little more modular and usable (http://www.spacesimulator.net/tut4_3dsloader.html).
However, either the program I use (Cheetah3d) is exporting the uv map incorrectly and/or the code for reading in a .bmp that ISN'T the one that came with the demo. The image is all weird. Very hard to explain.
So I arrive at my question. What solution should I use to draw objects? Should I honestly expect to spend hours guessing at vertices to make a space invader ship? Then also try to map a decent texture to this object as well? The code I am using draws the untextured object just fine but I can't begin to go mapping the texture to it because I don't know what vertices correspond to what polygons etc.
Thanks SO for any suggestions on what I should do. :D
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有纹理加载器,您可以绘制纹理四边形。
我真的不会太担心你的“uv 贴图”——如果你能得到正确的顶点,那么你通常可以把一些东西弄乱。这就是我会做的。
You could draw textured quads, provided you have a texture loader.
I really wouldn't worry too much about your "uv map" - if you can get your vertices right then you can generally cludge something anyway. That's what I'd do.