Adding VR to a No Man's Sky infinite universe game

Hi,

I have written a No Man’s Sky style procedurally generated universe “game” in DirectX and would like to make it work with Vive headset (probably vive but not purchased yet). Hard to know where to start in terms of questions but here goes:

  1. Can I add VR support to an existing DirectX program using some existing library?

  2. Could I rewrite in UE4 given that all my meshes are created procedurally? That would be better as I’d have all of the rendering, particle features etc of UE4

  3. I’m sure there is a way to create meshes dynamicaly in UE4 but the thing is, in order to create an infinite universe, my data structure is a bit unusual. I have a 3d grid of cube volumes (like an 11x11 Rubic cube) with each cube volume having a list of all the meshes init. The meshes and detail in each cube is created from an integer seed generated from a simple function. When the player moves out of the middle cube all the cubes are effectively shunted along so the cube the player has entered is recentered. The players position is is shunted back as well of course. In this way the universe is practically infinite.

Anyway, you see my challenge. How to best integrate VR into my game. i) Add VR support using some library or ii) rewrite in UE4 by somehow implementing my shunting Rubics cube data structures. The shunting has to be synced and in between frames of course to make sure all objects and player move seamlesly at the same time in between a frame.

Hope thats enough info to get some helpful pointers,

Many thanks!

Hey ,

If you want to create procedural meshes, have a look at UProceduralMeshComponent component. Components are attached to your actors which you place in your scene.

There’s also a great open source solution for procedural meshes in UE4 called RuntimeMeshComponent

C++ Tutiorials to get started with UE4

https://docs.unrealengine.com/latest/INT/Programming/Tutorials/
https://docs.unrealengine.com/latest/INT/Programming/index.html

Good luck with your project

Many thanks, RuntimeMeshComponent looks helpful. Will take a look at it.