> 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/features.md).

# Features

#### Make a modell from ogre's .mesh file:&#x20;

In your plugin use the following:

```
if (auto node = mpSceneManager->createNode(fileName).lock())
{
	if (auto model = std::static_pointer_cast<ape::IFileGeometry>(mpSceneManager->createEntity(fileName, ape::Entity::GEOMETRY_FILE).lock()))
	{
		model->setFileName(fileName);
		model->setParentNode(node);
	}
}
```

Or you can use the SceneMakerMacro from ApertusVR:&#x20;

```
mpSceneMakerMacro->makeModel("MyModel.mesh");
```

* To use this feature you must include apeSceneMakerMacro.h in your plugin:

```
#include "macros/sceneMaker/apeSceneMakerMacro.h"
```

#### Create Light:

```
if (auto light = std::static_pointer_cast<ape::ILight>(mpSceneManager->createEntity("light", ape::Entity::LIGHT).lock()))
	{
		light->setLightType(ape::Light::Type::DIRECTIONAL);
		light->setLightDirection(ape::Vector3(1, -1, 0));
		light->setDiffuseColor(ape::Color(0.6f, 0.6f, 0.6f));
		light->setSpecularColor(ape::Color(0.6f, 0.6f, 0.6f));
	}
```

To change the light type change the "DIRECTIONAL" keyword in the code just above.Light types provided by ApertusVR and Ogre:

* SPOT, DIRECTIONAL, POINT

#### SkyBox:

To change the skybox ,you can alter the SkyPostprocess files in ..\ApertusVR\plugins\ogre21Render\media\apeSky, this way the skybox image can be changed by editing the SkyPostprocess.material file:

1. Open SkyPostprocess.material.
2. Change "texture Teide.dds cubic gamma" to "texture MySkyBox.dds cubic gamma".
3. Save and close the file.
4. Copy MySkyBox.dds to ..\ApertusVR\plugins\ogre21Render\media\apeSky.

![..\ApertusVR\plugins\ogre21Render\media\apeSky\SkyPostprocess.material](/files/-LnH3vq-59rZWVNRl41b)

#### Create .mesh File:

To create your own valid .mesh file, you can use the [HLMS Editor](http://wiki.ogre3d.org/HLMS+Editor). It is a HLMS material editor for Ogre. You can find further informations about HLMS Editor [here](http://wiki.ogre3d.org/HLMS+Editor). When finished do not forget to copy the .mesh file and all its resources to a resource folder like ..\ApertusVR\plugins\ogre21Render\media\modelsV2.


---

# 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/features.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.
