MarkusR Posted January 8, 2015 Share Posted January 8, 2015 i have a 3d monitor where each row is alternate the left or right eye cam. with eye glasses i have 3d, thats really cool in 3d games. its a nice to have in the engine. i saw occulus rift is supported, but this device is very expensive now. Quote PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Ma-Shell Posted January 8, 2015 Share Posted January 8, 2015 Hi, I did this once for c++. You can find the files in the attached zip-folder. You can just add them to your c++-Project. What you have to do to make this work: Put the files StereoRender.cpp and StereoRender.h into the folder containing your Source-files and the shader-files into the Shaders/PostEffects - folder. In App.h: #include "StereoRender.h" In App.cpp: in App::Start() (Just put it at the end before the return statement): (Actually there are some more parameters to specify e.g. the nearplane and the farplane that have a default-value. If you want to play with those, you can find them in the StereoRender.h) StereoInterlaced::PrepareStereo(context, camera); in App::Loop() (Between "world->Update();" and "context->Sync(...);") StereoInterlaced::CheckStereoKeys(window); StereoInterlaced::RenderStereo(world, camera); StereoInterlaced::DrawStereoOffsetText(10, 220); CheckStereoKeys will check the numpad keys "-" and "+" which control the offset, "/" and "*", which control the angular offset. Also the Tab-Key is used to turn on/off stereo and F1 is used to reload the shaders (you shouldn't need this one if you don't modify the shaders). Shift is used to switch between the "real" 3d using two renderings and a (more or less failed) try of having a reprojected stereo. The latter one will most likely only cause headache but I included it because I was to lazy to cut it out now . It is quite a challenge to find the most suiting values for the offset and the angular offset so you will need to play around with these and find something that suits you. DrawStereoOffsetText will draw some info like the values for Angular Offset and Offset. Have Fun and please tell me what you think about it stereo_render.zip Quote Link to comment Share on other sites More sharing options...
Ma-Shell Posted January 8, 2015 Share Posted January 8, 2015 Also note that using the "real" mode will cause your fps to drastically go down which is by the nature of the thing since the world has to be rendered twice. The reprojected stereo followed a different approach which was meant as a pure post-processing-effect to recreate the two images from one image and its depth-image. This has a significant performance advantage against the former one. There are scientific papers out there that describe the approach, so it is possible to create decent looking 3d-images with that one, but at some point I just didn't have the time to continue that one and as it is now, it isn't really good. Quote Link to comment Share on other sites More sharing options...
MarkusR Posted January 9, 2015 Author Share Posted January 9, 2015 Ma-Shell, thanks, i use only indie version at this moment but maybe can josh build this into engine. Quote PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Ma-Shell Posted January 9, 2015 Share Posted January 9, 2015 Oh, I see. I quickly translated it to LUA (and removed the reprojection-approach). You'll find Instructions on the README.txt included in the zip. At the moment, the rendering is done in the WorldUpdate-Function which is probably not optimal. Feel free to move it anywhere more suited Have Fun stereo_lua.zip 2 Quote Link to comment Share on other sites More sharing options...
MarkusR Posted January 9, 2015 Author Share Posted January 9, 2015 ohh, wow, thank you very much. its works direct Quote PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Ma-Shell Posted January 9, 2015 Share Posted January 9, 2015 I just uploaded it to the workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=372381915 This will hopefully make it more easy to integrate this into your project. All that has to be done now is the assignment of the script to the camera and the removal of the current render-code (as written on the workshop-page). 1 Quote Link to comment Share on other sites More sharing options...
MarkusR Posted January 10, 2015 Author Share Posted January 10, 2015 @Ma-Shell super Quote PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.