如何为不同分辨率的屏幕生成精灵艺术资源?
我正在开发一款使用 OpenGL 显示精灵的游戏,即没有投影的 2d 四重映射图形,它将显示在几个不同分辨率的屏幕上。 (即iPhone视网膜/非视网膜,iPad..我的下一个项目,问题将扩展到数量更多的桌面分辨率)
我可以处理不同的纵横比,这可以通过opengl和我的精灵放置来处理。我也可以接受稍微不同的分辨率 - 使用相同的艺术,或者在屏幕上加边框,或者显示更多的信息..但是当事情开始增长/缩小 50% 以上时,这是一个主要问题。
在这种情况下生成艺术资产的标准程序是什么?生成最大分辨率并让 OpenGL 在光栅化过程中担心调整大小,或者人们是否为每个主分辨率生成艺术集?
光栅化的精灵艺术在拉伸(插值)时往往会变得丑陋,所以我很担心......但生成不同的尺寸实际上意味着出于实际目的,我必须使用矢量图形并导出多种分辨率。限制了艺术家,并且在加载和管理资源方面有些复杂
(是的,我可以在一定程度上“尝试一下”,但我已经对结果有了一个想法。我正在寻找人们使用的解决方案和我的角度)也许不会想到这个问题确实有一个答案,它不是主观的或懒惰的)
I'm working on a game using OpenGL displaying sprites, i.e. 2d quad-mapped graphics with no projection, that will be displayed on several different resolution screens. (i.e. iPhone retina/non-retina, iPad.. my next project the problem will expand to desktop resolutions which are far more numerous)
I'm OK with handling different aspect ratios, that can be handled by opengl and my placement of the sprites. I'm also OK with slightly different resolutions - use same art and either border the screen, or display a little bit more info.. but when things start to grow/shrink by like 50%+ it's a major issue.
What is standard procedure for generating the art assets in this situation? Generate for the largest resolution and just let OpenGL worry about resizing during it's rasterizing, or do people generate art sets for each main resolution?
Rasterized sprite art tends to get ugly when it's stretched (interpolated), so I'm concerned.. but generating different sizes really means for practical purposes I have to go with vector drawings and export several resolutions. Limits the artist and is somewhat complicated as far as loading and managing the assets
(Yes, I can "just try it" to an extent, but I already have an idea of the results. I'm looking for solutions people use and angles I maybe wouldn't have thought of. This question does have an answer(s) it's not subjective or lazy)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是对的,缩放位图往往会使精灵变坏。有几种方法可以解决这个问题:
对于每个选项,您都可以自由地对位图进行后处理以清理它们或添加细节,但如果您对选项 2 和 3 执行此操作,则会破坏链条,并且在渲染同一组时必须再次应用更改再次。
另一种选择是限制分辨率的变化。
据我所知,在(游戏)行业中,使所有(或最常用/可见的)精灵尽可能像素完美是很常见的。这就是他们付给艺术家的钱……
You are correct that scaling bitmaps tends to make sprites bad. There are a couple of ways of dealing with that:
For each of these options you are free to post-process the bitmaps to clean them up or add details but if you do this for options 2 and 3, you are breaking the chain and will have to apply the changes again when rendering the same set again.
An other option is to limit the variation of resolutions.
As far as I know it is very common in the (game) industry to make all (or the most used/visible) sprites as pixel perfect as possible. This is what they pay the artists for...