Virtual picture rendering method and device, storage medium and electronic device

文档序号:40853 发布日期:2021-09-28 浏览:20次 中文

阅读说明:本技术 一种虚拟画面的渲染方法、装置、存储介质和电子装置 (Virtual picture rendering method and device, storage medium and electronic device ) 是由 夏小凡 于 2021-06-25 设计创作,主要内容包括:本申请涉及一种虚拟画面的渲染方法、装置、存储介质和电子装置,其中,该方法包括:在渲染处于第一画面状态的第一虚拟画面的过程中,获取画面状态切换信息;响应画面状态切换信息,通过第一虚拟摄像机渲染包括第一虚拟画面中除目标虚拟对象之外的其他虚拟对象的第三虚拟画面;在第三虚拟画面上叠加通过第二虚拟摄像机渲染的包括目标虚拟对象的虚拟画面,得到处于第二画面状态的第二虚拟画面;在第二虚拟画面上通过第二虚拟摄像机渲染在目标虚拟对象上触发的目标事件。本申请解决了渲染虚拟画面的灵活性较差的技术问题。(The application relates to a rendering method, a rendering device, a storage medium and an electronic device of a virtual picture, wherein the method comprises the following steps: acquiring picture state switching information in the process of rendering a first virtual picture in a first picture state; rendering, by the first virtual camera, a third virtual screen including virtual objects other than the target virtual object in the first virtual screen in response to the screen state switching information; superimposing a virtual picture including the target virtual object rendered by the second virtual camera on the third virtual picture to obtain a second virtual picture in a second picture state; a target event triggered on the target virtual object is rendered on the second virtual screen by the second virtual camera. The method and the device solve the technical problem of poor flexibility of rendering the virtual picture.)

1. A method for rendering a virtual screen, comprising:

in the process of rendering a first virtual picture in a first picture state, obtaining picture state switching information, wherein the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object;

rendering, by the first virtual camera, a third virtual picture including virtual objects other than the target virtual object in the first virtual picture in response to the picture state switching information;

superimposing a virtual picture including the target virtual object rendered by a second virtual camera on the third virtual picture to obtain a second virtual picture in a second picture state;

rendering, by the second virtual camera, the target event triggered on the target virtual object on the second virtual screen.

2. The method of claim 1, wherein obtaining the picture state switching information comprises one of:

determining to acquire the screen state switching information when a target operation executed on the first virtual screen is detected, wherein the target operation is used for triggering the target event;

and determining to acquire the screen state switching information when the target virtual object on the first virtual screen is detected to be switched from a first object state to a second object state, wherein the virtual object in the second object state is allowed to trigger the target event.

3. The method according to claim 2, wherein in a case where a target operation performed on the first virtual screen is detected, before determining that the screen state switching information is acquired, the method further comprises:

detecting a trigger operation executed on a virtual button corresponding to a first virtual object in a first camp under the condition that the first virtual object in the virtual objects belonging to the first camp is detected to be converted from a waiting state to an operating state, wherein the virtual object belonging to the first camp is a virtual object allowing control of a target account;

and under the condition that the triggering operation is executed on a target button in the virtual buttons corresponding to the first virtual object, determining the target virtual object and the target event according to the button attribute of the target button, wherein the target operation comprises the operation of determining the target virtual object and the target event according to the button attribute of the target button.

4. The method of claim 3, wherein determining the target virtual object and the target event according to the button properties of the target button comprises:

judging whether a virtual object corresponding to the target button exists or not;

detecting a selection operation executed on a virtual object corresponding to the target button when the virtual object corresponding to the target button exists, wherein the virtual object corresponding to the target button comprises: the virtual object belonging to the first camp and/or the virtual object belonging to the second camp, wherein the virtual object belonging to the second camp is a virtual object which is not allowed to be controlled by the target account; when detecting that the selection operation is executed on a second virtual object in the virtual objects corresponding to the target button, determining the first virtual object and the second virtual object as the target virtual object, and determining that the first virtual object executes a first operation corresponding to the target button on the second virtual object as the target event;

and under the condition that the virtual object corresponding to the target button does not exist, determining the first virtual object as the target virtual object, and determining that the first virtual object executes the first operation corresponding to the target button as the target event.

5. The method according to claim 2, wherein in a case where it is detected that the target virtual object on the first virtual screen transitions from being in a first object state to being in a second object state, before determining that the screen state switching information is acquired, the method further comprises:

under the condition that a third virtual object in the virtual objects included in the first virtual picture is detected to be converted from a waiting state to an automatic fighting state, acquiring a second operation triggered by the automatic fighting state;

determining the target virtual object and the target event according to the operation attribute of the second operation, wherein the first object state comprises the waiting state, and the second object state comprises the automatic fighting state.

6. The method of claim 5, wherein determining the target virtual object and the target event according to the operational property of the second operation comprises:

judging whether a virtual object corresponding to the second operation exists or not;

under the condition that the virtual object corresponding to the second operation exists, acquiring a fourth virtual object from the virtual object corresponding to the second operation; determining the third virtual object and the fourth virtual object as the target virtual object, and determining the third virtual object performing the second operation on the fourth virtual object as the target event;

and under the condition that the virtual object corresponding to the second operation does not exist, determining the third virtual object as the target virtual object, and determining that the second operation executed by the third virtual object is the target event.

7. The method of claim 1, wherein rendering, by the first virtual camera, a third virtual frame including other virtual objects in the first virtual frame other than the target virtual object comprises:

acquiring a virtual scene in the first virtual picture and other virtual characters except a target virtual character in the virtual characters included in the first virtual picture through the first virtual camera, wherein the target virtual object includes the target virtual character, and the other virtual objects include the virtual scene and the other virtual characters;

rendering the other virtual roles in the virtual scene to obtain the third virtual picture.

8. The method of claim 7, wherein rendering the other virtual characters in the virtual scene resulting in the third virtual picture comprises:

rendering the virtual scene to obtain a scene picture;

rendering the other virtual roles on the scene picture to obtain a fourth virtual picture;

and performing blurring processing on the fourth virtual picture to obtain the third virtual picture.

9. The method of claim 1, wherein rendering a virtual frame including the target virtual object on the third virtual frame by a second virtual camera, and wherein obtaining the second virtual frame in the second frame state comprises:

rendering, by the second virtual camera, a fifth virtual picture including the target virtual object;

superposing the fifth virtual picture on the third virtual picture to obtain a sixth virtual picture;

and adding a target virtual element on the sixth virtual picture to obtain the second virtual picture in the second picture state, wherein the target virtual element is used for indicating picture information of the second virtual picture.

10. The method of claim 1,

in rendering the first virtual screen in the first screen state, the method further includes: rendering, by the second virtual camera, a first virtual picture in a first picture state;

after rendering, by the second virtual camera, the target event triggered on the target virtual object on the second virtual screen, the method further comprises: and in the case of detecting that the second virtual picture is converted into a virtual picture in a third picture state, rendering the virtual picture in the third picture state by the second virtual camera.

11. The method of claim 1, further comprising:

switching an imaging mode of the second virtual camera from an orthogonal mode to a perspective mode in a case where it is detected that the first virtual screen is switched to a virtual screen in a fourth screen state;

rendering, by the second virtual camera, the virtual picture in the fourth picture state in the see-through mode.

12. An apparatus for rendering a virtual screen, comprising:

the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring picture state switching information in the process of rendering a first virtual picture in a first picture state, the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object;

a first rendering module, configured to render, by a first virtual camera, a third virtual screen including a virtual object other than the target virtual object in the first virtual screen in response to the screen state switching information;

a second rendering module, configured to superimpose, on the third virtual picture, a virtual picture including the target virtual object rendered by a second virtual camera, so as to obtain a second virtual picture in a second picture state;

a first rendering module to render the target event triggered on the target virtual object on the second virtual screen by the second virtual camera.

13. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method of any of the preceding claims 1 to 11.

14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 11 by means of the computer program.

Technical Field

The present application relates to the field of computers, and in particular, to a method and an apparatus for rendering a virtual image, a storage medium, and an electronic apparatus.

Background

In the current technology, when a virtual picture is rendered, the picture rendering mode is single, generally, a picture under a certain view angle is intercepted from a virtual scene and is directly rendered, but the content displayed in the virtual scene is rich, a virtual object may possibly use props when releasing skills, and also may possibly display some actions, simulate some events and the like, the general rendering process cannot highlight key points, the rendering mode is not flexible enough, and changeable effects cannot be embodied, for example: when a battle picture is rendered in a game, the action of character skill is only rendered on the same layer, the flexibility of picture scheduling is poor, and the rendering in the battle process is not vivid enough.

In view of the above problems, no effective solution has been proposed.

Disclosure of Invention

The application provides a rendering method and device of a virtual picture, a storage medium and an electronic device, which are used for at least solving the technical problem of poor flexibility in rendering the virtual picture in the related technology.

According to an aspect of an embodiment of the present application, there is provided a method for rendering a virtual screen, including: in the process of rendering a first virtual picture in a first picture state, obtaining picture state switching information, wherein the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object; rendering, by the first virtual camera, a third virtual picture including virtual objects other than the target virtual object in the first virtual picture in response to the picture state switching information; superimposing a virtual picture including the target virtual object rendered by a second virtual camera on the third virtual picture to obtain a second virtual picture in a second picture state; rendering, by the second virtual camera, the target event triggered on the target virtual object on the second virtual screen.

Optionally, the acquiring the screen state switching information includes one of: determining to acquire the screen state switching information when a target operation executed on the first virtual screen is detected, wherein the target operation is used for triggering the target event; and determining to acquire the screen state switching information when the target virtual object on the first virtual screen is detected to be switched from a first object state to a second object state, wherein the virtual object in the second object state is allowed to trigger the target event.

Optionally, in a case where a target operation performed on the first virtual screen is detected, before it is determined that the screen state switching information is acquired, the method further includes: detecting a trigger operation executed on a virtual button corresponding to a first virtual object in a first camp under the condition that the first virtual object in the virtual objects belonging to the first camp is detected to be converted from a waiting state to an operating state, wherein the virtual object belonging to the first camp is a virtual object allowing control of a target account; and under the condition that the triggering operation is executed on a target button in the virtual buttons corresponding to the first virtual object, determining the target virtual object and the target event according to the button attribute of the target button, wherein the target operation comprises the operation of determining the target virtual object and the target event according to the button attribute of the target button.

Optionally, the determining the target virtual object and the target event according to the button attribute of the target button includes: judging whether a virtual object corresponding to the target button exists or not; detecting a selection operation executed on a virtual object corresponding to the target button when the virtual object corresponding to the target button exists, wherein the virtual object corresponding to the target button comprises: the virtual object belonging to the first camp and/or the virtual object belonging to the second camp, wherein the virtual object belonging to the second camp is a virtual object which is not allowed to be controlled by the target account; when detecting that the selection operation is executed on a second virtual object in the virtual objects corresponding to the target button, determining the first virtual object and the second virtual object as the target virtual object, and determining that the first virtual object executes a first operation corresponding to the target button on the second virtual object as the target event; and under the condition that the virtual object corresponding to the target button does not exist, determining the first virtual object as the target virtual object, and determining that the first virtual object executes the first operation corresponding to the target button as the target event.

Optionally, in a case that it is detected that the target virtual object on the first virtual screen transitions from being in a first object state to being in a second object state, before determining that the screen state switching information is acquired, the method further includes: under the condition that a third virtual object in the virtual objects included in the first virtual picture is detected to be converted from a waiting state to an automatic fighting state, acquiring a second operation triggered by the automatic fighting state; determining the target virtual object and the target event according to the operation attribute of the second operation, wherein the first object state comprises the waiting state, and the second object state comprises the automatic fighting state.

Optionally, determining the target virtual object and the target event according to the operation attribute of the second operation includes: judging whether a virtual object corresponding to the second operation exists or not; under the condition that the virtual object corresponding to the second operation exists, acquiring a fourth virtual object from the virtual object corresponding to the second operation; determining the third virtual object and the fourth virtual object as the target virtual object, and determining the third virtual object performing the second operation on the fourth virtual object as the target event; and under the condition that the virtual object corresponding to the second operation does not exist, determining the third virtual object as the target virtual object, and determining that the second operation executed by the third virtual object is the target event.

Optionally, rendering, by the first virtual camera, a third virtual screen including other virtual objects in the first virtual screen except the target virtual object includes: acquiring a virtual scene in the first virtual picture and other virtual characters except a target virtual character in the virtual characters included in the first virtual picture through the first virtual camera, wherein the target virtual object includes the target virtual character, and the other virtual objects include the virtual scene and the other virtual characters; rendering the other virtual roles in the virtual scene to obtain the third virtual picture.

Optionally, rendering the other virtual characters in the virtual scene, and obtaining the third virtual screen includes: rendering the virtual scene to obtain a scene picture; rendering the other virtual roles on the scene picture to obtain a fourth virtual picture; and performing blurring processing on the fourth virtual picture to obtain the third virtual picture.

Optionally, rendering, by a second virtual camera, a virtual screen including the target virtual object on the third virtual screen, and obtaining the second virtual screen in the second screen state includes: rendering, by the second virtual camera, a fifth virtual picture including the target virtual object; superposing the fifth virtual picture on the third virtual picture to obtain a sixth virtual picture; and adding a target virtual element on the sixth virtual picture to obtain the second virtual picture in the second picture state, wherein the target virtual element is used for indicating picture information of the second virtual picture.

Optionally, in the process of rendering the first virtual screen in the first screen state, the method further includes: rendering, by the second virtual camera, a first virtual picture in a first picture state; after rendering, by the second virtual camera, the target event triggered on the target virtual object on the second virtual screen, the method further comprises: and in the case of detecting that the second virtual picture is converted into the virtual picture in the first picture state, rendering the virtual picture in the first picture state by the second virtual camera.

Optionally, the method further comprises: switching an imaging mode of the second virtual camera from an orthogonal mode to a perspective mode in a case where it is detected that the first virtual screen is switched to a virtual screen in a fourth screen state; rendering, by the second virtual camera, the virtual picture in the fourth picture state in the see-through mode.

According to another aspect of the embodiments of the present application, there is also provided a rendering apparatus for a virtual screen, including: the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring picture state switching information in the process of rendering a first virtual picture in a first picture state, the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object; a first rendering module, configured to render, by a first virtual camera, a third virtual screen including a virtual object other than the target virtual object in the first virtual screen in response to the screen state switching information; a second rendering module, configured to superimpose, on the third virtual picture, a virtual picture including the target virtual object rendered by a second virtual camera, so as to obtain a second virtual picture in a second picture state; a first rendering module to render the target event triggered on the target virtual object on the second virtual screen by the second virtual camera.

Optionally, the obtaining module includes one of: a first determining unit, configured to determine to acquire the screen state switching information when a target operation performed on the first virtual screen is detected, where the target operation is used to trigger the target event; a second determining unit, configured to determine to acquire the screen state switching information when it is detected that the target virtual object on the first virtual screen transitions from being in a first object state to being in a second object state, where the virtual object in the second object state is allowed to trigger the target event.

Optionally, the apparatus further comprises: a detection module, configured to, when a target operation performed on the first virtual screen is detected, before it is determined that the screen state switching information is acquired, detect, when it is detected that a first virtual object in virtual objects belonging to a first camp included in the first virtual screen is switched from a waiting state to an operating state, a trigger operation performed on a virtual button corresponding to the first virtual object, where the virtual object belonging to the first camp is a virtual object that allows target account control; a first determining module, configured to determine, when it is detected that the trigger operation is performed on a target button of virtual buttons corresponding to the first virtual object, the target virtual object and the target event according to a button attribute of the target button, where the target operation includes an operation of determining the target virtual object and the target event according to the button attribute of the target button.

Optionally, the first determining module includes: the first judging unit is used for judging whether a virtual object corresponding to the target button exists or not; a first processing unit, configured to, when a virtual object corresponding to the target button exists, detect a selection operation performed on the virtual object corresponding to the target button, where the virtual object corresponding to the target button includes: the virtual object belonging to the first camp and/or the virtual object belonging to the second camp, wherein the virtual object belonging to the second camp is a virtual object which is not allowed to be controlled by the target account; when detecting that the selection operation is executed on a second virtual object in the virtual objects corresponding to the target button, determining the first virtual object and the second virtual object as the target virtual object, and determining that the first virtual object executes a first operation corresponding to the target button on the second virtual object as the target event; and the second processing unit is used for determining the first virtual object as the target virtual object and determining that the first virtual object executes the first operation corresponding to the target button as the target event under the condition that the virtual object corresponding to the target button does not exist.

Optionally, the apparatus further comprises: a second determining module, configured to, before determining that the screen state switching information is acquired when it is detected that the target virtual object on the first virtual screen is switched from being in the first object state to being in the second object state, acquire a second operation triggered by an automatic fighting state when it is detected that a third virtual object in virtual objects included in the first virtual screen is switched from being in a waiting state to being in the automatic fighting state; a third determining module, configured to determine the target virtual object and the target event according to an operation attribute of the second operation, where the first object state includes the waiting state, and the second object state includes the automatic fighting state.

Optionally, the third determining module includes: a second judging unit, configured to judge whether a virtual object corresponding to the second operation exists; a third processing unit, configured to, in a case where a virtual object corresponding to the second operation exists, acquire a fourth virtual object from the virtual object corresponding to the second operation; determining the third virtual object and the fourth virtual object as the target virtual object, and determining the third virtual object performing the second operation on the fourth virtual object as the target event; and a fourth processing unit, configured to, in a case that there is no virtual object corresponding to the second operation, determine the third virtual object as the target virtual object, and determine that the second operation executed by the third virtual object is the target event.

Optionally, the first rendering module comprises: an obtaining unit, configured to obtain, by the first virtual camera, a virtual scene in the first virtual picture and other virtual characters, except for a target virtual character, in the virtual characters included in the first virtual picture, where the target virtual object includes the target virtual character, and the other virtual objects include the virtual scene and the other virtual characters; and the first rendering unit is used for rendering the other virtual roles in the virtual scene to obtain the third virtual picture.

Optionally, the first rendering unit is configured to: rendering the virtual scene to obtain a scene picture; rendering the other virtual roles on the scene picture to obtain a fourth virtual picture; and performing blurring processing on the fourth virtual picture to obtain the third virtual picture.

Optionally, the second rendering module comprises: a second rendering unit configured to render, by the second virtual camera, a fifth virtual screen including the target virtual object; the superposition unit is used for superposing the fifth virtual picture on the third virtual picture to obtain a sixth virtual picture; and an adding unit, configured to add a target virtual element on the sixth virtual picture to obtain the second virtual picture in the second picture state, where the target virtual element is used to indicate picture information of the second virtual picture.

Optionally, the apparatus further comprises: the second rendering module is used for rendering the first virtual picture in the first picture state through the second virtual camera in the process of rendering the first virtual picture in the first picture state; a third rendering module, configured to render, by the second virtual camera, the virtual picture in the first picture state when it is detected that the second virtual picture is converted into the virtual picture in the first picture state after the target event triggered on the target virtual object is rendered by the second virtual camera on the second virtual picture.

Optionally, the apparatus further comprises: a conversion module configured to convert an imaging mode of the second virtual camera from an orthogonal mode to a perspective mode when it is detected that the first virtual screen is converted into a virtual screen in a fourth screen state; and the fourth rendering module is used for rendering the virtual picture in the fourth picture state in the perspective mode through the second virtual camera.

According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.

According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.

In the embodiment of the application, in the process of rendering a first virtual picture in a first picture state, picture state switching information is acquired, wherein the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object; rendering, by the first virtual camera, a third virtual screen including virtual objects other than the target virtual object in the first virtual screen in response to the screen state switching information; superimposing a virtual picture including the target virtual object rendered by the second virtual camera on the third virtual picture to obtain a second virtual picture in a second picture state; in the method of rendering a target event triggered on a target virtual object on a second virtual picture by a second virtual camera, if a virtual picture in a certain picture state needs to be converted into a virtual picture in another picture state when rendering the virtual picture in the certain picture state, rendering a virtual picture of other virtual objects except the target virtual object in the virtual picture by one virtual camera, then overlaying a virtual picture including the target virtual object rendered by another virtual camera on the virtual picture rendering other virtual objects, rendering the target event triggered on the target virtual object on the virtual picture by the virtual camera rendering the target virtual object, and further rendering the target virtual object and the target event triggered on the target virtual object with emphasis, thereby realizing the technical effect of improving the flexibility of rendering the virtual picture, and then solved the relatively poor technical problem of flexibility of rendering the virtual picture.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.

Fig. 1 is a schematic diagram of a hardware environment of a rendering method of a virtual screen according to an embodiment of the present application;

FIG. 2 is a flowchart illustrating an alternative method for rendering a virtual image according to an embodiment of the present disclosure;

FIG. 3 is a schematic diagram of a rendering process of a virtual screen according to an alternative embodiment of the present application;

FIG. 4 is a schematic diagram of another process for rendering a virtual screen according to an alternative embodiment of the present application;

FIG. 5 is a schematic diagram of an alternative virtual screen rendering apparatus according to an embodiment of the present application;

fig. 6 is a block diagram of an electronic device according to an embodiment of the present application.

Detailed Description

In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.

It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

According to an aspect of an embodiment of the present application, an embodiment of a method for rendering a virtual screen is provided.

Alternatively, in the present embodiment, the rendering method of the virtual screen may be applied to a hardware environment formed by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, a server 103 is connected to a terminal 101 through a network, which may be used to provide services (such as virtual services, application services, etc.) for the terminal or a client installed on the terminal, and a database may be provided on the server or separately from the server for providing data storage services for the server 103, and the network includes but is not limited to: the terminal 101 is not limited to a PC, a mobile phone, a tablet computer, and the like. The rendering method of the virtual screen in the embodiment of the present application may be executed by the server 103, the terminal 101, or both the server 103 and the terminal 101. The terminal 101 executing the rendering method of the virtual screen according to the embodiment of the present application may also be executed by a client installed thereon.

Fig. 2 is a flowchart of an alternative method for rendering a virtual screen according to an embodiment of the present application, and as shown in fig. 2, the method may include the following steps:

step S202, in the process of rendering a first virtual picture in a first picture state, picture state switching information is acquired, wherein the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object;

step S204, responding to the picture state switching information, and rendering a third virtual picture comprising other virtual objects except the target virtual object in the first virtual picture through a first virtual camera;

step S206, superimposing a virtual image including the target virtual object rendered by a second virtual camera on the third virtual image to obtain the second virtual image in the second image state;

step S208, rendering the target event triggered on the target virtual object through the second virtual camera on the second virtual screen.

Through the above steps S202 to S208, if a virtual screen in a certain screen state needs to be converted into a virtual screen in another screen state when rendering the virtual screen in the certain screen state, rendering a virtual picture of the other virtual object than the target virtual object in the virtual picture by one virtual camera, and superimposing a virtual picture including the target virtual object rendered by another virtual camera on the virtual picture rendering the other virtual object, a target event triggered on the target virtual object is rendered on the virtual screen by the above-mentioned virtual camera rendering the target virtual object, and then the target virtual object and the target event triggered on the target virtual object are mainly rendered, so that the technical effect of improving the flexibility of rendering the virtual picture is realized, and the technical problem of poor flexibility of rendering the virtual picture is solved.

Optionally, in this embodiment, the rendering method of the virtual screen may be applied to, but not limited to, a scene that renders any type of virtual screen, such as: game screen rendering, animation movie screen rendering, Virtual Reality (VR) screen rendering, and the like.

In the technical solution provided in step S202, the second screen state may include, but is not limited to, a screen state that requires to render a virtual object and an event, for example: combat status, action close-up status, etc. The first screen state may include, but is not limited to, other screen states in addition to the second screen state, which are allowed to transition to the second screen state. Such as: a combat readiness state, a scenario description state, a sports readiness state, and the like.

Optionally, in this embodiment, the virtual object in the virtual screen may include, but is not limited to: virtual characters (e.g., player characters, NPC characters), virtual items (e.g., weapons, vehicles, consumables), virtual buildings, virtual plants, virtual landscapes, virtual obstacles, and the like.

Optionally, in this embodiment, the target event may include, but is not limited to: release skills, show actions, show animations, etc. Such as: the player character or the NPC character releases skills, the vehicle travels, the animation character performs actions, and the like.

Optionally, in this embodiment, the screen state switching information is used to instruct to convert the first virtual screen into a second virtual screen in the second screen state. The frame status switching information may be, but not limited to, actively triggered or passively triggered. Such as: the active triggering mode can be, but is not limited to, triggering by detecting a user operation, and the passive triggering mode can be, but is not limited to, triggering by detecting an operation state.

As an alternative embodiment, acquiring the picture state switching information includes one of:

s11, determining to acquire the screen state switching information when a target operation executed on the first virtual screen is detected, wherein the target operation is used for triggering the target event;

s12, when it is detected that the target virtual object on the first virtual screen is in a first object state and a second object state, determining to acquire the screen state switching information, where the virtual object in the second object state is allowed to trigger the target event.

Optionally, in this embodiment, the target operation is used to trigger a target event, and the target operation may be, but is not limited to, an operation performed on the target virtual object, or may also be an operation performed on a control corresponding to the target virtual object. Such as: the player controls the process of releasing skills of the game character, and the player can trigger the skills by clicking or dragging the game character or clicking a skill button.

Optionally, in this embodiment, the first object state may be, but is not limited to, any object state that can be converted into a second object state, where the second object state is a state that is allowed to trigger a target event. Such as: the target virtual object may be an NPC in a game or a game prop automatically controlled by the system, and in a battle scene, when the NPC is detected to be converted from a battle preparation state to a battle state, the NPC and the object releasing the skill thereof may be determined as the target virtual object.

Alternatively, in this embodiment, the screen state switching information may be, but is not limited to, triggered by a target operation performed by a user, and may also be triggered by a transition of an object state of a virtual object in a virtual screen. Such as: when a player clicks a skill button of a virtual character or clicks a virtual prop to trigger skill release of the virtual character or a function of the virtual prop in a combat preparation state, picture state switching information is obtained, and the picture state switching information is triggered by operation of a user. For another example: when the skill releasing sequence of the NPC character is changed to release the skill in the battle preparation state, the method is equivalent to acquiring the picture state switching information, and the picture state switching information is triggered by the content rendered in the virtual picture.

As an optional embodiment, in a case that a target operation performed on the first virtual screen is detected, before determining that the screen state switching information is acquired, the method further includes:

s21, when detecting that a first virtual object in the virtual objects belonging to a first banker included in the first virtual screen is switched from a waiting state to an operating state, detecting a trigger operation executed on a virtual button corresponding to the first virtual object, wherein the virtual object belonging to the first banker is a virtual object allowing target account control;

s22, when it is detected that the trigger operation is performed on a target button of the virtual buttons corresponding to the first virtual object, determining the target virtual object and the target event according to a button attribute of the target button, where the target operation includes the operation of determining the target virtual object and the target event according to the button attribute of the target button.

Optionally, in this embodiment, the virtual object belonging to the first battle is a virtual object allowing control of a target account, the target account may be, but is not limited to, a game account of a game player, and the virtual object belonging to the first battle may include, but is not limited to: the player's character, the player's prop, the player's vehicle, and so on, can control the game object through the account. The target account may also be, but is not limited to, a video playing account, and the virtual objects belonging to the first camp may include, but are not limited to: characters, props and other objects in the video can be controlled by the video viewer through the account.

Optionally, in this embodiment, when a first virtual object in the virtual objects belonging to the first camp is transitioned from the waiting state to the operating state, virtual buttons corresponding to the first virtual object may be displayed on the virtual screen, and these virtual buttons may be used, but are not limited to, for triggering an operation that allows the first virtual object to be triggered. When detecting that the trigger operation is executed on a target button in the virtual buttons, determining a target virtual object and a target event which need to be rendered by using the second virtual camera according to the button attribute of the target button.

Optionally, in this embodiment, that the virtual object is in the waiting state means that the target account is not allowed to control the virtual object, and the target account is allowed to control the virtual object only when the virtual object is in the operating state.

Alternatively, in the present embodiment, the button attribute of the target button may include, but is not limited to, an operation object of the target button, an operation range of the target button, and the like. Such as: whether or not the target virtual object includes what or which virtual object in addition to the first virtual object may be determined according to the operation object of the target button, and a virtual object falling within its operation range may also be determined as the target virtual object according to the operation range of the target button.

As an alternative embodiment, determining the target virtual object and the target event according to the button attribute of the target button includes:

s31, judging whether a virtual object corresponding to the target button exists or not;

s32, when there is a virtual object corresponding to the target button, detecting a selection operation performed on the virtual object corresponding to the target button, where the virtual object corresponding to the target button includes: the virtual object belonging to the first camp and/or the virtual object belonging to the second camp, wherein the virtual object belonging to the second camp is a virtual object which is not allowed to be controlled by the target account; when detecting that the selection operation is executed on a second virtual object in the virtual objects corresponding to the target button, determining the first virtual object and the second virtual object as the target virtual object, and determining that the first virtual object executes a first operation corresponding to the target button on the second virtual object as the target event;

s33, when there is no virtual object corresponding to the target button, determining the first virtual object as the target virtual object, and determining that the first virtual object executes the first operation corresponding to the target button as the target event.

Optionally, in this embodiment, the button attribute of the target button may include, but is not limited to, whether a virtual object corresponding to the target button exists, which virtual objects the target button corresponds to if exists, and the like.

Optionally, in this embodiment, if there is a virtual object corresponding to the target button, the target account may perform a selection operation on the virtual object corresponding to the target button to select a second virtual object, determine both the first virtual object and the second virtual object as the target virtual object, and determine that the first virtual object performs a first operation corresponding to the target button on the second virtual object as the target event.

Optionally, in this embodiment, the virtual object corresponding to the target button may include, but is not limited to: the virtual object belonging to the first camp and/or the virtual object belonging to the second camp, the virtual object belonging to the first camp is a virtual object allowing the control of the target account, and the virtual object belonging to the second camp is a virtual object not allowing the control of the target account. That is, the operation corresponding to the target button may be released to the virtual object belonging to the first camp, may be released to the virtual object belonging to the second camp, or may be released to both the virtual object belonging to the first camp and the virtual object belonging to the second camp. Such as: in the battle screen of the game, the skills corresponding to the target buttons can be released to the character of the own party battle (for example, gain skills), or released to the character of the enemy battle (for example, NPC, the character of enemy player, etc.) (for example, injury skills and weakness skills), or released to the character of the own party battle and the character of the enemy battle simultaneously (for example, undifferentiated injury skills, undifferentiated gain skills, etc.).

Optionally, in this embodiment, if there is no virtual object corresponding to the target button, the first virtual object is directly determined as the target virtual object, and the first operation corresponding to the first virtual object executing the target button is determined as the target event.

In an alternative embodiment, a process for controlling a player character to release skills in a game battle is provided, fig. 3 is a schematic diagram of a rendering process of a virtual frame according to an alternative embodiment of the present application, and as shown in fig. 3, virtual objects included in the battle frame include virtual objects belonging to a first battle: player characters Player1 and Player2, virtual objects belonging to the second play: system controlled character NPC1, scene elements sun and mountain. When the Player2 in the Player character shifts from the waiting state to the operating state, a trigger operation performed on a virtual button (skill 1 button and skill 2 button) corresponding to a first virtual object is detected, if the trigger operation is detected to be performed on the skill 2 button, it is determined whether a virtual object corresponding to a target button, for example, a virtual object corresponding to the target button exists, a selection operation performed on the virtual object corresponding to the target button is detected, if the selection operation is detected to be performed on the NPC1 in the virtual object corresponding to the target button, the players 2 and NPC1 are determined as target virtual objects, and the Player2 performs a first operation (i.e., release skill 2) corresponding to the skill 2 button on the NPC1 as a target event. It may be determined that the picture state switching information is acquired, a third virtual picture (indicated by a dotted line in fig. 3) including Player1, scene element sun and mountain is rendered by the first virtual camera, a virtual picture (indicated by a solid line in fig. 3) including Player2 and NPC1 is rendered on the third virtual picture by the second virtual camera, a second virtual picture in the second picture state is obtained, the second virtual picture is rendered, and a target event that triggers Player2 to release skill 2 to NPC1 is rendered on Player2 and NPC1 by the second virtual camera.

As an optional embodiment, in a case that it is detected that the target virtual object on the first virtual screen transitions from being in the first object state to being in the second object state, before determining that the screen state switching information is acquired, the method further includes:

s41, when detecting that a third virtual object in the virtual objects included in the first virtual screen is in the automatic combat state from the waiting state, acquiring a second operation triggered by the automatic combat state;

s42, determining the target virtual object and the target event according to the operation attribute of the second operation, wherein the first object state comprises the waiting state, and the second object state comprises the automatic fighting state.

Alternatively, in the present embodiment, the virtual object allowed to be in the automatic fighting state may be, but is not limited to, a virtual object belonging to a first camp, and/or a virtual object belonging to a second camp, that is, both the virtual object allowed to be controlled by the player and the virtual object not allowed to be controlled by the player may be played in the automatic fighting mode. In the automatic combat mode, if a third virtual object is detected to be converted from a waiting state to an automatic combat state, second operation triggered by the automatic combat state is obtained, namely skills, controlled props and the like released by the automatic combat state are obtained, and then the target virtual object and the target event are determined according to operation attributes of the second operation.

Optionally, in this embodiment, the virtual object being in the waiting state indicates that the virtual object is not allowed to perform an operation, and the virtual object is allowed to perform an operation of automatic fighting when the virtual object is in the automatic fighting state.

Optionally, in this embodiment, the operation attribute of the second operation may include, but is not limited to, an operation object of the second operation, an operation range of the second operation, and the like. Such as: whether or not the target virtual object includes any virtual object other than the third virtual object may be determined according to the operation object of the second operation, and a virtual object falling within the operation range thereof may also be determined as the target virtual object according to the operation range of the second operation.

As an alternative embodiment, the determining the target virtual object and the target event according to the operation attribute of the second operation includes:

s51, judging whether a virtual object corresponding to the second operation exists;

s52, acquiring a fourth virtual object from the virtual object corresponding to the second operation when the virtual object corresponding to the second operation exists; determining the third virtual object and the fourth virtual object as the target virtual object, and determining the third virtual object performing the second operation on the fourth virtual object as the target event;

s53, when there is no virtual object corresponding to the second operation, determining the third virtual object as the target virtual object, and determining that the second operation performed on the third virtual object is the target event.

Optionally, in this embodiment, the operation attribute of the second operation may include, but is not limited to, whether a virtual object corresponding to the second operation exists, and which virtual objects the second operation corresponds to if exists, and the like.

Optionally, in this embodiment, if there is a virtual object corresponding to the second operation, a fourth virtual object may be acquired from the virtual object corresponding to the second operation (the acquisition manner may be random acquisition or acquisition according to some preset rules), the third virtual object and the fourth virtual object are determined as target virtual objects, and it is determined that the third virtual object performs the second operation on the fourth virtual object as a target event.

Optionally, in this embodiment, the virtual object corresponding to the second operation may include, but is not limited to: the virtual object belonging to the first camp and/or the virtual object belonging to the second camp, the virtual object belonging to the first camp is a virtual object allowing the control of the target account, and the virtual object belonging to the second camp is a virtual object not allowing the control of the target account. That is, the second operation may be released to the virtual object belonging to the first camp, or may be released to the virtual object belonging to the second camp, or may be released to both the virtual object belonging to the first camp and the virtual object belonging to the second camp. Such as: in the battle screen of the game, the skill corresponding to the second operation can be released (for example, gain skill) to the character of the own party battle, or released (for example, injury skill, weakness skill) to the character of the enemy battle (for example, NPC, character of enemy player, etc.), or released simultaneously (for example, nondifferential injury skill, nondifferential gain skill, etc.) to the character of the own party battle and the character of the enemy battle.

Optionally, in this embodiment, if there is no virtual object corresponding to the second operation, the third virtual object is directly determined as the target virtual object, and it is determined that the second operation executed by the third virtual object is the target event.

In another alternative embodiment, a process of automatically releasing the skill of the virtual character in the game battle is provided, fig. 4 is a schematic diagram of a rendering process of another virtual picture according to an alternative embodiment of the present application, and as shown in fig. 4, the virtual objects included in the battle picture include virtual objects belonging to a first battle: player characters Player1 and Player2, virtual objects belonging to the second play: system controlled character NPC1, scene elements sun and mountain. When the NPC1 is converted from the waiting state to the automatic fighting state, the second operation triggered by the current automatic fighting state is acquired as attack launching, whether a virtual object corresponding to the attack launching exists is judged, if the virtual object corresponding to the attack launching exists, the fourth virtual object is acquired from the virtual object corresponding to the attack launching as the Player1, the NPC1 and the Player1 are determined as target virtual objects, and the attack corresponding to the second operation executed by the NPC1 on the Player1 is determined as a target event. It may be determined that the picture state switching information is acquired, a third virtual picture (indicated by a dotted line in fig. 4) including Player2, scene element sun and mountain is rendered by the first virtual camera, a virtual picture (indicated by a solid line in fig. 4) including Player1 and NPC1 is rendered on the third virtual picture by the second virtual camera, a second virtual picture in the second picture state is obtained, the second virtual picture is rendered, and a target event triggering NPC1 to perform an attack corresponding to the second operation on Player1 is rendered on Player1 and NPC1 by the second virtual camera.

As an optional embodiment, in the process of rendering the first virtual screen in the first screen state, the method further includes:

s61, rendering a first virtual picture in a first picture state by the second virtual camera;

after the target event triggered on the target virtual object is rendered by the second virtual camera on the second virtual screen, further comprising:

s62, in a case where it is detected that the second virtual screen is converted into a virtual screen in a third screen state, rendering the virtual screen in the third screen state by the second virtual camera.

Optionally, in this embodiment, in the process of rendering the first virtual screen in the first screen state, the first virtual screen in the first screen state is rendered by the second virtual camera. And after the target event triggered on the target virtual object is rendered on the second virtual picture through the second virtual camera, if the second virtual picture is detected to be converted into the virtual picture in the third picture state, rendering the virtual picture in the third picture state through the second virtual camera.

Optionally, in this embodiment, the virtual image in the second image state may be rendered by the multi-camera rendering method, and the virtual images in other image states except the second image state are rendered by the second camera.

As an optional embodiment, the rendering process of the virtual image further includes:

s71, when detecting that the first virtual picture is converted into a virtual picture in a fourth picture state, converting the image capture mode of the second virtual camera from an orthogonal mode to a perspective mode;

s72, rendering the virtual picture in the fourth picture state in the perspective mode by the second virtual camera.

Optionally, in this embodiment, the virtual screen in the fourth screen state may include, but is not limited to, a virtual screen that requires stereoscopic rendering of screen content, such as: a picture that represents the entire scene is required. The virtual camera in the perspective mode can render a 3D picture effect, thereby showing a more stereoscopic overall scene.

Alternatively, in this embodiment, the image capturing mode employed by the second virtual camera in rendering the first virtual screen in the first screen state may be an orthogonal mode. The orthogonal mode virtual camera may render a 2D picture effect.

Such as: when the game screen is converted from a 2D perspective to a 3D perspective (for example, from rendering a scene moving in a landscape or still state to rendering a scene moving in a portrait state), the photographing mode of the second virtual camera is converted from the orthogonal mode to the perspective mode, thereby making the displayed screen more shockable.

In the technical solution provided in step S204, the image capturing mode adopted when the first virtual camera renders the third virtual screen may be an orthogonal mode. I.e. the third virtual picture may be a 2D picture.

Optionally, in this embodiment, other virtual objects in the first virtual screen except for the target virtual object are rendered in the third virtual screen, and the rendering process may be, but is not limited to, executed on the first virtual camera. The other virtual objects are all the virtual objects in the first virtual screen except the target virtual object, such as: a role 1, a role 2, a prop 1, a prop 2 and a prop 3 are in a certain virtual scene, the target virtual objects are the role 1 and the prop 2, and other virtual objects can be the role 2, the prop 1, the prop 3 and the virtual scene.

As an alternative embodiment, rendering, by the first virtual camera, a third virtual screen including virtual objects other than the target virtual object in the first virtual screen includes:

s81, acquiring, by the first virtual camera, a virtual scene in the first virtual picture and other virtual characters except a target virtual character in the virtual characters included in the first virtual picture, where the target virtual object includes the target virtual character, and the other virtual objects include the virtual scene and the other virtual characters;

s82, rendering the other virtual roles in the virtual scene to obtain the third virtual picture.

Optionally, in this embodiment, the target virtual object may include, but is not limited to, a target virtual character, and the other virtual objects include a virtual scene where the target virtual object is located and other virtual characters in the virtual scene.

Optionally, in this embodiment, the first virtual camera acquires the virtual scene in the first virtual picture and the other virtual characters, or in other words, acquires the virtual scene in the first virtual picture and the other virtual characters under the view angle of the first virtual camera. And rendering other virtual roles in the virtual scene to obtain a third virtual picture.

As an alternative embodiment, rendering the other virtual characters in the virtual scene to obtain the third virtual picture includes:

s91, rendering the virtual scene to obtain a scene picture;

s92, rendering the other virtual roles on the scene picture to obtain a fourth virtual picture;

and S93, blurring the fourth virtual picture to obtain the third virtual picture.

Optionally, in this embodiment, in the process of rendering the third virtual picture, a blurring process may be performed on fourth virtual pictures of other virtual characters on the rendered display scene picture to obtain the third virtual picture as the display background of the target event, so that the display of the target event is more vivid and prominent.

Optionally, in this embodiment, the way of blurring the fourth virtual screen may be, but is not limited to, adding a blurring effect to the fourth virtual screen, such as: vertical 7 layers, horizontal 7 layers.

In the technical solution provided in step S206, the image capturing mode adopted when the second virtual camera renders the second virtual screen may be an orthogonal mode. I.e. the second virtual picture may be a 2D picture.

Optionally, in this embodiment, the target virtual object is rendered on the third virtual screen, and the rendering process may be, but is not limited to, being executed on the second virtual camera. I.e. rendering the target virtual object under the perspective of the second virtual camera.

As an alternative embodiment, rendering a virtual picture including the target virtual object on the third virtual picture by a second virtual camera, and obtaining the second virtual picture in the second picture state includes:

s101, rendering a fifth virtual picture comprising the target virtual object through the second virtual camera;

s102, superposing the fifth virtual picture on the third virtual picture to obtain a sixth virtual picture;

and S103, adding a target virtual element on the sixth virtual picture to obtain the second virtual picture in the second picture state, wherein the target virtual element is used for indicating picture information of the second virtual picture.

Optionally, in this embodiment, a fifth virtual picture including the target virtual object is rendered under the angle of view of the second virtual camera, and is superimposed on the third virtual picture, and then a target virtual element for indicating the picture information of the second virtual picture is added to the obtained sixth virtual picture, so that the second virtual picture in the second picture state can be obtained.

Alternatively, in the present embodiment, the target virtual element is used to indicate the screen information of the second virtual screen, and the target virtual element may include, but is not limited to, screen elements such as an operation bar, a character avatar, a function button, and the like.

In the technical solution provided in step S208, the target event triggered on the target virtual object is rendered on the second virtual screen by the second virtual camera, and the target event triggered on the target virtual object is highlighted on the screen by the second virtual camera, so that the rendering process of the target event is more vivid.

It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.

Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling an electronic device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.

According to another aspect of the embodiment of the present application, there is also provided a virtual screen rendering apparatus for implementing the virtual screen rendering method. Fig. 5 is a schematic diagram of an alternative virtual screen rendering apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus may include:

an obtaining module 52, configured to obtain, during a process of rendering a first virtual screen in a first screen state, screen state switching information, where the screen state switching information is used to instruct to convert the first virtual screen in the first screen state into a second virtual screen in a second screen state, the second virtual screen is used to render a target event triggered on a target virtual object, and a virtual object rendered in the first virtual screen includes the target virtual object;

a first rendering module 54, configured to render, by the first virtual camera, a third virtual screen including virtual objects other than the target virtual object in the first virtual screen in response to the screen state switching information;

a second rendering module 56, configured to superimpose, on the third virtual picture, a virtual picture including the target virtual object rendered by a second virtual camera, so as to obtain the second virtual picture in the second picture state;

a first rendering module 58 configured to render the target event triggered on the target virtual object through the second virtual camera on the second virtual screen.

It should be noted that the obtaining module 52 in this embodiment may be configured to execute the step S202 in this embodiment, the first rendering module 54 in this embodiment may be configured to execute the step S204 in this embodiment, the second rendering module 56 in this embodiment may be configured to execute the step S206 in this embodiment, and the first rendering module 58 in this embodiment may be configured to execute the step S208 in this embodiment.

It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.

Through the modules, if a virtual picture in a certain picture state needs to be converted into a virtual picture in another picture state when the virtual picture in the certain picture state is rendered, rendering a virtual picture of the other virtual object than the target virtual object in the virtual picture by one virtual camera, and superimposing a virtual picture including the target virtual object rendered by another virtual camera on the virtual picture rendering the other virtual object, a target event triggered on the target virtual object is rendered on the virtual screen by the above-mentioned virtual camera rendering the target virtual object, and then the target virtual object and the target event triggered on the target virtual object are mainly rendered, so that the technical effect of improving the flexibility of rendering the virtual picture is realized, and the technical problem of poor flexibility of rendering the virtual picture is solved.

As an alternative embodiment, the obtaining module includes one of: a first determining unit, configured to determine to acquire the screen state switching information when a target operation performed on the first virtual screen is detected, where the target operation is used to trigger the target event; a second determining unit, configured to determine to acquire the screen state switching information when it is detected that the target virtual object on the first virtual screen transitions from being in a first object state to being in a second object state, where the virtual object in the second object state is allowed to trigger the target event.

As an alternative embodiment, the apparatus further comprises: a detection module, configured to, when a target operation performed on the first virtual screen is detected, before it is determined that the screen state switching information is acquired, detect, when it is detected that a first virtual object in virtual objects belonging to a first camp included in the first virtual screen is switched from a waiting state to an operating state, a trigger operation performed on a virtual button corresponding to the first virtual object, where the virtual object belonging to the first camp is a virtual object that allows target account control; a first determining module, configured to determine, when it is detected that the trigger operation is performed on a target button of virtual buttons corresponding to the first virtual object, the target virtual object and the target event according to a button attribute of the target button, where the target operation includes an operation of determining the target virtual object and the target event according to the button attribute of the target button.

As an alternative embodiment, the first determining module includes: the first judging unit is used for judging whether a virtual object corresponding to the target button exists or not; a first processing unit, configured to, when a virtual object corresponding to the target button exists, detect a selection operation performed on the virtual object corresponding to the target button, where the virtual object corresponding to the target button includes: the virtual object belonging to the first camp and/or the virtual object belonging to the second camp, wherein the virtual object belonging to the second camp is a virtual object which is not allowed to be controlled by the target account; when detecting that the selection operation is executed on a second virtual object in the virtual objects corresponding to the target button, determining the first virtual object and the second virtual object as the target virtual object, and determining that the first virtual object executes a first operation corresponding to the target button on the second virtual object as the target event; and the second processing unit is used for determining the first virtual object as the target virtual object and determining that the first virtual object executes the first operation corresponding to the target button as the target event under the condition that the virtual object corresponding to the target button does not exist.

As an alternative embodiment, the apparatus further comprises: a second determining module, configured to, before determining that the screen state switching information is acquired when it is detected that the target virtual object on the first virtual screen is switched from being in the first object state to being in the second object state, acquire a second operation triggered by an automatic fighting state when it is detected that a third virtual object in virtual objects included in the first virtual screen is switched from being in a waiting state to being in the automatic fighting state; a third determining module, configured to determine the target virtual object and the target event according to an operation attribute of the second operation, where the first object state includes the waiting state, and the second object state includes the automatic fighting state.

As an alternative embodiment, the third determining module includes: a second judging unit, configured to judge whether a virtual object corresponding to the second operation exists; a third processing unit, configured to, in a case where a virtual object corresponding to the second operation exists, acquire a fourth virtual object from the virtual object corresponding to the second operation; determining the third virtual object and the fourth virtual object as the target virtual object, and determining the third virtual object performing the second operation on the fourth virtual object as the target event; and a fourth processing unit, configured to, in a case that there is no virtual object corresponding to the second operation, determine the third virtual object as the target virtual object, and determine that the second operation executed by the third virtual object is the target event.

As an alternative embodiment, the first rendering module comprises: an obtaining unit, configured to obtain, by the first virtual camera, a virtual scene in the first virtual picture and other virtual characters, except for a target virtual character, in the virtual characters included in the first virtual picture, where the target virtual object includes the target virtual character, and the other virtual objects include the virtual scene and the other virtual characters; and the first rendering unit is used for rendering the other virtual roles in the virtual scene to obtain the third virtual picture.

As an alternative embodiment, the first rendering unit is configured to: rendering the virtual scene to obtain a scene picture; rendering the other virtual roles on the scene picture to obtain a fourth virtual picture; and performing blurring processing on the fourth virtual picture to obtain the third virtual picture.

As an alternative embodiment, the second rendering module comprises: a second rendering unit configured to render, by the second virtual camera, a fifth virtual screen including the target virtual object; the superposition unit is used for superposing the fifth virtual picture on the third virtual picture to obtain a sixth virtual picture; and an adding unit, configured to add a target virtual element on the sixth virtual picture to obtain the second virtual picture in the second picture state, where the target virtual element is used to indicate picture information of the second virtual picture.

As an alternative embodiment, the apparatus further comprises: the second rendering module is used for rendering the first virtual picture in the first picture state through the second virtual camera in the process of displaying the first virtual picture in the first picture state; a third rendering module, configured to render, by the second virtual camera, the virtual picture in a third picture state when it is detected that the second virtual picture is converted into the virtual picture in the third picture state after the target event triggered on the target virtual object is rendered by the second virtual camera on the second virtual picture.

As an alternative embodiment, the apparatus further comprises: a conversion module configured to convert an imaging mode of the second virtual camera from an orthogonal mode to a perspective mode when it is detected that the first virtual screen is converted into a virtual screen in a fourth screen state; and the fourth rendering module is used for rendering the virtual picture in the fourth picture state in the perspective mode through the second virtual camera.

It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.

According to another aspect of the embodiment of the present application, there is also provided an electronic device for implementing the rendering method of the virtual screen.

Fig. 6 is a block diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 6, the electronic device may include: one or more processors 601 (only one of which is shown), a memory 603, and a transmission 605. as shown in fig. 6, the electronic apparatus may further include an input-output device 607.

The memory 603 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for rendering a virtual image in the embodiment of the present application, and the processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 603, that is, implements the method for rendering a virtual image. The memory 603 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 603 may further include memory located remotely from the processor 601, which may be connected to the electronic device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The above-mentioned transmission device 605 is used for receiving or sending data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 605 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 605 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.

Among them, the memory 603 is used to store an application program, in particular.

The processor 601 may call the application stored in the memory 603 through the transmission device 605 to perform the following steps:

in the process of rendering a first virtual picture in a first picture state, obtaining picture state switching information, wherein the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object;

rendering, by the first virtual camera, a third virtual picture including virtual objects other than the target virtual object in the first virtual picture in response to the picture state switching information;

superimposing a virtual picture including the target virtual object rendered by a second virtual camera on the third virtual picture to obtain a second virtual picture in a second picture state;

rendering, by the second virtual camera, the target event triggered on the target virtual object on the second virtual screen.

By adopting the embodiment of the application, a rendering scheme of the virtual picture is provided. If the virtual picture in a picture state needs to be converted into a virtual picture in another picture state when the virtual picture in a certain picture state is rendered, one virtual camera is used for rendering the virtual pictures of other virtual objects except the target virtual object in the virtual picture, the virtual pictures including the target virtual object are rendered by another virtual camera and superposed on the virtual pictures rendering the other virtual objects, a target event triggered on the target virtual object is rendered on the virtual picture through the virtual camera rendering the target virtual object, and then the target virtual object and the target event triggered on the target virtual object are rendered with emphasis, so that the technical effect of improving the flexibility of rendering the virtual picture is achieved, and the technical problem of poor flexibility of rendering the virtual picture is solved.

Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.

It will be understood by those skilled in the art that the structure shown in fig. 6 is merely an illustration, and the electronic device may be a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.

Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program for instructing hardware associated with an electronic device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.

Embodiments of the present application also provide a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing a rendering method of a virtual screen.

Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.

Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:

in the process of rendering a first virtual picture in a first picture state, obtaining picture state switching information, wherein the picture state switching information is used for indicating that the first virtual picture in the first picture state is converted into a second virtual picture in a second picture state, the second virtual picture is used for rendering a target event triggered on a target virtual object, and the virtual object rendered in the first virtual picture comprises the target virtual object;

rendering, by the first virtual camera, a third virtual picture including virtual objects other than the target virtual object in the first virtual picture in response to the picture state switching information;

superimposing a virtual picture including the target virtual object rendered by a second virtual camera on the third virtual picture to obtain a second virtual picture in a second picture state;

rendering, by the second virtual camera, the target event triggered on the target virtual object on the second virtual screen.

Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.

Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.

The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.

The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.

In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

26页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:虚拟场景中虚拟技能的控制方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类