Skip to main content

30 replies

New Participant
April 1, 2013
I was wondering about this. It would be nice to get an official port for Java/jMonkeyEngine. Until then, you could always port it yourself. obviously, it would be less stable, slightly slower, and less accurate, but it would get the job done.
Up and Coming
April 3, 2013
I was considering looking at adding it to jogl. I haven't looked at the SDK yet to see what it will take through opengl yet. I think Jmonkey sits on top of jogl so might be easy.

My trouble will be time, and I haven't used jogl in a few years (and haven't wrapped c code in java in longer, but that was pretty easy before and more of a primary number conversion. might be easier now)
New Participant
April 3, 2013
I've played around with bits of the JMonkey rendering engine before and found it to be fairly easy to use. I'm no java expert and I was able to compile the engine and make meaningful additions to it. I think the easiest way to get started would be to write a C++ wrapper for the api that handled initialization and had maybe two functions (get rift specs, get current position readings) then wrap that in a JNI. There are tutorials on how to do this.

Once that's done we need to import the JNI into JMonkey and copy over/port the GLSL shaders for the barrel distortion, tweak the viewports and frustum culling to support two similar viewports without re-culling everything, and add it as an option.

Another method that I've considered is writing a simple companion program in C++ that takes the rift api and breaks it out to a local socket, so that any engine that has socket capabilities can easily connect to the rift (maybe even WebSocket support so that we can connect to JavaScript locally as well). This method would require roughly the same work on the JMonkeyEngine side, but it would be much easier to maintain and provide crossplatform support since having to compile (or cross-compile) 3+ JNIs for mac/windows/linux and fit them into the JME3 build process would be painful (at least at my experience level).

I know some of the other engine integrations have made some strides at porting the barrel distortion to GLSL, has anyone tried it in JME3?

Any comments on the pros/cons/suggestions on these two integration methods?
~ Joseph Duchesne Knowledge is power.
Participant
April 14, 2013
Hey.

I've begun adding support for the Rift in jMonkeyEngine.
You can follow (and join) the progress here: http://jmonkeyengine.org/forum/topic/oc ... t-support/
It's using some of 38leinaD's (user on this forum) java stuff to get a head's start.

Shader has been created together with a post-filter to add the barrel distortion.
"The television screen has become the retina of the minds eye."
Up and Coming
April 14, 2013
very cool,

I do not do much with Java anymore, but proof of concept for Minecraft :D
New Participant
April 18, 2013
You beat me to it ;)

I wasn't quite as far along as you, so that's cool. My rift arrives next Wednesday and I'll be glad to help.
~ Joseph Duchesne Knowledge is power.
Participant
April 19, 2013
Got the display and camera controls working.

wildhouse.png

Let's see if we can get the controls working before your rift arrives. I'm sure it'll be done before mine arrives :P

Cheers,
Rickard
"The television screen has become the retina of the minds eye."
Inspiring
April 19, 2013
Nice work.

Also, it's better to upload images to the forum, that way they will display correctly. Thanks.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
Participant
May 9, 2013
Awaiting a bit more feedback on the jmonkeyengine integration, from someone who has a rift.
Both display and controls should be working now. The Gui is a whole other issue i haven't even begun thinking about, yet.
In the mean time i've posted the JNI code on my much neglected blog: http://www.softwarepioneering.com.
It's not dependent on the engine at all.
"The television screen has become the retina of the minds eye."
Participant
August 4, 2013
Ok! Got my rift on thursday and have spent the weekend making a first release. Stereoscopy and controls seem to be working fine.
Still things like gui, skyboxes and i bet a bunch of other things to take care of.
I've created a project on google code: http://code.google.com/p/jmonkeyengine-oculus-rift/

Taking a break now to download some applications and enjoy the hardware a bit :)
"The television screen has become the retina of the minds eye."