Kuesa Reflection Planes¶
Kuesa provides support for reflection planes provided in glTF files through a custom glTF extension.
Kuesa 2.0
Kuesa provides support for reflection planes provided in glTF files through a custom glTF extension.
Adding Reflection Planes to a glTF scene¶
Using Blender¶
Assuming the Kuesa Studio Blender addon has been installed, the use of Reflection plane is straightforward.
a Reflection Plane¶
In Blender, reflection planes are found unded the Light Probe section.
Reflections¶
Once the plane has been positioned and scaled, make sure to select the Rendered Viewport Shading.
Next, go to the Object Data Properties tab of the Reflection Plane and enable the Show Preview Plane checkbox.
Reflection Planes¶
To export reflection planes, you only need to ensure that the KDAB_kuesa_reflection_planes extension has been selected in the export dialog.
Retrieving Reflection Planes¶
When loading a glTF file using the qmltype{GLTF2Importer} referencing a SceneEntity all reflection planes found while parsing while be added to the
{Kuesa::Qt3D::ReflectionPlaneCollection} {ReflectionPlaneCollection} of the scene entity.
This then allows retrieving the qmltype{ReflectionPlane} instances by name, either directly from the
{Kuesa::Qt3D::ReflectionPlaneCollection} {ReflectionPlaneCollection} if using C++ or though the use of the
C++¶
1 2 3 4 5 6 7 8 9 10 |
|
QML¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Configuring the Forward Renderer for Reflections¶
Once retrieved, the Kuesa::Qt3D::ReflectionPlane can be set on either the qmltype[CPP] {Kuesa::Qt3D::ForwardRenderer} {ForwardRenderer} or the
{Kuesa::Qt3D::View} {View} instances defined in the framegraph.
It should then be rendered. Please note however that for more advanced cases, using qmltype{Kuesa::Qt3D::View} {Views} can give you more control on the order in which rendering takes place. For instance, you might want to render the reflections after having rendered a background plane.
C++¶
1 2 3 4 5 6 7 8 9 10 |
|
QML¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|
Updated on 2023-07-03 at 11:02:17 +0000