Skip to content

Commit a405799

Browse files
committed
Add note about Blender using linearized sRGB working space
See #73
1 parent bfe5a25 commit a405799

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tools/model-export/converting-from-blender.rst

+26
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,29 @@ exporters may be required.
9494
Further, panda's native egg file format supports some esoteric things. For
9595
example, it supports blend targets (morph animations) and motion path curves,
9696
which are not supported by the X file format.
97+
98+
Why do my colors look different in Panda3D?
99+
-------------------------------------------
100+
101+
It is important to note that Blender uses a linear workflow, meaning all colors
102+
are converted from the sRGB color encoding to the "linearized sRGB" color space
103+
before being used for lighting and blending. After the render process, the
104+
colors in the framebuffer are converted back to sRGB for display on the screen.
105+
106+
Panda3D by default does not perform any color conversion, meaning that all the
107+
input colors are rendered as-is into the window. However, this can mean that
108+
colors defined in Blender will not appear the same way in Panda3D, as they have
109+
not undergone the same color conversion as Blender performs.
110+
111+
If you use blend2bam in conjunction with the panda3d-simplepbr package, this
112+
will be handled for you automatically. Otherwise, you will need to configure
113+
Panda3D to also use the linear workflow. This requires two steps:
114+
115+
#. Set your textures to use the ``Texture.F_srgb`` or ``Texture.F_srgb_alpha``
116+
texture format, which automatically linearizes the colors before they are
117+
used in the rendering process.
118+
#. Tell Panda3D to ask the graphics driver for an "sRGB framebuffer", which
119+
causes the GPU to automatically convert colors back to sRGB before they are
120+
displayed on the monitor. This is achieved by enabling ``framebuffer-srgb``
121+
in Config.prc, or by adding a post-processing filter as described in
122+
:ref:`common-image-filters`.

0 commit comments

Comments
 (0)