My wish was to build a game which I can start in 3D as well in VR.
All files are attached as example!
Step by step:
1.) Download CryEngine 5.6.5 = Masterenginepath
HDD:\CRYENGINE Launcher\Crytek\CRYENGINE_5.6
2.) Download GameSDK Samplescene = Master-SDK-Path
HDD:\CRYENGINE Launcher\Crytek\gamesdk_5.6
3.) Copy the Master-SDK-Path to any location and name it as your project, for example „my game“
Copy: HDD:\CRYENGINE Launcher\Crytek\gamesdk_5.6\ GameSDK
Rename the copy: HDD:\CRYENGINE Launcher\Crytek\gamesdk_5.6\My Game
4.) open this folder and rename the „GameSDK.cryproject“ – file to your projects name. For example:
HDD:\CRYENGINE Launcher\Crytek\gamesdk_5.6\ My Game\my_game.cryproject
5.) open this *.cryprojectfile with notepad++ and edit in the „Info-Block“ your NAME:
from:
Code: Select all
"name": "GameSDK"
Code: Select all
"name": "my_game"
Code: Select all
{
"type": "EPluginType::Native",
"path": "CryLobby"
},
Code: Select all
{
"path": "CryOculusVR",
"type": "EPluginType::Native"
},
Save and close your *.cryprojectfile
6.) open the CryEngine launcher and hit in the projects-section „import“. Browse to your location and import the project (my game - root). Now run the project and open or create within a new map.
-> If the CryEngine-Launcher wont import the project please make sure that you dont have setup the top "GameSDK" folder (inside is the 2nd one - renamed to your project)
The path you want to import must be looking like this: HDD:\My Game\my_game.cryproject
The sandbox-Editor should start now properly
7.) Once your map is created (https://docs.cryengine.com/display/CEMANUAL/Tutorials), place a SpawnPoint (where you want to start in your map) by using:
Create Object -> Legacy Entities -> SpawnPoint
-> now hit in the menu bar upper left:
File -> Export to Engine
-> close the Sandbox-Editor
8.) Enable the basic movement for Oculus Rift S controllers:
• Create in your project path the folder [GameSDK\libs\Config]
• extract into this path the [defaultProfile.xml] from [GameSDK\gamedata.pak\libs\Config]
• open this [GameSDK\libs\Config\defaultProfile.xml] and search the string: <!-- Actor 2 basic movement -->
• Change the section FROM:
Code: Select all
<!-- Actor 2 basic movement -->
<action name="xi_movey" xboxpad="xi_thumbly" ps4pad="pad_stickly"/>
<action name="xi_movex" xboxpad="xi_thumblx" ps4pad="pad_sticklx"/>
<action name="xi_rotateyaw" xboxpad="xi_thumbrx" ps4pad="pad_stickrx"/>
<action name="xi_rotatepitch" xboxpad="xi_thumbry" ps4pad="pad_stickry"/>
<!-- ~Actor 2 basic movement -->
Code: Select all
<!-- Actor 2 basic movement -->
<action name="xi_movey" xboxpad="xi_thumbly" ps4pad="pad_stickly" oculustouch="otouch_stickly" openvr="openvr_l_pad_y"/>
<action name="xi_movex" xboxpad="xi_thumblx" ps4pad="pad_sticklx" oculustouch="otouch_sticklx" openvr="openvr_l_pad_x"/>
<action name="xi_rotateyaw" xboxpad="xi_thumbrx" ps4pad="pad_stickrx" oculustouch="otouch_stickrx" />
<action name="xi_rotatepitch" xboxpad="xi_thumbry" ps4pad="pad_stickry" oculustouch="otouch_stickry" openvr="openvr_l_pad_y"/>
<!-- ~Actor 2 basic movement -->
Attention: Sometimes an errors appears but please try again, the 2nd build runs well. I guess some not unloaded processes causes this circumstance.
10.) After building the project please open its root and change the entries of the system.cfg to:
Code: Select all
-- ORIGINAL SYSTEM
sys_asserts = 0
sys_float_exceptions = 0
--
-- VR-Support
sys_vr_support = 0 //1 = activate VR-Support, 0 deactivate VR-Support
--
-- PROXIES
p_proxy_highlight_threshold=2000000 // highlight Polygonlimit Physical Proxy (Triangles)
e_PhysProxyTriLimit=2000000 // Limit Polygone (Triangles) Physical Proxy
Code: Select all
-- SYSTEM
sys_spec=4 // Maximum Spec
r_AntialiasingMode=4 // Antialiasingmode
r_depthbits=32 // Bits
r_vsync=0 // if V-Sync=1 FPS are fixed to 60 FPS
r_MotionBlur=0 // no motion blur
r_DisplayInfo=0 // no debug messages (FPS etc. pp.)
--
-- VR REQUIRED
r_refraction=1 // activates transparency in VR
hmd_tracking_origin=2 // Viewpos in VR, 2 = hight of eyes, 1 = pivot = feet
r_Fullscreen=0 // no fullscreen at monitor (not affects VR)
r_width=960 // resolution width in VR per eye 1920/2 = 960
r_height=1080 // resolution height
r_backbufferWidth = 1920 // resolution width eye tex
r_backbufferHeight = 1080 // resolution height eye tex
cl_bobHeight=0 // deactivate Headbob
cl_bobWidth=0 // deactivate Headbob
--
-- OPTIONAL HIDE ELEMENTS
hud_hide=0 // 1 hide the HUD, 0 HUD is anabled
g_hidearms=0 // 1 hide the arms, 0 anable arms
r_NoDrawNear=0 // 1 hide all near objects (weapon etc. pp.), 0 enabled
--
-- GRAPHICS – EXPERIMENTAL!!
r_SSReflections=1 // Screen Space Reflection -> TEST!
e_VolumetricFog=0 // voxel based volumetric fog
r_VolumetricClouds=0 // volumetric clouds
r_ssdoAmountAmbient=1.5 // default 1, raises SSDO-amount
r_ssdoAmountReflection=1000 // default 1.5 - intensified Ambient Occlusion (AO) -
r_ssdoRadius=2 // default 1.2 - intensified Ambient Occlusion (AO) – TEST!
r_ssdoRadiusMax=2 // default 0.2 - intensified Ambient Occlusion (AO) – TEST!
r_ssdoRadiusMin=0.1 // default 0.04 - intensified Ambient Occlusion (AO) – TEST!
--
-- AUTOSTART MAP IF NEED TO AUTOSTART THE MAP
map my_map
Entries:
Code: Select all
"bin\win_x64\GameLauncher.exe"
Currently it seems that CE 5.6.5 denied the builds start when an original *.logfile is written. There is a workaround in conding but unfortunately my skill is not expanded enougth in this case.
So I created another solution:
- Option 1: Delete by hand before you start your builded game the *.log-files or
- Option 2: Create a "Reset To Default.bat":
Code: Select all
echo ***BEGINN ENTRY******************************************************** >> %DATE%_MY_DEBUG_LOG.txt
echo %DATE% %TIME% >> %DATE%_MY_DEBUG_LOG.txt
echo *********************************************************************** >> %DATE%_MY_DEBUG_LOG.txt
echo. >> %DATE%_MY_DEBUG_LOG.txt
taskkill /F /IM GameLauncher.exe >> %DATE%_MY_DEBUG_LOG.txt
del *.log /S /Q >> %DATE%_MY_DEBUG_LOG.txt
del *.dmp /S /Q >> %DATE%_MY_DEBUG_LOG.txt
rd /S /Q user >> %DATE%_MY_DEBUG_LOG.txt
echo ###END ENTRY########################################################### >> %DATE%_MY_DEBUG_LOG.txt
echo. >> %DATE%_MY_DEBUG_LOG.txt
- unload all running CE-processes
- delete the user-folder
- delete all *.log-files
-> It also creates an own *.txt log where you can see what this bat has done
After using this bat the build game should running well
Thats it. Please run „Start My Game.bat“ and your map should autoload directly to VR.
If you want to run your map just as 3D but not in VR, please change in the system.cfg the entry:
from: sys_vr_support = 1
to: sys_vr_support = 0
Please note the attached files to this tutorial.