Disclosure of Invention
Based on this, for the problem that the current user cannot observe other user viewing angles or other viewing angles in the virtual scene when wearing the head-mounted display device, and the flexibility of the immersive experience is not good, it is necessary to provide a picture rendering method, a device and a readable storage medium, which can observe pictures at other viewing angles in the virtual scene, and improve the flexibility of the user in the immersive experience.
In order to achieve the above object, the present invention provides a picture rendering method for a head-mounted display device, the picture rendering method including:
acquiring an observation visual angle;
creating a dynamic canvas;
setting a display canvas on the dynamic canvas according to the observation visual angle;
and performing picture rendering on the display canvas.
Optionally, the display canvas comprises at least one two-dimensional canvas;
the step of setting a display canvas on the dynamic canvas according to the viewing angle comprises:
setting at least one two-dimensional canvas on the dynamic canvas according to the observation visual angle;
the step of performing screen rendering on the display canvas comprises the following steps:
and establishing rendering windows corresponding to the two-dimensional canvas according to the number of the two-dimensional canvas, and binding the content of picture rendering with the two-dimensional canvas.
Optionally, the viewing perspective comprises a first perspective and a second perspective;
the step of setting up the display canvas on the dynamic canvas according to the viewing angle further comprises:
setting a two-dimensional canvas on the dynamic canvas according to the first view angle; and/or the presence of a gas in the gas,
and setting two pieces of two-dimensional canvas on the dynamic canvas according to the second visual angle.
Optionally, the step of acquiring the viewing angle is preceded by:
constructing a virtual scene, and selecting a viewing angle in the virtual scene.
Optionally, the step of creating a dynamic canvas includes:
and acquiring an operation instruction for creating a dynamic canvas, and creating the dynamic canvas according to the operation instruction in the virtual scene.
Optionally, the obtaining an operation instruction for creating a dynamic canvas includes, before the step of creating the dynamic canvas according to the operation instruction in the virtual scene:
and receiving the gesture and/or eyeball fixation point of the user and generating an operation instruction.
Optionally, the step of performing screen rendering on the display canvas includes:
if the transparency of the display canvas is equal to 100%, deleting at least part of contents of the picture below the outermost layer of the display canvas;
and if the transparency of the display canvas is less than 100%, displaying the outermost picture of the display canvas.
Further, in order to achieve the above object, the present invention also provides a screen rendering apparatus for a head-mounted display device, the screen rendering apparatus including:
the acquisition module is used for acquiring an observation visual angle;
a creation module to create a dynamic canvas;
the setting module is used for setting a display canvas on the dynamic canvas according to the observation visual angle;
and the rendering module is used for performing picture rendering on the display canvas.
Optionally, the display canvas comprises at least one two-dimensional canvas,
the setting module is also used for setting at least one piece of two-dimensional canvas on the dynamic canvas according to the observation visual angle;
the rendering module is used for establishing rendering windows corresponding to the two-dimensional canvas according to the number of the two-dimensional canvas and binding the content of picture rendering with the two-dimensional canvas.
In addition, in order to achieve the above object, the present invention also provides a readable storage medium on which a screen rendering program is stored, the screen rendering program implementing the steps of the screen rendering method as described above when executed by a processor.
According to the technical scheme, the observation visual angle is acquired, the dynamic canvas is created, the corresponding display canvas is arranged on the dynamic canvas according to the observation visual angle, and the display canvas is subjected to picture rendering, so that the display pictures at other angles can be watched through the observation visual angle, and the flexibility of a user in immersive experience is improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that all the directional indicators (such as up, down, left, right, front, and rear … …) in the embodiment of the present invention are only used to explain the relative position relationship between the components, the movement situation, etc. in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indicator is changed accordingly.
In addition, the descriptions related to "first", "second", etc. in the present invention are only for descriptive purposes and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "connected," "secured," and the like are to be construed broadly, and for example, "secured" may be a fixed connection, a removable connection, or an integral part; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In addition, the technical solutions in the embodiments of the present invention may be combined with each other, but it must be based on the realization of those skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, a first embodiment of the present invention provides a picture rendering method, where the picture rendering method is used for a head-mounted display device, and the picture rendering method includes:
step S10, obtaining an observation angle; the observation angle includes expansion or reduction of the angle range, and also includes switching of the observation angle. For example, the viewing angle range is widened, and the user can observe a wider range. Or the visual angle range is reduced, so that the details of the scene can be observed. Still alternatively, one of the positions is selected as a viewing perspective in the virtual environment. For example, the original user's view angle is a landscape standing on the bridge to look at the shore, and by selectively observing the view angle, the user can also look at the bridge by switching the view angle to the shore, which is equivalent to standing on the shore to look at the landscape on the bridge. Or the scene in two viewing angles is observed simultaneously in the display interface. The selection of the observation visual angle may be a pre-bound visual angle, or may be a coordinate point arbitrarily selected by a user as a point of the observation visual angle in the virtual scene.
Step S20, creating a dynamic canvas; the dynamic canvas can be understood as the bottom layer of the picture, in the head-mounted display device, the display process of the picture is a dynamic continuous process, and the setting of the canvas on the dynamic canvas can ensure that the picture watched by a user is a dynamic process. For example, a user watches a live game while wearing a head-mounted display device, and the progress of the game is persistent. A viewing perspective is created in which the display is also built upon the dynamic canvas.
Step S30, setting a display canvas on the dynamic canvas according to the observation angle; on the basis of the selected observation visual angle, new display content is constructed, the display canvas is arranged on the dynamic canvas, and a user can watch a new picture under the newly selected observation visual angle by performing picture rendering on the display canvas. For example, in the virtual environment, the user watches the game, and selects a viewing angle near the goalkeeper in the picture of the live game, so that the user can watch the picture in two viewing angles simultaneously, and can switch the picture between the two viewing angles.
In step S40, screen rendering is performed on the display canvas. The picture rendering is simply to render a picture on the display canvas according to the frame-section frequency on the surface of the display canvas. The head-mounted display equipment is provided with the processor, the picture rendering of the display canvas is controlled and executed by the processor, and the display canvas is switched to the display screen of the head-mounted display equipment after the picture rendering.
In the technical scheme of this embodiment, acquire the viewing angle, establish dynamic canvas, according to the viewing angle set up corresponding display canvas on the dynamic canvas, right the display canvas carries out the picture and renders, can watch the display picture of other angles through viewing angle from this, improves the flexibility of user in immersive experience.
Referring to fig. 2, on the basis of the first embodiment proposed by the present invention, a second embodiment of the present invention is proposed, in which the display canvas includes at least one two-dimensional canvas;
step S30 of setting a display canvas on the dynamic canvas according to the viewing perspective, includes:
and step S31, setting at least one two-dimensional canvas on the dynamic canvas according to the observation visual angle.
The user needs to set up a two-dimensional canvas on the dynamic canvas when needing to watch the planar two-dimensional picture, if need watch a plurality of two-dimensional pictures, then can set up a plurality of independent two-dimensional canvases on the dynamic canvas, wherein every two-dimensional canvas corresponds an observation visual angle, and these observation visual angles can be the same, also can be different.
Two pieces of two-dimensional canvas can be further arranged, the two pieces of two-dimensional canvas are combined to generate the three-dimensional canvas, the user can be switched to a newly-established observation visual angle through the current visual angle through visual angle switching, and in the three-dimensional canvas, the two pieces of two-dimensional canvas are overlapped and combined to form a three-dimensional picture. Likewise, a plurality of three-dimensional canvases can be set, and a user can switch among the three-dimensional canvases at will, so that an immersive experience can be obtained at any observation visual angle.
Step S40 of screen rendering the display canvas includes:
and step S41, establishing rendering windows corresponding to the two-dimensional canvas according to the number of the two-dimensional canvas, and binding the content of the picture rendering with the two-dimensional canvas.
For example, a two-dimensional canvas is created, a rendering window corresponding to the two-dimensional canvas and the eyes of the user is created, the content of the picture rendering is bound with the two-dimensional canvas, and the user can view the picture at the corresponding observation angle through the rendering window. Similarly, corresponding rendering windows are established on a plurality of two-dimensional canvases, and a plurality of display windows can be displayed in the virtual interface.
Referring to fig. 3, on the basis of the second embodiment proposed by the present invention, a third embodiment of the present invention is proposed, and the observation angle includes a first angle and a second angle;
step S30 of setting a display canvas on the dynamic canvas according to the viewing perspective, further comprising:
step S310, setting a two-dimensional canvas on the dynamic canvas according to a first view angle; and/or the presence of a gas in the gas,
and step S320, setting two pieces of two-dimensional canvas on the dynamic canvas according to the second visual angle.
It will also be appreciated that step S30 includes three situations, the first situation, where a two-dimensional canvas is placed on the dynamic canvas according to a first perspective. In the second case, two-dimensional canvases are provided on the dynamic canvas according to the second viewing angle. And in the third condition, according to the first visual angle, a two-dimensional canvas is arranged on the dynamic canvas, and simultaneously, according to the second visual angle, two-dimensional canvases are arranged on the dynamic canvas, one two-dimensional canvas is arranged to form a two-dimensional picture, two-dimensional canvases are arranged, and a three-dimensional picture can be formed by rendering the picture on the two-dimensional canvases. Wherein the first viewing angle and the second viewing angle may be the same viewing angle or different viewing angles.
In addition, rendering windows can be created on a three-dimensional picture formed by two-dimensional canvases, and a user can select any one of the rendering windows to switch the view angle of the picture. That is to say, in the virtual display interface, a plurality of small windows are arranged, through these small windows, the user can observe the display pictures of other observation visual angles, the size of the small window can be adjusted according to the user's requirements, and the pictures are switched by selecting the corresponding small window.
Furthermore, according to the use requirement of the user, a plurality of two-dimensional pictures and a plurality of picture canvases can be created at the same time, so that a plurality of two-dimensional display windows and a plurality of three-dimensional display window pictures are obtained, namely, the two-dimensional display windows and the three-dimensional display windows can be displayed at the same time or can be displayed independently.
Referring to fig. 4, a fourth embodiment of the present invention is proposed on the basis of the first embodiment of the present invention, and before the step S10 of acquiring the viewing angle, the method includes:
step S50, a virtual scene is constructed, and an observation angle is selected in the virtual scene.
The viewing angle is selected in the virtual scene, so that the user can select the viewing angle according to the display content of the virtual scene, and the selection flexibility is higher.
In addition, the selection of the viewing angle may be preset, and the user may select among the preset viewing angles in the virtual scene.
Referring to fig. 5, on the basis of the fourth embodiment proposed by the present invention, a fifth embodiment proposed by the present invention, the step S20 of creating a dynamic canvas, includes:
step S21, an operation instruction for creating a dynamic canvas is obtained, and in the virtual scene, the dynamic canvas is created according to the operation instruction.
Specifically, the operation instruction may be generated according to an input instruction, where the input instruction source may be a voice command, a gesture command, or the like. Or an instruction input completed by the eyeball fixation point of the user.
Referring to fig. 6, on the basis of the fifth embodiment proposed by the present invention, a sixth embodiment proposed by the present invention obtains an operation instruction for creating a dynamic canvas, and before the step S21 of creating the dynamic canvas according to the operation instruction in the virtual scene, the method includes:
and step S60, receiving the user gesture and/or the eyeball fixation point, and generating an operation instruction.
In the virtual scene, the corresponding operation content can be determined through the gesture change of the user, and the operation instruction is generated. The corresponding operation content can be determined through the change of the fixation point of the eyeballs of the user, and the operation instruction is generated. Or determining corresponding operation content and generating an operation instruction in a mode of combining the user gesture and the eyeball fixation point. Through the selection of the user gesture or the eyeball fixation point, the response to the user gesture and the selection of the eyeball fixation point is easier to be made in the virtual scene, and the user gesture and the eyeball fixation point are more in line with the operation conditions in the virtual scene.
Referring to fig. 7, on the basis of any one of the first to sixth embodiments of the present invention, a seventh embodiment of the present invention is proposed, and the step S40 of performing screen rendering on a display canvas includes:
in step S401, if the transparency of the display canvas is equal to 100%, at least part of the content of the screen below the outermost layer of the display canvas is deleted.
In general, in a display canvas, if the transparency of the display canvas is equal to 100%, a user views a picture in a transparent state, and lines of objects or scenes in the picture are disordered and difficult to distinguish the display effect of the picture.
And step S402, if the transparency of the display canvas is less than 100%, displaying the outermost picture of the display canvas.
The outermost picture refers to a picture which is the uppermost picture facing the human eyes of a user when the user views a display picture. The transparency of the display canvas is not equal to 100%, namely the display canvas is opaque, so that the layer at the uppermost part of the display canvas is subjected to picture rendering.
Referring to fig. 8, the present invention further provides a screen rendering apparatus, where the screen rendering apparatus is used for a head-mounted display device, and the screen rendering apparatus includes: an acquisition module 10, a creation module 20, a setup module 30 and a rendering module 40.
An obtaining module 10, configured to obtain an observation angle; the observation angle includes expansion or reduction of the angle range, and also includes switching of the observation angle. For example, the viewing angle range is widened, and the user can observe a wider range. Or the visual angle range is reduced, so that the details of the scene can be observed. Still alternatively, one of the positions is selected as a viewing perspective in the virtual environment. For example, the original user's view angle is a landscape standing on the bridge to look at the shore, and by selectively observing the view angle, the user can also look at the bridge by switching the view angle to the shore, which is equivalent to standing on the shore to look at the landscape on the bridge. Or the scene in two viewing angles is observed simultaneously in the display interface. The selection of the observation visual angle may be a pre-bound visual angle, or may be a coordinate point arbitrarily selected by a user as a point of the observation visual angle in the virtual scene.
A creation module 20 for creating a dynamic canvas; the dynamic canvas can be understood as the bottom layer of the picture, in the head-mounted display device, the display process of the picture is a dynamic continuous process, and the setting of the canvas on the dynamic canvas can ensure that the picture watched by a user is a dynamic process. For example, a user watches a live game while wearing a head-mounted display device, and the progress of the game is persistent. A viewing perspective is created in which the display is also built upon the dynamic canvas.
A setting module 30, configured to set a display canvas on the dynamic canvas according to the viewing angle; on the basis of the selected observation visual angle, new display content is constructed, the display canvas is arranged on the dynamic canvas, and a user can watch a new picture under the newly selected observation visual angle by performing picture rendering on the display canvas. For example, in the virtual environment, the user watches the game, and selects a viewing angle near the goalkeeper in the picture of the live game, so that the user can watch the picture in two viewing angles simultaneously, and can switch the picture between the two viewing angles.
And the rendering module 40 is used for performing picture rendering on the display canvas. The picture rendering is simply to render a picture on the display canvas according to the frame-section frequency on the surface of the display canvas. The head-mounted display equipment is provided with the processor, the picture rendering of the display canvas is controlled and executed by the processor, and the display canvas is switched to the display screen of the head-mounted display equipment after the picture rendering.
In the technical scheme of this embodiment, acquire the viewing angle, establish dynamic canvas, according to the viewing angle set up corresponding display canvas on the dynamic canvas, right the display canvas carries out the picture and renders, can watch the display picture of other angles through viewing angle from this, improves the flexibility of user in immersive experience.
Further, the display canvas comprises at least one two-dimensional canvas.
The setting module 30 is further configured to set at least one two-dimensional canvas on the dynamic canvas according to the viewing angle; the user needs to set up a two-dimensional canvas on the dynamic canvas when needing to watch the planar two-dimensional picture, if need watch a plurality of two-dimensional pictures, then can set up a plurality of independent two-dimensional canvases on the dynamic canvas, wherein every two-dimensional canvas corresponds an observation visual angle, and these observation visual angles can be the same, also can be different.
Two pieces of two-dimensional canvas can be further arranged, the two pieces of two-dimensional canvas are combined to generate the three-dimensional canvas, the user can be switched to a newly-established observation visual angle through the current visual angle through visual angle switching, and in the three-dimensional canvas, the two pieces of two-dimensional canvas are overlapped and combined to form a three-dimensional picture. Likewise, a plurality of three-dimensional canvases can be set, and a user can switch among the three-dimensional canvases at will, so that an immersive experience can be obtained at any observation visual angle.
The rendering module 40 is further configured to establish a rendering window corresponding to the two-dimensional canvas according to the number of the two-dimensional canvas, and bind the content of the picture rendering with the two-dimensional canvas.
For example, a two-dimensional canvas is created, a rendering window corresponding to the two-dimensional canvas and the eyes of the user is created, the content of the picture rendering is bound with the two-dimensional canvas, and the user can view the picture at the corresponding observation angle through the rendering window. Similarly, corresponding rendering windows are established on a plurality of two-dimensional canvases, and a plurality of display windows can be displayed in the virtual interface.
Further, the setting module 30 is further configured to set a two-dimensional canvas on the dynamic canvas according to the first view angle; and/or two-dimensional canvases are arranged on the dynamic canvases according to the second visual angle.
It will also be appreciated that there are three total cases, the first case, where a two-dimensional canvas is placed on the dynamic canvas according to a first perspective. In the second case, two-dimensional canvases are provided on the dynamic canvas according to the second viewing angle. And in the third condition, according to the first visual angle, a two-dimensional canvas is arranged on the dynamic canvas, and simultaneously, according to the second visual angle, two-dimensional canvases are arranged on the dynamic canvas, one two-dimensional canvas is arranged to form a two-dimensional picture, two-dimensional canvases are arranged, and a three-dimensional picture can be formed by rendering the picture on the two-dimensional canvases. Wherein the first viewing angle and the second viewing angle may be the same viewing angle or different viewing angles.
In addition, rendering windows can be created on a three-dimensional picture formed by two-dimensional canvases, and a user can select any one of the rendering windows to switch the view angle of the picture. That is to say, in the virtual display interface, a plurality of small windows are arranged, through these small windows, the user can observe the display pictures of other observation visual angles, the size of the small window can be adjusted according to the user's requirements, and the pictures are switched by selecting the corresponding small window.
Furthermore, according to the use requirement of the user, a plurality of two-dimensional pictures and a plurality of picture canvases can be created at the same time, so that a plurality of two-dimensional display windows and a plurality of three-dimensional display window pictures are obtained, namely, the two-dimensional display windows and the three-dimensional display windows can be displayed at the same time or can be displayed independently
In addition, a rendering window can be created on a three-dimensional canvas composed of two-dimensional canvases, and a user can select any one of the rendering windows to switch the view angle of the picture. That is to say, in the virtual display interface, a plurality of small windows are arranged, through these small windows, the user can observe the display pictures of other observation visual angles, the size of the small window can be adjusted according to the user's requirements, and the pictures are switched by selecting the corresponding small window.
Furthermore, according to the use requirement of the user, a plurality of two-dimensional canvases and a plurality of three-dimensional canvases can be created simultaneously, so that a plurality of two-dimensional display windows and a plurality of three-dimensional display window pictures are obtained, namely, the two-dimensional display windows and the three-dimensional display windows can be displayed simultaneously.
Further, the screen rendering apparatus further includes:
and the building module 50 is used for building a virtual scene, and selecting an observation angle in the virtual scene.
The viewing angle is selected in the virtual scene, so that the user can select the viewing angle according to the display content of the virtual scene, and the selection flexibility is higher.
In addition, the selection of the viewing angle may be preset, and the user may select among the preset viewing angles in the virtual scene.
Further, the creating module 20 is further configured to obtain an operation instruction for creating a dynamic canvas, and in the virtual scene, the dynamic canvas is created according to the operation instruction.
Specifically, the operation instruction may be generated according to an input instruction, where the input instruction source may be a voice command, a gesture command, or the like. Or an instruction input completed by the eyeball fixation point of the user.
Further, the screen rendering apparatus further includes a generating module 60, and the generating module 60 is configured to receive a user gesture and/or an eye gaze point, and generate an operation instruction.
In the virtual scene, the corresponding operation content can be determined through the gesture change of the user, and the operation instruction is generated. The corresponding operation content can be determined through the change of the fixation point of the eyeballs of the user, and the operation instruction is generated. Or determining corresponding operation content and generating an operation instruction in a mode of combining the user gesture and the eyeball fixation point. Through the selection of the user gesture or the eyeball fixation point, the response to the user gesture and the selection of the eyeball fixation point is easier to be made in the virtual scene, and the user gesture and the eyeball fixation point are more in line with the operation conditions in the virtual scene.
Further, the rendering module 40 is further configured to delete at least part of the contents of the screen below the outermost layer of the display canvas if the transparency of the display canvas is equal to 100%.
Generally, in a display canvas, if the transparency of the display canvas is equal to 100%, a user is in a transparent state when watching a picture, and lines of objects or scenes in the picture are disordered and are difficult to distinguish the display effect of the picture.
The rendering module 40 is further configured to display an outermost screen of the display canvas if the transparency of the display canvas is less than 100%.
The outermost picture refers to a picture which is the uppermost picture facing the human eyes of a user when the user views a display picture. The transparency of the display canvas is not equal to 100%, namely the display canvas is opaque, so that the layer at the uppermost part of the display canvas is subjected to picture rendering.
The present invention also provides a readable storage medium on which a picture rendering program is stored, which, when executed by a processor, implements the steps of the picture rendering method as described above.
The detailed implementation of the readable storage medium of the present invention may refer to the embodiments of the image rendering method, which are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.