[中英]Book of the Dead: Photogrammetry Assets
图文教程技术文章技术文库 1501 3
实名

通过了实名认证的内容创造者

发布于 2021-10-2 15:20:23

您需要 登录 才可以下载或查看,没有账号?注册

x
1.jpg


Author introduction

Zdravko Pavlov is good at VFX, video synthesis and editing, and image design. In 2014, he joined the unity demo team and participated in various particle effects, rigid body dynamics and cloth simulation of "Viking village", "the blacksmith" and "Adam". "Book of the dead" is a new field for the author. In this project, photogrammetry software is mainly used to create various environmental resources. Outdoor photography is just his hobby, so he is very happy to accept this task. In this article, he will share with you the production and development process of this project.

作者介绍

Zdravko Pavlov,擅长VFX、视频合成与编辑、图像设计。2014年加入Unity Demo团队,参与了“Viking village”, “The Blacksmith” 和 “Adam”的各种粒子效果、刚体动力学和布料模拟。“Book of the Dead”对于作者来说是一个全新的领域,在这个项目中主要是使用摄影测量软件来创建各种环境资源。户外摄影正好是他的业余爱好,所以非常乐意接受这个任务,在这篇文章中将和大家分享这个项目中的制作和开发流程。

1、The Photogrammetry workflow
The texture material of general photo scanning level comes from the DSLR digital SLR camera with 50mm lens, but other devices can also be used, such as the 24 megapixel Sony a7ii 16mm-35mm lens I usually use. Although the wide-angle lens will bring more distortion, it can be solved by processing photos with software such as Lightroom, or we can ignore this problem. The functions of photographic modeling and measurement software (photo scanning modeling software, which is popularly translated later) are powerful enough. Theoretically, 50mm fixed focus lens can get clearer photos. Scanning in a controlled studio environment is great, but using zoom lens outdoors has more advantages.
Here are some examples of photo import modeling:

1、照片级的工作流


一般照片扫描级别的纹理素材来源于50mm镜头的DSLR数字单反相机,但是也可以使用其他的设备,比如我平时使用的2400万像素的Sony a7II 16mm-35mm的镜头。虽然广角镜头会带来更多失真,通过Lightroom等软件对照片进行处理可以解决,或者我们可以忽略这个问题,摄影建模与测量软件(Photogrammetry Software,后面通俗翻译为照片扫描建模软件)的功能都足够强大。理论上50mm定焦透镜可以得到更清晰的照片,在受控的工作室环境中进行扫描非常棒,但是在户外使用变焦透镜更有优势。
下面是一些照片导入建模的例子:
2.jpg






I tried many popular photo scanning modeling software and chose realitycapture. It has better performance, can process a large number of pictures, the accuracy of the converted model can reach 185 million triangular surfaces, and supports export to ply format. When using FBX format, we encountered some errors when baking maps, so we chose ply format, but the disadvantage of ply format is that it can not scale and rotate the axis.

我尝试了许多流行的照片扫描建模软件,选择了 RealityCapture,它的性能更好,可以处理大量的图片,转换的模型精度可以达到1.85亿三角面,而且支持导出为PLY格式。使用FBX格式时在烘焙贴图时遇到了一些错误因而选择PLY格式,但是PLY格式的缺点是不能缩放和旋转轴向。

Most of the modeling faces are about 50 million ~ 90 million triangles. I upgraded the graphics card from gf980ti to gf1080, and the performance can be slightly improved. I also upgraded my photography equipment to a 42 megapixel Sony ARII 50mm lens. However, it does not have many surprising improvements as expected. The photo data stored and managed by 42mp device is about twice that of the original 24mp. It is better to use 24mp device to take as many photos as possible to get sufficient data to reconstruct the model.

大部分建模的面数大概是5000万~9000万三角形,我将显卡从GF980TI升级到了GF1080性能才略有提升。我还将摄影装备升级到4200万像素的Sony aRII 50mm镜头。但是,它并没有像期望中有太多令人惊喜的提升,使用42MP设备存储和管理的照片数据大约是原来24MP的两倍,倒不如使用24MP的设备拍摄尽可能多的照片,可以得到充分的数据来重建模型。

There are not many three-dimensional software that can handle 100 million triangular faces, so we use the characteristics of realitycapture to create a lower polygon version, about 1 million triangular faces, which can be opened in modeling software such as ZBrush and meshlab for re topology and UV development.
I often use zremesher to reconstruct low modules or manually re topology.

能够处理1亿三角形面这种数量级的三维软件并不多,所以我们使用RealityCapture的特性创建一个较低多边形的版本,100万三角面左右,可以在ZBrush、MeshLab等建模软件中打开进行重新拓扑和展UV。
我经常使用ZRemesher重建低模或者手动重新拓扑。



Then use xnormal to bake maps. Xnormal can easily handle hundreds of millions of triangles. Use the vertex color information to bake the color map. The vertex density of high polygon is enough to generate a high-definition map without interpolation between vertices. We did not use the UV and mapping features of realitycature.

At the same time, the following pictures will appear in photo scanning modeling. There are some missing areas. Mapping a map can add details to these areas.

然后使用xNormal烘焙贴图,xNormal可以轻松处理上亿的三角形。使用顶点颜色的信息烘焙颜色贴图,高多边形的顶点顶点密度足够生成一张高清的贴图,不需要在顶点之间插值。我们并没有使用RealityCapture的展UV和贴图特性。

同时,照片扫描建模会出现下面图片这样的情况,有一些丢失的区域,映射一张贴图就可以为这些区域添加细节。

Most photo scanning modeling tutorials will teach you how to avoid harsh light and shadows when scanning objects. Scanning small stones can easily solve these problems by placing them in the shadow or using boxes and turntables indoors. For big trees, shadows and AO will inevitably appear even on cloudy days. Using unity's lightingtool, shadows and AO can be removed. It requires a normal map, a bent normal map and a baked Ao, which retains complete diffuse information while removing shadows.

大部分的照片扫描建模教程会教你怎样在扫描物体时避免苛刻的光照和阴影。小石头的扫描很容易解决这些问题,只要把它们摆在阴影下或者在室内使用盒子和转盘。对于大树,即时在阴天也会不可避免的出现阴影和AO,使用Unity的DeLightingTool可以去掉阴影和AO,它需要一张normal map,一张bent normal map和一张烘焙的AO,在移除阴影的同时保留了完整的漫反射信息。

Unity-Technologies/DeLightingToolgithub.com/Unity-Technologies/DeLightingTool

Then import unity to check dynamic lighting and shader effects.

然后导入Unity检查动态光照和着色器效果。



Whether the model is examined from multiple perspectives or not, there are still some details: we can't capture each independent part of the model; Due to obstacles, photos from all angles may not be available; Sometimes the time is in a hurry, sometimes the battery is running out; I didn't realize what was missing until I went home to process the data. I made many such mistakes. Finally, I chose to solve these missing details in substance painter.

无论是否从多角度检查了模型,多少还会有一些细节问题:我们无法捕捉模型的每个独立的部分;因为有障碍物,可能无法得到所有角度的照片;有时候时间比较匆忙,有时候电池快没电了;直到回家处理数据才意识到漏掉了些什么等等问题。我犯了很多这样的错误,最后我选择在Substance Painter中解决这些丢失的细节。




2、The actual game assetsOur demo team does not have full-time scene art. Some work is outsourced to tihomir nyagolov, who has done preliminary pre research and environment construction. The main work is completed by Veselin efremov, art director. We will take photo materials from the nearby forest and turn them into resources in the demo. I have no background in scene art and have no experience in dealing with game optimization and LODs. Tihomir made some trees through growfx. I learned these production processes and took over the production of resources.
Growfx is a 3DS MAX plug-in that provides powerful and diverse tools to create vegetation and achieve a unified and natural effect. However, it relies on some old functions of Max, such as the old curve editing tool, which is not very convenient. Generally speaking, it is a good tool.

2、实际游戏资源
我们的Demo团队并没有专职的场景美术,一些工作被外包给了场景美术Tihomir Nyagolov,他做了初步预研和环境搭建,主要的工作还是我和艺术总监Veselin Efremov完成。我们会从附近的森林里拍摄照片素材,让它们变成Demo中的资源。我并没有场景美术的背景,对于处理游戏优化、LODs没有任何经验。由Tihomir通过GrowFX制作好一些树,我学会了这些制作流程并接手资源的制作。
GrowFX是一款3ds max插件,提供了强大多样的工具来创建植被,可以获得一个统一而自然的效果。不过它依赖一些max的老旧功能比如旧版的曲线编辑工具,不是很方便,总体来说是一个很好的工具。

Growfx plug-in download:
https://exlevel.com/download/exlevel.com/download/
The plants in the demo are mainly conifers, and the trunk part is mainly made by photo scanning. Using unified mapping specifications, the trunk part is repeatable.

GrowFX插件下载:
https://exlevel.com/download/exlevel.com/download/
Demo中的植物的种类以针叶树为主,树干部分主要使用照片扫描来制作,使用统一的贴图规范,树干的部分是可重复的。


Quixel worked with our team to make many small resources for the book of the dead, such as grass, shrubs, debris, etc.

Quixel与我们的团队合作,专为Book of the Dead制作了很多小资源,比如草,灌木,碎片等。

I have made CG for large forests, using multiscatter or forest pack pro and rendering with V-Ray, but book of the dead is a real-time project that needs some optimization. We assign new maps to some large structural elements (such as trunk, treetop, etc.), and convert the scanned data into normal map, parallax, transmission, etc

我曾经制作过大型森林的CG,使用Multiscatter或Forest Pack Pro并使用V-ray渲染,但是Book of the Dead是一个实时运行的项目,需要做一些优化。我们为一些大结构的元素(如树干,树梢等)分配新的贴图,将扫描数据转换为法线贴图、视差、透射等。


The normal data in megascans software is slightly modified to have a more sense of volume.

Megascans软件中的法线数据稍作修改为更有体积感。

Use normal thief and other custom 3ds Max scripts to edit the normals of the model.

使用Normal Thief和其他自定义的3ds max脚本来编辑模型的法线。



Use the above method to make different types of trees.

使用上面的方法,制作出不同类型的树。



3、Wind
Wind is the key element in the forest. We hope that the performance of the forest is vitality. Scene art Julien heijmans configures the vertex color of the tree in the scene with the wind farm solution based on vertex animation.
There are many ways to create vector field. Finally, I decided to try importing useful data from chaosgroup's fluid solution Phoenix FD to unity. Export the scene geometry to FBX to 3ds max, and the fluid passes through the vegetation to simulate the effect of turbulent wind field. Large trees will block small plants, and the impact will be less obvious.

3、风
风是森林中的关键元素,我们希望森林的表现是有生命力的。场景美术Julien Heijmans配合基于顶点动画的风场解决方案配置了场景中树的顶点颜色。
创建向量场vector field的方法有很多,最后决定试试从Chaosgroup的流体解算方案PhoenixFD中导入有用的数据到Unity。将场景几何体导出FBX到3ds max中,流体穿过植被模拟出湍流风场的效果,较大的树林会挡住小植物,影响会没那么明显。



Use the playback control function of Phoenix FD to generate a vector information map after repeated simulation.

使用PhoenixFD的回放控制功能,经过反复的模拟,生成一张向量信息贴图。

Simulation example of a single horizontal layer:

单个水平层的模拟示例:

Put the created map resources into the scene, and use a simple box to define the simulated boundary as the position reference.
This attempt can be promoted in the effects of many short films. If you use unity to make film products, I highly recommend it. The wind farm solution based on vertex animation was developed by our technical director Torbjorn laedre for this project. It is now used in many test scenarios, including the host platform version demonstrated on GDC. In the blog to be updated, Julien and Torbjorn will explain more wind farm control and detailed solutions.

将创建好的贴图资源放入场景,用一个简单的box定义模拟的边界作为位置参考。
这个尝试可以在很多电影短片的效果中推广,如果你使用Unity制作电影产品,我非常推荐使用它。基于顶点动画的风场解决方案是由我们的技术总监Torbjorn Laedre为这个项目开发的,现在被很多测试场景使用,包括GDC上演示的主机平台版本。在将要更新的博客中,Julien and Torbjorn会解释更多的风场控制和详细的解决方案。


4、The Hive
I had the idea of honeycomb for a long time. I used multiscatter and V-Ray rendering for conceptual design.

4、蜂巢
我很早就有了关于蜂巢的想法,使用 multiscatter并使用V-Ray渲染进行概念设计。

After the preliminary design, first create the honeycomb element to prepare for the creation of unity resources. Create a cluster using Pflow.

在初步设计后,先创建蜂巢的元素,为创建Unity资源做准备。使用pFlow创建集群。




Effects assembled in unity:

在Unity中组装起来的效果:


5、The Screwies
Use Phoenix FD to simulate human form with fluid smoke.

5、怪人
使用PhoenixFD,用流体烟雾来模拟人形。

This method can quickly preview different shapes as a reference. The final screenie character model was created by PLAmen (Paco) tamnev. You can see this detailed introduction to the role of the book of the dead:

这种方法可以快速预览不同的形状作为参考,最后的screwie角色模型是由Plamen (Paco) Tamnev创建。可以看这一篇关于死者之书角色的详细介绍:
Book of the Dead: Character and hero assets – Unity Blogblogs.unity3d.com/2018/06/08/book-of-the-dead-character-and-hero-assets/


6、The dripping sap effect
Still use Phoenix FD to make the liquid dripping effect on the screen face. First, verify that the flip solution of Phoenix FD can get such an effect.

6、滴液特效
还是使用PhoenixFD来制作screwie脸上的液体滴落效果。首先验证一下PhoenixFD的Flip解算可以得到这样的效果。


Then make it on the model of the screenie character to simulate the effect of a liquid drop. The following are different versions of the simulation:

然后在screwie角色的模型上进行制作,模拟出一片液体滴下的效果,下面是模拟的不同版本:

Obtain a single frame from the generated multiple geometry sequences, re topology, generate UVs, and use wrap3 to map to other shapes in the sequence. Finally, I get a series of blendshapes with the same topology, and use blendshapes to control animation in unity.

从生成的多个几何体序列中获取单个帧,重新拓扑,生成UV,并使用WRAP3映射到序列中的其他形状上,最后我得到了一系列有相同拓扑结构的BlendShapes,在Unity中使用Blendshapes控制动画。

It can also be used to simulate SAP on the trunk.

也可以用来模拟树干上的树液。




本帖被以下画板推荐:

自然选择,前进四!
使用道具 <
水木神川  发表于 2021-10-3 00:55:34  
2#
谢谢楼主分享
回复 收起回复
使用道具
ZB8024  发表于 2021-10-3 08:57:51  
3#
很好的资料,谢谢分享
回复 收起回复
使用道具
qq_呱呱_u79  发表于 2021-10-4 10:01:50  
4#
感谢分享,照片建模很有用
回复 收起回复
使用道具
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表