Is it possible to use background image used in previous SDK's instead of ovrScene file in 360 Videos project or is it possible to use sphere instead of skybox or cube?
The background OvrScene is hardcoded in the application currently as "assets/stars.ovrscene". An easy way to load your own custom OvrScene would be to simply save it over stars.ovrscene. Alternatively you could change the file path in the application. Another option would be to do what VrScene does and pass the file path to the scene into the app via an intent (which would involve a bit more work).
Regarding using a background panorama instead of an OvrScene, this was indeed the case before we switched to using the OvrScene. A bit more work is necessary to make that work again. The basic idea would be to render your background equirectangular panorama onto the globe. This is what we do in 360 Photos for example. If you're interested, I could send you a modified Oculus360Videos.cpp where I have it working.
Yes, we definitely need that project where we can use panoramic image instead of ovrscene file. Can you please also confirm that the project which you are going to send is using the latest SDK?
I had offered to send just the cpp. However, I'll just go over the changes you need to make to the current version of Oculus360VideosSDK to get the background panorama rendering as it's quite straightforward. All the following changes are for Oculus360Videos.cpp -- the main cpp of the project.
Starting at line 271 to 281, we want to disable loading the background scene as we will not be using it. #define out or erase the following:
// Optimize for 16 bit depth in a modest theater size Scene.Znear = 0.1f; Scene.Zfar = 200.0f; MaterialParms materialParms; materialParms.UseSrgbTextureFormats = ( app->GetVrParms().colorFormat == COLOR_8888_sRGB );
The next change is in the DrawEyeView function. Here we are going to edit the code which handles rendering when we are not playing a video -- ie. the code that currently renders the star scene and change it to render the background panorama instead. Starting at line 586, replace everything within the first block of the if statement:
because SingleColorTextureProgram and mvp are not declared. I replaced the code with the following but it's not loading the image. It only shows the black background.
// Videos have center as initial focal point - need to rotate 90 degrees to start there const Matrix4f view = Scene.ViewMatrixForEye( 0 ) * Matrix4f::RotationY( M_PI / 2 ); const Matrix4f proj = Scene.ProjectionMatrixForEye( 0, fovDegrees );
It seems the problem is the version of the SDK you are using. The changes I suggested specifically need a shader I added to the current version of the SDK's 360 Videos (It was released on the 23rd). This explains the compile errors you are getting as your version is missing the SingleColorTextureProgram shader program. Please get the latest and the changes should work.
I have another question which I asked earlier in different post but never got an answer.
We used 8 .wav files for 360 effect in earlier versions of the SDK but in latest version I couldn't find that code. Is it still possible to have that effect in latest SDK?
We don't use that code anymore hence why it was stripped out. I believe it was self contained so you could still use it if you wanted to.
We currently play the ui sounds in 360 Videos using the SoundManager class in VRLib. It's a pretty simple class and the header should explain how it works if you want to use it.