Skip to content

Commit 6f3d0b0

Browse files
committed
Add specular occlusion documentation to StandardMaterial3D tutorial
1 parent 6b8faf3 commit 6f3d0b0

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed
3.36 KB
Binary file not shown.
Binary file not shown.

tutorials/3d/standard_material_3d.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,11 @@ Disable Fog
322322

323323
Makes the object unaffected by depth-based or volumetric fog. This is useful for particles or other additively blended materials that would otherwise show the shape of the mesh (even in places where it would be invisible without the fog).
324324

325+
Disable Specular Occlusion
326+
~~~~~~~~~~~~~~~~~~~~~~~~~~
327+
328+
Makes the object not have its reflections reduced where they would usually be occluded.
329+
325330
Vertex Color
326331
------------
327332

@@ -414,6 +419,41 @@ and wider compatibility.
414419
popular engines) can be found
415420
`here <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details>`__.
416421

422+
Bent normal map
423+
---------------
424+
425+
A bent normal map describes the average direction of ambient lighting. Unlike a
426+
regular normal map, this is used to improve how a material reacts to lighting
427+
rather than add surface detail.
428+
429+
This is achieved in two ways:
430+
431+
* Indirect diffuse lighting is made to match global illumination more closely.
432+
* If specular occlusion is enabled, it is calculated using the bent normals and
433+
ambient occlusion instead of just from ambient light.
434+
This includes screen-space ambient occlusion (SSAO) and other sources of
435+
ambient occlusion.
436+
437+
.. image:: img/spatial_material_bentnormals.webp
438+
439+
Godot only uses the red and green channel of a bent normal map for better
440+
compression and wider compatibility.
441+
442+
When creating a bent normal map, there are three things required for it to
443+
work correctly in Godot:
444+
445+
* A **cosine distribution** of rays has to be used when baking.
446+
* The texture must be created in **tangent space**.
447+
* The bent normal map needs to use the X+, Y+ and Z+ coordinates, this is
448+
known as OpenGL style. If you've imported a material made to be used with
449+
another engine it may be DirectX style, in which case the bent normal map
450+
needs to be converted so its Y axis is flipped.
451+
452+
.. note::
453+
454+
A bent normal map is different from a regular normal map. The two are not
455+
interchangeable.
456+
417457
Rim
418458
---
419459

0 commit comments

Comments
 (0)