Background technology
Virtual reality, be called for short VR technology, be utilize computer simulation to produce a three-dimensional virtual world, provide user about the simulation of the sense organs such as vision, the sense of hearing, sense of touch, allow user as on the spot in person, the things in three-dimensional space can be observed in time, ad lib.
At present, worldwide, mainly contain two to the engine that mobile Internet and virtual reality are supported simultaneously, they are the Unreal3 engine of Epic company of the U.S. and the Unity3D engine of Unity Technology company of Denmark respectively.
Unreal3 engine is the tap of conventional P C and household game machine platform, and thousands of game and virtual reality applications use this engine to develop.When technical development is to the mobile Internet epoch, Unreal3 engine has also issued corresponding engine authorizes for mobile platform.But Unreal3 engine is designed to high-end engine from the beginning, no matter from complexity, the expressive ability of engine or from the price of authorizing, the technology of user itself and hardware configuration requirement are all very harsh.That only has the big companies of minority and listed company to bear plays this engine.He is very slow in mobile platform development always in occupation of the high-end market of exploitation.
Unity3D engine develops the cross-platform engine of 3D rapidly in nearly 2 years, he towards be middle-end developing target market, existing market occupation rate occupies high.
But no matter this two engine is from designing or in service, not customizing for Chinese developer.China developer has inconvenience in use, and for Unity3D, this engine Chinese document is very unsound, and the upper acquiescence of literary composition input is not also supported in the implementation, and developer, when encountering problems, cannot be solved fast and effectively.When running into engine design defect, due to official's not providing source code, developer is by helpless.
At home, 3D virtual reality engine software best is at present the VRP developed by Shenzhen Zhong Shidian digital technology company limited.VRP is a directly towards the Chinese virtual reality software platform of three-dimensional art designing, and its core looks the virtual reality 3D engine of allusion quotation independent research in being.Its all operation is all carry out in the understandable mode of art designing, does not need programmer to participate in.If operator has good 3DMAX modeling and plays up basis, as long as learn a little VRP platform and study the virtual reality scenario just can producing oneself very soon.But the virtual reality 3D engine of VRP and external virtual reality engine gap in technical merit is very large: support point is not painted, and UV layer is only supported two-layer.Do not support UV animation, want that realizing flow effect very wastes pinup picture, pinup picture stacked system is few.And whole platform does not all provide any programmer the interface that can get involved to client, do not support the plug-in unit that any client writes oneself etc. defect also allow VRP with the competition of external engine at a disadvantage.
Summary of the invention
The present invention is the defect overcoming above-mentioned technology, provides a kind of implementation realizing immersive VR across mobile platform.
Realize a system for immersive VR across mobile platform, comprise server end and client, wherein, reality scene is played up by described server end, and the display device transferring to client shows.
Further, wherein client comprises head-mounted display apparatus and mobile client, and server end comprises virtual reality engine; Mobile client is arranged on the hand-held Intelligent mobile equipment of user, described Intelligent mobile equipment is undertaken alternately by radio communication and server end, mobile device is by the input instruction of interactive operation emulating server end, control virtual scene or personage, server end feedback command is to mobile device.
Further, virtual reality engine, the picture adopting DirectX3D Rendering to be rendered by virtual three-dimensional scene by pixel rendering device Pixel Shader carries out distortion correction and distortion convergent-divergent, and segmentation is plotted to the left and right eyes screen of described head-mounted display apparatus, refreshes with frequencies more than 60 frames per second.
Further, described system also comprises one or more sensor, for immediately obtaining positional information and the orientation information of head-mounted display apparatus, carries out the tracking in head movement and eyes direction; Described sensor be accelerometer, gyroscope, compass or direction sensor at least one of them; Described system also comprises message interface, for the position coordinates that obtained by described sensor with rotate hypercomplex number information feed back to the application program operating in server end.
Further, described application program is by the processing module of described virtual reality engine, process is played up, physical impacts, audio effect processing process feedack, coordinates matrix is set, the process of image is carried out according to feedack, the image processed is transferred to client by the hardware abstraction layer HAL of head-mounted display apparatus, the picture that user upgrades after seeing feedback by eyes.
Further, described mobile device is undertaken by Wi-Fi or bluetooth and server end alternately.
Further, the interactive operation that described mobile device performs can be Touch Screen or dummy keyboard operation realizes.
Further, server end feed back to mobile device instruction can by vibrations and/or play sound effect perform.
Further, server end can be PC or Cloud Server.
The present invention also provides a kind of system realizing immersive VR across mobile platform, and this system comprises server end and client, wherein,
Server end comprises:
Message interface, for interactive information between client; Processing module, for the treatment of the information of client feedback, and sends it back client by the result after process; Image rendering module, carries out 3D to image and plays up, and generates 3D scene; Pixel rendering module, carries out distortion correction and distortion convergent-divergent to the 3D scene generated; Segmentation drafting module, draws the Image Segmentation Using played up; Image output module, exports to the image split on the screen of the head-mounted display apparatus of client.
Client comprises head-mounted display apparatus and mobile client.
Wherein head-mounted display apparatus comprises:
Display screen, shows for the image exported by server end, and to make user to watch, it is per second that the refreshing frequency of described display screen is not less than 60 frames; Sensor, for immediately obtaining positional information and the orientation information of head-mounted display apparatus, carries out the tracking in head movement and eyes direction; Message interface, for server end interactive information; Processing module, for the treatment of the information that sensor obtains, is translated into corresponding position coordinates and rotates hypercomplex number information, and the result after transforming is sent to server end.
Mobile client is installed on the mobile apparatus, comprising: control module, by arranging virtual input device on the screen of the mobile device, by the input instruction of interactive operation emulating server end, controls virtual scene or personage; Processing module, for the treatment of the information received by mobile device, and is sent to corresponding server end by the result after process; Message interface, for server end interactive information; Wireless connections module, for setting up wireless connections with server.
The invention has the beneficial effects as follows:
1, a product only need be developed once, and just can be distributed on and comprise PC, iOS, Android, Windows Phone etc. are multi-platform.Developer need not consider the details that each platform interior constructs completely, only need understand the exploitation rule of engine.
2, augmented reality computer graph technology and visualization technique produce non-existent virtual objects in actual environment, and by sensing technology by virtual objects accurately " placement " in true environment, by display device, virtual objects and true environment are combined together.
3, for hall-room class server application, a set of Cloud Server solution is provided.
4, the mutual of Intelligent mobile equipment and computer equipment is realized by Wi-Fi technology.
Embodiment
With regard to characteristic and performance, OpenGL and Direct3D two kinds of 3D API can say and respectively have superiority, as OpenGL has good professional platform independence and hardware independence, and the feature development that the Immediate Mode programming that Direct3D provides allows application program to make full use of 3D hardware goes out more high performance 3D application program, this programming mode is adopted by many high performance 3 d application developers.Consider the actual conditions that order first two 3D API uses, develop better performances and support that the application program of two kinds of 3D API is just extremely important simultaneously.
As shown in Figure 1, the invention provides a kind of system realizing immersive VR across mobile platform, it comprises server end and client, and reality scene is played up by described server end, and the display device transferring to client shows.Described server end comprises virtual reality engine.Described client comprises head-mounted display apparatus HMD, is configured to be expanded the realistic space merged by three-dimensional virtual object by 360 degree of full views watchings.
Cross-platform Rendering:
Engine of the present invention encapsulates all details in first floor system storehouse (Direct3D and OpenGL), and be PC, IOS, the systems such as Android and Windows phone provide hardware device and the graphic interface that corresponding interface (hardware abstraction layer HAL) carrys out adaptive different platform, make it cross-platformly easily to realize multiple 3D characteristic.As: Terrain (landform), Water (water surface effect), SkyBox (sky sylphon system) Vegetation (vegetation system), Reflection (reflection), refraction (refraction) and Shader advanced feature.As: Bloom (full frame floodlight), HDR (High-Dynamic Range high dynamic illumination is played up), Depth offield (depth of field), Motion blur (motion blur) etc.
Engine of the present invention mainly comprises following several part: Render System panorama rendering module, Scene Manager scene management, Network System network service, Physical simulation physical simulation, Material-Texture material texture, Shader effect, I/O input and output, GUI user interface, AR (Augmented Reality) augmented reality.
Mobile device physical simulation and operating characteristic:
The present invention meets mobile device to three of physical engine major requirements: engine lightweight, cpu resource consumption less, mobile device functionality.On this basis, except Collision Detection (collision detection) can be realized, Ray Detection (ray detection), Gravity (gravity), outside the basic functions such as Joint (association's simulation) Car (vehicle simulation), also support that the function of mobile device is as Gyroscope (gyrostat compass), gravity sensing sensor.
AR (Augmented Reality) augmented reality:
The present invention uses camera to control, image recognition, signage identification, dummy object editing technique, and by smart mobile phone camera (front camera and rear camera), these images are processed, add 3D dummy object by shooting real-time imaging.And by gesture, signage etc. carry out alternately with it, realize the virtual on the spot in person sense unified with reality.
The technology of immersive VR is realized across mobile platform:
DirectX3D Rendering is adopted to carry out distortion correction (Distortion Correction) and distortion convergent-divergent (Distortion Scale) by the picture that virtual three-dimensional scene renders by Pixel Shader; and segmentation is plotted to the left and right eyes screen of head-mounted display apparatus HMD (Head-mounted display) equipment; and keep the refreshing frequency of more than 60 frames per second, obtain more smooth picture to make user and protect the eyes of user.
See Fig. 2, the image that segmentation is drawn show left and right and seems repetition, edge also with the image of distortion on computer monitor, two width pictures part that right and left eyes should be seen in correspondence HMD equipment respectively in fact.Image, with this angle distortion, HMD equipment adopts convex lens to be amplified by picture, just can realize 110 degree of visual angles.And although left and right two width figure is similar, but the scenery scope that about being in fact corresponding people, two eyes are seen is different and specially adjust, in time seeing for two, just can allow the partly overlapping of two width images so simultaneously on visual field, reach the effect of perfect reduction 360 ° of visual fields.
Described system also comprises one or more sensor, for immediately obtaining positional information and the orientation information of HMD equipment, carries out the tracking in head movement and eyes direction; From sensor, obtain HMD equipment positional information and orientation information carry out head tracking (Head-tracking), and by message interface by coordinate (Position) and rotate hypercomplex number (Quaternion) information feed back to application program.Application program is processed feedack by the rendering module of described virtual reality engine, physical impacts module, audio module, nucleus module, coordinates matrix is set, the image processed is transferred to described equipment by the hardware abstraction layer of head-mounted display apparatus, the picture that user upgrades after seeing feedback by eyes, can also complete some actions controlled simply by nictation by the activity detecting eyes of user.
Sensor be accelerometer, gyroscope, compass and direction sensor at least one of them.
The mutual of Intelligent mobile equipment and computer equipment is realized by wireless communication technology (as Wi-Fi or bluetooth):
Server end is arranged on controlled remote equipment, server end can be PC, Cloud Server or other can the equipment of working procedure.Mobile client is arranged on the hand-held Intelligent mobile equipment of user.User uses mobile device by dummy keyboard at interactive operations such as screen taps, paddling remote analog computer input apparatus (keyboard/mouse), computer equipment feedback command is to mobile device (vibrations/play sound effect), realize the mutual of Intelligent mobile equipment and computer equipment, see Fig. 3.
Before use native system, need present target by build-in services device end in control machine, wait for the access of handheld device.Then user opens handheld device client software, searches LAN (Local Area Network) internal object equipment, after searching target device, clicks connection and can enter control operation.Such as, on cell-phone customer terminal, slip mobile phone screen, moves up and down about can controlling the mouse on remote computer.Click screen, can click by the mouse on analogue computer.Mobile phone screen adds two buttons in left and right, the mouse right and left key button operation on computer can be controlled.Cell-phone customer terminal is opened software dish interface or adopts dummy keyboard, the input through keyboard on computer can be controlled.
Cloud server framework:
For hall-room class server application, as chatroom, athletic game, chess/card game etc., application needs server maintenance room list, generates room information, safeguards player information in room, and instant messaging and message forward.
For the demand, the technology realizing immersive VR across mobile platform provides a set of Cloud Server solution.Client only need in backstage registered application, will obtain a unique authorization code.Beyond the clouds, server is this client distribution hall-room service device space, and is held open state at any time, waits for that user is connected into.Developer uses this authorization code to carry out tag application in engine.Just can connect corresponding server when starting application, use the service that Cloud Server provides.
The following examples are further explained system provided by the present invention.
This system comprises server end and client.Server end can be the server in PC or high in the clouds, and client comprises a head-mounted display apparatus and a mobile client; For the Rift of PC and Oculus company, mobile client is arranged on a mobile device, and for smart mobile phone, this PC and smart mobile phone can wirelessly connect.
Head-mounted display apparatus Oculus Rift is connected with PC by user, and PC is connected by WIFI or bluetooth with the panel computer being provided with mobile client.The Rift of Oculus company can provide horizontal direction 90 degree, the visual field that vertical direction is 110 degree, and vision input delay is lower than 20ms, and sensor delay is lower than 30ms.Add that then built-in gyroscope and accelerometer the head movement of real-time detection wearer can adjust picture displaying contents, user stays that wherein to infiltrate sense stronger.Therefore, although the resolution of Oculus Rift only has 640x800 at present (by 1280x800 split screen, 1080P display screen coupling will be had very soon), but rely on 90 degree of visual fields of its excellence and extremely low delay, in virtual reality, still surpass various commercial model HMD on the market.
User wears and by after Rift device start, data cube computation is set up with the related application run in PC, simultaneously can also select by mobile client, mobile phone to be connected with PC, user can by the action control of Rift equipment or by dummy keyboard that mobile phone shows in PC and Rift equipment to user's eyes provide two screens of picture carry out controls with alternately.
Wherein, the virtual reality engine run in PC, DirectX3D Rendering is adopted to carry out distortion correction and distortion convergent-divergent by the picture that virtual three-dimensional scene renders by pixel rendering device PixelShader, and segmentation is plotted to the left and right eyes screen of described head-mounted display apparatus, refreshes with frequencies more than 60 frames per second.
The control action of user is captured by the sensor be built in Rift equipment, corresponding data message is converted into through process, by being transferred in the handling procedure in PC with the connection of PC, this handling procedure processes obtained data message, then passes the result after process back Rift equipment.According to these results, Rift equipment and/or PC process shown image, and are shown to user.Such as when user carries out rotary head operation, picture changes to corresponding direction along with the rotation of user.
Simultaneously, this system provides the function of augmented reality, by internal or external camera real-time imaging taken and corresponding 3D dummy object projected in the 3D virtual reality image that user sees, this 3D dummy object can carry out with user alternately in the picture, such as can project in screen by a vase, user can carry out some to it and operation such as move.
Wherein, the control action of user can be caught by the sensor that Rift equipment is built-in, when user needs to use mobile device to control, such as user may wear headset equipment for a long time and feel too for a long time, virtual supervisory keyboard can be shown on the mobile apparatus, user controls visual angle by these buttons, action etc.
The connection that user is set up by mobile device and PC the operation of dummy keyboard, be sent to PC to process, result after process is shown to the screen of PC by PC, the screen of Rift equipment, and result is fed back on mobile device and smart mobile phone, with the fluency making user can be experienced operation intuitively by many aspects.
Be cloud server for server, embodiment is with substantially identical above, Rift equipment or mobile device are set up cloud with cloud server by network and are connected, the mutual data of all needs and information are all connected by cloud carries out mutual, and playing up and processing of image beyond the clouds server is carried out.So just make virtual reality technology breach the restriction in space, field widely can be applied to.
The present invention is not limited to above-mentioned preferred implementation, and anyone should learn the structure change made under enlightenment of the present invention, and every have identical or akin technical scheme with the present invention, all belongs to protection scope of the present invention.