# X3D specification 4.0 draft, with Physically-Based Rendering materials supported by Castle Game Engine

**URL:** https://forum.castle-engine.io/t/x3d-specification-4-0-draft-with-physically-based-rendering-materials-supported-by-castle-game-engine/212
**Category:** News
**Created:** [August 20, 2020, 9:17pm UTC](https://forum.castle-engine.io/t/x3d-specification-4-0-draft-with-physically-based-rendering-materials-supported-by-castle-game-engine/212 "2020-08-20T21:17:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [August 20, 2020, 9:17pm UTC](https://forum.castle-engine.io/t/x3d-specification-4-0-draft-with-physically-based-rendering-materials-supported-by-castle-game-engine/212/1 "2020-08-20T21:17:04Z")

</div>

| [![DamagedHelmet_0](https://castle-engine.io/wp/wp-content/uploads/2020/03/DamagedHelmet_0-200x113.png)](https://castle-engine.io/wp/wp-content/uploads/2020/03/DamagedHelmet_0.png "DamagedHelmet\_0") |

Our engine uses [X3D nodes](https://castle-engine.io/vrml_x3d.php) to express everything that is rendered in 2D or 3D inside [TCastleScene](https://castle-engine.io/manual_scene.php).

That is why, as I [announced previously](https://castle-engine.io/wp/2020/07/20/pull-request-to-x3d-4-0-to-add-physically-based-rendering-and-other-improvements-merged/), I was working on X3D specification to [incorporate some modern rendering features in X3D 4.0](https://github.com/michaliskambi/x3d-tests/wiki/X3D-version-4:-New-features-of-materials,-lights-and-textures), in particular _Physically-Based Rendering_.

I’m happy to announce that the result of this work is now available publicly. It is [X3D 4.0 2nd working draft](https://www.web3d.org/x3dv4-public-working-draft). Despite the “draft” specification version, it is something we actually implement in CGE _right now_, and thus the [X3D 4.0 draft specification](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/Architecture.html) serves also as a documentation for CGE. In particular see:

- [X3DOneSidedMaterialNode](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#X3DOneSidedMaterialNode), which corresponds to CGE class [TAbstractOneSidedMaterialNode](https://castle-engine.io/apidoc-unstable/html/X3DNodes.TAbstractOneSidedMaterialNode.html). This is an ancestor for all materials, it specifies e.g. normalmap and emissive color.
- [UnlitMaterial](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#UnlitMaterial), which corresponds to CGE class [TUnlitMaterialNode](https://castle-engine.io/apidoc-unstable/html/X3DNodes.TUnlitMaterialNode.html). As the name suggests, this is “unlit” (not affected by lights) material.
- [Material](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#Material), which corresponds to CGE class [TMaterialNode](https://castle-engine.io/apidoc-unstable/html/X3DNodes.TMaterialNode.html). This is the “classic” Blinn-Phong lighting model.
- [PhysicalMaterial](https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-WD2/Part01/components/shape.html#PhysicalMaterial), which corresponds to CGE class [TPhysicalMaterialNode](https://castle-engine.io/apidoc-unstable/html/X3DNodes.TPhysicalMaterialNode.html). This is the _Physically-Based_ lighting model, fully consistent with glTF 2.0 PBR materials.
