Disclosure of Invention
Based on this, aiming at the problem that when the user wears the head-mounted display device, other user visual angles or other visual angles cannot be observed in the virtual scene at present, the flexibility of immersion experience is poor, it is necessary to provide a picture rendering method, a picture rendering device and a readable storage medium, which can watch pictures of other visual angles in the virtual scene, and improve the flexibility of the user in immersion 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 comprising:
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 the following steps:
setting at least one two-dimensional canvas on the dynamic canvas according to the observation view angle;
the step of performing picture rendering on the display canvas comprises the following steps:
and establishing rendering windows corresponding to the two-dimensional canvases according to the number of the two-dimensional canvases, and binding the content rendered by the picture with the two-dimensional canvases.
Optionally, the viewing angle includes a first viewing angle and a second viewing angle;
the step of setting a 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 number of the groups of groups,
and setting two-dimensional canvases on the dynamic canvases according to the second visual angle.
Optionally, before the step of obtaining the viewing angle, the method includes:
a virtual scene is constructed, and an observation view angle is selected 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 a user gesture and/or an eyeball fixation point, and generating an operation instruction.
Optionally, the step of performing picture rendering on the display canvas includes:
if the transparency of the display canvas is equal to 100%, deleting at least part of the content 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 layer picture of the display canvas.
In addition, in order to achieve the above object, the present invention also provides a picture rendering apparatus for a head-mounted display device, comprising:
the acquisition module is used for acquiring an observation visual angle;
the creation module is used for creating 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 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 rendered by the picture with the two-dimensional canvas.
In addition, in order to achieve the above object, the present invention also provides a readable storage medium having stored thereon a picture rendering program which, when executed by a processor, implements the steps of the picture rendering method as described above.
According to the technical scheme provided by the invention, the observation visual angle is obtained, the dynamic canvas is created, and the corresponding display canvas is arranged on the dynamic canvas according to the observation visual angle, so that the display canvas is subjected to picture rendering, and therefore, 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 following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that all directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present invention are merely used to explain the relative positional relationship, movement, etc. between the components in a particular posture (as shown in the drawings), and if the particular posture is changed, the directional indicator is changed accordingly.
Furthermore, descriptions such as those referred to as "first," "second," and the like, are provided for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implying an order of magnitude of the indicated technical features in the present disclosure. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless specifically stated and limited otherwise, the terms "connected," "affixed," and the like are to be construed broadly, and for example, "affixed" may be a fixed connection, a removable connection, or an integral body; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In addition, the technical solutions of the embodiments of the present invention may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered as not existing, and not falling within the scope of protection claimed by the present invention.
Referring to fig. 1, a first embodiment of the present invention provides a picture rendering method, which is used for a head-mounted display device, and the picture rendering method includes:
step S10, obtaining an observation visual angle; the viewing angle includes expansion or reduction of the viewing angle range, and also includes switching of the viewing angle. For example, enlarging the viewing angle range, the user can observe a wider range. Or the view angle range is narrowed, and the details of the scenery can be observed. In the virtual environment, one of the positions is selected as the viewing angle. For example, the original user's viewing angle is a landscape standing on the bridge to look at the shore, and by selectively viewing the viewing angle, the user can also be equivalent to a landscape that the user stands on the bridge to look at the shore by switching the viewing angle to the shore. Or a scene within two viewing angles is observed simultaneously in the display interface. The viewing angle may be a pre-bound viewing angle, or a coordinate point arbitrarily selected by the user in the virtual scene may be a point of the viewing angle.
Step S20, creating a dynamic canvas; the dynamic canvas can be understood as the bottom layer of a picture, and in the head-mounted display device, the display process of the picture is a dynamic continuous process, and by setting the dynamic canvas, the setting of the canvas above the dynamic canvas can ensure that the picture watched by a user is a dynamic process. For example, a user may watch a live race while wearing a head mounted display device, the progress of the race being persistent. The created viewing angle, wherein the display is also built on a dynamic canvas.
Step S30, setting a display canvas on the dynamic canvas according to the observation view angle; on the basis of the selected viewing 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 new selected viewing angle by picture rendering of the display canvas. For example, in a virtual environment, a user views a game, and in a picture of a live game, a view angle near a goalkeeper is selected, so that the user can view pictures in two views at the same time, and can also switch the pictures between the two views.
And step S40, performing picture rendering on the display canvas. The picture rendering is simply to render pictures on the display canvas according to the frame section frequency on the surface of the display canvas. The head-mounted display device is provided with a processor, the processor is used for controlling and executing picture rendering of the display canvas, and then the display canvas after picture rendering is switched into a display screen of the head-mounted display device.
In the technical scheme of the embodiment, an observation view angle is obtained, a dynamic canvas is created, a corresponding display canvas is arranged on the dynamic canvas according to the observation view angle, and picture rendering is carried out on the display canvas, so that display pictures of other angles can be watched through the observation view angle, and the flexibility of a user in immersive experience is improved.
Referring to FIG. 2, in addition to the first embodiment of the present invention, a second embodiment of the present invention is presented, the display canvas comprising at least one two-dimensional canvas;
step S30 of setting a display canvas on the dynamic canvas according to the viewing angle, comprising:
step S31, at least one two-dimensional canvas is set on the dynamic canvas according to the observation angle.
When a user needs to watch two-dimensional pictures of a plane, a two-dimensional canvas is required to be arranged on the dynamic canvas, if a plurality of two-dimensional pictures need to be watched, a plurality of independent two-dimensional canvases can be arranged on the dynamic canvas, wherein each two-dimensional canvas corresponds to one observation visual angle, and the observation visual angles can be the same or different.
Two-dimensional canvases can be arranged, the two-dimensional canvases are combined to generate a three-dimensional canvas, a user can switch from a current visual angle to a newly established visual angle through visual angle switching, and in the three-dimensional canvas, the two-dimensional canvases are overlapped and combined to form a three-dimensional picture. Likewise, multiple three-dimensional canvases can be provided, and a user can switch between the multiple three-dimensional canvases at will, thereby being able to obtain an immersive experience at any viewing angle.
Step S40 of rendering a screen on the display canvas includes:
and S41, establishing rendering windows corresponding to the two-dimensional canvases according to the number of the two-dimensional canvases, and binding the content rendered by the picture with the two-dimensional canvases.
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 rendered by the picture is bound with the two-dimensional canvas, and the user can watch the picture under the corresponding viewing 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, a third embodiment of the present invention is presented on the basis of the second embodiment of the present invention, and the viewing angle includes a first viewing angle and a second viewing angle;
step S30 of setting a display canvas on the dynamic canvas according to the viewing angle, further includes:
step S310, setting a two-dimensional canvas on the dynamic canvas according to the first visual angle; and/or the number of the groups of groups,
step S320, two-dimensional canvases are set on the dynamic canvas according to the second visual angle.
It will also be appreciated that step S30 includes three situations, the first of which is setting a two-dimensional canvas on a dynamic canvas according to a first viewing angle. In a second case, two-dimensional canvas is set on the dynamic canvas according to a second viewing angle. In a third case, a two-dimensional canvas is arranged on the dynamic canvas according to the first view angle, and two-dimensional canvases are arranged on the dynamic canvas according to the second view angle, so that a two-dimensional picture can be formed by arranging one two-dimensional canvas, and a three-dimensional picture can be formed by rendering pictures on the two-dimensional canvases. The first view angle and the second view angle may be the same view angle or different view angles.
In addition, a rendering window can be created on a three-dimensional picture formed by two-dimensional canvases, and a user can select any rendering window to switch the picture visual angle. That is, in the virtual display interface, a plurality of portlets are provided, through which a user can observe display images of other viewing angles, the size of the portlets can be adjusted according to the needs of the user, and image switching is performed by selecting corresponding portlets.
Furthermore, according to the use requirement of the user, a plurality of two-dimensional images and a plurality of image canvas can be simultaneously created, so that a plurality of two-dimensional display windows and a plurality of three-dimensional display window images are obtained, that is, the two-dimensional display windows and the three-dimensional display windows can be simultaneously displayed or can be separately displayed.
Referring to fig. 4, on the basis of the first embodiment of the present invention, a fourth embodiment of the present invention is provided, comprising, before step S10 of obtaining an observation angle:
step S50, constructing a virtual scene, and selecting an observation view angle in the virtual scene.
The observation view angle is selected in the virtual scene, so that a user can select the observation view angle according to the display content of the virtual scene, and the flexibility of selection is higher.
In addition, the selection of the viewing angle may be preset, and the user may make a selection among the preset viewing angles in the virtual scene.
Referring to fig. 5, on the basis of the fourth embodiment of the present invention, a fifth embodiment of the present invention is provided, and a step S20 of creating a dynamic canvas includes:
step S21, an operation instruction for creating the 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 or a gesture command. The instruction input may be performed through the eye gaze point of the user.
Referring to fig. 6, a sixth embodiment of the present invention is provided on the basis of the fifth embodiment of the present invention, in which an operation instruction for creating a dynamic canvas is obtained, and before step S21 of creating a dynamic canvas according to the operation instruction in a virtual scene, the method includes:
step S60, receiving a user gesture and/or an eyeball fixation point, and generating an operation instruction.
In the virtual scene, corresponding operation content can be determined through gesture change of a user, and an operation instruction is generated. The corresponding operation content can be determined through the change of the eye gaze point of the user, and the operation instruction is generated. The corresponding operation content can also be determined by combining the gesture of the user and the eye gaze point, and the operation instruction is generated. Through the selection of the user gesture or the eyeball fixation point, the user gesture and the eyeball fixation point are easier to react to the selection of the user gesture and the eyeball fixation point in the virtual scene, and the user gesture and the eyeball fixation point are more in accordance 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 provided, where 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%, deleting at least part of the content of the screen under the outermost layer of the display canvas.
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 objects or lines of a scene in the picture are disordered, so that the display effect of the picture is difficult to distinguish.
And step S402, if the transparency of the display canvas is less than 100%, displaying the outermost layer picture of the display canvas.
The outermost screen is a screen in which the direction of the eyes of the user is the uppermost screen when the user views the display screen. The transparency of the display canvas is not equal to 100%, i.e., the display canvas is opaque, so that the uppermost layer of the display canvas is picture rendered.
Referring to fig. 8, the present invention also provides a picture rendering apparatus for a head-mounted display device, the picture rendering apparatus comprising: the device comprises an acquisition module 10, a creation module 20, a setting module 30 and a rendering module 40.
An acquisition module 10 for acquiring an observation angle; the viewing angle includes expansion or reduction of the viewing angle range, and also includes switching of the viewing angle. For example, enlarging the viewing angle range, the user can observe a wider range. Or the view angle range is narrowed, and the details of the scenery can be observed. In the virtual environment, one of the positions is selected as the viewing angle. For example, the original user's viewing angle is a landscape standing on the bridge to look at the shore, and by selectively viewing the viewing angle, the user can also be equivalent to a landscape that the user stands on the bridge to look at the shore by switching the viewing angle to the shore. Or a scene within two viewing angles is observed simultaneously in the display interface. The viewing angle may be a pre-bound viewing angle, or a coordinate point arbitrarily selected by the user in the virtual scene may be a point of the viewing angle.
A creation module 20 for creating a dynamic canvas; the dynamic canvas can be understood as the bottom layer of a picture, and in the head-mounted display device, the display process of the picture is a dynamic continuous process, and by setting the dynamic canvas, the setting of the canvas above the dynamic canvas can ensure that the picture watched by a user is a dynamic process. For example, a user may watch a live race while wearing a head mounted display device, the progress of the race being persistent. The created viewing angle, wherein the display is also built on a dynamic canvas.
A setting module 30 for setting a display canvas on the dynamic canvas according to the viewing angle; on the basis of the selected viewing 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 new selected viewing angle by picture rendering of the display canvas. For example, in a virtual environment, a user views a game, and in a picture of a live game, a view angle near a goalkeeper is selected, so that the user can view pictures in two views at the same time, and can also switch the pictures between the two views.
And a rendering module 40, configured to render a screen of the display canvas. The picture rendering is simply to render pictures on the display canvas according to the frame section frequency on the surface of the display canvas. The head-mounted display device is provided with a processor, the processor is used for controlling and executing picture rendering of the display canvas, and then the display canvas after picture rendering is switched into a display screen of the head-mounted display device.
In the technical scheme of the embodiment, an observation view angle is obtained, a dynamic canvas is created, a corresponding display canvas is arranged on the dynamic canvas according to the observation view angle, and picture rendering is carried out on the display canvas, so that display pictures of other angles can be watched through the observation view angle, and the flexibility of a user in immersive experience is improved.
Further, the display canvas includes 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; when a user needs to watch two-dimensional pictures of a plane, a two-dimensional canvas is required to be arranged on the dynamic canvas, if a plurality of two-dimensional pictures need to be watched, a plurality of independent two-dimensional canvases can be arranged on the dynamic canvas, wherein each two-dimensional canvas corresponds to one observation visual angle, and the observation visual angles can be the same or different.
Two-dimensional canvases can be arranged, the two-dimensional canvases are combined to generate a three-dimensional canvas, a user can switch from a current visual angle to a newly established visual angle through visual angle switching, and in the three-dimensional canvas, the two-dimensional canvases are overlapped and combined to form a three-dimensional picture. Likewise, multiple three-dimensional canvases can be provided, and a user can switch between the multiple three-dimensional canvases at will, thereby being able to obtain an immersive experience at any viewing angle.
The rendering module 40 is further configured to establish a rendering window corresponding to the two-dimensional canvas according to the number of two-dimensional canvases, and bind the content rendered by the screen 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 rendered by the picture is bound with the two-dimensional canvas, and the user can watch the picture under the corresponding viewing 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 viewing angle; and/or, setting two-dimensional canvases on the dynamic canvases according to the second visual angle.
It will also be appreciated that there are three scenarios in total, the first scenario, in which a two-dimensional canvas is set up on a dynamic canvas according to a first perspective. In a second case, two-dimensional canvas is set on the dynamic canvas according to a second viewing angle. In a third case, a two-dimensional canvas is arranged on the dynamic canvas according to the first view angle, and two-dimensional canvases are arranged on the dynamic canvas according to the second view angle, so that a two-dimensional picture can be formed by arranging one two-dimensional canvas, and a three-dimensional picture can be formed by rendering pictures on the two-dimensional canvases. The first view angle and the second view angle may be the same view angle or different view angles.
In addition, a rendering window can be created on a three-dimensional picture formed by two-dimensional canvases, and a user can select any rendering window to switch the picture visual angle. That is, in the virtual display interface, a plurality of portlets are provided, through which a user can observe display images of other viewing angles, the size of the portlets can be adjusted according to the needs of the user, and image switching is performed by selecting corresponding portlets.
Furthermore, according to the use requirement of the user, a plurality of two-dimensional images and a plurality of image canvas can be simultaneously created, so as to obtain a plurality of two-dimensional display windows and a plurality of three-dimensional display window images, that is, the two-dimensional display windows and the three-dimensional display windows can be simultaneously displayed or can be separately displayed
In addition, a rendering window can be created on a three-dimensional canvas consisting of two-dimensional canvases, and a user can select any rendering window to switch the visual angle of a picture. That is, in the virtual display interface, a plurality of portlets are provided, through which a user can observe display images of other viewing angles, the size of the portlets can be adjusted according to the needs of the user, and image switching is performed by selecting corresponding portlets.
Furthermore, according to the use requirement of the user, a plurality of two-dimensional canvases and a plurality of three-dimensional canvases can be simultaneously created, so that a plurality of two-dimensional display windows and a plurality of three-dimensional display window pictures are obtained, that is, the two-dimensional display windows and the three-dimensional display windows can be simultaneously displayed.
Further, the picture rendering apparatus further includes:
a construction module 50 for constructing a virtual scene in which a viewing angle is selected.
The observation view angle is selected in the virtual scene, so that a user can select the observation view angle according to the display content of the virtual scene, and the flexibility of selection is higher.
In addition, the selection of the viewing angle may be preset, and the user may make a selection among the preset viewing angles in the virtual scene.
Further, the creation module 20 is further configured to obtain an operation instruction for creating a dynamic canvas, where the dynamic canvas is created according to the operation instruction in the virtual scene.
Specifically, the operation instruction may be generated according to an input instruction, where the input instruction source may be a voice command or a gesture command. The instruction input may be performed through the eye gaze point of the user.
Further, the image rendering device further includes a generating module 60, where the generating module 60 is configured to receive a gesture of a user and/or an eye gaze point, and generate an operation instruction.
In the virtual scene, corresponding operation content can be determined through gesture change of a user, and an operation instruction is generated. The corresponding operation content can be determined through the change of the eye gaze point of the user, and the operation instruction is generated. The corresponding operation content can also be determined by combining the gesture of the user and the eye gaze point, and the operation instruction is generated. Through the selection of the user gesture or the eyeball fixation point, the user gesture and the eyeball fixation point are easier to react to the selection of the user gesture and the eyeball fixation point in the virtual scene, and the user gesture and the eyeball fixation point are more in accordance with the operation conditions in the virtual scene.
Further, the rendering module 40 is further configured to delete at least a portion of the content of the frame below the outermost layer of the display canvas if the transparency of the display canvas is equal to 100%.
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, lines of objects or scenes in the picture are disordered, and the display effect of the picture is difficult to distinguish.
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 screen is a screen in which the direction of the eyes of the user is the uppermost screen when the user views the display screen. The transparency of the display canvas is not equal to 100%, i.e., the display canvas is opaque, so that the uppermost layer of the display canvas is picture rendered.
The present invention also provides a readable storage medium having stored thereon a picture rendering program which, when executed by a processor, implements the steps of the picture rendering method as described above.
The specific embodiments of the readable storage medium of the present invention may refer to the embodiments of the above-mentioned image rendering method, and will not be 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 one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description of the preferred embodiments of the present invention should not be construed as limiting the scope of the invention, but rather should be understood to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention as defined by the following description and drawings or any application directly or indirectly to other relevant art(s).