====== Augmented/Virtual Reality ====== {{template>project:infobox| name=Augmented/Virtual Reality| image=vr.png?200| sw=?| hw=?| founder=[[user:stick]]| interested=[[user:biiter]],\\ [[user:tomsuch]],\\ [[user:ruza]],\\ [[user:aym]],\\ [[user:lexik]]| status=suspended}} ~~META: status = suspended &relation firstimage = :project:vr.png ~~ We have [[http://www.vuzix.com/consumer/products_vr920.html|Vuzix iWear VR920]] and shutter glasses available for projects. ===== Ideas ===== * Depth Perception * http://xkcd.com/941/ * Kinect + VR * http://www.engadget.com/2010/12/21/kinect-paired-with-vuzix-vr920-shades-creates-zany-virtual-real/ * Plane Model + Cam * http://www.autoblog.com/2011/08/31/r-c-f16-jet-with-swiveling-pilots-view-blows-our-tiny-little-mi/ * Wireless Head Mounted Display * http://www.pabr.org/wxhmd/doc/wxhmd.en.html ===== Driver ===== ==== eDimensional ==== Edimensional controller se inicializuje barevnyma kodoma v horni casti obrazovky. Kody se zjisti z programu E-D.exe na adrese 0x004010A9. Program si uklada nastaveni do registru v rutine na adrese 0x00401491. Aktivace synchronizace LEFT/RIGHT obrazu se signalizuje pres DDC na VGA konektoru. === sprovozneni pod linuxem (incomplete) === # modprobe i2c-dev $ i2cdetect -l $ cat /sys/bus/i2c/devices/i2c-X/device/device/card0-VGA-1/edid === reference === * [[http://www.hardwarebook.info/VGA_(VESA_DDC)|VGA (VESA DDC)]] * [[http://jaffar.cs.msu.su/oleg/ddcci/|Linux DDC/CI Tool page]] * [[https://xgoat.com/wp/2007/11/11/using-i2c-from-userspace-in-linux/|Using I2C from userspace in Linux]] ==== Vuzix vr920 ==== Bryle se ovladaji pres USB. USB descriptor zarizeni obsahuje krome audio kanalu a headtracking sensoru jeste display controller kterym lze prepinat obraz na levem a pravem oku. Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 4 VR920 3D Stereo Control Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 1 Ovladani displayu probiha na EP 5 OUT (0x05). Inicializace se provadi zpravou typu [[http://www.beyondlogic.org/usbnutshell/usb6.shtml#SetupPacket|control transfer]] v nasledujicim nastaveni: bmRequestType 0x40 bRequest 0x0009 wValue 0x0302 wIndex 0x0003 wLength 0x0010 data 0x02 0x07 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Kompletni inizializace zarizeni a ovladani leveho/praveho oka v PyUSB: import usb # nalezeni zarizeni dev = usb.core.find(idVendor = 0x1bae, idProduct = 0x0002) if dev is None: raise ValueError('Device not found') for i in range(4): try: dev.detach_kernel_driver(i) dev.detach_kernel_head(i) except: pass # nalezeni EP 5 OUT epx = None dev.set_configuration(1) for cfg in dev: for intf in cfg: for ep in intf: if ep.bEndpointAddress is 0x05 : epx = ep if epx is None: raise ValueError('ep not found') # inicializace dev.ctrl_transfer(0x40, 0x9, 0x302, 0x3, "\x02\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") dev.ctrl_transfer(0x40, 0x9, 0x302, 0x3, "\x02\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") epx.write("\x00") dev.ctrl_transfer(0x40, 0x9, 0x302, 0x3, "\x02\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00") # ovladani displayu epx.write("\x00") epx.write("\x01") Obraz je v displayi udrzovan dokud mu neprijde zprava o jeho obnoveni (0x00/0x01). ===== Anaglyph ===== [[wp>Anaglyph_image]] ==== Inficolor ==== [[https://www.youtube.com/watch?v=2cJ1KCTem9o]] ===== Theory ===== [[http://paulbourke.net/miscellaneous/stereographics/stereorender/|Paul Bourke's stereoscopic articles]]