# 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](https://4044724383-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LEyKyxZqxfQ560k-THK%2F-LnGtF3ZT3ooElAIinBC%2F-LnH3vq-59rZWVNRl41b%2Fogre21_features01.PNG?alt=media\&token=d721df85-f537-4d6e-8883-143295a39931)

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