> For the complete documentation index, see [llms.txt](https://apertus.gitbook.io/vr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apertus.gitbook.io/vr/plugins-on-windows/photorealistic-render/how-to-use.md).

# How to use

Before you can use the plugin you must do the following steps (we assume you already have a working ApertusVR on your computer, if you do not, check out our guide [here](https://app.gitbook.com/@apertus/s/vr/~/edit/drafts/-Lmy_mey0x8FDWpjjnSp/developers/developers-guide)):

1. Open Cmake and check in the followings: APE\_PLUGIN\_Ogre21Render, APE\_PLUGIN\_PhotorealisticScene.
2. Make sure to **uncheck** the following: APE\_PLUGIN\_OgreRender.
3. (Optional) If you want to examine the sample using this plugin check in: APE\_SAMPLES\_PhotorealisticScene.
4. Press Configure then Generate.

![](/files/-LnC6qacHlSFu3eIdTLx)

To use the plugin you can make your own sample or use an existing one. To create an empty sample skeleton in ApertusVR you can use the following guide:&#x20;

{% content-ref url="/pages/-L\_lANi-8yzzjVCGmob6" %}
[Creating a sample](/vr/developers/getting-started/creating-a-sample.md)
{% endcontent-ref %}

When you have your sample you can add the plugin by the following steps:

1. Open your sample's config folder at: ..\ApertusVR\samples\MyScene
2. Open your config where you want to use the plugin.
3. Here you must find a CMakeLists.txt (..\ApertusVR\samples\MyScene\configs\myconfig\CMakeLists.txt)
4. Open CMakeLists.txt.
5. In the set property you must add the followings : apeOgre21RenderPlugin.json. You should already have the followings if not you must add them: apeOisUserInputPlugin.json, apeCore.json.
6. Save your changes and close the file.
7. Open apeCore.json at ..\ApertusVR\samples\MyScene\configs\myconfig\apeCore.json
8. Add the followings to the "plugins" attribute: "apeOgre21RenderPlugin", "apeOisUserInputPlugin", "apePhotorealisticScenePlugin".
9. Save your changes and close the file.
10. Open CMake and click Generate.

![..\ApertusVR\samples\MyScene\configs\myconfig\CMakeLists.txt](/files/-LnCEVcYE1wPHSU6dbui)

![..\ApertusVR\samples\MyScene\configs\myconfig\apeCore.json](/files/-LnCHtP784Se3xaZgyd6)

Now you have a sample that uses our Photorealistic Render Plugin. You can use your own plugin to populate your scene with PBS objects. To create your own plugin check out the following guide:

{% content-ref url="/pages/-L\_lAA5cGXAV7-64pDgK" %}
[Creating a plugin](/vr/developers/getting-started/creating-a-plugin.md)
{% endcontent-ref %}

For more information read the How to configure tab.

#### glTF format:

To use glTF files in your project you must do the followin steps alongside with the earlier mentioned:

1. Open CMake and check in: APE\_PLUGIN\_AssimpAssetLoader.
2. Click Generate.
3. Open CMakeLists.txt at ..\ApertusVR\samples\MyScene\configs\myconfig\CMakeLists.txt
4. In the set property add the following: apeAssimpAssetLoaderPlugin.json.
5. Save the changes and close the file.
6. Open apeCore.json at ..\ApertusVR\samples\MyScene\configs\myconfig\apeCore.json
7. Add the following to the "plugins" attribute: "apeAssimpAssetLoaderPlugin".&#x20;
8. Add the following to the "resourceLocations" attribute: "/plugins/assimpAssetLoader/resources"
9. Save your changes and close the file.
10. Open CMake and click Generate.

**Important**: You can not use mpSceneMakerMacro->makeModel() function while using apeAssimpAssetLoaderPlugin in your plugin and sample

![..\ApertusVR\samples\MyScene\configs\myconfig\CMakeLists.txt](/files/-LnCwFt_kBN2WqJZGMr6)

![..\ApertusVR\samples\MyScene\configs\myconfig\apeCore.json](/files/-LnDBW3DmB3kLSVFCdi7)

Makes sure to copy all your glTF model's files to: ..\ApertusVR\plugins\assimpAssetLoader\resources. Or you can add its location to ..\ApertusVR\samples\MyScene\configs\myconfig\apeCore.json under the "resourceLocations" attribute. To load a .glTF file into your scene you must edit the apeAssimpAssetLoaderPlugin.json file at ..\ApertusVR\samples\MyScene\configs\myconfig\apeAssimpAssetLoaderPlugin.json. More information about editing apeAssimpAssetLoaderPlugin.json can be found under the **How to configure** tab.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apertus.gitbook.io/vr/plugins-on-windows/photorealistic-render/how-to-use.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
