Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved! Phone/head too big/small (lens renders both eyes squeezed on the bottom half of the screen) #41

Open
SaintAnd opened this issue Aug 10, 2022 · 24 comments

Comments

@SaintAnd
Copy link

Why is a small window broadcast, as if one lens is felt, and the second seems to be felt as being located outside the borders. How to fix it? Two problems, a small lens, the second lens seems to be gone.

Screenshot:
https://ibb.co/4s1Tf7d

Changed different data in ffmpeg_fg.py and frame_generator.py fork

@SaintAnd SaintAnd changed the title Why is a small window broadcast, as if one lens is felt Edited! Phone/head too big/small (lens renders both eyes squeezed on the bottom half of the screen) Aug 11, 2022
@SaintAnd
Copy link
Author

How decide it error.

  1. Install wine
  2. Install Trinus for windows on wine (version for Google Cardboard)
  3. Start Trinus (cd $PATH_TO_TRINUS && wine TGServer.exe
  4. Press "Start" in program and press start "trinus" on android, then activate this
  5. When will be connect program and device you can change "Head mount" in top "Main".
  6. Exit Trinus on wine
  7. Start LinusTrinus and enjoy
    P.S. If you want change your own size. Edit TGServer.exe.config in $PATH_TO_TRINUS. In Line 29 change "[{"name":"Default_Any"," and other parametrs
    P.S.S. Sorry form my bad English

@SaintAnd SaintAnd changed the title Edited! Phone/head too big/small (lens renders both eyes squeezed on the bottom half of the screen) Solved! Phone/head too big/small (lens renders both eyes squeezed on the bottom half of the screen) Aug 14, 2022
@izzijaz
Copy link

izzijaz commented Apr 6, 2023

How decide it error.

  1. Install wine
  2. Install Trinus for windows on wine (version for Google Cardboard)
  3. Start Trinus (cd $PATH_TO_TRINUS && wine TGServer.exe
  4. Press "Start" in program and press start "trinus" on android, then activate this
  5. When will be connect program and device you can change "Head mount" in top "Main".
  6. Exit Trinus on wine
  7. Start LinusTrinus and enjoy
    P.S. If you want change your own size. Edit TGServer.exe.config in $PATH_TO_TRINUS. In Line 29 change "[{"name":"Default_Any"," and other parametrs
    P.S.S. Sorry form my bad English

Does this work?

@izzijaz
Copy link

izzijaz commented Apr 6, 2023

Screenshot_2023-04-06-15-57-17-097_com.loxai.trinus.full.jpg

After doing so i got this very weird video output.

@SaintAnd
Copy link
Author

SaintAnd commented Apr 6, 2023

Yes, it's working for me. In app you need turn off any function. Now I install it's app and will write here

@SaintAnd
Copy link
Author

SaintAnd commented Apr 6, 2023

Screenshot_2023-04-06-15-57-17-097_com.loxai.trinus.full.jpg

After doing so i got this very weird video output.

You need turn off lens in android app.
"Lens Off"
https://ibb.co/jMKFW2B
IMG_20230406_141754

@izzijaz
Copy link

izzijaz commented Apr 6, 2023

Screenshot_2023-04-06-15-57-17-097_com.loxai.trinus.full.jpg

After doing so i got this very weird video output.

This is after enabling lens in the app. How to properly configure this

@SaintAnd
Copy link
Author

SaintAnd commented Apr 6, 2023

Disable lens.
After disabling the lens function, ffmpeg will work and additionally make a picture from instead of this disabled function.

@izzijaz
Copy link

izzijaz commented Apr 6, 2023

Disable lens.
After disabling the lens function, ffmpeg will work and additionally make a picture from instead of this disabled function.

Without the lens option enabled the picture is just a flat image and not suitable for vr. Very difficult to see

@SaintAnd
Copy link
Author

SaintAnd commented Apr 6, 2023

@izzijaz
I remembered.
I made a possible use of lens warp with ffmpeg but didn't add how to do it here.
I'll try to add it soon

@SaintAnd
Copy link
Author

SaintAnd commented Apr 6, 2023

@izzijaz
https://github.com/SaintAnd/LinusTrinus
Try this repository. Maybe I add here

Yes, I edited this repositories. You can edit frame_generator/ffmpeg_double_fg.py next string:
73 ("filter_complex", f'split[lenl][lenr];[lenl]crop=iw/2:ih:iw/2:0,lenscorrection=k1=0.58101:k2=0[a];[lenr]crop=iw/2:ih:0:0,lenscorrection=k1=0.58101:k2=0[b];[b][a]hstack'),

And edit lenscorrection.

Maybe you need update ffmpeg to new version with support lenscorrection plugin

@izzijaz
Copy link

izzijaz commented Apr 6, 2023

@izzijaz
https://github.com/SaintAnd/LinusTrinus
Try this repository. Maybe I add here

Yes, I edited this repositories. You can edit frame_generator/ffmpeg_double_fg.py next string:
73 ("filter_complex", f'split[lenl][lenr];[lenl]crop=iw/2:ih:iw/2:0,lenscorrection=k1=0.58101:k2=0[a];[lenr]crop=iw/2:ih:0:0,lenscorrection=k1=0.58101:k2=0[b];[b][a]hstack'),

And edit lenscorrection.

Maybe you need update ffmpeg to new version with support lenscorrection plugin

Is there a setting for Vr Box lens?

@SaintAnd
Copy link
Author

SaintAnd commented Apr 6, 2023

@izzijaz Yes you are right. This line is responsible for displaying the image and where you can distort the image for a specific helmet as you like.

@izzijaz
Copy link

izzijaz commented Apr 6, 2023

@izzijaz Yes you are right. This line is responsible for displaying the image and where you can distort the image for a specific helmet as you like.

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

@SaintAnd
Copy link
Author

SaintAnd commented Apr 6, 2023

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone?

Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line.

You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning:
{"profiles":[{"name":"Default Simulator" ...
[{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ...
{"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ...
where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

@izzijaz
Copy link

izzijaz commented Apr 7, 2023

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone?

Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line.

You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

@SaintAnd
Copy link
Author

SaintAnd commented Apr 7, 2023

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone?
Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line.
You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

I'm glad that you managed to achieve lens distortion. I don't have a helmet like you have in the picture right now, so I hope you can do it the best you can, but take care of your eyes, because these things are not safe in my opinion.
──────────────────────
█──██████────██████──█
█─██────██──██────██─█
─███─██─██████─██─███─
──██────██──██────██──
───██████────██████───

@izzijaz
Copy link

izzijaz commented Apr 13, 2023

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone?
Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line.
You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

I'm glad that you managed to achieve lens distortion. I don't have a helmet like you have in the picture right now, so I hope you can do it the best you can, but take care of your eyes, because these things are not safe in my opinion. ────────────────────── █──██████────██████──█ █─██────██──██────██─█ ─███─██─██████─██─███─ ──██────██──██────██── ───██████────██████───

I have tried this after a while today, When steam vr starts, using ur rep, the steamvr windows shows in my phone and also my desktop also shows. Its not just taking SteamVR Compositor but the whole screen is still being mirrored

@SaintAnd
Copy link
Author

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone?
Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line.
You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

I'm glad that you managed to achieve lens distortion. I don't have a helmet like you have in the picture right now, so I hope you can do it the best you can, but take care of your eyes, because these things are not safe in my opinion. ────────────────────── █──██████────██████──█ █─██────██──██────██─█ ─███─██─██████─██─███─ ──██────██──██────██── ───██████────██████───

I have tried this after a while today, When steam vr starts, using ur rep, the steamvr windows shows in my phone and also my desktop also shows. Its not just taking SteamVR Compositor but the whole screen is still being mirrored

Yes, I kind of removed the steam capture function. But it can be returned, you just need to find it in the code.

@SaintAnd
Copy link
Author

This setting is in xwd_fg.py on line 54 of this text:
window_id = self.find_window_id("SteamVR Compositor")
You need to look at the name of your process in the task manager

@izzijaz
Copy link

izzijaz commented Apr 13, 2023

This setting is in xwd_fg.py on line 54 of this text:
window_id = self.find_window_id("SteamVR Compositor")
You need to look at the name of your process in the task manager

It is set to steamvr compositor

@SaintAnd
Copy link
Author

You need install xwininfo and xwd if it didn't install before
After then edit main.py string 25:
Replace FRAMEGEN_FFMPEG to FRAMEGEN_XWD

But I don't know now how to edit this windows with lenscorrections

@izzijaz
Copy link

izzijaz commented Apr 14, 2023

You need install xwininfo and xwd if it didn't install before
After then edit main.py string 25:
Replace FRAMEGEN_FFMPEG to FRAMEGEN_XWD

But I don't know now how to edit this windows with lenscorrections

I will try this, didn't read this part yesterday. Will let you know if i run into any problems.

@izzijaz
Copy link

izzijaz commented Apr 14, 2023

Extremely nausiating this mode FRAMEGEN_XWD. THE image is doubled also. not one singular image when viewing through Gear. Is the distance between the images adjustable?

@izzijaz
Copy link

izzijaz commented Apr 14, 2023

My game LFS could not initialise SteamVR. I think i should switch to windows for gaming. Linux is currently a pain in the a** when it comes to VR and these related. Not much ease of use or compatibility yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants