导入模型
用glTF格式的模型
- glTF格式介绍:https://github.com/KhronosGroup/glTF
- 在vscode安装glTF tools 插件:
- 可以跳转到具体accessor,直接查看数据
- 可以查看渲染之后的结果(包括背景和动画)
- 下载gltf模型: https://github.com/GPUOpen-LibrariesAndSDKs/Cauldron-Media/tree/v1.0.4/buster_drone
步骤
- 参考b站的教学视频 修改:
- world property:
- surface: 选background, strength 0
- 直接把surface的shader直接关掉应该也是一样的效果?
- surface: 选background, strength 0
- 光源:
- blender代码:
- https://github.com/blender/cycles/blob/main/src/scene/light.cpp
- https://github.com/blender/cycles/blob/main/src/kernel/light/spot.h
- https://github.com/blender/cycles/blob/main/src/kernel/sample/mapping.h#L114
- 改成spot light
- radius改成0:影响光锥的软硬
- blend改成0
- blender代码:
- rendering
- 用cycles:
- 引擎改成cycles:cycles是基于光追的,更符合现实情况
- noise threshold改成0, sample改成64
- Light Paths里面反弹次数(Total, Diffuse, Glossy, Transmission)都改成0
- 防止出现明亮表面和柔和边缘?
- 用eevee: eevee的效果看起来不太一样.. 因为压缩色阶的效果相当于blur+量化吧? 所以和没有blur过的结果不一致
- Film里面filter size改成0
- 在shader和material output中间,加Shader to RGB->ColorRamp
- 再把ColorRamp改成Constant, 只有黑白2个色阶
- 用cycles:
- shader
- 改成Toon BSDF
- 把反光的部分BSDF从diffuse改成glossy
- world property:
- 加入运镜,参考教学视频 https://www.bilibili.com/video/BV1eq4y1y7D2
- 在animation界面删除本来的animation
- 在layout界面开启auto key之后,点击播放:这个时候鼠标只能移动,需要按快捷键配合移动。
- 输出视频
得到viewport白模图
参考这个视频 在viewport->render pass改成Ambient Occlusion或Diffuse Light然后渲染viewport