0% found this document useful (0 votes)
83 views8 pages

PBR Basics Antb1

PBR (Physically Based Rendering) allows materials to be rendered more realistically by simulating how light interacts with different surfaces. In XPlane, normal maps store PBR information in their RGBA channels: height in R and G, metalness in B, and smoothness in A. To implement PBR, create diffuse, height, normal, metalness, and smoothness maps. Combine the latter three into the normal map by copying their channels. Bake the result onto the 3D model. For simple edits, hand-paint the normal map's alpha channel to control specularity.

Uploaded by

Cullen Pinkus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views8 pages

PBR Basics Antb1

PBR (Physically Based Rendering) allows materials to be rendered more realistically by simulating how light interacts with different surfaces. In XPlane, normal maps store PBR information in their RGBA channels: height in R and G, metalness in B, and smoothness in A. To implement PBR, create diffuse, height, normal, metalness, and smoothness maps. Combine the latter three into the normal map by copying their channels. Bake the result onto the 3D model. For simple edits, hand-paint the normal map's alpha channel to control specularity.

Uploaded by

Cullen Pinkus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

THE BASICS OF PBR IMPLEMENTATION IN XPLANE

THE BASICS OF PBR


IMPLEMENTATION IN XPLANE

Assumptions:

1. You are comfortable with your image-editing software and know about editing specific RGBA
channels - white = higher value, black = minimum value

2. You know how to make a ‘regular’ normal map – If not, an easy way to make one for a material
is to convert it into a height map, then use the height map to generate the normal map - see this

3. You know how to use blender ( Blender internal rendering engine) and bake multiple materials
to one object texture - see this tutorial

1
THE BASICS OF PBR IMPLEMENTATION IN XPLANE

Table of Contents

Theory .............................................................. 1
What is PBR? ................................................................. 2
What is a normal Map? .............................................. 3
PBR in XPlane ................................................... 5
Workflow suggestion .................................................... 6
Simpler workflow suggestion ..................................... 8

2
THE BASICS OF PBR IMPLEMENTATION IN XPLANE

Theory:

What is PBR?

PBR stands for Physically Based Rendering

It enables the game engine to ‘simulate’ the different ways in which light (mostly reflections)
interacts with different materials.

This can make materials look more realistic if done correctly. You can thus produce shiny
glass windows as part of the same object as a light metal, and in turn, the light will reflect
differently of both surfaces.

What is a normal map?


A normal map is a texture map that can be used to give the illusion of additional
geometry/detail on a 2d face. This reduces GPU workload.

3
THE BASICS OF PBR IMPLEMENTATION IN XPLANE

Figure 1 Diffuse texture (left) and it's normal equivalent (right)

In the case of XPlane, the normal map also can store PBR information in its channels.

An XPlane normal map can use up to four channels: R,G,B,A. The way to think of these
channels is that each channel stores information about a pixel in a normal map.

Type of Information Which Channel is it Stored in?


Height Red
Height Green
PBR metalness Blue
PBR smoothness/specularity Alpha

When viewing individual channels, they are generally displayed in black and white. Black
represents minimum channel value, and white represents the maximum value. Any values in
between the extremes will be shown as a shade of grey.

This image is purely blue. Look at the channels: The green


Figure 2 What individual channels can look like when editing. In this and red channels are purely black because red and green
case, the blue one is selected (gimp). In the blue channel, those black don't exist in any of the pixels. On the other hand, the blue
regions means that little/no blue exists in those pixels. channel is purely white.

4
THE BASICS OF PBR IMPLEMENTATION IN XPLANE

PBR in Xplane
XPlane models two types of reflectiveness:
Type What does it do Where in the _NML is this
information stored

Metalness Produces a reflection but it Blue channel


is not clear due to the
scattering of the light once
reflected. (matte - rough
surface)
Smoothness/Specularity Glossy reflection due to the Alpha channel
surface being smooth.

The diagram below illustrates how a smooth surface (left) produces a clearer reflection than
a rough surface (right). This is because a rough surface has lots of micro-surfaces with
normals in lots of different directions. This means that light rays will bounce off at different
angles as their angle of incidence is different depending on which micro-surface they hit. This
causes the light to scatter.

Examples by Ilias Tselios:

Type of Material Alpha Blue


Hi-gloss Metal high high
Glossy Plastic high low
Rough Metal low high
Rough Plastic low low

5
THE BASICS OF PBR IMPLEMENTATION IN XPLANE

Workflow Suggestion:
This is how I like to do things when it comes to PBR implementation

Download diffuse texture for a


Open in materialize Create Height Map
particular material

Create Normal Map from height map


Create Metallic Map and export Create Smoothness map and export and export. Note that this wil not be
your final normal material.

Export this file. This will be your final


Copy and paste the Smoothness Map
Open Normal Map, Smoothness Map Normal Map for the material. Don't
and Metallic Maps in the alpha and
and Metallic Map in image editing worry if the alpha is 0/near zero and
blue channels of the Normal Map
software (I use Gimp) you can't see anything. This is normal
respectively (only edit one at a time)
in the case of limited specularity.

Add to the .obj file followed by


anumber between 0 and 1:
a. NORMAL_METALNESS directive
Bake to the final object using the Add this normal map as a material
to indicate that the blue channel is
settings on page 7 image texture in blender
suitable for base reflectance.
b. ATTR_shiny_rat for the specular
level map to work

SEE THIS TUTORIAL ON HOW TO USE MATERIALIZE

6
THE BASICS OF PBR IMPLEMENTATION IN XPLANE

Figure 3Material Settings

(BLENDER INTERNAL RENDERING ENGINE)

7
THE BASICS OF PBR IMPLEMENTATION IN XPLANE

Simpler Workflow: hand-painting


This workflow is more appropriate for hand-painting simple reflection profiles for objects that
have already been made in XPlane. You may want to do this if you want to make windows
shiny in XPlane for example.

Edit the alpha channel to control specularity. More


alpha (100% opacity) makes the surface more
mirror-like. You can edit it by only selecting the
alpha channel and using the eraser to remove alpha
Open the <objectname>_NML file in image editing
or using a paint brush to add it. You can also use
software. If this does not exist, you can use a plugin
brush opacity to change the alpha values to be in
to make one. In the .obj file you must use the
between the extremes of max and min values.
TEXTURE_NORMAL directive to use it.
Don’t worry if you need 0% alpha and your image
turns out ‘invisible’ – the height information is
retained in the other channels even if you can’t see
anything.

Follow the rest of the procedures to implement the


NML file in the object by entering the appropriate
commands in the .obj file: Edit the blue channel to control diffuse reflectivity.
In GIMP, using a black paint brush reduces the blue
a. NORMAL_METALNESS directive to indicate
values. Using a white brush increases the blue value
that the blue channel is suitable for base
in the painted region. The argument of brush
reflectance.
opacity still holds
b. ATTR_shiny_rat for the specular level map to
work

You might also like