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.

DarkBASIC Professional Discussion / Where are VR920 commands ?

Author
Message
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 2nd Sep 2010 15:37
Hello !

Dbp supports Vuzix Vr920 HMD and tracking.

Where is a list of vr-commands for this device ?

I have now searched trough editor help, forums and google,
but have not found the list.

Thanks,
Mikko

mikko_ketonen( )hotmail.com
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Sep 2010 23:09
The lack of response to your query is probably because nobody knows what you're talking about. Perhaps you could explain where you get this from:

Quote: "Dbp supports Vuzix Vr920 HMD and tracking."


Well, I don't know what you're on about anyway.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Sep 2010 23:27
I'm in the same boat...

VR920's are a stereo headset with tracking, like a VR kit for 3D games, looking around and all that stuff in full 3D.

I just got mine today, and FPSC supports them, so there must be some support in DBPro for them. If nothing turns up I'll email Rick.

Health, Ammo, and bacon and eggs!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 2nd Sep 2010 23:28 Edited at: 2nd Sep 2010 23:32
Green Gandalf, thanks for the answer.

I went and bought VR920 because Newsletter 79 mentioned this:

http://www.thegamecreators.com/pages/newsletters/newsletter_issue_79.html


And from Upgrade 7.5 we can find these:

•Added new VR920EXIST=RESET LEFT EYE() command to detect VR920 and reset to left stereo eye
•New RESET TRACKING command to calibrate head tracker of VR920 device during runtime session

So, I hope someone can help.

Mikko

mikko_ketonen( )hotmail.com
Jeff032
18
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 2nd Sep 2010 23:49 Edited at: 3rd Sep 2010 15:43
I don't know what they do but I found:

FLOAT Reset Left Eye()
Reset Tracking
FLOAT Get Tracking Pitch(INTEGER filtering)
FLOAT Get Tracking Yaw(INTEGER filtering)
FLOAT Get Tracking Roll(INTEGER filtering)

filtering = 1 seems to mean "manual application filtering"
and filtering = 2 seems to mean "internal driver filtering"

They might be more commands, I am not sure.

Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 2nd Sep 2010 23:50
Van B.

In Vuzix website they also say that Dbp has a native support.

So if you find something out, please tell us.

Firstly there should be some vrmode flag after "set display mode",
but it is not documented. (maybe in update 7.4....?)


Mikko

mikko_ketonen( )hotmail.com
Jeff032
18
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 2nd Sep 2010 23:54 Edited at: 2nd Sep 2010 23:55
See my above post that you probably missed, also:

SET DISPLAY MODE
INTEGER Width, INTEGER Height, INTEGER Depth, INTEGER VSyncOn, INTEGER MultisamplingFactor, INTEGER MultimonitorMode, INTEGER BackbufferWidth, INTEGER BackbufferHeight, INTEGER ActivateVRMode

Use a value of 1 for ActivateVRMode to enable it.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Sep 2010 23:56
Looks like my nudge worked.
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 3rd Sep 2010 00:05
Jeff032,

Thanks for the tracking functions. I Have to try them.

Mikko

mikko_ketonen( )hotmail.com
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 3rd Sep 2010 01:25 Edited at: 3rd Sep 2010 01:41
Tracking works

There seems to be spaces in "Get Tracking Pitch" and so on...

I have not yet managed to get "set display" to work.
I wonder what are the right values for:
INTEGER MultisamplingFactor, INTEGER MultimonitorMode, INTEGER BackbufferWidth, INTEGER BackbufferHeight

Is there some special sync command maybe?
VR920 uses frame sequential system.

Mikko

mikko_ketonen( )hotmail.com
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 3rd Sep 2010 02:22 Edited at: 3rd Sep 2010 02:45
I made it work manually .

I move the camera sideways and make two syncs (code below)

I don't know if it is the right way, but it works.
I have 8 years old Amilo, so it should work with any
graphics card.

Official documention would still be nice to have.

Thanks for you all.
Mikko



Rem Project: Dark Basic Pro Project
Rem Created: Friday, September 03, 2010

Rem ***** Main Source File *****
set display mode 800,600,32,0,0,0,0,0,1
make object cube 1,10
make object cube 2,100
position object 2,-50,0,200
position camera 0,0,-100
sync on
do
PITCH OBJECT UP 1,1
p=Get Tracking Pitch(2)
set cursor 10,10:print "pitch: ";p
y=Get Tracking Yaw(2)
set cursor 10,20:print "yaw: ";y
r=Get Tracking Roll(2)
set cursor 10,30:print "roll: ";r
position camera 0,0,-100
wait 16
sync
position camera 10,0,-100
wait 16
sync
LOOP

mikko_ketonen( )hotmail.com
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Sep 2010 10:25
Coolness, can't wait to try it out . Wondering if it's better to have a custom sync function, otherwise I can imagine myself loosing track of sync's, and end up switching 'eyes'.

Health, Ammo, and bacon and eggs!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 3rd Sep 2010 13:00 Edited at: 3rd Sep 2010 13:19
One thing is that it has to be in full screen now with that example.

The sync function should calculate 1/60 of second for both eyes
even when there is heavy graphics.

I'm wondering if Dbp team knows, that Vuzix continued this product
and it is available again.

Iz3d has made a driver for VR920, but I have not tried that out.

Mikko

mikko_ketonen( )hotmail.com
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Sep 2010 13:07
Quote: "I'm wondering if Dbp team knows, that Vuzix continued this product and it is available again."


Yeah, it was in one of the recent newsletters, maybe from July or something - but TGC is partnered with a company who use VR920's to produce training simulations using a modified FPSC. I'm sure there was support for the double render headset a couple of years ago, the Vuzix stuff is new.

What I have found is that the 3D works great in supported games, but the head tracking sucks - I think it really needs custom games, not FPS games that try and replace aiming with head tracking. I did enjoy a quick game of CounterStrike:Source in 3D though, you have to kinda close one eye to aim properly, but it's pretty cool. I want to make my own VR game specifically for these specs - they have so much potential.

Health, Ammo, and bacon and eggs!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 3rd Sep 2010 13:43 Edited at: 3rd Sep 2010 13:48
I'm very excited of this also.

First I try this with my old demos: "Elite" and "Superkarting",
but then I like to make a Vr-world for treadmill. "Joggingworld"

I think, when well calibrated, tracking is good for looking
around. Easy resetting is essential.

Mikko

mikko_ketonen( )hotmail.com
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Sep 2010 13:49
Quote: "but then I like to make a Vr-world for treadmill. "Joggingworld""


Hehe, me too! - well I planned to use my cycling machine, would be a pretty awesome way to excercise huh!.

Health, Ammo, and bacon and eggs!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 3rd Sep 2010 14:44
Cycling machine is safer. With treadmill you can fall down

Actually I made software with Db for "Orbitreck" exercise machine
way back. I connected Orbi's Tachometer to mouse button for speed
measurement and joystick buttons on top of the rods for manouvering.

It worked quite well.

mikko_ketonen( )hotmail.com
Chris K
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 3rd Sep 2010 19:10
Van, how good are these glasses? I have wanted to try and write a 3D VR sort of thing for ages, but I have never found anywhere to test out the glasses...

I have read that they are like looking at a big TV from a few feet back - how does that mix with the 3D? Does it feel like you are looking through a window or through goggles?

Cheers

-= Out here in the fields, I fight for my meals =-
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 6th Sep 2010 09:34
Chris,
It is kinda like having a screen floating in front of you, however I don't know where they get the 'size' from - it's really not a factor, because you could be sitting in front of a 60'' screen, or a 15'' screen - it does draw you in when in 3D which is the main thing.
3D stereo works really well, I imagine it's as good as any of the other options, like nVidia's, making games work in stereo is a lot easier than getting head tracking working.
So as a gamer, they provide 3D stereo and it works really nicely, Red Faction Guerrilla worked very nicely with all the destructable scenery. Oblivion is really nice in 3D as well. Some games cheat, for instance Flight Simulator X only uses 3D for the plane and cockpit - however head tracking works pretty well which makes up for it - flying around in a microlight and looking straight down at the ground, was pretty cool - I just wish FSX was a better game.
I got head tracking working in Halo, which was pretty good, but it soon becomes apparant that it's not ideal to aim with your head - of course the mouse still works, but for FPS games 3D stereo only seems to be the best option. I played Counterstrike:Source in 3D mode, closing my left eye to aim more accurately. The display is only 640x480, but that's not such a bad thing IMO, means that with the double-sync burdon, the frame rate should be able to keep up because of the lower resolution.
From a developer standpoint though, very cool - I only messed around with the code Mikko posted, but got a little demo going with cubes moving around the camera in 3D, with head tracking. That worked great, and shows the real potential of these things. I think the best illusion would be in a vehicle game, where the player is able to sit down, because it's not ideal to have to turn all the way around, tangle yourself up in cables etc. A space game like Starwraith would be insane with support for these, or a driving game. But the main thing is that games need to be written for them specifically to get the most from them, having head tracking hack into mouse movement etc is just not a good solution. If I made an FPS for instance, I'd have head tracking for looking around, but only make that the aiming point with a right click - so your still aiming with the mouse, but you have some freedom to look around as well. That would be really cool with a sniper rifle I think - and would give a better sense of realism, so forward is always right in front of the player. Without that, you end up looking straight left, moving forward, then to turn left again you have to dislocate your neck, or skooch the chair around - not very intuitive.

The main factor is price, and I wouldn't suggest anyone buy these unless their £350 is really not needed elsewhere, it's like the ultimate developers luxury - I worked some overtime so had the extra money. Perhaps Vuzix would be open to licensing a game, because the games they include only have head tracking as a gimmock, a properly 3D head tracking game might be something they'd be interested in putting on their software CD, or host on their site.


I'll upload my demo tonight Mikko, got the eyes working nicely with camera rotation .

Health, Ammo, and bacon and eggs!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 6th Sep 2010 14:55
Van B,
I undersign everything you said.

Below is a code i converted from Lee's 3d example.
(keys for moving=wasd)

When I used original dbo object, the screen update was
not enough.
But with these simple cubes, it works
-------------------------------------------


set display mode 800,600,32,0,0,0,0,0,1

sync on : sync rate 60 : hide mouse

rem object to control camera (invisible eyes and focal points to set cameras by)
make object sphere 12,1 : make mesh from object 12,12

add limb 12,1,12 : offset limb 12,1,-12,0,0
add limb 12,2,12 : offset limb 12,2, 12,0,0
add limb 12,3,12 : offset limb 12,3,-12,0,50
add limb 12,4,12 : offset limb 12,4, 12,0,50
move object 12,50 : hide object 12

rem Cloned camera object for smoothing
clone object 13,12 : hide object 13

for f=300 to 400
make object cube f,10
position object f,rnd(500)-250,rnd(500)-250,rnd(500)
next f

rem setup main camera (backbuffer camera)
position camera 0,0,0 : point camera 0,0,1

rem 3D viewing vars
eyeswide#=1.0 : focalpoint#=2000 : focaldepth#=20.0

rem main loop
do
`
rem control stereoscopics
if inkey$()="1" and eyeswide#>-10.0 then dec eyeswide#,0.01
if inkey$()="2" and eyeswide#<100.0 then inc eyeswide#,0.01
if inkey$()="3" and focalpoint#>50.0 then dec focalpoint#,1
if inkey$()="4" and focalpoint#<2000.0 then inc focalpoint#,1
if inkey$()="5" and focaldepth#>-100.0 then dec focaldepth#,0.1
if inkey$()="6" and focaldepth#<100.0 then inc focaldepth#,0.1
`
rem adjust camera object limbs (eyes and focal points
offset limb 12,1,eyeswide#*-1,0,0
offset limb 12,2,eyeswide#,0,0
offset limb 12,3,focaldepth#,0,focalpoint#
offset limb 12,4,focaldepth#*-1,0,focalpoint#
`
rem Tracking control on camera object (12)--------------
p#=Get Tracking Pitch(2)
y#=Get Tracking Yaw(2)
r#=Get Tracking Roll(2)
controlobj=13
mvx#=p#
mvy#=y#

rotate object controlobj,-mvx#,-mvy#,0
rem ---------------------------------------------------------
sp#=0.0
cax#=object angle x(controlobj)
cay#=object angle y(controlobj)
caz#=object angle z(controlobj)
if scancode()=30
rotate object controlobj,0,object angle y(controlobj)-90,0
move object controlobj,1.0
rotate object controlobj,cax#,object angle y(controlobj)+90,caz#
else
if scancode()=32
cax#=object angle x(controlobj)
rotate object controlobj,0,object angle y(controlobj)+90,0
move object controlobj,1.0
rotate object controlobj,cax#,object angle y(controlobj)-90,caz#
else
if scancode()=17 then sp#=1
if scancode()=31 then sp#=-1
move object controlobj,sp#
endif
endif

position object 12,object position x(controlobj),object position y(controlobj),object position z(controlobj)
rotate object 12,object angle x(controlobj),object angle y(controlobj),object angle z(controlobj)
`
rem place left/right camera eyes using camera object limbs
cxl#=limb position x(12,1)
cyl#=limb position y(12,1)
czl#=limb position z(12,1)
cxr#=limb position x(12,2)
cyr#=limb position y(12,2)
czr#=limb position z(12,2)
cfxl#=limb position x(12,3)
cfyl#=limb position y(12,3)
cfzl#=limb position z(12,3)
cfxr#=limb position x(12,4)
cfyr#=limb position y(12,4)
cfzr#=limb position z(12,4)


set cursor 0,0
print "STEREOSCOPICS IN DBPRO - ESCAPE TO QUIT"
print "[1][2] EYES APART = ";eyeswide#
print "[3][4] FOCAL DISTANCE = ";focalpoint#
print "[5][6] FOCAL DEPTH = ";focaldepth#


set cursor 10,60:print "pitch: ";p#
set cursor 10,70:print "yaw: ";y#
set cursor 10,80:print "roll: ";r#

wait 16
position camera cxl#,cyl#,czl#
point camera cfxl#,cfyl#,cfzl#
sync
wait 16
position camera cxr#,cyr#,czr#
point camera cfxr#,cfyr#,cfzr#
sync
loop

mikko_ketonen( )hotmail.com
Chris K
22
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 6th Sep 2010 16:30 Edited at: 6th Sep 2010 16:40
Cheers, Van.

I was thinking about writing my own 3D tracking stuff similar to Jonny Lee's Wiimote headtracking - http://www.youtube.com/watch?v=Jd3-eiid-Uw - and then using glasses to make a kind of crude holodeck.

I think I will wait for the glasses to be a bit cheaper or have a wider FOV.

-= Out here in the fields, I fight for my meals =-
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 7th Sep 2010 09:06 Edited at: 7th Sep 2010 09:14
I got this promising answer from the support:

"We're looking into writing some kind of tutorial for this feature. But we're a small company, and we have to base our work load on need. As not many users have the VR920 headset I'm afraid other more urgent matters take priority. Keep an eye on the newsletter however for fresh tutorials. Hopefully we'll have something in the next couple of months. However I can make no promises. "

Can't wait.
What I need to know is, if there is some automatic screen freshing
feature for VR920, or is our method here the only way?

mikko_ketonen( )hotmail.com
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Sep 2010 09:52
I think that the screen update will be much the same as what were doing already, maybe there's some neat sync trick though that helps avoid tearing. I've found that setting the refresh rate to the monitors vsync avoids tearing.

Maybe we should make an example each, get the ball rolling, proove how well DBPro works with them. Personally I'd like to adapt one of Evolveds demo's to use VR and stereo - have also been thinking about the eyes, and if maybe it's worth checking the focal range and setting the angle of the eyes to suit that. So if your looking right at a wall, the focal point would be the collision point, or 'pick screen'. I think that would produce more realistic depth, being able to kinda focus on whatever is in front of the screen. So I'm gonna look into doing that.

Health, Ammo, and bacon and eggs!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 7th Sep 2010 22:56
Good points. We can help by making demos of different aspects. Changes of focal point is interesting.

I will be back in like two weeks and continue
this also.

mikko_ketonen( )hotmail.com
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 8th Sep 2010 10:09
Got the head tracking added to Evolveds terrain and water demo, it's pretty cool - can't get stereo working, probably due to the shaders but I'll keep at it. I found that adding a curveangle function to the head tracking can really help keep it smooth.

Sounds good though, maybe have a couple of extra examples for when they do a tutorial.

Health, Ammo, and bacon and eggs!
Mikko
23
Years of Service
User Offline
Joined: 25th Sep 2002
Location: Finland
Posted: 25th Oct 2010 00:51
Ok,
I attach here one experiment:

It's a JPS viewer.

Put it in one folder with .jps files, and it
will show them in stereo.

SPACE - for the next picture.
UP/DOWN - for zooming in/out

You can find a lot more jps stereo files on the net.

Mikko

mikko_ketonen( )hotmail.com
Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 25th Oct 2010 03:13 Edited at: 25th Oct 2010 03:15

Login to post a reply

Server time is: 2026-07-22 03:51:48
Your offset time is: 2026-07-22 03:51:48