Engine-Ready Texture Maps From One Photo: A Checklist for Unreal, Unity and Godot
When a prototype needs a surface that looks real, a single photo is usually the fastest starting point. The catch is that game engines do not take a photo. They take a set of maps: normal, height, roughness and ambient occlusion. This checklist covers how I get from one image to four engine-ready maps without the colors and bumps fighting each other.
当原型需要一个看起来真实的表面时,单张照片通常是最快的起点。问题在于游戏引擎无法直接使用照片,它们需要一套贴图:法线、高度、粗糙度和环境光遮蔽。这份清单涵盖了我如何将一张图像转换为四张引擎就绪的贴图,并确保颜色和凹凸感不会相互冲突。
Checklist before you generate: The source image should have clear light and shade. Brick, stone, fabric and scanned materials work well. Blown-out highlights and flat logos produce noisy normals. Crop to the area you actually need and remove strong lighting gradients where possible. If the material will repeat in your level, make the source tileable first. Seams in a normal map are far more visible than seams in the color texture.
生成前的检查清单:源图像应具有清晰的明暗对比。砖块、石头、织物和扫描材质效果很好。过曝的高光和平面的标志会产生噪点过多的法线。裁剪到你实际需要的区域,并尽可能消除强烈的照明渐变。如果材质需要在关卡中重复使用,请先将源图像处理为可平铺的。法线贴图中的接缝比颜色贴图中的接缝明显得多。
Generate from one source: Keep all four outputs coming from the same input. Mixing tools means the bumps and the roughness will not line up. A browser tool such as Normal Map (click here: https://getnormalmap.com/) makes all four maps from one image and exports them as ZIP packages. It needs no sign-up, so it is easy to test a few crops before committing to one.
从单一来源生成:确保所有四个输出都来自同一个输入。混合使用工具会导致凹凸感和粗糙度无法对齐。像 Normal Map(点击此处:https://getnormalmap.com/)这样的浏览器工具可以从一张图像制作所有四张贴图,并将其导出为 ZIP 包。它无需注册,因此在确定最终版本之前,可以轻松测试几种裁剪方案。
Engine-specific checks: Normal green channel: Unreal expects DirectX-style (Y-), while Unity and Godot are generally OpenGL-style (Y+). If the surface looks lit from the wrong side, flip green. Compression: import normals with the normal-map compression setting and turn sRGB off. Height, roughness and AO are data, not color. Keep sRGB off for them as well.
引擎特定检查:法线绿色通道:Unreal 使用 DirectX 风格 (Y-),而 Unity 和 Godot 通常使用 OpenGL 风格 (Y+)。如果表面看起来光照方向错误,请翻转绿色通道。压缩:导入法线时使用法线贴图压缩设置并关闭 sRGB。高度、粗糙度和 AO 是数据而非颜色,因此也应关闭它们的 sRGB。
Test under two lights: Render once under a hard side light and once under flat ambient light. If the detail only reads in one setup, lower the normal strength instead of reworking the source. If you have a favorite way to get clean height maps from a photo, I would like to hear it in the comments, especially whether you trust generated height data more than hand-painted data for your engine.
在两种光线下测试:分别在强侧光和均匀环境光下进行渲染。如果细节仅在一种设置下可见,请降低法线强度,而不是重新处理源图像。如果你有从照片中获取干净高度贴图的偏好方法,欢迎在评论区分享,特别是你是否比手绘数据更信任引擎生成的自动高度数据。