[gdc19]《蜘蛛侠》开发解读(2/4)--工具篇

本文深入探讨了《蜘蛛侠》游戏中的关键技术,包括Houdini流水线的应用、LOD与光照处理以及编辑器升级历程等内容。文章详细介绍了如何利用Houdini进行场景生成,实现高效光照和LOD管理,并回顾了编辑器的发展过程。

在这里插入图片描述
在《蜘蛛侠》中,工具对于游戏的品质可以说是愈发重要,说是和runtime相提并论也不过分,也正是工具的出色发挥,能支撑spiderman的优秀品质。
这里主要谈三个方面:

  • houdini流水线来生成场景以及细节
  • lod&光照
  • 编辑器升级历史

houdini流水线

从gr开始,houdini近几年谈的比较多了。
spiderman可以说用的比较重度,覆盖的范围非常的广,可以说主体都覆盖了:

  • 路面,路径,路面细节
  • 建筑,各种装饰
  • 车辆,特效等
  • 一些gameplay事件
    houdini的流水线也比较复杂和长:
    在这里插入图片描述
    这部分的构建可以说比较强大了。

然后在实际应用中有几个要点:

  • 分治:做好模块化,一个区一个区的来生成
  • 简化:尽量保持流程简单,减少耦合,减少策划美术的选项
  • 清晰化:了解到整个自动化生成流程,与传统手摆很不一样,上游改动会影响到下游
  • 打好tag,自动生成的,手摆的,都要有不同的区分

LOD

spiderman里lod一大特色就是3d imposter,一个是保持了ps4该有的品质(billboard式的imposter就太low了),一个是维持了很高的性能
在这里插入图片描述
是这样的一种面数极低的imposter,而且组织方式是以一个zone为单位,内部imposter的贴图达成atlas,然后以类似cubemap的方式来sample(mesh不存uv)
在这里插入图片描述
生成3d imposter mesh的过程就是:

  • 合并能和的面
  • 内部面都去掉
    mesh本身:
  • 没有normal和uv,完全通过position来反算(normal因为都是axis aligned)

光照的probe摆放

光照是IBL是realtime生成的envmap,生成为position通过houdini+美术手摆来完成。

diffuse lighting是offline baked lightgrid(算是一个irradiance volume),hdr格式,在一个volume里,生成大量的256分辨率的cubemap,然后convolve到hdr的颜色+方向;
spiderman里也有time of day, 所以是cook了四套。

关于这个volume based GI,现在知道的方案是:

  • 战神4,蜘蛛侠:offline baked,蜘蛛侠bake多套用于多个时段
  • 荒野大镖客:听开发者说是volume的方式,是不是realtime 生成的不知道
  • division系列:是offline bake surfel信息,然后实时生成GI Volume
    一定程度上可以说是比较成熟的方案了。

编辑器本身

  • 制作蜘蛛侠,内部包括map editor, fx editor, cinematic…一共有12个editor
  • 早先是html5的然后逐步迁移到qt的c++的
  • 使用json做配置文件

中间h5编辑器到c++也展现了其比较务实老练的一面,如果全都推到重来肯定是最方便的。
但是团队是一步步来做的:

  • 始终保持格式兼容
  • 老的h5不再开发,只是做一些debug
  • 逐步迁移

DDL(data definition language)

这是挺有意思的一个点,实际在insomniac,战神中有应用。
和同事也有一些讨论,可能后面专门总结一个文章较好。
简言之,就是定义meta信息(可以使用xml,json,protocal buffer等等),然后生成头文件,编译到项目里。
好处若干,有的是未来跨平台,跨语言,有的是data driven,让策划美术可以使用等等。

reference

  • Tools for ‘Marvel’s Spider-Man’: Editing with Immutable Data
  • Procedurally Crafting Manhattan for ‘Marvel’s Spider-Man’
  • ‘Marvel’s Spider-Man’: A Technical Postmortem
  • ‘Marvel’s Spider-Man’: Procedural Lighting Tools
patching file zlib/zutil.h touch /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/build_dir/toolchain-aarch64-openwrt-linux/gdb-16.3/.prepared (cd /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/build_dir/toolchain-aarch64-openwrt-linux/gdb-16.3/; if [ -x configure ]; then cp -fpR /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/scripts/config.{guess,sub} /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/build_dir/toolchain-aarch64-openwrt-linux/gdb-16.3// && CC="/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/bin/gcc" CFLAGS="-O2 -I/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/include" CXX="/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/bin/g++" CPPFLAGS="-I/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/include" CXXFLAGS="-O2 -I/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/include" LDFLAGS="-L/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/lib" CONFIG_SHELL="/usr/bin/env bash" acx_cv_cc_gcc_supports_ada=false gdb_cv_func_sigsetjmp=yes bash ./configure --prefix=/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/toolchain-aarch64-openwrt-linux --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=aarch64-openwrt-linux --with-gmp=/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host --with-mpfr=/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host --with-mpc=/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host --with-expat=/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host --disable-werror --without-uiout --enable-tui --disable-gdbtk --without-x --without-included-gettext --enable-threads --disable-unit-tests --disable-ubsan --disable-binutils --disable-ld --disable-gas --disable-sim --without-python ; fi ) checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... aarch64-openwrt-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for a sed that does not truncate output... /bin/sed checking for gawk... gawk configure: WARNING: neither ld nor gold are enabled checking for gdbserver support... no checking for x86_64-pc-linux-gnu-gcc... /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/bin/gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/bin/gcc accepts -g... yes checking for /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/bin/gcc option to accept ISO C89... none needed checking for /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/bin/gcc option to accept ISO C99... none needed checking whether we are using the GNU C++ compiler... yes checking whether /home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/host/bin/g++ accepts -g... yes checking whether g++ accepts -static-libstdc++ -static-libgcc... yes checking for x86_64-pc-linux-gnu-gnatbind... no checking for gnatbind... no checking for x86_64-pc-linux-gnu-gnatmake... no checking for gnatmake... no checking whether compiler driver understands Ada and is recent enough... (cached) false checking for x86_64-pc-linux-gnu-gdc... no checking for gdc... no checking whether the D compiler works... no checking for cargo... no checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2 checking for objdir... .libs checking for the correct version of gmp.h... no configure: error: Building GDB requires GMP 4.2+, and MPFR 3.1.0+. Try the --with-gmp and/or --with-mpfr options to specify their locations. If you obtained GMP and/or MPFR from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages. Makefile:77: recipe for target '/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/build_dir/toolchain-aarch64-openwrt-linux/gdb-16.3/.configured' failed make[3]: *** [/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/build_dir/toolchain-aarch64-openwrt-linux/gdb-16.3/.configured] Error 1 make[3]: Leaving directory '/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/toolchain/gdb' time: toolchain/gdb/compile#3.11#7.65#9.21 ERROR: toolchain/gdb failed to build. toolchain/Makefile:91: recipe for target 'toolchain/gdb/compile' failed make[2]: *** [toolchain/gdb/compile] Error 1 make[2]: Leaving directory '/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x' toolchain/Makefile:89: recipe for target '/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/toolchain-aarch64-openwrt-linux/stamp/.toolchain_compile' failed make[1]: *** [/home/soho/code/x10/codee/iplatform/board/model_mtk_mt798x/sdk/mtk798x/openwrt-26.0x/staging_dir/toolchain-aarch64-openwrt-linux/stamp/.toolchain_compile] Error 2 为什么?
12-19
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值