Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / AppGameKit VR DLC - Official Thread

Author
Message
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 9th Nov 2017 15:36 Edited at: 6th Dec 2017 19:00
Hello All,

I thought it would be helpful to create centralized place for discussion about the AppGameKit VR DLC. I try my best to check the forums regularly, but it is very possible for me to miss things that are posted. It is also a little more difficult to go back through a bunch of various messages when working on updates. So, if you find any bugs, have feature requests, or want to make sure that I see something pertaining to the AppGameKit VR DLC, please post it here! This includes anything with the LeapMotion plugin that was recently added to the DLC.

I am currently working on an update to AGKVR. Here is a list of things that I'm planning to include based on feedback that I've received from different users:
- Commands to set the global position and rotation of the HMD in the 3D world
- Add command to cleanly shut-down AGKVR
- Add the ability to return a float value from Oculus Touch grip triggers
- Add the ability to get lower level controller button feedbacks to better support Oculus controllers
- Ability to render to each eye individually
- Feedback and control of Steam's chaperone (boundary grid)
- Add hardware information feedbacks
- Fix problem with the SetPlayerRotation command
- Add ability to render depth textures
- Allow the use of a custom skybox instead of the SteamVR room when application is too busy to render new images

Right now, I am still in the process of testing these new features, but the code is done pending any issues found while testing. I am away next week, so I'm guessing that a new version will be available later in November.

Thanks!
a.k.a WOLF!
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 27th Nov 2017 23:05
Oh, I didn't see this thread

* If you haven't already got it, then can you get the Oculus controller joystick pressed?
* SetPlayerPosition() issues
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Nov 2017 02:14
Hi nz0,
Can you clarify what you mean by "get the Oculus controller joystick pressed"?

Thanks!
a.k.a WOLF!
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 28th Nov 2017 19:54
The oculus touch controller joystick registers a press down click (not the analog directional movement, but as if pushing the joystick hat into the controller from above)

Was curious if it's a detectable input...?
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 28th Nov 2017 20:31
Quote: "Was curious if it's a detectable input...?"

It should be. The way OpenVR handles button presses is a bit painful to work with, so I tried to simplify things in a way that worked across both the Vive and Touch controllers. But, I also don't have a Rift, so I just did my best to support it without being able to test myself. I will look at adding some lower level commands that allow you to check for any button presses (0 or 1), or analogue axis values (0.0 to 1.0) for triggers and joysticks.

Ron
a.k.a WOLF!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 2nd Dec 2017 06:26
So, I've edited my list above. The items marked with a have been finished and tested as well as I can test them. The command with the means that I was unable to fix the problem, which isn't really a problem since there is no sense using VR without any 3D objects in the scene. I've added the recent items from nz0 to the list and I'm pretty sure that they are now properly supported.
I've had a couple more recent requests that I'd like to add before releasing the update. The first is to add the capability of generating depth textures in the rendering process that can be used for shader purposes. The second is lower level access to the rendering sequence so only certain objects can be rendered by using the DrawObject command (I believe this is also for shaders).
There is also another weird thing that OpenVR does that I'm trying to solve. If the scene is not updated within a certain (short) timeframe, OpenVR will begin showing the SteamVR room until it receives new render images. This can happen if you begin loading new objects in the middle of your game. There doesn't seem to be any way to prevent this, so I'm looking to make the SteamVR room customizable by supplying skybox images.

Ron


a.k.a WOLF!
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 2nd Dec 2017 20:34
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 6th Dec 2017 19:02
I modified the original list again. Feature-wise, I think everything is now done for this update. I'm waiting for some testing feedback while also updating the documentation and Tier 2. Hopefully the update is released very soon!
a.k.a WOLF!
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 6th Dec 2017 22:34 Edited at: 6th Dec 2017 22:35
Looking forward to that update!

Funny story: I had some really bad stuttering when I ran my newest game. I tried removing all elements that might cause a slowdown. I had almost stripped the game to the bone, but still, the stuttering persisted. I considered if it might be my own computer which had a problem? Or maybe Windows downloaded an update, slowing everything? Or maybe AppGameKit had updated, and it caused a stuttering inducing error? And then I discovered this line in my code:

SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 7th Dec 2017 17:39 Edited at: 7th Dec 2017 18:10
This command screws up the HMD view:
SetCameraRange( 1, 0.1, 1000.0 )

But "1" is the main camera, right? Shouldn't it be completely sealed from the HMD?

Something else: Would love to play with the built-in microphone on the Rift! Don't know if this is somehow possible.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 8th Dec 2017 16:51
Quote: "Funny story: I had some really bad stuttering when I ran my newest game. I tried removing all elements that might cause a slowdown. I had almost stripped the game to the bone, but still, the stuttering persisted. I considered if it might be my own computer which had a problem? Or maybe Windows downloaded an update, slowing everything? Or maybe AppGameKit had updated, and it caused a stuttering inducing error? And then I discovered this line in my code:

SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery"


Yeah... That would do it!

Quote: "This command screws up the HMD view:
SetCameraRange( 1, 0.1, 1000.0 )

But "1" is the main camera, right? Shouldn't it be completely sealed from the HMD?"


Internally, AGKVR uses the main camera to render to images for each eye. Unfortunately, since AppGameKit really only supports one camera at this time, that is the way it has to work. If you want to change the range of the camera, you have to use the AGKVR command:
AGKVR.SetCameraRange( 0.1, 1000.0 )
This command sets the range for camera 1 and uses the new range values to set some internal variables in AGKVR that are necessary for things to render correctly on the HMD.
Quote: "
Something else: Would love to play with the built-in microphone on the Rift! Don't know if this is somehow possible."

Yeah... I have no idea on that one. I don't recall seeing anything in the OpenVR API. I'd have to look into it. Even if it is possible, that one may be difficult to do since I have a Vive!

Ron
a.k.a WOLF!
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 16th Dec 2017 21:56
Hi,

Thank you for creating the AGKVR plugin. It is really fantastic to be able to program for my rift!

I was wondering if the update has been released officially yet? I read about a new command that let's you cleanly shut down your VR-set. That would be welcome, as Steam VR often reports a failure once I launch my project for a second time. Quite troublesome while debugging
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 17th Dec 2017 16:00
Hi Zerotown! I'm glad you are enjoying AppGameKit VR! The update was not officially released yet. I had a couple people testing some things and was seeing if they ran into any problems first. All seems good so far, so I'm hoping to officially release the update sometime this week!
a.k.a WOLF!
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 17th Dec 2017 17:31 Edited at: 17th Dec 2017 17:31
Thanks for responding Ron. I consider this to be one of the best DLC's to date: simple to use but very powerfull at the same time. I'll be awaiting the update eagerly
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 8th Jan 2018 19:42
New version has been released. Sorry for the delay!
a.k.a WOLF!
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 8th Jan 2018 20:16
Thank you! A quick question: what is the command to 'cleanly shut down AGKVR'? I couldn't find it in the documentation.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 8th Jan 2018 21:01
Epic way to start 2018!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 8th Jan 2018 21:10
Quote: "Thank you! A quick question: what is the command to 'cleanly shut down AGKVR'? I couldn't find it in the documentation."


Crap! It looks like I forgot to add that to the documentation!

The command is:
AGKVR.Shutdown()

a.k.a WOLF!
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 8th Jan 2018 21:12
Quote: "Crap! It looks like I forgot to add that to the documentation!

The command is:
AGKVR.Shutdown()"


No worries, thanks for the quick reply!
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 25th Jan 2018 14:47
I got some feedback that AppGameKit VR does work with the Windows Mixed Reality devices! That is good news for anyone looking to get into VR development at a lower starting price.....

Ron
a.k.a WOLF!
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 29th Jan 2018 13:36 Edited at: 29th Jan 2018 13:45
is the VR DLC still working with the new version of AppGameKit? i get an error when i try to use it now.
on windows 10, used to work fine before (tried an old project and a new one, same error).

nevermind, i needed to copy over the new openvr_api.dll
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu

Attachments

Login to view attachments
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 31st Jan 2018 16:00
Can the use of AGKVR.SetDepthTextures() be more explained?

For instance, when you use it in a deconstructed render sequence.
I have been unable to get this to work... does this call actually render out the depth or does it occur when you call AGKVR.Render()

An example would be very useful.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 31st Jan 2018 16:30
Quote: "Can the use of AGKVR.SetDepthTextures() be more explained?

For instance, when you use it in a deconstructed render sequence.
I have been unable to get this to work... does this call actually render out the depth or does it occur when you call AGKVR.Render()

An example would be very useful."


AGKVR.SetDepthTextures is a setup command that supplements the AGKVR.Init command. Just like you pass 2 Image ID's to the Init command to tell it where to render each eye, you pass 2 image ID's to the SetDepthTextures command to tell it where to render the depth texture for each eye. If you never call the SetDepthTextures command, then Depth Textures will not be generated. Once you do call the command, the depth textures will be rendered to the specified image ID's when the AGKVR.Render command is called.

Ron

a.k.a WOLF!
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 31st Jan 2018 18:10 Edited at: 31st Jan 2018 18:19
Cheers Ron.

Something else though.
I originally tested the updated AGKVR in my VR sandbox system and it was fine.
Now I tried my game with it and it's a bit of a mess.
Initially, i saw only 45fps so I thought I'd added something that slowed it down (added some shaders etc.) Unfortunately, I stripped everything away and barely dented the fps drop. Perhaps it had gone into ASW mode?

I restored a backup of the code from back in October 2017 which was running fine at the time and again, 40-45 fps.

I then did the following:
Updated to latest video driver
Switched off/on SLI options on GPU
Tested throughput on device (via steam tools and also with Occulus tray tool)
Occulus tray tool pinpointed the lag to APP CPU, so I trimmed virtually everything out and was left with virtually nothing, save about 10000 polys, no shaders.
Removing shadows seemed to have the biggest effect, but I can't lose them now. Besides, that only got me to 85-90 fps.
It seems so bad that hiding a 200 poly object even showed a difference!?

I notice Occulus has new drivers / home etc. and appears that Windows 10 may be the only supported platform soon - it's running in some kind of legacy mode now on my Windows 8.1

Anyone else with Occulus had a performance drop? Any Occulus users on Windows 10?

[edit] Dunno about the Meltdown patching on Intel CPUs? Just something else to have to consider. Maybe see if the proper fix comes out and/or this issue I've got is related. Just wondered why it should be a app CPU bottleneck which showed up in the OTT diagnostics...
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 31st Jan 2018 19:47
Yeah... I have no idea what could be causing your slowdown, but I really don't think it has anything to do with AGKVR. The scene doesn't really matter to AGKVR. You can render a scene with one simple object or a scene with 1000 complicated objects but in the end the only thing received by AGKVR are the 2 rendered eye images which are presented to the HMD. It takes no more effort for the HMD to present a complicated set of renders than it does a very simple set of renders. It sounds like it is actually the process of rendering that is now taking longer than before, which would remain true even if you completely removed AGKVR from the equation. The only "VR slowdown" is that you need to render your scene twice (once for each eye) instead of just once for your monitor.
Are you also presenting the scene on your monitor? If so, how are you doing that? If you are using the SYNC command, then you are adding a 3rd render to each of your loop iterations. You can possibly save some time by not displaying on the monitor.

Ron
a.k.a WOLF!
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 31st Jan 2018 21:12
I was using the monitor as well, because it didn't really affect it (still had 400+ fps spare)
Now, my sandbox doesn't get over 35-45 (~37) fps.

This has a plane, a cube, a sphere and some decals. It does have shadows, light and stuff, but something has gone badly wrong.

I've seen some threads on reddit etc regarding Occulus slowdowns etc. Will carry on investigating
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 31st Jan 2018 23:46
Well, after some more messing around, I have come to this conclusion:

If I run the OTT in diagnostic, I see catastrophic frame drop just turning my head at more polys, but even at best it's still grim (like 70 fps).
I reinstalled Steam VR (no difference). I am struggling to see what has happened here; there's nothing really going on in the scene that wasn't hundreds of FPS before, so I can only try and run this on another PC and see if it's something local as I've run out of ideas.

I worked out the FPS cost on my rig for the screen render and it appears to be 20 fps. However, I'm starting to doubt any results at this stage.

Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 1st Feb 2018 11:39
Again, I really don't think there is something strange going on with the VR here. No matter how complicated the scene, in the end you are just submitting an image for each eye to be displayed on the HMD. The slowdown seems more related to the actual render process of generating the images for each eye. Internally, when you call the AGKVR.Render command, all it is doing is positioning the camera at the right eye's location, then rendering the camera to an image, then positioning the camera at the left eye's location and rendering to another image, then submitting those images to the VR Compositor. The only part of the process that is not standard AppGameKit commands is submitting to the compositor, but that doesn't care at all how complicated of a scene you have.
Maybe try to not call AGKVR.Render, and just call SYNC three times in your loop to see if you still get the slowdown. If you still have your slowdown, it would eliminate AGKVR as the source of the problem.

Ron
a.k.a WOLF!
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 1st Feb 2018 20:16
I was trying to make a stereoscopic viewer, so I wrote the code below. But when I had my HMD positioned at certain areas, the right eye went blank!



Curiously, I likewise got left and right eye disabled when the HMD was at certain areas, using this code:
nz0
AGK Developer
16
Years of Service
Recently Online
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 1st Feb 2018 20:17
Sorry Ron, I wasn't suggesting there's a problem with AGKVR, just hoping someone may be able to give me a pointer. The AGKVR render costs me 20 frames, so it's nothing in the scale of things.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 2nd Feb 2018 13:01
CORRECTION! Despite what I claimed earlier, the right eye does NOT go blank!

What happened instead was that the last eye rendered (in this case, the right) won't catch the changed image of stereoScreen, instead rendering that plane as pure black.

Stranger still, the blankness only happens when my HMD is tilted slightly upwards. This really is quite a curious error!

Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 2nd Feb 2018 14:05
Quote: "Sorry Ron, I wasn't suggesting there's a problem with AGKVR, just hoping someone may be able to give me a pointer. The AGKVR render costs me 20 frames, so it's nothing in the scale of things."


No problem! I just wanted to be sure that there wasn't an actual problem with the way AGKVR was handling things.
Quote: "
CORRECTION! Despite what I claimed earlier, the right eye does NOT go blank!

What happened instead was that the last eye rendered (in this case, the right) won't catch the changed image of stereoScreen, instead rendering that plane as pure black.

Stranger still, the blankness only happens when my HMD is tilted slightly upwards. This really is quite a curious error!"


Wow. I have no idea on that one! I know that the HMD will not actually update either eye until it receives both of them. Maybe if the time lapse is too large between receiving the update for the second eye, it causes issues? I wouldn't think that is the case though if you are calling these commands right after each other. It is also very strange that it appears to occur when the HMD is at different angles. That doesn't make any sense at all!
a.k.a WOLF!
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 2nd Feb 2018 14:44 Edited at: 3rd Feb 2018 10:40
I just tried using some other images for left and right eyes, and now the error is gone! So I suspect that the error has something to do with me using LoadSubImage() to extract left and right image from a single stereoview?

EDIT: Okay, so I fixed it by rewriting the code without LoadSubImage, instead having the left and right photos as separate image files. A bit of a shame, since I really liked having both photos on a single image, like old school stereoviews. Still, it was rather awkward having to save the settings as a text file for LoadSubImage() to load back in. Anyways, in my opinion, this error is not worth looking into. Just don't mix LoadSubImage() with AGKVR.Render_RightEye() or AGKVR.Render_LeftEye() and all is fine!
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 3rd Feb 2018 12:27
The documentation says:
AppGameKit VR User Guide.pdf wrote: "RightController_TriggerPulse
This command will cause the Right Hand controller to vibrate
Tier 1: AGKVR.RightController_TriggerPulse(integer Time)
Tier 2: AGKVR_RightController_TriggerPulse(int Time);
Parameters:
Time – Length of time in milliseconds for the controller to vibrate"


But it looks like the command requires two integers, not one:
AGKVR.RightController_TriggerPulse( 0,1000 )
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 4th Feb 2018 13:52 Edited at: 8th Feb 2018 11:48
Dang it! Even though I dropped LoadSubImage(), the weird error persists: Turn the HMD at certain angles, and the plane forgets their image in the last eye rendered.

EDIT: On further testing, it looks like the plane only forgets their image if the image is loaded with mipmaps enabled: SetGenerateMipmaps( 1 ) This makes sense since the other time I encountered this error was when using LoadSubImage(), which is kinda similar. (both loads a portion of an image)
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 8th Feb 2018 12:35
Yet again, I failed to get them fancy shaders to work in VR! It seems like App Shader Kit has its own command to update the screen:

SP_Sync()

But AppGameKit VR has its own command for updating the HMD:

AGKVR.Render_RightEye()
AGKVR.Render_LeftEye()

I don't really have a clue how to get those to play along. When I write a forum post about something, the solution usually appears to me as I write. But not this time.
basicFanatic
6
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 8th Feb 2018 14:44
Low priority suggestion: Add support for the Oculus Remote

Login to post a reply

Server time is: 2024-04-24 00:25:10
Your offset time is: 2024-04-24 00:25:10