How to use
Last updated
Last updated
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):
Open Cmake and check in the followings: APE_PLUGIN_Ogre21Render, APE_PLUGIN_PhotorealisticScene.
Make sure to uncheck the following: APE_PLUGIN_OgreRender.
(Optional) If you want to examine the sample using this plugin check in: APE_SAMPLES_PhotorealisticScene.
Press Configure then Generate.
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:
Creating a sampleWhen you have your sample you can add the plugin by the following steps:
Open your sample's config folder at: ..\ApertusVR\samples\MyScene
Open your config where you want to use the plugin.
Here you must find a CMakeLists.txt (..\ApertusVR\samples\MyScene\configs\myconfig\CMakeLists.txt)
Open CMakeLists.txt.
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.
Save your changes and close the file.
Open apeCore.json at ..\ApertusVR\samples\MyScene\configs\myconfig\apeCore.json
Add the followings to the "plugins" attribute: "apeOgre21RenderPlugin", "apeOisUserInputPlugin", "apePhotorealisticScenePlugin".
Save your changes and close the file.
Open CMake and click Generate.
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:
Creating a pluginFor more information read the How to configure tab.
To use glTF files in your project you must do the followin steps alongside with the earlier mentioned:
Open CMake and check in: APE_PLUGIN_AssimpAssetLoader.
Click Generate.
Open CMakeLists.txt at ..\ApertusVR\samples\MyScene\configs\myconfig\CMakeLists.txt
In the set property add the following: apeAssimpAssetLoaderPlugin.json.
Save the changes and close the file.
Open apeCore.json at ..\ApertusVR\samples\MyScene\configs\myconfig\apeCore.json
Add the following to the "plugins" attribute: "apeAssimpAssetLoaderPlugin".
Add the following to the "resourceLocations" attribute: "/plugins/assimpAssetLoader/resources"
Save your changes and close the file.
Open CMake and click Generate.
Important: You can not use mpSceneMakerMacro->makeModel() function while using apeAssimpAssetLoaderPlugin in your plugin and sample
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.