Code Monkey home page Code Monkey logo

Comments (55)

Olm-e avatar Olm-e commented on August 30, 2024 2

Ok ... installing latest NV driver 387.34 get it back somewhat working ... but now with really bad framerate (it was good before) and with bizarre systems hangups/freeze for multi seconds ... this is indeed the interaction between the driver and steamvr that makes this happening, but as it's 2 blackboxes... :/
great to see advancement on the Libre part,
I have a contact that could be interested in funding if needed to makes it happens (send me a PM for info)

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024 2

@calumk Thank you for confirming the Linux build I provided for the asset also works for someone else than me. Glad you have fun with it :)

from godot_openvr.

calumk avatar calumk commented on August 30, 2024 1

Just wanted to drop in and confirm, I have managed to get the godot-openvr-asset working under Ubuntu Mate 16.04, with HTC VIVE + controllers.

Incase anyone new to this stumbles across this post, I wanted to outline steps i used to get it working

1. Install Steam

  • Install SteamVR - Use the beta version
  • Configure / setup device using steam.

2. Download Godot from official website,

  • Place executable somewhere useful
  • Launch the executable by referencing the steam runtime
    $HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh /path/to/godot3executable

3. Follow @BastiaanOlij 's tutorial
https://www.youtube.com/watch?v=267dRjEYliU

4. Have fun!

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

@beniwtv , any ideas ?

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

also it needs

platform/X11_32bit = "res://bin/libgodot_openvr.so"
platform/X11_64bit = "res://bin/libgodot_openvr.so"

in godot_openvr.tres
for it to register in godot as pluging ;)

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

owh, did you initialize the submodules? (check if openvr and godot_headers subfolders are empty)

Also you need to use godot_headers from your godot install, the godot_headers repository is still in godot alpha2 state.

And yes godot_openvr.tres needs that change but I did just merge that in half an hour ago (along with a bundle of changes related to gdnative changes in godot)

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

yes I clone with --recursive ;)

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

wait wrong error ;)
it's this one indeed

(steamrt_scout_amd64)user@user-P65xRP ~/godot_openvr $ scons platform=linux
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/Image.os -c -std=c++0x -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -g -O3 -std=c++11 -fPIC -Iopenvr/headers -I. -Igodot_headers src/Image.cpp
In file included from src/Image.h:8:0,
                 from src/Image.cpp:9:
src/GodotCalls.h:18:14: error: 'godot_gdnative_nativearvr_api_struct' does not name a type
 extern const godot_gdnative_nativearvr_api_struct *arvr_api;
              ^
src/GodotCalls.h:19:14: error: 'godot_gdnative_nativescript_api_struct' does not name a type
 extern const godot_gdnative_nativescript_api_struct *nativescript_api;
              ^
scons: *** [src/Image.os] Error 1
scons: building terminated because of errors.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

ok with a pull
error changed a bit

(steamrt_scout_amd64)user@user-P65xRP ~/godot_openvr $ scons platform=linux
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/Image.os -c -std=c++0x -fPIC -g -O3 -std=c++11 -fPIC -Iopenvr/headers -I. -Igodot_headers src/Image.cpp
In file included from src/Image.h:8:0,
                 from src/Image.cpp:9:
src/GodotCalls.h:17:14: error: 'godot_gdnative_core_api_struct' does not name a type
 extern const godot_gdnative_core_api_struct *api;
              ^
src/GodotCalls.h:18:14: error: 'godot_gdnative_ext_arvr_api_struct' does not name a type
 extern const godot_gdnative_ext_arvr_api_struct *arvr_api;
              ^
src/GodotCalls.h:19:14: error: 'godot_gdnative_ext_nativescript_api_struct' does not name a type
 extern const godot_gdnative_ext_nativescript_api_struct *nativescript_api;
              ^
src/Image.cpp: In function 'godot_object* Image_new()':
src/Image.cpp:12:9: error: 'api' was not declared in this scope
  return api->godot_get_class_constructor((char *)"Image")();
         ^
src/Image.cpp: In function 'void Image_create_from_data(godot_object*, int64_t, int64_t, bool, int64_t, const godot_pool_byte_array*)':
src/Image.cpp:18:8: error: 'api' was not declared in this scope
   mb = api->godot_method_bind_get_method("Image", "create_from_data");
        ^
scons: *** [src/Image.os] Error 1
scons: building terminated because of errors.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

ok rebuilding godot and godot_openvr with last pull gives godot3 ok but godo_openvr the same error as above even after copying gdnative dir over godot_header dir
I restress that these errors don"t appears when compiling with more recent gcc out of the chroot env, I'm not able to do more unfortunately...

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

@Olm-e You don't need any chroot for compiling - newer GCC is fine. Nor should you need to change any compiler settings. The original problem probably is due to your OpenVR library in /usr/local/lib/libopenvr_api.so not being compatible with what we expect - try to make sure it links against the one in the openvr/lib/linux64 subdirectory.

Also note that the headers in godot_headers aren't correct, these point to a repo that is, for now, for Godot version Alpha2.

Instead, point your build to your recently built Godot 3 master and do:

GODOT_HEADERS=/path/to/godot3/modules/gdnative/include scons platform=linux

Hope it helps.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

mmmm .... well ... thanks, I'll try to get the pieces together ...

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

ok thanks you for support, It is very confusing with this driver bizare stack...
I recompiled all from normal gcc,
I could compile and run the hellovr_opengl with tracking in samples
I had to play to get the right things in place, now it seems to track ! :)
but strangely, I have a correct view on the screen and in the headset there is only a blue circle correctly tracked and displayed, on a fix monocular background like a screenshot of first frame ...
Oo

edit : So yes, there is something wrong in the display for the demo
I can use a vive controller with button visualisation, but I have the correct vue only on the pc screen,
on the headset, I have the correct vue for a overlay circle, but the scene is freezed in first frame of camera in monoscopic.

I will see if it would be related to nvidia driver,
(I'm on 381.26.13 recommended before, I'll test a newer one)

edit :
updating driver to 384.90 does'nt solve
and I need to launch another openvr app (like hellovr_opengl) for the driver to initialise in godot3, if not, it wait and fail

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

Line 7 is:
https://github.com/BastiaanOlij/godot_openvr/blob/master/demo/ovr_controller/ovr_controller.gd#L7

On that line, it attempts to load a 3D model for the controller(s) attached, but that seems to be failing.
Could you attach a screenshot of the HMD view and the window? (You can use the HMD mirror function in SteamVR to get the HMD screenshot).

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

here a screen where you can (barelly) see the chaperone overlay over fixed backround, and on the screen window, the correct scene view with controller

https://lut.im/gallery#SkhbYY6JTf/jnxqlOox4EsQOHRl.jpg

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

That looks indeed strange, I'll recompile myself in a bit (haven't done it in a few days as I've been busy), and see if I get the same thing now.

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

Just built, and all works fine. Controllers show up and scene does not freeze.
I am on AMD Mesa though.

If you are currently on SteamVR beta, try the regular SteamVR. Or vice-versa.

screenshot from 2017-11-10 20-08-41

@BastiaanOlij Any ideas why that could be?

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

Only just woke up, be aware that last night when @Olm-e was testing this (well night for me on this side of the world), Karroffel was in the middle of doing a few breaking changes to GDNative. I didn't have a chance to test all the changes so it is possible that there is a bug that sneaked in before i went to bed.

I also don't know if he did more changes during the night. It is possible that pulling in all latest changes from both godot and godot_openvr will fix things, or break it more :) I won't have a chance to test until this afternoon.

The new() error happens when the GDNS file for the render models class can't be loaded. Very possible I've missed a change related to Karroffels changes.

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

Yeah, could be. Everything from master (both Godot 3 and godot_openvr) as of 30 minutes does work for me, however.

@Olm-e Maybe check again all the repos are up to date - including the OpenVR submodule.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

ok lets try ;)
...
(some time later)

hello ... I made it works! !! \o/

actually it looks like the compositor (or vulkan or... don't know) doesn't like to have rescaled windows here...

so commenting line 14 in Main.gd let the correct image be drawn in the HMD
(and deformed one in the computer screen)
if you try to rescale it by hand, it freeze the image in the HMD
screenshot for the record ;)

https://lut.im/gallery#wI3PQsH2TF/NDtbR2ruzMS4A0ym.png

thanks for the work attention,
I should relook at all this and write a simple how-to at some point

now for something to be done with it :D

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

Looks like Karroffel has made a few breaking changes, he's unfortunately not online atm so attempting to figure out what needs to be done :)

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

All should hopefully compile & work again since pull #19 - will test later today.

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

So I can report things seems to work. @Olm-e Did you get it working in the meantime?

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

Yup, the master seems to work pretty well. I'm still having weird problems with the PR I'm still working on. I think it is related to the reference counting on the texture that is shared between the objects which indeed does not work correctly yet.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

I have it working since the other day actually : I must pull and check the last commits since but it is working pretty well (in the version state I have)
I'm working on a first project and will release a demo of my locomotion system in godot3 when all is in place ;)

https://mamot.fr/@Olm_e/98993741489082267

libreheadviewgif-godot3s

just one remark : could be nice to have it using same "platform" code as godot for compilation (had some stupid mistake with this):
for godot3 it's "x11" or here it's "linux"

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

Owh that looks nice @Olm-e !

what hardware are you running on?

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

I'm working on a tuxedo laptop with a nv 1060

I just can't test the last iteration, as the main godot3 master is not compiling now for me ... (posting issue there)

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

Nice! I've got a 1060 based laptop as well but running windows.

yeah they're breaking the master a bit these last few days getting last features in before beta freeze is finalised :)

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

ok I could compile and run, but I have troubles now getting the image in the headset as before, disabling the rescaling of godot window is not helping anymore
steamvr says godot is unresponsive, and the environment is "grayed" in the headset, although the tracking is working in the godot window...

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

Make sure HDR is turned off on the viewport. OpenVR does not like the HDR buffers.

The size of godot window shouldn't matter, the output there is purely for spectating.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

HDR is not on, I just try the demo project without touching for test,
before I had to disable the godot viewport rescaling to get it working without freezing, now it's not doing any better...

here is the console output, with the godot viewport giving correct rendering and tracking (incl. controller) but vive headset giving a grayed out version of the "steamvr default non space" as like "indicating transition to somthing else not there yet... "

no error in godot output/debugger

ERROR: get_edited_scene_root: Indexcurrent_edited_scene=-1 out of size (edited_scene.size()=0)
At: editor/editor_data.cpp:607.
Running: /home/user/godot3b/godot/bin/godot.x11.tools.64 --path /home/user/godot3b/godot_openvr/godot_openvr/demo --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 5297 --position 448,240
OpenGL ES 3.0 Renderer: GeForce GTX 1060/PCIe/SSE2
GLES3: max ubo light: 409
GLES3: max ubo reflections: 455, ubo size: 144
Construct gdnative interface
ARVR: Registered interface: OpenVR
ARVR: Registered interface: Native mobile
Creating render model resource
OpenVR: initialising OpenVR context
Main OpenVR interface has been initialized
Main render models interface has been initialized.
Creating render model resource
OpenVR: increased use count to 2
OpenVR: increased use count to 3
Found openvr device 1 (vr_controller_vive_1_5)
Found openvr device 2 (lh_basestation_vive)
Primary interface set to: OpenVR
Creating render model resource
OpenVR: increased use count to 4
models: [arrow, dk2_camera, dk2_hmd, generic_controller, generic_hmd, generic_tracker, hard_bounds, laser_pointer, lh_basestation_01_boysandgirls, lh_basestation_02_batman, lh_basestation_03_robin, lh_basestation_vive, lighthouse_ufo, mptam_hmd_model, oculus_cv1_controller_left, oculus_cv1_controller_right, ref_controller, rift_camera, stage, steam_controller_02_freeman, steam_controller_03_gordon, vr_controller_01_mrhat, vr_controller_02_mrhat_puck, vr_controller_05_wireless_b, vr_controller_vive_1_5, {htc}vr_tracker_vive_1_0, {system}arrow, {system}dk2_camera, {system}dk2_hmd, {system}generic_controller, {system}generic_hmd, {system}generic_tracker, {system}hard_bounds, {system}laser_pointer, {system}lh_basestation_01_boysandgirls, {system}lh_basestation_02_batman, {system}lh_basestation_03_robin, {system}lh_basestation_vive, {system}lighthouse_ufo, {system}mptam_hmd_model, {system}oculus_cv1_controller_left, {system}oculus_cv1_controller_right, {system}ref_controller, {system}rift_camera, {system}stage, {system}steam_controller_02_freeman, {system}steam_controller_03_gordon, {system}vr_controller_01_mrhat, {system}vr_controller_02_mrhat_puck, {system}vr_controller_05_wireless_b, {system}vr_controller_vive_1_5]
Releasing render model resource
OpenVR: decreased use count to 3
Controller vr_controller_vive_1_5_1 became active
Argument count: 1
Searching for: vr_controller_vive_1_5
OpenVR reports: 106
OpenVR reports: 106
OpenVR reports: 106
...

screenshot from 2017-11-28 00-06-19

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

Are you on a laptop that has a dual GPU? I don't know how things work on Linux but I've ran into trouble before that the NVidia driver doesn't select the correct GPU, so it will run Godot using the GTX and run steamVR using the onboard intel chip. They all need to run on the same GPU..

Error 106 is VRInitError_Init_InvalidInterface, could be that issue.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

actually it seems it's SteamVR that is the problem,
even the "steamvr tutorial" is doing the same and
looking at the forum plenty of pleople complains, and specifically on linux same error as here
https://steamcommunity.com/app/250820/discussions/5/1479856439039327893/
damn ... home we can soon get openHMD to get position tracking

from godot_openvr.

ChristophHaag avatar ChristophHaag commented on August 30, 2024

I'll barge in and say that it's mostly the nvidia driver. Here on AMD (RX 480) it mostly just works, but the performance is not good.

screenshot_20171126_164450

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

@ChristophHaag I don't know how the RX 480 compares to my GTX 1060, I'm actually testing around with Fracteeds demo at the moment. While i had to tone a few things down it's now running at over 60fps. Thats on Windows though, i don't know how much better SteamVR runs on Windows. I still have a few things I hope to try out in the coming weeks that may give things a speed boost. I also heard someone say there is a setting in steam VR where you can reduce the size Steam VR asks of games to render the eyes at.

@Olm-e make sure to test out: https://github.com/BastiaanOlij/godot_openhmd
It should now compile and run, I was talking to another guy, name slipped my mind, who has been trying it out lately. There are still some issues because its a straight port of my earlier module version and it really needs to be changed so the 3rd party dependencies are compiled using their own build systems. The current way scons is building those libraries is really a hack.
They are making headway on controller tracking and I wouldn't be surprised if you could use one of their branches to try it out. In theory the controller logic should work when added in.

I still see the openhmd gdnative module as very experimental, there are a bunch of things that have to be redone or improved upon. Would be great to get some extra hands on board:)

from godot_openvr.

ChristophHaag avatar ChristophHaag commented on August 30, 2024

Performance issue are 99% because of deficiencies in the radv vulkan driver or its interaction with SteamVR.
The slider is the Supersampling slider in the Developer settings: https://imgur.com/6qo6ULv

The funny thing is that the frametime graph actually shows much improvement when the RX 480 is set to the lowest clocks:
1288MHz: https://i.imgur.com/pAPDwSn.png
300MHz: https://i.imgur.com/0NWHO59.png
Visually there's not much difference, there's slight stutter all around. So yea, almost surely a driver issue.

On the OpenHMD front there is some super WIP Vive lighthouse tracking code with opencv inside this repository https://github.com/lubosz/OSVR-Vive-Libre/commits/pnp that was used to create this youtube video https://www.youtube.com/watch?v=THpDpKPvZm0 but I do not believe it is hooked up anywhere yet, not even to the OSVR driver of that repository.

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

@Olm-e does Github have PM functionality?

I'm afraid I'm a little hamstrung when it comes to Linux, I've had very little exposure to the platform. But it sounds like something Valve needs to be contacted on?

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

@BastiaanOlij ha yes, true I need to add some contact ;)
I was talking about making the Libre stack happening, to not be tied to SteamVR that changes without notice and makes things break at random time f.ex.
I am working on systems/projects that have more values in being stable than having the last thingies so a working OpenHMD/OSVR stack is best in my pov ;)

from godot_openvr.

ChristophHaag avatar ChristophHaag commented on August 30, 2024

The thing is, everyone is using Valve's openvr API and that's not going to change until it's been superseded by OpenXR.

If people really want to be independent of the proprietary SteamVR runtime in the meantime, they can help finishing an independent OpenVR implementation. This is my start, but still a very early prototype: https://github.com/ChristophHaag/openvr_api-libre. Alone I surely won't finish this before OpenXR is out though.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

Hi,
to report, I get correct result with setting the Nvidia Driver 387.34 Powermizer to Max performance and not adaptive. It was making all the SteamVR/OpenVR really bad fps (like 0.3fps ... ! ) setting it manually solve this
seen this as hint ValveSoftware/SteamVR-for-Linux#82

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

@beniwtv if you have time, could you see if this works for you:
https://github.com/BastiaanOlij/godot-openvr-asset
(it'll be added to the asset library soon I hope)

And maybe add a compiled version for linux?

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

@BastiaanOlij Sweet! Will check it out when I get home :)
I probably can't add the compiled version for Linux unless I can solve the crash today (I feel I'm getting closer)

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

so for the time being, apparently for it to works on gnu-linux, at least on some, it needs being compiled with the 'use_llvm=yes' option added to scons for both godot and godot_openvr
it works with clang 3.8 + llvm 5.0(.1) on manjaro and linux mint 18

from godot_openvr.

lboklin avatar lboklin commented on August 30, 2024

Compiling with scons platform=x11 on Ubuntu 17.10 produces a binary which doesn't work for me (but the binary from https://github.com/BastiaanOlij/godot-openvr-asset/ does). Adding use_llvm=yes fails - logs from that can be provided if desired.

Output from cd demo && godot -v:

No touch devices found                                                                                                                                                                                                                
PulseAudio: detected 2 channels                                                                                                                                                                                                       
PulseAudio: audio buffer frames: 512 calculated latency: 11ms                                                                                                                                                                         
failed cursor: size_bdiag                                                                                                                                                                                                             
failed cursor: size_fdiag                                                                                                                                                                                                             
Using GLES3 video driver                                                                                                                                                                                                              
OpenGL ES 3.0 Renderer: GeForce GTX 1070/PCIe/SSE2                                                                                                                                                                                    
load resource: res://bin/godot_openvr.gdnlib                                                                                                                                                                                          
Construct gdnative interface                                                                                                                                                                                                          
CORE API HASH: 5483915881153564253                                                                                                                                                                                                    
EDITOR API HASH: -5919760101651613804                                                                                                                                                                                                 
load resource: res://default_env.tres                                                                                                                                                                                                 
load resource: res://Main.tscn                                                                                                                                                                                                        
load resource: res://Main.gd                                                                                                                                                                                                          
load resource: res://bin/OpenVRRenderModel.gdns                                                                                                                                                                                       
load resource: res://bin/godot_openvr.gdnlib (cached)                                                                                                                                                                                 
load resource: res://bin/godot_openvr.gdnlib (cached)                                                                                                                                                                                 
load resource: res://Milkyway.png                                                                                                                                                                                                     
load resource: res://Table.tscn                                                                                                                                                                                                       
load resource: res://ovr/ovr_first_person.tscn                                                                                                                                                                                        
load resource: res://ovr/ovr_controller.tscn                                                                                                                                                                                          
load resource: res://bin/OpenVRRenderModel.gdns (cached)                                                                                                                                                                              
load resource: res://ovr/ovr_controller.tscn (cached)                                                                                                                                                                                 
load resource: res://ovr/ovr_controller.tscn (cached)                                                                                                                                                                                 
load resource: res://ovr/Function_Teleport.tscn          
load resource: res://ovr/Function_Teleport.gd            
load resource: res://ovr/teleport_arrow.png              
load resource: res://ovr/teleport_target.png             
load resource: res://ovr/teleport_arrow.png (cached)     
load resource: res://ovr/teleport_target.png (cached)    
load resource: res://ovr/Function_Teleport.gd (cached)   
load resource: res://ovr/Function_Direct_movement.tscn   
load resource: res://Milkyway.png (cached)               
load resource: res://Main.gd (cached)                    
load resource: res://Table.tscn (cached)                 
load resource: res://ovr/ovr_first_person.tscn (cached)  
load resource: res://ovr/Function_Teleport.tscn (cached) 
load resource: res://ovr/Function_Direct_movement.tscn (cached)                                                    
Creating render model resource                           
OpenVR: initialising OpenVR context                      
Main OpenVR interface has been initialized               
Main render models interface has been initialized.       
Creating render model resource                           
OpenVR: increased use count to 2                         
OpenVR: increased use count to 3                         
Found openvr device 1 (lh_basestation_vive)              
Found openvr device 2 (lh_basestation_vive)              
Primary interface set to: OpenVR                         
Creating render model resource                           
OpenVR: increased use count to 4                         
models: [arrow, dk2_camera, dk2_hmd, generic_controller, generic_hmd, generic_tracker, hard_bounds, laser_pointer, lh_basestation_01_boysandgirls, lh_basestation_02_batman, lh_basestation_03_robin, lh_basestation_vive, lighthouse_ufo, mptam_hmd_model, oculus_cv1_controller_left, oculus_cv1_controller_right, ref_controller, rift_camera, stage, steam_controller_02_freeman, steam_controller_03_gordon, vr_controller_01_mrhat, vr_controller_02_mrhat_puck, vr_controller_05_wireless_b, vr_controller_vive_1_5, {htc}vr_tracker_vive_1_0, {system}arrow, {system}dk2_camera, {system}dk2_hmd, {system}generic_controller, {system}generic_hmd, {system}generic_tracker, {system}hard_bounds, {system}l
aser_pointer, {system}lh_basestation_01_boysandgirls, {system}lh_basestation_02_batman, {system}lh_basestation_03_robin, {system}lh_basestation_vive, {system}lighthouse_ufo, {system}mptam_hmd_model, {system}oculus_cv1_controller_l
eft, {system}oculus_cv1_controller_right, {system}ref_controller, {system}rift_camera, {system}stage, {system}steam_controller_02_freeman, {system}steam_controller_03_gordon, {system}vr_controller_01_mrhat, {system}vr_controller_0
2_mrhat_puck, {system}vr_controller_05_wireless_b, {system}vr_controller_vive_1_5]
Releasing render model resource
OpenVR: decreased use count to 3                         
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. Framebuffer name must be generated before being bound.                         
   At: drivers/gles3/rasterizer_gles3.cpp:126.           
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. Framebuffer name must be generated before being bound.                         
   At: drivers/gles3/rasterizer_gles3.cpp:126.           
ERROR: _gl_debug_print: GL ERROR: Source: OpenGL        Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. The required buffer is missing.                                                
   At: drivers/gles3/rasterizer_gles3.cpp:126.           
ERROR: operator[]: FATAL: Index p_index=0 out of size (size()=0)                                                   
   At: core/vector.h:138.                                
handle_crash: Program crashed with signal 4              
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues   
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x37140) [0x7fa5970cf140] (??:0)                                              
[2] godot() [0x887d67] (<artificial>:?)                  
[3] godot() [0x951f28] (<artificial>:?)                  
[4] godot() [0x18edcf6] (??:?)                           
[5] godot() [0x179393b] (??:?)                           
[6] godot() [0x18ef6e1] (<artificial>:?)                 
[7] godot() [0x4c5fd5] (??:?)                            
[8] godot() [0x45412d] (??:?)                            
[9] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fa5970b91c1] (??:0)                                
[10] godot() [0x46061f] (??:?)                           
-- END OF BACKTRACE --                                   
[1]    14316 abort (core dumped)  godot -v

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

@lboklin You have to either use the asset or compile with --use_llvm=yes (and make sure you specifically compile with LLVM 5.0.1). GCC currently runs into a problem when compiling, and the resulting plugin will crash Godot.

If you want, provide your LLVM compiling logs here and we'll take a look.

from godot_openvr.

lboklin avatar lboklin commented on August 30, 2024

Output from scons platform=x11 use_llvm=yes:

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
clang++ -o src/ARVRInterface.os -c -fPIC -Iopenvr/headers -I. -Igodot_headers src/ARVRInterface.cpp
In file included from src/ARVRInterface.cpp:8:
In file included from src/ARVRInterface.h:8:
In file included from src/OVRCalls.h:8:
openvr/headers/openvr.h:1444:104: error: use of undeclared identifier 'nullptr'
        virtual void GetOutputDevice( uint64_t *pnDevice, ETextureType textureType, VkInstance_T *pInstance = nullptr ) = 0;
                                                                                                              ^
openvr/headers/openvr.h:1820:219: error: use of undeclared identifier 'nullptr'
                virtual uint32_t GetApplicationPropertyString( const char *pchAppKey, EVRApplicationProperty eProperty, VR_OUT_STRING() char *pchPropertyValueBuffer, uint32_t unPropertyValueBufferLen, EVRApplicationError *peError = nullptr ) = 0;
                                                                                                                                                                                                                                        ^
openvr/headers/openvr.h:1823:132: error: use of undeclared identifier 'nullptr'
                virtual bool GetApplicationPropertyBool( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0;
                                                                                                                                                 ^
openvr/headers/openvr.h:1826:138: error: use of undeclared identifier 'nullptr'
                virtual uint64_t GetApplicationPropertyUint64( const char *pchAppKey, EVRApplicationProperty eProperty, EVRApplicationError *peError = nullptr ) = 0;
                                                                                                                                                       ^
openvr/headers/openvr.h:1913:71: error: use of undeclared identifier 'nullptr'
                virtual bool Sync( bool bForce = false, EVRSettingsError *peError = nullptr ) = 0;
                                                                                    ^
openvr/headers/openvr.h:1915:118: error: use of undeclared identifier 'nullptr'
                virtual void SetBool( const char *pchSection, const char *pchSettingsKey, bool bValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                   ^
openvr/headers/openvr.h:1916:122: error: use of undeclared identifier 'nullptr'
                virtual void SetInt32( const char *pchSection, const char *pchSettingsKey, int32_t nValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                       ^
openvr/headers/openvr.h:1917:121: error: use of undeclared identifier 'nullptr'
                virtual void SetFloat( const char *pchSection, const char *pchSettingsKey, float flValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                      ^
openvr/headers/openvr.h:1918:129: error: use of undeclared identifier 'nullptr'
                virtual void SetString( const char *pchSection, const char *pchSettingsKey, const char *pchValue, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                              ^
openvr/headers/openvr.h:1922:105: error: use of undeclared identifier 'nullptr'
                virtual bool GetBool( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                      ^
openvr/headers/openvr.h:1923:109: error: use of undeclared identifier 'nullptr'
                virtual int32_t GetInt32( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                          ^
openvr/headers/openvr.h:1924:107: error: use of undeclared identifier 'nullptr'
                virtual float GetFloat( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                        ^
openvr/headers/openvr.h:1925:160: error: use of undeclared identifier 'nullptr'
                virtual void GetString( const char *pchSection, const char *pchSettingsKey, VR_OUT_STRING() char *pchValue, uint32_t unValueLen, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                                                             ^
openvr/headers/openvr.h:1927:83: error: use of undeclared identifier 'nullptr'
                virtual void RemoveSection( const char *pchSection, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                ^
openvr/headers/openvr.h:1928:116: error: use of undeclared identifier 'nullptr'
                virtual void RemoveKeyInSection( const char *pchSection, const char *pchSettingsKey, EVRSettingsError *peError = nullptr ) = 0;
                                                                                                                                 ^
openvr/headers/openvr.h:2589:19: error: use of undeclared identifier 'nullptr'
                : m_pImageData( nullptr )
                                ^
openvr/headers/openvr.h:3157:158: error: use of undeclared identifier 'nullptr'
                virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
                                                                                                                                                                           ^
openvr/headers/openvr.h:3157:196: error: use of undeclared identifier 'nullptr'
                virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
                                                                                                                                                                                                                 ^
openvr/headers/openvr.h:3157:234: error: use of undeclared identifier 'nullptr'
                virtual VRMessageOverlayResponse ShowMessageOverlay( const char* pchText, const char* pchCaption, const char* pchButton0Text, const char* pchButton1Text = nullptr, const char* pchButton2Text = nullptr, const char* pchButton3Text = nullptr ) = 0;
                                                                                                                                                                                                                                                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
scons: *** [src/ARVRInterface.os] Error 1
scons: building terminated because of errors.

clang --version:

clang version 5.0.0-3 (tags/RELEASE_500/final)                                                                                                                                                                                        
Target: x86_64-pc-linux-gnu                                                                                                                                                                                                           
Thread model: posix                                                                                                                                                                                                                   
InstalledDir: /usr/bin

from godot_openvr.

lboklin avatar lboklin commented on August 30, 2024

#35 enabled me to build a working .so with scons platform=x11!

from godot_openvr.

BastiaanOlij avatar BastiaanOlij commented on August 30, 2024

#35 has now been merged :)

from godot_openvr.

fire avatar fire commented on August 30, 2024

Is anyone able to run a demo? I get a purple screen for the default master and a crash for the blit branch.

from godot_openvr.

fire avatar fire commented on August 30, 2024

Was able to run the rebased blit branch. Had performance problems but

~/.steam/steam/ubuntu12_32/steam-runtime/run.sh  ./Godot_v3.0.2-stable_x11.64 -vulkan -vr -noautofidelity

helped.

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

I still have an issue here with master version of godot/openvr : the rendering through steamvr is giving some weird lagging frames...
I was thinking about those "reprojection" thing but it is disabled completely (in the settings and files), and hardly work as expected if any...
it also looks like if the buffer was displayed first then projected correctly then redisplayed again, and that for each frame ... (probably also slowing down the rendering ? althought the basic demo works well, I get bad framerate for the Sponza scene and other personal "simple" scenes with no fancy lightning, low res texture and shadows and only static meshes with total 1/2M vertices ... on a i7-7700k+Nvidia GTX1060 - driver 396.18... )

it is showing through steamvr only, the windows rendering is good (low framerate but no lagging frame reprojection) and the scene in the editor runs at 100-120 fps ...
I'll try to make a video of it

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

Hi @Olm-e does this issue still persist, or is it meanwhile solved? :)

from godot_openvr.

Olm-e avatar Olm-e commented on August 30, 2024

hi,
from my pov this can be considered solved :
the development of the renderer in godot 3.0+ and the updates on openvr these last months have greatly helped smooth all this (I could demo it at the godot conf in brussels last feb.)
just one final tip : it's actually happening still if you don't have render fps and physics fps at the same rate. so it's important to check all the rendering parameters to have a consistent setup (90 fps for both, no synch-screen, no fancy shadows, etc ... ) together with multi-threading and some possible tweaks in lightnings and other quality options.
but with some basic attention, it's now very usable with even some complex scenery ...
(all is in the performance/detail/optimisation then)

from godot_openvr.

beniwtv avatar beniwtv commented on August 30, 2024

Nice, I guess Vulkan will also help for performance ;)

from godot_openvr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.