Creating PBR materials: Difference between revisions
m (Equalizer5118 moved page Adding PBR Textures to Supported Games/en to User:Equalizer5118/Adding PBR Textures to Supported Games/en: Should have made it a user page before making it an actual page) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Language subpage}} | {{Language subpage}} | ||
[[Physically Based Rendering]] is an excellent shading technique that gives modders the ability to create amazing photorealistic maps. However, the creation process for PBR materials is much different from that of standard {{Source|4}} materials, and many modders new to the PBR workflow may not know how to create them. This article will review the process of creating a PBR material. | |||
== | ==Overview== | ||
A | A PBR material consists of 3 main files: | ||
*A [[$basetexture|Diffuse]] (base) texture | |||
*A [[Bump map|Normal]] map (optionally with a [[Height map]] embedded in the Alpha channel | |||
*A [[$mraotexture|MRAO]] map, containing information on the Metalness and Roughness data as well as Ambient Occlusion | |||
While the Diffuse and Normal map textures may already be part of the standard Source texture workflow, the MRAO map may present some difficulty to create, as standard image editing programs do not have ways to create the textures needed to make an MRAO texture. Modeling programs, such as {{blender|4}}, and image-to-texture programs, such as [https://boundingboxsoftware.com/materialize/ Materialize] can create such materials. | |||
<onlyinclude> | |||
==Creating an MRAO texture== | |||
{{note|If the program you are using utilizes "smoothness" or "glossiness" maps, make sure to invert the colors before proceeding}} | |||
There are a couple of methods used to port PBR textures to an MRAO texture. Here are two methods known to work for {{strata|2}} based games. {{confirm|Do these methods work for other PBR-supported games?}} | |||
===GIMP=== | |||
First, create a new image with the same resolution as your PBR maps. Next, open your PBR maps with the "Open as Layers..." button. This will open your PBR maps as layers to the current image, and not as separate image files. | |||
{{Note|[[File:MRAO GIMP gs.png|175px|thumb|right|Click to enlarge]]The images you import must be grayscale. Even if they are visibly grayscale, GIMP may still read them as RGB images. If you are unsure if your images are using the grayscale format, navigate to Image→Mode and make sure that the Grayscale option is checked.}} | |||
Next, navigate to Colors→Components→Compose and set the Red, Green, and Blue channels to the Metalness, Roughness, and AO layers respectively. Once you are done, export the image to a PNG or TGA file, convert it to a VTF, and then place it in the same folder as your diffuse and normalmap textures. | |||
=== | Next, create a blank VMT file. Copy-Paste the following text: | ||
{{CodeBlock|style=1|"PBR" | |||
{ | |||
$basetexture "<insert path to diffuse texture>" | |||
$bumpmap "<insert path to normal map>" | |||
$mraotexture "<insert path to MRAO map>" | |||
$envmap "env_cubemap" | |||
$normalmapalphaenvmapmask 1 | |||
} | |||
}} | |||
Change the parameters to your specified filepaths, and you are done! | |||
===PBR-2-Source=== | |||
{{Main|PBR-2-Source}} | |||
{{Todo}} | |||
</onlyinclude> |
Revision as of 10:26, 24 October 2023


Physically Based Rendering is an excellent shading technique that gives modders the ability to create amazing photorealistic maps. However, the creation process for PBR materials is much different from that of standard Source materials, and many modders new to the PBR workflow may not know how to create them. This article will review the process of creating a PBR material.
Overview
A PBR material consists of 3 main files:
- A Diffuse (base) texture
- A Normal map (optionally with a Height map embedded in the Alpha channel
- A MRAO map, containing information on the Metalness and Roughness data as well as Ambient Occlusion
While the Diffuse and Normal map textures may already be part of the standard Source texture workflow, the MRAO map may present some difficulty to create, as standard image editing programs do not have ways to create the textures needed to make an MRAO texture. Modeling programs, such as Blender, and image-to-texture programs, such as Materialize can create such materials.
Creating an MRAO texture

There are a couple of methods used to port PBR textures to an MRAO texture. Here are two methods known to work for Strata Source based games.

GIMP
First, create a new image with the same resolution as your PBR maps. Next, open your PBR maps with the "Open as Layers..." button. This will open your PBR maps as layers to the current image, and not as separate image files.

Next, navigate to Colors→Components→Compose and set the Red, Green, and Blue channels to the Metalness, Roughness, and AO layers respectively. Once you are done, export the image to a PNG or TGA file, convert it to a VTF, and then place it in the same folder as your diffuse and normalmap textures.
Next, create a blank VMT file. Copy-Paste the following text:
Change the parameters to your specified filepaths, and you are done!
PBR-2-Source
[Todo]