Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Diy Laser Light Gun.  (Read 1082 times)

0 Members and 1 Guest are viewing this topic.

ryoken

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 41
  • Last login:Today at 06:02:50 pm
  • I want to build my own arcade controls!
Re: Diy Laser Light Gun.
« Reply #40 on: May 18, 2019, 02:41:25 am »
I didn't use opentrack yet. Because i can't calibrate the screen  size with it. I will try to recording a better  video to show  how it works.  I really will like to have more time to expend in this project but work every day take me 10 to 11 hours an then the baby, wife... not much time left in my daily  routine. I'm having a bit of problem with model 2 emulator because it crash every time  i change to full screen.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 17317
  • Last login:Today at 10:44:43 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Diy Laser Light Gun.
« Reply #41 on: May 18, 2019, 05:21:25 pm »
Mine came in today.  I can't even get it to behave as a proper webcam in windows.  There's an example directshow app I found specifically for the ps3 cam that works, but pretty much nothing else does.  If it's a directshow only thing, that'll work, but it's a bit slower than pulling down the raw images. 

From what little testing I have done you might want to keep this in mind.....  My old mame cab, which has a 27' 16:10 monitor in it needs the camera about 14 inches back before it can get the whole screen in, even in widescreen mode.  So on a traditional cab this isn't going to be entirely easy to setup.  You'd probably need to mount it either at the trailing edge of your control panel or the ceiling or something. 

SammyWI

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:Today at 09:09:04 pm
Re: Diy Laser Light Gun.
« Reply #42 on: May 18, 2019, 06:14:47 pm »
Mine came in today.  I can't even get it to behave as a proper webcam in windows.  There's an example directshow app I found specifically for the ps3 cam that works, but pretty much nothing else does.  If it's a directshow only thing, that'll work, but it's a bit slower than pulling down the raw images. 

From what little testing I have done you might want to keep this in mind.....  My old mame cab, which has a 27' 16:10 monitor in it needs the camera about 14 inches back before it can get the whole screen in, even in widescreen mode.  So on a traditional cab this isn't going to be entirely easy to setup.  You'd probably need to mount it either at the trailing edge of your control panel or the ceiling or something.

PS3 eye cameras have pretty poor windows driver support.  There is some stuff on Github.  And there's the Code Laboratories driver that you have to pay for.  I've used the free ones and got lock ups with the ShootOff software. But they have that high FPS which is enticing.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 17317
  • Last login:Today at 10:44:43 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Diy Laser Light Gun.
« Reply #43 on: May 18, 2019, 09:36:19 pm »
Yeah I ran across this:

https://github.com/psmoveservice/PSMoveService/wiki/PSEye-Software-Setup-%28Windows%29

I don't have the time nor inclination to try them all right now so I'll take a look at it later.  This was my concern all along and why I initially dismissed the ps eye as a viable solution.

SammyWI

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:Today at 09:09:04 pm
Re: Diy Laser Light Gun.
« Reply #44 on: Yesterday at 09:05:09 am »
I'll probably try messing with the PS3 eye again since I did take the time to remove the IR filter and add a lens with focus adjustment.  And I'll probably be disappointed once again.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 17317
  • Last login:Today at 10:44:43 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Diy Laser Light Gun.
« Reply #45 on: Yesterday at 08:27:32 pm »
Was it hard to remove the IR filter?  I haven't attempted it yet.  I'm just wondering how much IR light the green lasers put off because the image quality of the ps eye is surprisingly poor.  It's quick in terms of frame rate, but there's all kinds of static.... blocking out visible light and just tracking ir would really improve accuracy.  Assuming I can sort out the drivers the wide lens is probably good enough for me to be able to get good tracking with a minimum of distortion. 

My idea for the system as a whole is this....  A 3d printed lens cap with a visible light filter installed could be removed for calibration.  To calibrate the eye would just take a pic and the user could click on the corners.... that'd give me the screen bounds and I could draw a trapezoid with them.  I can then scan the image one pixel at a time for that trapezoid's color to determine the start and stop points for each row and column and save those values as offsets and multipliers.  The leftmost pixel in a row and the topmost pixel in a column are the offsets and the rightmost and bottommost minus those values converted to a percentage of the screen are the multipliers.  Then when you play replace the lens cap and the dot's position would be applied to the array to determine the position on the screen with distortion removed.  Alternatively the user could "paint" the corners by firing at them with a visible laser that also has ir.  Either would work, I just need to know the corners.  So long as the camera isn't moved, it'd never have to be calibrated again.  It might be prudent to do a 4:3 calibration for 16:9 monitors but that could be calculated from the 16:9 corners. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Online Online
  • Posts: 17317
  • Last login:Today at 10:44:43 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Diy Laser Light Gun.
« Reply #46 on: Today at 12:48:21 am »
I ran across this:

https://www.walmart.com/ip/Universal-AR-Gun-Smart-Pistol-Bluetooth-Game-Handle-Controllers-W-Phone-Stand-3D-AR-Games-Gun-For-Smartphones/981944364

For people with limited DIY skills it'd be an ideal shell for a basic gun.  The trigger is actually a Bluetooth controller, so it's wireless.  Drill out the front to slide a laser pointer in, rig it to stay on and you are good to go. 

SammyWI

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 400
  • Last login:Today at 09:09:04 pm
Re: Diy Laser Light Gun.
« Reply #47 on: Today at 08:29:30 am »
Was it hard to remove the IR filter? 
It's been a while but IIRC it was a PITA.  And on top of that you have to add some kind of shim behind the lens mount to get things to focus.  That was why I put on a new lens with the focus adjustment built in.  I had another one where I just guessed on adding a shim and the picture was a little out of focus but still worked OK for laser detection.

I've also done some testing with filters.  Photographic gel films work well.  I ordered this pack from Amazon and it has worked well (plus cheap!).
https://smile.amazon.com/gp/product/B00QN48X0Q/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
Two red plus two blue filters work well as a visible light filter for IR laser use.   For a visible red laser, adding a red filter can help.