您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 毒游小行家 于 2021-9-27 10:02 编辑
在 Maya、Substance 和 Unreal 中创建风格化的Boat Diorama 文/Ali Mshasha
Ali Mshasha 向我们介绍了最近的 Boat Diorama 项目,讨论了 Maya 中的建模过程,并解释了水着色器的设置方式。
介绍 嘿!感谢您抽出宝贵的时间阅读本文。我很荣幸与您分享我最近完成的 Boat Diorama 项目的工作,我希望来自令人惊叹的 80 Level 社区的一些人会发现我所说的有用。 我的名字是 Ali Mshasha,我是一名 3D 环境艺术家。我住在不列颠哥伦比亚省的温哥华,我在智库培训中心的学业即将结束。
Boat Diorama项目 我开始着手这个项目时,心中有一个既定目标:提高我的风格化技能以及发展我的虚幻引擎着色器知识。 该项目的灵感之一是我的导师约翰尼马尔科姆的作品,他的艺术非常复杂和详细,但作为整体形象仍然清晰。另一个灵感,也是我选择的概念的艺术家,是Mike Azevedo。每当我看到他的情感人物和环境时,我都会感到震惊。他的船插图嵌套在一系列环境概念中,立即引起了我的注意。
造型 我通过在 Maya 中封锁船及其周围的一切来开始我的项目。为了忠实于这个概念,我使用了一个名为 fSpy 的免费程序,通过将透视图与概念图对齐来计算场景中主相机所需的焦距。
一旦我知道焦距,就很容易将我的 Maya 相机与概念艺术的视角对齐。完成后,我所要做的就是对场景进行框建模,使我的所有资产都具有可以构建的形状。从一开始,我就知道建模阶段最大的挑战将是绳索和渔网,而模型的其余部分则具有相当简单的形状。因此,在封闭阶段,我创建了一个球体,并使用 Maya 的雕刻工具将其推到周围以形成网的总体形状,并创建了绳索的粗略形状。
在封锁之后,我认为最好在 ZBrush 中雕刻鱼和刀,因为获得有机形状比在 Maya 中更容易获得。我使用 DynaMesh 雕刻鱼和刀的形状以获得具有所有形状的高多边形版本,然后我使用 ZRemesher 清理高多边形并创建雕刻的低多边形版本。我保存了这些资产的 2 个版本,低多边形版本用于 UV 展开并在我的场景中使用,高多边形版本用于在 Substance Painter 中烘焙,以便我可以将细节转移到低多边形网格的法线贴图。
将资产导入回 Maya 后,我开始创建游戏网格,该过程主要涉及对许多边缘进行斜切,并完善一些在块中不存在的细节。网是通过将斑点(我之前从封锁中获得的)变成活动表面而制成的,这意味着物体和工具将捕捉到它。然后我使用与概念艺术对齐的相机沿着概念网络绘制曲线。
一旦我有了曲线,就只是沿着它们挤压管子的问题。在 Maya 中,有几种方法可以解决这个问题。我的首选选项是创建一个 NURBS 圆,将其调整为所需的直径,然后转到 Surfaces -> Extrude Options 并沿所选曲线生成一个多边形管。这种方法比创建圆形平面并沿曲线挤出面更好,因为否则工作流程会有些破坏性。使用 NURBS 圆可使挤出的管保持活动状态,并允许您通过更改圆的大小来更改管的大小。
这种方法也适用于场景中的其余绳索。
建模过程的其余部分相当简单,除了悬垂可能需要一些布料模拟。最后,这就是我的模型的外观:
展开 在 UV 展开我的模型时,我使用了 Maya 的内置功能,这些功能在过去几年中变得非常出色。如果你没有 Maya,你可以使用 RizomUV 或 UVLayout 等软件,我相信 Blender 也有一个很好的解包工具。 在这个过程中,我面临着两个决定纹理过程的选择。第一个选项是将船视为英雄道具资产,第二个选项是将其设置为更可平铺的纹理方法。我决定采用 Hero 方法,因为我知道该项目的最终结果将是一个从原始概念的角度来看的视频,并且没有人会经历它,因此纹素密度不必非常高大的。它只需要足够高以在 4k 视频中观看时看起来不错。我将我的船分成 4 个 UV 组,用于所有不同的部分和资产,除了鱼的网、绳索和眼睛,以便我可以应用平铺纹理。下面是一个 UV 组的示例。
绳索和网以这种方式展开以适应 64x64 平铺绳索纹理。
最后,您需要确保整个网格的纹素密度相同,否则纹理看起来不会具有相同的分辨率。
纹理
纹理化阶段相对简单。它是使用 Substance Painter 和 Substance Designer 完成的。我首先创建了一个概念的调色板,我建议使用 Adob​​e Color 提取颜色以供参考和采样。这让我可以在某些东西看起来不对时直接比较值。
我将我的游戏网格带入 Unreal 并应用了一些基础材质,这些材质后来保存了从 Substance 导出的文件,这样我就可以看到我的纹理在引擎中的外观。我还将 Substance Painter 中的颜色 LUT(查找表)更改为 ACES,这与 Unreal 使用的 LUT 相同,因此我的纹理在两个软件之间看起来无法区分。我强烈推荐William Faucher 的这个教程来了解 LUT 并学习如何在 Painter 中更改它。 为了制作绳索平铺纹理,我在 Designer 中创建了一个非常简单的图形,它使用平铺生成器和几个混合在一起的斜面来创建一个简单的旋转形状。眼睛也是在 Designer 中制作的,但它本质上只是两种颜色,带有渐变径向蒙版将它们混合在一起。
在 Substance Painter 中,我烘焙了网格以生成诸如 Ambient Occlusion 和 Curvature 之类的贴图,以便稍后在纹理化时用作蒙版。 我注意到 Unreal 没有捕捉到我的木质纹理的大部分细节,所以我夸大了纹理的高度、颜色对比度和粗糙度,以更好地捕捉外观。事实上,我对大部分(如果不是全部)纹理都这样做了,这样我就可以让虚幻引擎中的所有东西都更加突出。
对于木材,我制作了多个我在 Painter 中创建的基础材料,以便我可以将它们放入我的图层中并进行相应的调整。例如,我将有一种木材材料,然后是另一种树皮材料,我将其覆盖在具有更高高度值的顶部以将其推出。这使我能够快速创建可以单独调整和编辑的不同类型的木材。 颗粒和破碎通常使用噪音或垃圾作为“填充层”上的掩码。当我需要添加特定细节时,我为蒙版添加了绘画调整,以便我可以手动绘制自己的细节。我还在高度的重大调整中广泛使用了“锚点”,以便我以后可以将它们应用为“微高度”细节,例如,在创建我的网格的曲率高光时
在创作风格化作品时,一个非常常见的做法是突出你的边缘,使它们脱颖而出,并定义你资产的整体形状。通过创建“填充层”并使用曲率生成器对其进行遮罩,可以在 Painter 中轻松完成此操作,以便“填充层”仅出现在边缘上。就您想要的而言,正确使用它需要在发生器中使用平衡和对比度滑块。蒙版该图层后,您可以将颜色调整为您想要的样式。我通常复制我的材质的基础层,并少量提高值和饱和度,偶尔,如有必要,对我的曲率高光应用轻微的色调偏移。 为了在我的船的蓝色屋顶上获得“笔触”效果,我创建了一个更亮的层,被几个“Crystal 2”噪音掩盖,最大对比度与不同的随机性种子以引入变化。然后我在蒙版上添加了一个油漆调整,以在我想要的任何地方添加一些我自己的笔触。然后,我将它们乘以“定向噪声”噪声模式来分解它们。
我遇到的另一个纹理挑战是实现金属的风格化外观。我开始通过调整金属贴图上的值来工作,但它对于风格化的作品来说似乎太现实了。因此,相反,我使用光发生器来创建一个模拟定向光的蒙版,并允许将光照烘焙到纹理中。这对于不移动的物体尤其有用,因为您可以“艺术指导”您希望物体如何捕捉和反射光线。
虚幻引擎和着色器 一旦我的纹理完成并在 Unreal 中看起来不错,我就开始研究 Water Shader。Unreal 有一个内置的水插件,它为您提供了一组相对容易的工具来创建统一的水系统。因此,如果您想制作湖泊、海洋和河流等水体,那么我强烈建议您使用此插件。 不幸的是,这些水系统与我试图实现的目标不兼容,因为它们创建了水平面,而我的西洋镜的水基本上是一个有边的立方体。这意味着我必须或多或少地从头开始创建一个水着色器。 我首先创建了一个基础材料,然后将它的一个实例应用到水形状的立方体上
然后,我将材质混合模式设置为“半透明”,打开“双面”,并将半透明照明模式更改为“表面正向着色”。这是半透明的计算量最大的模式,但看起来最适合水和玻璃。然后我开始创建取代网格的网络。由于此位移未细分,因此您需要在立方体上有足够的顶点将它们推出。对于置换,我在 Designer 中生成了一个简单的 Perlin 噪声,并通过使用 Normal Sobel 节点为其生成了一个法线,并将它们导入到 Unreal 中。使水在原地移动而不朝特定方向移动的一个好技巧是将两个相同的噪音相乘,这些噪音在彼此相反的方向上平移。在下面的节点图中,您可以看到我是如何处理这个问题的。我发现,最简单的方法是使用“Panner”节点并通过两个矢量参数设置速度,以便您可以在材质实例设置中控制它们。虽然噪声可以相乘(因为它只有 0 到 1 的线性值),但法线贴图需要稍微不同地混合。这就是我使用“BlendAngleCorrectedNormals”节点的原因,该节点使用其下方的地图校正叠加的法线贴图的方向。
将这张图放在一起后,我将法线直接插入输出节点,将黑白噪声乘以“VertexNormalWS”并将其插入“WorldPositionOffset”输出中。 这移动了整个几何体上的顶点,在我的情况下这不是我想要的,因为我的立体模型的侧面或多或少是平坦的。所以,我需要创建一个只允许我的网格顶部移动的蒙版。对我来说,最简单的方法是使用 World Position 并控制遮罩的高度和过渡,这样就不会出现突然而粗糙的遮罩来切断小波浪,而是使用柔和的过渡,淡出它们。下图显示了我的方法,这是我从另一个项目中回收的,在该项目中,我试图在不创建任何额外几何形状的情况下呈现瓶子中的液体外观。创建遮罩后,我只使用 Lerp 节点来遮罩侧面。
这就是位移最终的样子。
水中的另一个挑战是不透明度和折射。一个相对复杂的方面是能够对水产生“腐蚀性”效果。这是通过应用自定义“直方图选择”材质功能实现的(有关更多信息,请查看此视频)。此功能与 Substance Designer 中的“直方图选择”节点的用途相同,它允许我选择和对比特定范围的线性值/纹理。我插入了平移 Perlin 噪声,我用它来偏移“HistogramSelect”节点中的顶点并使它的使选定的范围增加不透明度。
照明和后期处理 我的场景的照明相对简单。我有一个暖色的定向灯打在船的前面,还有一个天窗用一些冷色调填充黑暗区域。使焦散反射到船上。我创建了一个聚光灯,上面应用了光功能材质,它平移焦散纹理的方式与平移 Perlin 以进行顶点偏移的方式相同。
在后期处理方面,我添加了一些非常轻的对比度和伽马校正以及少量的色差 - 使场景具有被相机拍摄的效果,因为现实生活中的所有相机都会导致这种类型的光线失真.
结论
在整个项目中,我遇到了几个挑战。尽管它们都没有让我迷失或停留太久!我相信这是由于事先对项目进行了彻底的规划。我强烈推荐在开始一个项目时,设置一个截止日期和一个延伸目标类型的系统。就我而言,我的主要目标是对船进行建模和纹理化,并在设定的时间内将其放入 Unreal 中。在那之后,我想在添加任何附加功能(例如烟雾和动画)之前完成水着色器。 虽然重复对提高技能很有好处,但有时你会发现自己陷入了做同样事情的循环中,以至于你没有真正学到任何新东西。我相信每个项目都是学习新事物的好方法,也是走出舒适区的机会。但最重要的是,这是一个享受乐趣并做自己喜欢做的​​事情的机会! 非常感谢您在本网站上介绍我,希望您觉得这对您有用。如果您有任何问题,可以在我的ArtStation上给我留言,我很乐意提供更多详细信息!
END
Creating a Stylized Boat Diorama in Maya, Substance & Unreal
Ali Mshasha talked to us about the recent Boat Diorama project, discussed the modeling process in Maya, and explained how the water shader was set up.
Introduction
Hey there! Thank you for taking the time out of your day to read this article. I'm honored to share with you my work on the Boat Diorama project that I recently finished and I hope some of you from the amazing 80 Level community will find what I say helpful. My name is Ali Mshasha and I'm a 3D Environment Artist. I live in Vancouver, BC and I’m nearing the end of my studies at the Think Tank Training Centre
The Boat Diorama Project
I started working on this project with a set goal in mind: to improve my stylized skills as well as to develop my Unreal Engine shaders knowledge. One of the inspirations for the project was the work of my instructor Johnny Malcolm whose art is very intricate and detailed but remains well-defined as an overall image. Another inspiration, and the artist of my chosen concept, was Mike Azevedo. His emotive characters and environments blow my mind every time I look at them. His boat illustration, nested in a collection of environment concepts, caught my eye instantly.
Modeling
I began my project by blocking out the boat and everything around it in Maya. To stay true to the concept I used a free program called fSpy to figure out the focal length that I would need for the main camera in my scene by lining up perspective to the concept art.
Once I knew the focal length, it was easy to line up my Maya camera to the concept art's perspective. Once that was done, all I had to do was box model the scene to a point where all my assets had a shape that I could build on. From the start, I knew that the biggest challenge during the modeling phase was going to be the rope as well as the fishnet, while the rest of the model had fairly simple shapes. So, during the block-out phase, I created a sphere and nudged it around with Maya's sculpting tools to form the general shape of the net and created a rough shape of the rope.
After the blockout, I thought it would be best to sculpt the fish and knife in ZBrush since it's far easier to get organic shapes than doing them in Maya. I sculpted the shapes of the fish and knife using DynaMesh to get a high poly version with all the shapes and then I used the ZRemesher to clean up the high poly and create a low poly version of the sculpt. I saved the 2 versions of these assets, the low poly version to UV unwrap and use in my scene, and the high poly version to bake in Substance Painter so I can transfer the details to the low poly mesh's Normal Maps.
Once I had the assets imported back into Maya, I began creating the game mesh and the process mostly involved beveling many of the edges and refining some of the detail that wasn't present in the blockout. The net was made by turning the blob (that I previously had from the blockout) into a Live Surface which means that objects and tools will snap to it. I then used the camera that was lined up to the concept art to draw curves along the concept's net.
Once I had curves, it was only a matter of extruding tubes along them. In Maya, there are several ways of approaching this. My preferred option was to create a NURBS circle, sizing it to the desired diameter and then going to Surfaces -> Extrude Options and generating a polygonal tube along the selected curve. This method is better than for example creating a circular plane and extruding the face along the curve because the workflow would otherwise be somewhat destructive. Using a NURBS circle keeps the extruded tube live and lets you change the size of the tube by changing the size of the circle.
This method was also applied to the rest of the ropes in the scene.
The remainder of the modeling process was fairly straightforward, with the exception perhaps of the drape, which required some playing around with cloth simulation. In the end, this is how my model looked:
Unwrapping
When it came to UV unwrapping my model, I used Maya's built-in features, which over the past few years have gotten amazing. If you don't have Maya, you can use software such as RizomUV or UVLayout and I'm sure Blender also has a great unwrapping tool. During the process, I was faced with two options that would determine the texturing process. The first option was to treat the boat as a Hero prop asset and the second was to set it up for a more tileable texturing approach. I decided to go for the Hero approach since I knew that the final result of the project was going to be a video from the original concept's perspective and no one was going to walk through it, so the texel density didn't have to be very large. It just needed to be high enough to look good while being watched in a 4k video. I split my boat into 4 UV groups for all the different parts and assets, except for the net, rope, and eyes of the fish so that I can apply tileable textures. Below is an example of a UV group. Repeating UVs were placed in the same location on a different UV Tile to make it easier to create the mesh that I was going to use for texturing and map baking.
The rope and net were Unwrapped in this manner to accommodate a 64x64 tiling rope texture.
In the end, you need to make sure that the texel density is the same across the mesh, or else textures won't appear to have the same resolution.
Texturing
The texturing phase was relatively straightforward. It was done using Substance Painter and Substance Designer. I began by creating a color palette of the concept, I recommend using Adobe Color to extract the colors for reference and sampling. This allowed me to have a direct comparison of values when something seemed off.
I brought my game mesh into Unreal and applied some base materials that later held the exported files from Substance, just so that I could see how my textures looked in the engine. I also changed the color LUT (Lookup Table) inside Substance Painter to ACES, which is the same LUT that Unreal uses, so that my textures look indistinguishable between the two softwares. To make the rope tiling texture, I created a very simple graph in Designer that uses the Tile Generator and a couple of bevels blended together to create a simple twirling shape. The eyes were also made in Designer, but it was essentially just two colors with a Gradient Radial mask blending them together.
Within Substance Painter, I baked the mesh to generate maps like Ambient Occlusion and Curvature to later use as masks while texturing. I noticed that Unreal wasn't capturing much of the detail of my wooden textures, so I exaggerated the height, color contrast, and roughness of the grain to better capture the look. In fact, I did this to most, if not all, of my textures so that I could make everything stand out a lot more within Unreal.
For the wood, I made multiple Base materials that I created within Painter so that I could throw them into my layers and adjust accordingly. For example, I would have a wood material and then another bark material that I overlayed on top with a higher height value to push it out. This allowed me to quickly create varying types of wood that can be adjusted and edited individually. Grain and break-up were usually made using noise or grunge as a mask over a "Fill Layer". When I needed to add specific details, I added a paint adjustment to the mask so that I could hand paint my own detail. I also made extensive use of "Anchor Points" on significant adjustments of height so that I could later apply them as "Micro Height" details, like for example, when creating the curvature highlights of my mesh. When creating stylized work, a very common practice is to highlight your edges to make them stand out and make the overall shape of your assets defined. This is done very easily in Painter by creating a "Fill Layer" and masking it with the curvature generator so that the "Fill Layer" only appears on the edges. Getting it right in terms of exactly what you want, requires playing around with the balance and contrast sliders within the generator. Once you have that layer masked, you can adjust the color to your intended style. I usually duplicate the base layer of my material and raise the value and saturation by a small amount and occasionally, if necessary, apply a slight hue shift to my curvature highlights. To get a "brushstroke" effect on the blue roof of my boat, I created a brighter layer masked by a couple of "Crystal 2" noises on max contrast with different randomness seeds to introduce variation. I then added a paint adjustment to the mask to add some of my own strokes wherever I wanted them. Then, I multiplied them by the "Directional Noise" noise pattern to break them up.
Another texturing challenge that I came across was achieving a stylized look for metals. I began working by adjusting the values on the metallic map but it appeared too realistic for a stylized work. So, instead, I played with the light generator to create a mask that simulates directional light and allows for baking lighting into the textures. This is especially great for objects that don't move, because you can "art direct" exactly how you want the object to capture and bounce light.
Unreal Engine and Shaders
Once my textures were done and looked good in Unreal, I began working on the Water Shader. Unreal has a built-in water plugin that gives you a set of relatively easy tools to use to create unified water systems. So, if you’re looking to make bodies of water like lakes, oceans, and rivers then I highly recommend using this plugin. Unfortunately, these water systems aren't compatible with what I was trying to achieve because they create planes of water while my diorama's water was essentially a cube with sides. That meant that I had to create a water shader more or less from scratch. I began by creating a base material and applying an instance of that to a cube in the shape of the water
Then, I set the Material blend mode to "Translucent", turned "Two-Sided" on, and changed the translucency lighting mode to "Surface ForwardShading". It's the computationally heaviest mode for translucency but looks the best for water and glass. I then began by creating the network that displaces the mesh. Since this displacement isn't being tessellated, you will need to have enough vertices on the cube to push them out. For the Displacement, I generated a simple Perlin noise in Designer and also generated a normal for it by using the Normal Sobel node and imported them into Unreal. A good trick for making water move in place without going in a specific direction is to multiply two of the same noises that pan in opposite directions to one another. In the node graph below you can see how I approached this. The easiest way, I found, is to use the "Panner" node and have the speed set by two vector parameters so that you can control them in your material instance settings. While the noise can be multiplied (since it only has linear values of 0 to 1), the Normal Maps need to be blended a little differently. This is why I used the "BlendAngleCorrectedNormals" node, which corrects the overlaid Normal Map's directions with the map below it.
Once I had this graph put together, I plugged in the normals straight into the output node, multiplied the black and white noise by a "VertexNormalWS" and plugged it into the "WorldPositionOffset" output. This displaced the vertices on the entire geometry, which in my case is not what I wanted because the sides of my diorama were more or less flat. So, I needed to create a mask that only allows the top part of my mesh to displace. The easiest way for me to do that was to use World Position and control the height as well as the transition of the masking so that there isn’t an abrupt and harsh mask that cuts off the small waves but instead, with a soft transition, fades them out. Below is the graph showing my approach, which I recycled from another project in which I was trying to give the appearance of liquid in a bottle without creating any extra geometry. Once the mask was created, I just used a Lerp node to mask out the sides.
This is how the displacement looked in the end.
Another challenge in the water was the opacity and refraction. One relatively complicated aspect was being able to get the "caustic" effect on the water. This was achieved by applying a custom "Histogram Select" material function (for more information, check this video). This function serves the same purpose as the "Histogram Select" node in Substance Designer which allowed me to select and contrast a specific range of a Linear value/texture. I plugged in the panning Perlin noise that I used to offset the vertices in the "HistogramSelect" node and made it so that the selected range would increase the opacity.
Lighting and Post-Processing
The lighting for my scene was relatively simple. I had a directional light with a warm color hitting the front of the boat and a Skylight to fill in the dark areas with some cooler tones. To get the caustics to reflect onto the boat. I created a spotlight with a light function material applied to it that panned a caustic texture the same way I panned the Perlin for my vertex offsetting.
In terms of post-processing, I added some very light contrast and gamma correction as well as a tiny amount of chromatic aberration – giving the scene the effect of being filmed by a camera since all cameras in real life can cause this type of light distortion.
Conclusion
I had several challenges throughout this project. Although none of them left me lost or stuck for too long! I believe that was due to thoroughly planning out the project beforehand. I highly recommend when starting a project, setting up a deadline and a stretch goal-type system. In my case, my main goal was to model and texture the boat and get it into Unreal within a set amount of time. After that, I wanted to finish the water shader before adding any additional features such as the smoke and animations. While repetition can be good for refining skills, you can sometimes find yourself stuck in a loop of doing the same thing to the point where you aren't really learning anything new. I believe that every project is a good way to learn something new and an opportunity to get out of your comfort zone. But most importantly, it’s an opportunity to have fun and do what you love! Thank you so much for featuring me on this website, and I hope you found this useful. If you have any questions whatsoever, you can message me on my ArtStation and I would be more than happy to provide more details!
END
|