Page 2 of 49

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 12:29 am
by StellaArtois
Ok, yet more progress (I hope). The GUI is turning out to be a real pain. However, neck model is in, first person mod is in. 64bit JNI support is in.

Is this rifty still looking 'correct' please?
2013-04-27_07.22.21.png
Final things to do before alpha release:

- Sort GUI so it's 'good enough'
- Use correct IPD and other parameters in distortion shader instead of fixed values (and add chromatic aboration correction).

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 1:50 am
by mrklaw
I love you.

Either this mod will be ready by the time my rift arrives (at least good enou to play with) or it'll spur mojang to pull their finger put and do it officially. Either way is good for me :)

And past experience has shown me that unofficial mods are often better than official additions anyway

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 2:27 am
by StellaArtois
mrklaw wrote:Either this mod will be ready by the time my rift arrives (at least good enou to play with) or it'll spur mojang to pull their finger put and do it officially. Either way is good for me :-)
Well, that was my plan all along... :-D

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 2:54 am
by mrklaw
StellaArtois wrote:
mrklaw wrote:Either this mod will be ready by the time my rift arrives (at least good enou to play with) or it'll spur mojang to pull their finger put and do it officially. Either way is good for me :-)
Well, that was my plan all along... :-D
Keep up this work though and you'll be the defacto option. Look forward to seeing what you'll do with the GUI. Any plans for controls? Detaching look and arm?

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 5:18 am
by braddas
StellaArtois wrote:The GUI is turning out to be a real pain.
The GUI is an interesting problem, that could be why Mojang hasn't released anything themselves yet. What you've come up so far looks great, hopefully you can crack it!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 5:43 am
by StellaArtois
I can fully believe that Mojang will do a proper job of the GUI. I'm aiming to just get the GUI usable to be honest; i.e. duplicate it on both eyes, get the mouse working on the shifted buttons, try to move it to the visible area of the screen. Please don't expect a complete rework, you'll be disappointed!

In fact, what to expect in general: lower your hopes! I'll be surprised if the first alpha will even work with the rift tracker, I don't have mine yet so it's not tested. Also, it'll be 'head movement is the mouse' only in game to start with. Oh, and I've messed something up with the FBO rendering because 'fancy' graphics only displays a completely green screen at the moment...

That said, once I get the basics right, I'd love to have a go at getting the Hydra working :-)

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 7:54 am
by stinkvis
Is this going to be forge compatible?

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 8:53 am
by mrklaw
My main initial hope is 'head is the mouse' but also allowing the mouse to rotate left/right as well - lots of rotation in minecraft and the head alone wouldn't be enough I think. Then the rest as-is with a readable GUI but nothing else should still be great

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 12:20 pm
by StellaArtois
mrklaw wrote:My main initial hope is 'head is the mouse' but also allowing the mouse to rotate left/right as well - lots of rotation in minecraft and the head alone wouldn't be enough I think. Then the rest as-is with a readable GUI but nothing else should still be great
Exactly what I hope to achieve.

As to being forge compatible - not initially. Mainly because at the moment I don't know what that entails!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 3:23 pm
by stinkvis
Well, forge is an API that exposes various hooks to allow mods to modify the game without editing base classes, meaning you can use many mods together without conflicts. Pretty much all major mods require it.
I don't think you can actually make changes to the rendering code without modifying base classes, but it's still possible to keep it forge-compatible. Not sure as to the specifics; I've heard that there's documentation in the form of comments, but nothing online as far as I know.
I really hope you get around to making it compatible at some point, as the vanilla game has become almost unplayable for me.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 3:32 pm
by StellaArtois
Ok I see. I've pretty muched changed *only* the base classes, so there could be an issue there!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 3:44 pm
by stinkvis
Heh. Optifine does the same (likely the same classes) and is 100% compatible so I wouldn't worry too much :)

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat Apr 27, 2013 5:30 pm
by space123321
StellaArtois wrote: Is this rifty still looking 'correct' please?
Yes - looks great in the rift - and it is making me giggle looking at it!!!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun Apr 28, 2013 2:00 am
by kenman884
mrklaw wrote:I love you.

Either this mod will be ready by the time my rift arrives (at least good enou to play with) or it'll spur mojang to pull their finger put and do it officially. Either way is good for me :)

And past experience has shown me that unofficial mods are often better than official additions anyway
Mojang "Doing It Officially" will probably consist of them looking for the most popular mod and stealing it.

But regardless, very glad am I to see that someone much better than I am at coding is working on this! I was going to, but my programming experience is in C and Matlab, so it's probably for the best that someone else is doing it.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Tue Apr 30, 2013 4:30 pm
by zeroxoz
It might be easier if instead of drawing the same image on each eye, you render the GUI on a translucent plane fixed in position a meter or so in front of the player's eye, like they did in tf2. There may be some convergence issues otherwise?

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Tue Apr 30, 2013 6:37 pm
by tmek
These images are looking good on my Rift! I can't wait to try the alpha. Great work.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Wed May 01, 2013 1:27 am
by StellaArtois
zeroxoz wrote:It might be easier if instead of drawing the same image on each eye, you render the GUI on a translucent plane fixed in position a meter or so in front of the player's eye, like they did in tf2. There may be some convergence issues otherwise?
For the first version, doubt I can get that in. But that's a priority on the roadmap!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Wed May 01, 2013 6:49 am
by mrklaw
do you have your rift yet? If not, what order number are you? I'm way back in the high 9xxx so I'm hoping you get yours pretty quickly so there is a chance of an alpha release when my rift comes :)

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Wed May 01, 2013 7:37 am
by StellaArtois
No Rift as I'm 43xxx :-D That won't stop me getting an alpha out; but it does mean that the first couple of versions probably won't even work. I'll have to rely on those with rifts to help me debug.

Still having issues with the GUI at the moment, but getting near-ish to first release.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Wed May 01, 2013 1:31 pm
by everix92
StellaArtois wrote:No Rift as I'm 43xxx :-D That won't stop me getting an alpha out; but it does mean that the first couple of versions probably won't even work. I'll have to rely on those with rifts to help me debug.

Still having issues with the GUI at the moment, but getting near-ish to first release.
That's great to hear! (That you're getting close to the first release)

I feel your pain about the Rift though. My order number is in the late 43000's as well so we should be getting ours around the same time :D

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Fri May 03, 2013 4:57 pm
by StellaArtois
Ok getting near now. I've given up with the main GUI menus for now, trying to get them into 3D is going to take too long. The game overlay is in 3D now, but I'm getting hampered by my lack of OpenGL experience and it all looks a bit rough. Just about usable. Need to disable the windows mouse cursor and draw my own. But not for the initial release.
2013-05-03_23.38.40.png
2013-05-03_23.44.30.png
2013-05-03_23.27.13.png
I think the overlays aren't quite in the right alignment. Oh well. They can always be turned off!

Anyway, a few more things to tidy up, the first release in the next few days hopefully.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Fri May 03, 2013 7:04 pm
by mrbabbage
This is looking great! Awesome work!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Fri May 03, 2013 9:01 pm
by space123321
Looking great!!!! Can't Wait to test it out!!!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat May 04, 2013 2:10 pm
by skyworxx
This looks really great. Canät wait for the rift to work on Minecraft, or at least the rendering.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat May 04, 2013 4:05 pm
by Chard
Fantastic, these screenshots really work well, especially with the sword in the foreground and looking up in the cave. :woot
Can't wait to try it. The FOV could use some work though, screen is far too far zoomed in. HUD could use some work too.

off-topic: I really want to see this (below) I find that the simplistic 2D artstyle compliments the rift monitor pixelation quite well. Are we heading back to 16-bit!?

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sat May 04, 2013 11:34 pm
by StellaArtois
Chard wrote:The FOV could use some work though, screen is far too far zoomed in. HUD could use some work too.
Ok, I know the HUD is dodgy, but the FOV looks incorrect? Too zoomed in? That's more serious. The projection parameters should be coming directly from the Oculus SDK!

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 1:34 am
by mrklaw
Can you adjust the FoV in minecraft settings as normal? That seems to go pretty wide if you need it to?

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 2:23 am
by StellaArtois
FOV adjustment within Minecraft will have no effect - I use the FOV as calculated from within the Oculus SDK.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 4:49 am
by hellodeibu
I think the official SDK FOV settings/recommendations are a bit off anyway, some of the games I've tried feel awfully zoomed, if that's the right way to call it. So far I enjoy Half Life 2 the most, with games like Skyrim being too zoomed, making you dry-hump walls more often than I'd like to admit.. ;-)

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 5:41 am
by tmek
These images look correct to me. I don't believe there is an issue with the FOV. Remember the blocks in Minecraft are supposed to be a cubic meter in size. That's about how they appear to me looking through my rift.

Image

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 7:03 am
by StellaArtois
I'm wondering if we need an adjustable 'eye-to-lens' setting to plug into the SDK calculation. Seems to work ok for some people and others it looks zoomed. People probably have different lens to eye distances depending if they're wearing glasses, different eye cups etc. That would account for differences in perceived fov?

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 7:30 am
by TheHolyChicken
StellaArtois wrote:I'm wondering if we need an adjustable 'eye-to-lens' setting to plug into the SDK calculation. Seems to work ok for some people and others it looks zoomed. People probably have different lens to eye distances depending if they're wearing glasses, different eye cups etc. That would account for differences in perceived fov?
People need to start explaining themselves better; "zoomed in" leaves us guessing (the most annoying that I kept reading is "blurry", which could be one of a dozen things from someone lacking the ability to articulate themselves properly).

"Zoomed in" could be caused by:
  • Incorrect virtual IPD.
  • A user seeing reduced Rift screen real-estate due to their face / Rift lens setup etc. This could be remedied by shrinking the image for each eye (increasing the black wasted screen real-estate), which would mean the user sees a greater game FOV. See some of the TF2 pics floating around the web for examples of this, where you can see a lot of black on the monitor.
  • Probably more I can't think of.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 9:21 am
by mrklaw
Asoka some people just like different FoVs in their games. If a game isn't representing reality, I see no reason you can't still allow that adjustability and let people find what is comfortable for them

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 5:28 pm
by StellaArtois
Ok, first release guys. Go easy on me; like I say - if the head tracking works, and / or it doesn't crash on Rift init, I'll be amazed.
Minecrift_0_11_alpha.zip
Release notes copied below. Please note, follow the installation guide closely - in particular make sure you have added the native dir to your system path!

===========================
Minecrift Mod for Minecraft
===========================

StellaArtois, 2013

With thanks to:
- Palmer Luckey and his team for creating the Oculus Rift. The future is finally here (well for some people anyway; mine hasn't arrived yet).
- Markus "Notch" Persson for creating Minecraft. What has it grown into?
- The team behind the MCP coders' pack, and the Minecraft community - why Mojang bother obsfucating the source when you guys have done such a fantastic job of de-obsfucating it is beyond me!
- Powback for his initial work on the Java JNI wrapper to the SDK. Seeing this inspired me to get off my arse and get modding. See http://www.reddit.com/r/oculus/comments ... _for_devs/
- The guys at Valve for giving some good advice on updating a game for VR.

No thanks to:
- My lack of OpenGL experience.

------------------
What is Minecrift?
------------------

The cheesy name apart, Minecrift attempts to update Minecraft to support the Oculus Rift. Initially this means allowing headtracking input and using the correct stereo rendering parameters for the Rift. In the future this also means updating Minecraft for various control schemes, and updating the GUI to be in full 3D. Minecrift is also meant as a kick up the arse to Mojang, so that they can add official Oculus support in the near future. As and when Minecraft officially supports the Rift, Minecrift development will probably cease (unless they make a complete hash of it).

----------
Disclaimer
----------

I recommend using a vanila Minecraft.jar file for this. Currently I haven't had the time to look into Forge compatibility, or Mod Loader compatibility etc. BACK UP your original minecraft.jar before installing this mod. I make no claims as to the compatibility of this mod with other mods!

------------
Installation
------------

REQUIRES vanilla Minecraft 1.5.2 currently.

Minecrift is Windows only currently. It requires Vista or above and a graphics card & driver capable of at least OpenGL 3.3 support.

- Change directory to %APPDATA%\.minecraft\bin
- Open your minecraft.jar file using 7-zip, winzip etc.
- Select all, and drag and drop in the entire contents of the /minecraft directory from the Minecrift zip into the jar archive (but not the /minecraft directory itself).
- Make sure to delete the META-INF folder in minecraft.jar. Close 7zip / winzip.
- Copy JRiftLibrary.dll and JRiftLibrary64.dll into %APPDATA%\.minecraft\bin\natives
- **** VERY IMPORTANT **** Go to the My Computer icon, right click, select properties. Go to advanced system settings, Environment variables. Edit the system path to add the directory %APPDATA%\.minecraft\bin\natives, so that the JRiftLibrary dlls can be found. If you don't do this, Minecraft will just show a black screen on startup!
- **** Almost as important ****. Install the Microsoft VS2012 C++ redists (both x86 and x64) from http://www.microsoft.com/visualstudio/1 ... #vc-redist
- Run up Minecraft and off you go. If you get a black screen on login, trying running an admin command prompt, cd to your minecraft.exe dir and enter the command
>java -cp Minecraft.exe net.minecraft.LauncherFrame
This should allow any exceptions or errors on Minecraft startup to show up in the console.

--------
Controls
--------

Once in game the dual viewports will kick in. I suggest using Large or Normal GUI size for now. Obviously you will want to be at 1280X800 fullscreen for the Oculus currently.

- F1 to bring up the game HUD / overlay if it isn't already up.
- Cycle F3 until the Rift debug info appears. Good luck reading this - it should be just about visible if it's near the top of the viewport.
- Ctrl and - / = for IPD adjustment. Hold ALT as well for fine adjustment. The IPD setting should be saved between sessions.
- Ctrl O to attempt to reinitialise the Rift (including head tracking).
- Ctrl P while not in a menu to turn distortion on / off. Sometimes useful if the offset mouse pointer is a pain in the menus.
- FOV adjustment within Minecraft will have no effect - I use the FOV as calculated from within the Oculus SDK.

------------
Known Issues
------------

There are many!

- If head tracking works, it'll be a miracle. ***I haven't been able to test it***.
- Resizing the screen leads to graphics corruption on the left viewport. Open and close the inventory to remove the corruption. [If anyone with OpenGL experience could give me pointers as to why this happening, that would be fantastic. I haven't yet been able to suss this out. Something not being done correctly with the FBO I assume].
- Within the in game menus, the displayed mouse pointer is only present on one viewport, and does not match up with the highlighted button position on screen. Please rely on the location of the button highlight or tooltip when clicking. If the click does not seem to take, move the mouse down slightly and try again!
- Everything needs anti-aliasing.

------------
Feedback, bug reporting
------------

Please post feedback, bug reports etc. to the forum thread at MTBS: http://www.mtbs3d.com/phpbb/viewtopic.php?f=140&t=17146

------------
Roadmap
------------

- Get the head tracking working, stereo parameters correct with appropriate user adjustments to the parameters.
- Draw two mouse pointers, one for each viewport.
- Have a rest.

-------------
Release Notes
-------------

0.11 Alpha - FIRST RELEASE 06-05-13

- For Minecraft 1.5.2
- Initial Rift stereo rendering and distortion in place, with IPD adjustment available.
- Headtracking working (maybe! I have no means of testing this currently!).
- Proper first-person rendering.
- Rudimentary neck model should be in place.
- Removed crosshair.
- Initial overlay HUD.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 5:41 pm
by ChrisJD
Looks like I'm finally going to have to buy Minecraft once my Rift arrives.

Screenshots look good already.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 5:47 pm
by drgroove101
:woot Holy snap! you actually released it! Quick quick someone make a youtube video testing this, I needs to see it! Can't wait for Minecraft in the Rift!

Congratulations on the alpha release man, following this thread you've really out did yourself. You learned so much and were able to apply it in such a short time, cudos to you good sir.

However you're allowed no rest until someone confirms head tracking is working! :lol:

My Rift can not come soon enough ...

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 6:03 pm
by mattyeatsmatts
Great work, I'll finally have to buy Minecraft for PC now

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 6:22 pm
by tmek
[quote="StellaArtois"]Ok, first release guys. Go easy on me; like I say - if the head tracking works, and / or it doesn't crash on Rift init, I'll be amazed.

First off, the stereo rendering looks great in the rift!

However as you suspected the head tracking doesn't work well at all. It usually just seems to spin you around one direction or the other. Pressing CTRL O locks up the game on my machine. (windows 8 64-bit, i7, AMD 5850)

In the mean time is it possible to restore the original mouselook from the game and just have the rift rendering? It woudl be awesome just to be able to look around at stuff with the mouse even without head tracking.

Thanks again for doing this. Great job.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 6:25 pm
by mrbabbage
Just had a go. Plays great! Can't wait to try and get head tracking working in it.
For those trying this, if you still get the black screen. Instead of running command prompt just right click on the executable and select run as administrator.

Re: Rudimentary Minecraft Rift Support - Is it feasible?

Posted: Sun May 05, 2013 6:32 pm
by jf031
I don't have a Rift yet, but I wanted to try this out ASAP. I was getting a black screen but got it to work after messing around with the Path variable.

For those who don't know, the specific entry you need to edit is under System Variables. Look for Path, highlight it, click edit, and add the following directory after the last semicolon (press End to get there immediately) with no \ at the end: C:\Users\(YOUR_USERNAME_WITHOUT_THESE_PARENTHESES)\AppData\Roaming\.minecraft\bin\natives

Not enough FPS for me at Far distance (depending what's on-screen), but at normal distance I'm getting 60+. Core 2 Duo e8400, Radeon HD5770.

THANK YOU!