游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

分享制作2D游戏场景的相关技巧

发布时间:2013-07-20 14:57:10 Tags:,,,

作者:Junxue Li

下图截取自Facebook寻物解谜游戏《Jane Austen Unbound》。其场景是19世纪的英国(游戏邦注:这张图片并非作者所在团队的游戏作品,在此仅作为本文示例内容)。

Jane Austen Unbound(from gamasutra)

Jane Austen Unbound(from gamasutra)

针对这类场景,在设计方案通过之后,我们会先考虑画面的制作。我们可以将这幅画分解为多个元素。在这里我们可以看到沙发、钟、钢琴、画框、楼梯等东西。要制作各个物件,以沙发为例,最容易的方法是找到一张照片(要有合适的形状和透视效果,拥有足够的像素),将其转化成图片,然后进行复绘就可以了。

在多数时候,你可以找到大量符合外形需求的照片,但透视效果却未必如你所愿。那就需要进行额外加工了。你要切割不同照片的元素,例如桌椅、盘子等,添加一些变形,然后将其组合到一起,获得你所需要的效果。

有时候你得到的照片很棒,但细节部分却很模糊,导致照片无法派上用场。

在这些情况下,你可以运用一些3D技术。最基本的方法是从网上下载一些免费模型,进行简单的渲染,然后添加复绘。

以下就是两个下载免费3D模型的优秀网站:

http://archive3d.net

http://www.3dmodelfree.com

这些网站通常都有特定物体的大量模型,例如在“沙发”类别中就有超过2000种的模型。你可以选择最适合自己的一种。

objects(from gamasutra)

objects(from gamasutra)

在确定你的场景中哪些物体该使用3D模型后,最好的方法是将这些模型整合到一起置到3D场景中,渲染成一个单色图像,然后将其转到2D编辑&渲染。

要记住,最终图像更多地是取决于2D复绘,所以你并不需要像电影行业那样采用高质量的3D制作方法,例如极为复杂的着色器、高级照明等。最好以简单的方法获取3D图像,以便快速制作你的场景并降低成本(但决不要在质量上打折扣)。

在此我要用一个简单的例子为你示范这一理念。但我不能使用我们的全3D场景,所以就以单个家具开始吧。

从www.3dmodelfree.com下载这个橱柜模型。

它的UV并不是特别理想。所以我用圆柱投影来修理它的边角。如果你得到的模型UV不佳,只要使用简单的投影工具,例如平面投影,圆柱投影、自动投影等。这可以节省不少精力。不要手动调整UV,也不要在意纹理接缝。记住我们可以在2D复绘阶段轻松地解决这个问题。

然后要为它找一个理想的木材纹理,使用基本的布林材质着色器,使用着色器的一点加亮功能,为抽屉把手分配一个简单的白色着色器。

至于光照部分,仅赋予一个主光和辅助光。记住我们将在之后的2D处理过程中添加更多微妙的光照。不要使用全局光照等会降低速度的高级光照技术。

ok,现在开始渲染彩色图像。

Out Color(from gamasutra)

Out Color(from gamasutra)

然后是环境光散射(AO)图像。

Out AO(from gamasutra)

Out AO(from gamasutra)

将AO图像整合到彩色图像之上,这是一种补偿纹理和光照的好方法。

Out Final(from gamasutra)

Out Final(from gamasutra)

之后我们再进入最后的2D复绘阶段。

根据我们的经验,不管你是直接在照片上复绘物体,还是先进行3D渲染再复绘,其最终图像质量和风格是没有差别的。至于要选择哪种方法,也很简单:我们通常只用3D渲染那些无法找到优质场景照片的物体。

所以你在制作过程中,无需执拗于全2D或全3D场景,努力找到最省力的方法即可。

适合用3D处理的物件:家具、机器、建筑、人工制品。

适用用2D处理的物件:河流、山峰、植物、地面。

这里需要提到一个技巧。如果你是为客户从头设计一个场景。假如你的画面中需要一个古老的沙发,在绘制线条艺术之前,先看一眼2D照片和3D模型库。只有在模型库中找到合意的沙发时,才能将其融入自己的设计。在之后的制作阶段,这个过程就很直接简单了,只需复绘现成的沙发即可。与此相反,如果你全凭自己的想象重新设计沙发,之后你就无法找到相似的沙发照片或3D模型,这意味着你必须从头开始创建一系列内容,这需要大量的时间和精力。

但如果你选择的是手绘式的图像风格,就不合适采用这个技巧了。但即便是采用这种风格,进行3D渲染也会让你更省事。这会让你获得更精确的形状和透视效果。我有一个朋友是采用这种方法:首先用3D创建画面中的一切内容,并不分配任何纹理和光照,只是通过AO渲染灰度等级图像,然后再手绘整个画面。(本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

Good tactics of producing 2D game scene

by Junxue Li

The following blog was, unless otherwise noted, independently written by a member of Gamasutra’s game development community. The thoughts and opinions expressed here are not necessarily those of Gamasutra or its parent company.

Want to write your own blog post on Gamasutra? It’s easy! Click here to get started. Your post could be featured on Gamasutra’s home page, right alongside our award-winning articles and news stories.

Please first take a look of this picture, this is a screenshot from a facebook hidden object game Jane Austen Unbound. The setting is in early 1800s England. (This picture is not produced by our team, because it is a picture in the public domain, we take it as example to illustrate the ideas in this article.)

For scenes like this, after the design is greenlighted, we would think of the production of the picture. We can break down the picture to individual elements. Here we have couch, clock, piano, frames, stair, etc. To make an individual thing, for example, the couch, the most easy way, is to find a photograph, which is in the right shape and perspective, and with enough pixel resolution. Then you compose the photograph to the picture, apply some overpainting, then it’s done.

In most cases, you can find tons of photos of desired shape, but none is in the right perspective. Then lots of extra effort is demanded. You would cut parts of different photos, legs, plates, add some deformation, then stitch them together to get the thing you want.

Sometimes you get a good photo, but the details are too blur, rendering it useless.

In these situations, you can think a bit of 3D. The basic ideas is to download free models from the web, do some simple render, then add overpainting.
Here are few good sites to download free 3D models:

http://archive3d.net

http://www.3dmodelfree.com

For the above particular scene, let’s see the result of a few model searches in archive3d.net

On this site, there are usually scores of models of certain object, for example there are over 2000 models in the “Couch” category. You can choose the one fits your need best.

After having decided what objects in your scene should be 3D, the best tactics is to gather all these models, put them together in a 3D scene, render out a single color image, then proceed to 2D editing&overpainting.

Keep in mind, the final image depends much on 2D overpainting, so you don’t need to employ high end method of 3D production as the movie industry would demand, such as very complex shaders, advanced lightings. Try to get the 3D images by cheap method, to produce your scene fast and reduce cost (But by no means compromise quality.)

Let me give you a simple example to illustrate this idea. Sorry I can’t show our full 3D scenes, let’s go with a single furniture.

Download this cabinet model form www.3dmodelfree.com.

It’s UVs is not very good. That I use cylinder projection to fix the legs. If you get a model with bad UVs, only use basic projection tools, such as plane projection, cylinder projection, automatic projection. This can save the labor to the minimal shape. Don’t manual tweak UVs, and don’t mind the seam of the textures. Keep mind we can address these issues easily in 2D overpainting phase.

Then find a good wood texture for it, use a basic blinn shader, crank the highlight of the shader a bit. And the drawer handle is assigned only a simple white shader.

About lighting, only give a key light and a fill light. Keep in mind we will give more subtle lighting in 2D afterward. Don’t try advanced lightings such as global illumination and final gather, they are slow.

Ok, then render a color image.

Then an ambient occlusion(AO) image.

Compose the AO image on top of the color image, which gives a sense of structure and volume, it’s a good compensation to our cheap way of texturing and lighting.

Then we go to the final 2D overpainting stage.

To our experience, either you overpaint photo objects, or first 3D render then overpaint, the quality and style of the resulted graphics are of no difference. And about which method to choose, it’s very singular: we only 3D render those objects in the scene that a good photo is not available.

So in your production, don’t insist on a all 2D or all 3D scene, try to find the most labor saving combination.

Things good for 3D:  furniture, machines, architectures, manmade items;

Things good for 2D:  rivers, mountains, plants, grounds.

There’s a trick worth mentioning. If you design a scene from scratch for your client. For example, if you need a vintage sofa in your picture. Before drawing the line art, first look into the 2D photo and 3D model library. Only if you can find a desirable sofa in the library, that you put it into your design. And later in production stage, it’s very straight forward process, only a matter to overpaint the sofa you already have; on the contrary, if you design the sofa totally by mental work, and later you can’t find an identical sofa photo or 3D model, that means you must build this thing all from scratch, a lot more of works!

This trick doesn’t apply if your picture style is hand-painting. By even in this style, 3D rendering would do you some help. It would give you precise shapes and perspective. One of my friends make pictures in this way: he first builds everything in the picture in 3D, then he doesn’t assign any texture and lighting. He just renders a grey scale image by ambient occlusion, then he hand paint the whole picture.(source:gamasutra


上一篇:

下一篇: