Screen control method, device, storage medium and equipment based on virtual environment
By using pre-computed static models for scene destruction in mobile games, the method addresses the high resource demand of real-time physics simulations, enhancing performance and adaptability to mobile platforms.
Patent Information
- Application Number
- CN202011258007.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-11
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2040-11-11
AI Technical Summary
In the prior art, real-time physical simulation calculation of game scene damage consumes a lot of resources on mobile devices, resulting in high hardware requirements and it is difficult to achieve efficient scene damage effects on mobile platforms with limited performance.
By creating two sets of static model resources before and after the scene corruption in the editing stage, and switching static models in the run stage, replacing real-time physical simulation calculations, combining static lighting models and custom rendering pipelines, the stylized rendering effect is achieved.
It greatly reduces performance consumption during runtime and reduces hardware requirements for mobile devices, so that the scene sabotage effect can be realized on mobile platforms with limited performance, and the dynamic process is completely controllable, in line with the pre-setting of art producers.
Smart Images

Figure CN113398576B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technologies, and particularly to a method, device, storage medium, and equipment for controlling a screen based on a virtual environment. Background Art
[0002] With the rapid development of Internet technologies and the diversification of functions of mobile devices, there are more and more games supported to run on mobile devices. For example, side-scrolling fighting games are one of them. In addition, with the rapid popularization of games on mobile devices, it has gradually become an option for more and more users nowadays to release stress by performing scene destruction in games.
[0003] Among them, scene destruction refers to that a user creates an environmental physical destruction effect in a game by physically destroying the game scene.
[0004] In related technologies, the scene destruction performance during game operation is realized based on real-time physical simulation calculation, and the real-time physical simulation calculation consumes a large amount of resources, thus resulting in very high hardware requirements for mobile devices. Based on this, there is an urgent need for a new method for controlling a screen based on a virtual environment to solve the above problems. Summary of the Invention
[0005] Embodiments of the present application provide a method, device, storage medium, and equipment for controlling a screen based on a virtual environment, which realizes replacing the real-time physical simulation calculation in the running stage with a static model switch, so that the performance consumption during operation can be greatly reduced, and this solution can be adapted to a mobile platform with limited performance. The technical solution is as follows:
[0006] On the one hand, a method for controlling a screen based on a virtual environment is provided. The method includes:
[0007] In the editing stage of a target application, import a first static model into a target engine to form a first static mesh; the first static model is an original object model corresponding before scene destruction;
[0008] Import a second static model into the target engine to form a second static mesh; the second static model is an object model with a scene destruction effect corresponding after scene destruction, and the second static model is obtained by geometric dissection of the first static model;
[0009] In the running stage of the target application, in response to satisfying a scene destruction trigger condition, control the target application to switch from displaying a first virtual environment screen to displaying a second virtual environment screen. The first virtual environment screen includes the first static mesh, and the second virtual environment screen includes the second static mesh.
[0010] On the other hand, a screen control device based on a virtual environment is provided. The device includes:
[0011] An editing unit configured to import a first static model into a target engine during an editing stage of a target application to form a first static mesh; the first static model is an original object model corresponding to before the scene is damaged.
[0012] The editing unit is further configured to import a second static model into the target engine to form a second static mesh; the second static model is an object model with a scene damage effect corresponding to after the scene is damaged, and the second static model is obtained by geometric dissection of the first static model.
[0013] A running unit configured to, during a running stage of the target application, in response to meeting a scene damage trigger condition, control the target application to switch from displaying a first virtual environment screen to displaying a second virtual environment screen, where the first virtual environment screen includes the first static mesh and the second virtual environment screen includes the second static mesh.
[0014] In a possible implementation, the editing unit is further configured to, during the editing stage, add a geometric collision body to the first static mesh, and the geometric collision body is used for collision detection during the running stage.
[0015] Wherein, the scene damage trigger condition includes: the first static mesh collides with a virtual weapon or virtual ammunition in the virtual environment.
[0016] In a possible implementation, the running unit is further configured to, during the running stage, in response to meeting the scene damage trigger condition, display a skeletal animation; or, during the running stage, in response to meeting the scene damage trigger condition, display a particle effect.
[0017] Wherein, the particle effect includes an explosion effect, a flame effect, and a flash effect.
[0018] In a possible implementation, the type of the scene damage is terrain damage, and the running unit is further configured to display a particle effect matching the surface type information of the terrain damage trigger position.
[0019] In a possible implementation, during the editing stage, the editing data related to the scene damage effect includes:
[0020] The trigger action range of the scene damage effect and the trigger condition of the scene damage effect.
[0021] Spatial position movement information after triggering the scene destruction effect, where the spatial position movement information includes the position, rotation angle, and scaling ratio of the second static mesh;
[0022] Special effect presentation type, where the special effect presentation type includes skeletal animation and particle effects.
[0023] In a possible implementation manner, during the running stage, the running unit is further configured to obtain serialized data, where the serialized data is obtained by serializing the editing data; and instantiate the serialized data according to the scene destruction trigger condition.
[0024] In a possible implementation manner, the first virtual environment screen and the second virtual environment screen are obtained through stylized rendering using a custom rendering pipeline;
[0025] Among them, the stylized rendering depends on a static lighting model; the static lighting model corresponds to static lighting and static models in the virtual environment.
[0026] In a possible implementation manner, the first static mesh and the second static mesh correspond to the same set of light maps.
[0027] In a possible implementation manner, the editing unit is further configured to:
[0028] Perform light pre-baking processing on the first static mesh through the target engine to generate the light map;
[0029] Associate the light map with the first material instance referenced by the first static mesh;
[0030] Associate the light map with the second material instance referenced by the second static mesh.
[0031] On the other hand, a computer device is provided, where the device includes a processor and a memory, and at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the above-mentioned virtual environment-based screen control method.
[0032] On the other hand, a computer-readable storage medium is provided, where at least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to implement the above-mentioned virtual environment-based screen control method.
[0033] On the other hand, a computer program product or a computer program is provided. The computer program product or the computer program includes computer program code, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device executes the above-described method for controlling a screen based on a virtual environment.
[0034] The beneficial effects brought by the technical solutions provided in the embodiments of this application are as follows:
[0035] In the editing stage, the embodiments of this application create two sets of static model resources. One set of static model resources corresponds to before the scene is damaged, and the other set of static model resources corresponds to after the scene is damaged. Both sets of static model resources are imported into the engine to form static meshes. Based on this, in the running stage, the embodiments of this application implement the replacement of real-time physical simulation calculations with static model switching. Therefore, the performance consumption during running can be significantly reduced, and the hardware requirements for mobile devices are relatively low. Therefore, this solution can be adapted to mobile platforms with limited performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0037] Figure 1 is a schematic diagram of an implementation environment related to a method for controlling a screen based on a virtual environment provided by an embodiment of this application;
[0038] Figure 2 is an architecture diagram of a game editing and running stage provided by an embodiment of this application;
[0039] Figure 3 is a schematic diagram of a service process and function modules provided by an embodiment of this application;
[0040] Figure 4 is a flowchart of a method for controlling a screen based on a virtual environment provided by an embodiment of this application;
[0041] Figure 5 is a schematic diagram of a static model resource preparation stage provided by an embodiment of this application;
[0042] Figure 6 is a schematic diagram of a scene light pre-baking process provided by an embodiment of this application;
[0043] Figure 7It is a schematic diagram of a dynamic process editing stage provided by an embodiment of the present application;
[0044] Figure 8 It is a schematic structural diagram of a screen control device based on a virtual environment provided by an embodiment of the present application;
[0045] Figure 9 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0046] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0047] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. Among them, at least one means one or more than one. For example, at least one user can be one user, two users, three users, etc., any integer greater than or equal to one. And multiple means two or more than two. For example, multiple users can be two users, three users, etc., any integer greater than or equal to two.
[0048] The following introduces some noun terms or abbreviations that may be involved in the embodiments of the present application.
[0049] 1. Side-scrolling game
[0050] A side-scrolling game generally refers to a horizontal screen game realized by technical operations. In other words, side-scrolling means fixing the game screen on a horizontal plane. Among them, most side-scrolling games are 2D games with low production costs. Usually, only rendering needs to be processed well, so the overall cost will be very small. Exemplarily, side-scrolling games include, but are not limited to, side-scrolling level-clearing, side-scrolling adventure, side-scrolling competition, side-scrolling strategy, side-scrolling fighting, etc. Exemplarily, representative 2D side-scrolling games include: MapleStory, Dungeon & Fighter, Metal Slug, Rainbow Island, etc. Representative 3D side-scrolling games include: Elsword, Dream Island, Dongyouji, Xiahun, etc.
[0051] 2. Fighting game
[0052] A fighting game (Fight Technology Game, FTG) is a type of action game. Its game screen usually shows players divided into two or more camps fighting against each other, and using fighting skills to defeat opponents to win. This type of game has obvious action game characteristics and is an important branch of action games.
[0053] 3. Side-scrolling fighting game
[0054] Among them, the side-scrolling fighting game combines the side-scrolling game and the fighting game. Among them, the representative side-scrolling fighting game is Dungeon Fighter Online.
[0055] 4. Stylized Representation
[0056] Stylized means an expression method of "depicting or processing in an attitude-based and non-realistic way". That is, the stylized representation is a rendering style different from the realistic representation, mainly used to simulate the artistic painting style.
[0057] 5. Scene Destruction
[0058] As the pace of modern life is getting faster and faster, people's pressure is also increasing. Releasing pressure by destroying scenes in games has become the choice of many people. In addition, humans are born with a desire to destroy, and it has become possible to vent this desire in the virtual game world.
[0059] In short, scene destruction in games refers to physically destroying the game scene, thereby creating an environmental physical destruction effect in the game.
[0060] Exemplarily, many scenes in the game are destructible, and the destruction special effects are very realistic. For example, it can achieve a large-scale physical destruction at the level of movie visual effects in real time. Among them, scene destruction includes but is not limited to building destruction, terrain destruction, vegetation destruction, etc. For example, the virtual character controlled by the player can use shells or grenades in the game to blow a hole in the ground for use as a trench, or can also use a virtual firearm to destroy the doors, windows or walls of a house, etc.
[0061] 6. Light map
[0062] The light mapping technology is a technology to enhance the lighting effect of static scenes, which can make static scenes look more real and rich with less performance consumption. Among them, light maps are only required when using baked light to illuminate static models.
[0063] Specifically, for game scenes, most of the objects in the scene are usually static. If these static objects use real-time lighting, it will bring a large performance overhead. In this case, by using the light mapping technology to bake the lighting information in advance, the performance consumption can be significantly reduced. In other words, the light mapping technology targets static objects in game scenes, and it can pre-bake the lighting information of static objects (such as including direct lighting and indirect lighting) onto a texture map for use during runtime, thus avoiding dynamic calculations. That is to say, the lighting information is obtained by pre-baking and stored on the light map, and during rendering, the light map is sampled and decoded for shading. That is, the lighting information can be pre-baked into the light map to achieve the lighting effect of the shader.
[0064] Exemplarily, the light map can contain the direct light sources projected onto the surfaces of static objects within the game scene, as well as the indirect light sources reflected between different objects. Additionally, the light map generated by baking the lighting is unable to change the calculations during game runtime, so it is defined as static. Usually, we use this method to solve the performance consumption problem during game runtime.
[0065] Among them, the meaning of baking is to save the brightness and darkness information of the object's lighting onto the texture. During real-time rendering, instead of performing lighting calculations, the pre-generated light map is used to represent the brightness and darkness effect.
[0066] In summary, when developing mobile games, in order to balance the visual performance and game running efficiency, we often choose to use light maps as the lighting solution for game scenes.
[0067] 7. Illumination Model
[0068] When light shines on the surface of an object, the object will reflect, transmit, absorb, diffract, and refract the light. Among them, the part absorbed by the object is converted into heat, and the reflected light and transmitted light will enter the human visual system so that we can see the object. To simulate this phenomenon, some mathematical models are usually established to replace the complex physical models, and these models are called illumination models. Among them, the purpose of the illumination model is to calculate the quantity and direction of the outgoing light after the light enters an object of a certain material (such as a rough surface or a metal surface, etc.).
[0069] 8. Rendering
[0070] Macroscopically speaking, rendering consists of two main parts: one is to determine the visibility of a pixel, and the other is to determine the lighting calculation of this pixel. Among them, the illumination model is used to determine how to perform the lighting calculation on a pixel.
[0071] 9. Mobile
[0072] Generally refers to the mobile device side, including but not limited to all handheld portable game devices.
[0073] 10. Player
[0074] In the embodiments of the present application, the player is referred to as the user. Among them, the player can also be called a gamer, which is a term between the game industry and game participants. Generally speaking, a player generally refers to a user who plays games, that is, a person who participates in any form of game. Specifically, in role-playing games, the player plays a controllable game character in the game world and completes the game or the goals set by himself by operating these controllable game characters. In addition, some players can also be the protagonist of the game or the key to the game plot in role-playing games. Generally speaking, a player is an experiencer, user, evaluator, and consumer of the game. According to the differences in personality and preferences, different players like different types of games.
[0075] 11. Virtual environment
[0076] It is the virtual environment displayed (or provided) when the application program runs on the terminal.
[0077] This virtual environment can be a simulation environment of the real world, or a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. This virtual environment can be a two-dimensional virtual environment, and the present application does not make specific limitations on this.
[0078] For example, this virtual environment can include the sky, land, ocean, etc. The land can include environmental elements such as deserts and cities, and the user can control the virtual object to move in this virtual environment.
[0079] 12. Virtual object
[0080] A virtual object refers to an active object in the virtual environment. This active object can be a virtual character, a virtual monster, etc. This virtual object can be a virtual image in this virtual environment used to represent the player. There can be multiple virtual objects in the virtual environment, and each virtual object has its own shape and volume in the virtual environment and occupies a part of the space in the virtual environment.
[0081] The following introduces the implementation environment involved in a method for controlling a screen based on a virtual environment provided by the embodiments of the present application.
[0082] Figure 1 It is a schematic diagram of the implementation environment involved in a method for controlling a screen based on a virtual environment provided by the present application. See Figure 1 , this implementation environment includes: terminal 110, server 120.
[0083] The terminal 110 installs and runs a client 111 that supports a virtual environment. The client 111 can be a horizontal action game program. When the terminal runs the client 111, the user interface of the client 111 is displayed on the screen of the terminal 110.
[0084] The terminal 110 is the terminal used by the user 112. The user 112 uses the terminal 110 to control the virtual character A located in the virtual environment to perform activities. The virtual character A can be called the master virtual character of the user 112.
[0085] The terminal 110 can generally refer to one of multiple terminals. Only the terminal 110 is used as an example in the embodiments of the present application. The device types of the terminal 110 can include: smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, smart speakers, smart watches, etc., but are not limited thereto.
[0086] Figure 1 Only one terminal is shown, but in different embodiments, there are multiple other terminals 130 that can access the server 120. Optionally, there is also one or more terminals 130 that are the terminals corresponding to the developers. A development and editing platform for the client that supports the virtual environment is installed on the terminal 130. The developers can edit and update the client on the terminal 130 and transmit the installation package of the updated client to the server 120 through a wired or wireless network. The terminal 110 can download the client installation package from the server 120 to update the client.
[0087] In addition, the server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal and the server 120 can be directly or indirectly connected through wired or wireless communication methods, which are not limited in the present application.
[0088] Among them, the server 120 is used to provide background services for the client supporting the virtual environment. Optionally, the server 120 undertakes the main computing work, and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work, and the terminal undertakes the main computing work; or, a distributed computing architecture is adopted between the server 120 and the terminal for collaborative computing.
[0089] In some embodiments, the solution provided by the embodiments of the present application can be applied to the scenario destruction in a horizontal version fighting game. For example, the solution can be applied to a stylized horizontal perspective fighting game. Exemplarily, the above scenario destruction can be terrain destruction in the game. Additionally, during the dynamic display process of the scenario destruction, the embodiments of the present application rely on a static lighting model to complete the rendering, and this solution is also applicable to game scenarios with high custom requirements for the rendering pipeline and visual performance to implement the scenario destruction function.
[0090] Figure 2 It is an architecture diagram of the game editing and running stages provided by the embodiments of the present application.
[0091] See Figure 2 , the embodiments of the present application avoid real-time physical simulation calculations during the running stage, and introduce a scenario destruction management module 201, a scenario destruction trigger module 202 (abbreviated as the trigger module), and an additional special effect module 203 during the editing stage. In the embodiments of the present application, the above editing stage and running stage are both for the target application program. Among them, the target application program is a game program.
[0092] Scene destruction management module 201
[0093] In the embodiments of the present application, two corresponding sets of static model resources are prepared respectively for the visual performance before and after the scenario destruction. Among them, one set of corresponding static model resources is made for before the scenario destruction, and one set of corresponding static model resources is made for after the scenario destruction.
[0094] One set of static model resources corresponding to before the scenario destruction is the Figure 2 original model shown, and one set of static model resources corresponding to after the scenario destruction is the Figure 2 destroyed model shown. Additionally, the original model is also referred to as the first static model in this article, and the destroyed model is also referred to as the second static model in this article.
[0095] In addition, the above destroyed model is obtained by geometric dissection of the above original model. In some embodiments, the above original model and destroyed model are three-dimensional models created in a third-party modeling software (such as 3dsMax, Maya, Softimage, etc.), and the embodiments of the present application do not specifically limit this.
[0096] In the embodiments of the present application, the model switching before and after scene destruction is managed by the scene destruction management module 201. Since static model switching is used to replace the real-time physical simulation calculation during the running stage, the performance consumption during running can be significantly reduced, and this solution can be adapted to mobile platforms with limited performance.
[0097] Scene destruction trigger module 202
[0098] In the editing stage, the art production staff can set the trigger action range and trigger conditions of scene destruction based on the timeline, as well as the spatial position movement information generated by the scene destruction management module 201 after triggering. Among them, the spatial position movement information includes, but is not limited to, position, rotation angle, scaling ratio, etc.
[0099] In addition, the information pre-edited by the art production staff can be serialized into game assets. Generally speaking, serialization refers to the process of converting the state information of an object into a form that can be stored or transmitted. Corresponding to the embodiments of the present application, serialization is the process of converting the above-edited information into a data form that can be saved from memory to the hard disk.
[0100] In addition, during the running stage, the above game assets can also be instantiated according to the needs of the game logic. In the embodiments of the present application, instantiation is a process opposite to serialization, which is to instantiate game assets into game objects in the game scene.
[0101] In the embodiments of the present application, the visual performance of the dynamic process of scene destruction can completely retain the pre-settings of the art production staff. That is to say, the running-time performance of scene destruction can be completely controlled by the art production staff.
[0102] Additional special effect module 203
[0103] In the embodiments of the present application, the additional special effect module 203 includes skeletal animations and particle systems triggered additionally during the dynamic process of scene destruction. In some embodiments, the above additional special effects are also recorded in the above game resources. Exemplarily, assuming that the type of scene destruction is terrain destruction, correspondingly, the scene destruction management module 201 also includes specified surface type information. After the destruction process is triggered, the additional special effect module 203 can also use the surface type information at the scene destruction trigger point to present the corresponding rendering effect.
[0104] Exemplarily, taking the above target application as a horizontal action game and the scene destruction as terrain destruction as an example, as a game type that emphasizes instant feedback, real-time terrain destruction can effectively enhance the player's immersion in the game by showing the interaction between the skills released by the player and the scene environment.
[0105] In some embodiments, the solution provided by the embodiments of the present application is based onFigure 2 Based on the scene destruction management module 201, scene destruction trigger module 202, and additional special effect module 203 shown, by providing a scene destruction trigger method and editing process that are fully controllable by artists, as well as a customized rendering pipeline and scene lighting pre-baking process to adapt to the stylized performance based on the static lighting model.
[0106] Further, referring to Figure 3 , the business process of the solution provided in the embodiments of this application is divided into Figure 3 the several stages shown, namely the static model preparation stage, scene lighting pre-baking stage, dynamic process editing stage, and running stage, to respectively support the scene destruction management module 201, scene destruction trigger module 202, and additional special effect module 203 shown in Figure 2 .
[0107] Figure 4 is a flowchart of a method for controlling a picture based on a virtual environment provided in the embodiments of this application. The execution subject of this method is a computer device. Exemplarily, this computer device includes Figure 1 the terminals 110 and 130 in Figure 4 . Referring to
[0108] Static model resource preparation
[0109] 401. In the editing stage of the target application, import the first static model into the target engine to form the first static mesh; and import the second static model into the target engine to form the second static mesh.
[0110] In the embodiments of this application, the target application refers to a game application, and correspondingly, the target engine refers to a game engine. For the visual performance before and after scene destruction, in the game editing stage, two corresponding sets of static model resources will be produced respectively. Among them, the first static model and the second static model respectively correspond to the two states before and after scene destruction. As Figure 2 shown, the first static model refers to Figure 2 the original model in Figure 2 , and the second static model refers to
[0111] the destroyed model in
[0112] such as Figure 5As shown, both the first static model and the second static model are imported into the game engine. After the two groups of static models are imported into the game engine, a first static mesh body and a second static mesh body are respectively formed. In addition, the two groups of static mesh bodies are given to Figure 2 the scene destruction management module 201 in Figure 5 for management, which is used for switching display during scene destruction. Among them, as
[0113] shown, the first static model corresponds to the mesh component 1 in the scene destruction management module 201, and the second static model corresponds to the mesh component 2 in the scene destruction management module 201.
[0114] Since the embodiment of the present application uses static model switching to replace the real-time physical simulation calculation in the running stage, the performance consumption during running can be greatly reduced, and this solution can be adapted to mobile platforms with limited performance.
[0115] 402. During the running stage of the target application, in response to meeting the scene destruction trigger condition, control the target application to switch from displaying the first virtual environment screen to displaying the second virtual environment screen. The first virtual environment screen includes the first static mesh body, and the second virtual environment screen includes the second static mesh body.
[0116] In some other embodiments, a geometric collision body also needs to be added to the first static mesh body corresponding before scene destruction for collision detection during game running, so as to trigger the scene destruction effect. That is, the solution provided by the embodiment of the present application also includes: adding a geometric collision body to the first static mesh body during the editing stage of the target application, where the geometric collision body is used for collision detection during the running stage; among them, the collision body is a type of physical component that needs to be added to a game object (such as the static model in this article) to trigger a collision.
[0117] Exemplarily, the scene destruction trigger condition includes but is not limited to: the first static mesh body collides with a virtual weapon or virtual ammunition in the virtual environment.
[0118] Among them, the virtual weapons include, but are not limited to, virtual firearms and virtual cold weapons; the virtual ammunition is a virtual ordnance item containing gunpowder, explosives or other fillers, which can damage the target or complete other tactical tasks after explosion. The virtual ammunition includes, but is not limited to: bullets, shells, grenades, rifle grenades, aerial bombs, rockets, missiles, torpedoes, depth charges, mines, landmines, blasting cartridges, blasting charge packs, blasting devices, etc., and the embodiments of the present application do not specifically limit this.
[0119] Scene light pre-baking
[0120] In some other embodiments, the embodiments of the present application support stylized rendering performance relying on the static lighting model. As Figure 6 shown, since the embodiments of the present application rely on the static lighting model to complete the rendering, a scene lighting pre-baking process is also included.
[0121] Exemplarily, in the embodiments of the present application, the static model performance adopts a custom rendering pipeline. In another way of expression, the virtual environment picture presented by the game application is obtained by stylized rendering through the custom rendering pipeline; among them, the stylized rendering relies on the static lighting model; and the static lighting model corresponds to the static lighting and the static model in the virtual environment.
[0122] Among them, the rendering pipeline is the core component of real-time rendering. The function of the rendering pipeline is to generate or render a two-dimensional image by given scene elements such as a virtual camera, a scene object model, and a light source. For example, the three-dimensional object model in the game scene is transformed into a two-dimensional image on the display screen through the rendering pipeline. The rendering pipeline is an important tool for real-time rendering, and real-time rendering is inseparable from the rendering pipeline. The rendering pipeline mainly includes two functions: one is to transform the 3D coordinates of the object model into 2D coordinates in the screen space; the other is to color each pixel point of the display screen. The general process of the rendering pipeline includes: input of vertex data, vertex shader, tessellation process, geometry shader, primitive assembly, clipping and culling, rasterization, fragment shader, and blending test, etc.
[0123] Exemplarily, the custom rendering pipeline is created by game developers based on the game engine, and the embodiments of the present application do not specifically limit this.
[0124] In addition, since the stylized rendering pipeline in the game uses the static lighting model, in order to ensure the correct lighting performance before and after the scene is damaged, it is also necessary to ensure that the UV space arrangements of the lighting maps of the two sets of static meshes are the same, that is, the first static mesh and the second static mesh correspond to the same set of lighting maps. When rendering, the same set of lighting maps is sampled and decoded, and then coloring is achieved.
[0125] In addition, as Figure 6As shown, during the light information baking process, in the embodiment of the present application, only the first static mesh corresponding to before the scene destruction is subjected to light pre-baking. After the pre-baking is completed, the light map generated by the game engine is exported as an asset and associated with the material instances respectively referenced by the two groups of static meshes.
[0126] That is, the solution provided by the embodiment of the present application further includes: performing light pre-baking processing on the first static mesh (corresponding to the mesh component 1 in Figure 6 ) through the target engine to generate a light map; associating the light map with the first material instance referenced by the first static mesh (corresponding to the material instance 1 in Figure 6 ); and associating the light map with the second material instance (corresponding to the material instance 2 in Figure 6 ) referenced by the second static mesh (corresponding to the mesh component 2 in Figure 6 ).
[0127] Exemplarily, the above association method is an explicit association. Among them, the material instance is an instance of the material. It inherits from the material, has the shader logic of the material, and when the logic of the material is updated, all related material instances will also be updated accordingly.
[0128] Dynamic process editing
[0129] In some other embodiments, the dynamic process of scene destruction is completely controllable and is edited by the art production staff according to requirements. When the game runs, the pre-settings of the art production staff are fully restored.
[0130] Exemplarily, as Figure 7 shown, the following information involved in the scene destruction process can be edited simultaneously in the multi-track timeline manner. For example, the trigger range, model switching dynamics, and additional special effect dynamics can be edited simultaneously through multiple timelines. Among them, during the dynamic process editing stage, the information that the art production staff can pre-edit includes but is not limited to the following several types:
[0131] (1) The triggering action range of the scene destruction effect and the triggering conditions of the scene destruction effect;
[0132] As Figure 7 shown, the information of this type of editing is managed by the trigger component in the scene destruction trigger module.
[0133] (2) The spatial position movement information after triggering the scene destruction effect. The spatial position movement information includes the position, rotation angle, and scaling ratio of the second static mesh;
[0134] As Figure 7 shown, the information of this type of editing is managed by the mesh component in the scene destruction management module.
[0135] (3) The special effect presentation types of the additional special effect module. Among them, the special effect presentation types include bone animation and particle special effects.
[0136] As Figure 7 shown, the information edited in this category is managed by the bone animation component and the particle system component in the additional special effect module. Among them, bone animation has many advantages compared with frame-by-frame animation. For example, pictures are bound to bones to achieve animation, which can more conveniently change the equipment of game characters. Moreover, bone animations can be blended. For example, a game character can both shoot and walk, run, jump or swim. After the art production staff creates the bone animation, the game developer can use the game engine to run the bone animation. The particle system provides convenience for implementing realistic and natural random special effects (such as explosions, fireworks, water flows), and a particle editor can be used to create the particle system.
[0137] It should be noted that the information pre-edited by the art production staff above is serialized in the form of corresponding components in each module and integrated into game assets to facilitate instantiation according to the needs of game logic during game operation. That is, during the game operation stage, the solution provided by the embodiment of the present application further includes: obtaining serialized data, where the serialized data is obtained by serializing the above pre-edited information; instantiating the serialized data according to the scene destruction trigger condition.
[0138] In another embodiment, the solution provided by the embodiment of the present application further includes: during the game operation stage, in response to satisfying the scene destruction trigger condition, displaying bone animation; or, during the game operation stage, in response to satisfying the scene destruction trigger condition, displaying particle special effects; where the particle special effects include but are not limited to explosion special effects, flame special effects and flash special effects.
[0139] Exemplarily, assuming that the type of scene destruction is terrain destruction, then displaying particle special effects includes: displaying particle special effects that match the surface type information of the terrain destruction trigger position. For example, if the surface type information matching the terrain destruction trigger position is grassland, the particle special effect can be a flame special effect. For example, the visual effect of the grassland being burned can be presented.
[0140] The method provided by the embodiment of the present application has the following beneficial effects:
[0141] In the editing stage, the embodiment of the present application creates two sets of static model resources. One set of static model resources corresponds to before the scene is destroyed, and the other set of static model resources corresponds to after the scene is destroyed. Both sets of static model resources are imported into the engine to form static meshes. Based on this, in the running stage, the embodiment of the present application realizes replacing real-time physical simulation calculation with static model switching. Therefore, the performance consumption during running can be significantly reduced, and the hardware requirements for mobile devices are relatively low. So this solution can be adapted to mobile platforms with limited performance.
[0142] In addition, the dynamic process of scene destruction is completely controllable and is edited by art production personnel according to requirements. When the game runs, it completely restores the preset of art production personnel.
[0143] In addition, the embodiment of the present application also supports stylized rendering performance dependent on the static lighting model.
[0144] Figure 8 It is a schematic structural diagram of a screen control device based on a virtual environment provided by the embodiment of the present application. Refer to Figure 8 The device includes:
[0145] An editing unit 801, configured to import a first static model into a target engine during the editing stage of a target application to form a first static mesh; the first static model is an original object model corresponding to before the scene is destroyed;
[0146] The editing unit 801 is further configured to import a second static model into the target engine to form a second static mesh; the second static model is an object model with a scene destruction effect corresponding to after the scene is destroyed, and the second static model is obtained by geometric dissection of the first static model;
[0147] A running unit 802, configured to, during the running stage of the target application, in response to satisfying a scene destruction trigger condition, control the target application to switch from displaying a first virtual environment screen to displaying a second virtual environment screen. The first virtual environment screen includes the first static mesh, and the second virtual environment screen includes the second static mesh.
[0148] The device provided by the embodiment of the present application creates two sets of static model resources in the editing stage. One set of static model resources corresponds to before the scene is destroyed, and the other set of static model resources corresponds to after the scene is destroyed. Both sets of static model resources are imported into the engine to form static meshes. Based on this, in the running stage, the embodiment of the present application realizes replacing real-time physical simulation calculation with static model switching. Therefore, the performance consumption during running can be significantly reduced, and the hardware requirements for mobile devices are relatively low. So this solution can be adapted to mobile platforms with limited performance.
[0149] In a possible implementation, the editing unit 801 is further configured to add a geometric collision body to the first static mesh during the editing phase, and the geometric collision body is used for collision detection during the running phase;
[0150] Wherein, the scene destruction trigger condition includes: the first static mesh collides with a virtual weapon or virtual ammunition in the virtual environment.
[0151] In a possible implementation, the running unit 802 is further configured to display a skeletal animation during the running phase in response to satisfying the scene destruction trigger condition; or, display particle effects during the running phase in response to satisfying the scene destruction trigger condition;
[0152] Wherein, the particle effects include explosion effects, flame effects, and flash effects.
[0153] In a possible implementation, the type of scene destruction is terrain destruction, and the running unit 802 is further configured to display particle effects that match the surface type information of the terrain destruction trigger position.
[0154] In a possible implementation, during the editing phase, the editing data related to the scene destruction effect includes:
[0155] The trigger range of the scene destruction effect and the trigger condition of the scene destruction effect;
[0156] The spatial position movement information after triggering the scene destruction effect, and the spatial position movement information includes the position, rotation angle, and scaling ratio of the second static mesh;
[0157] The special effect presentation type, and the special effect presentation type includes skeletal animation and particle effects.
[0158] In a possible implementation, during the running phase, the running unit 802 is further configured to obtain serialized data, and the serialized data is obtained by serializing the editing data; instantiate the serialized data according to the scene destruction trigger condition.
[0159] In a possible implementation, the first virtual environment image and the second virtual environment image are obtained by stylized rendering through a custom rendering pipeline;
[0160] Wherein, the stylized rendering depends on a static lighting model; the static lighting model corresponds to static lighting and static models in the virtual environment.
[0161] In a possible implementation, the first static mesh body and the second static mesh body correspond to the same set of light maps.
[0162] In a possible implementation, the editing unit 801 is further configured to:
[0163] Perform light pre-baking processing on the first static mesh body through the target engine to generate the light map;
[0164] Associate the light map with the first material instance referenced by the first static mesh body;
[0165] Associate the light map with the second material instance referenced by the second static mesh body.
[0166] All of the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present disclosure, which will not be elaborated here one by one.
[0167] It should be noted that: when the above-described screen control device based on a virtual environment performs screen control, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the above-described screen control device based on a virtual environment and the embodiment of the screen control method based on a virtual environment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be elaborated here.
[0168] Figure 9 The structural block diagram of a computer device 900 provided by an exemplary embodiment of the present application is shown. The computer device 900 may be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer or a desktop computer. The computer device 900 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
[0169] Generally, the computer device 900 includes: a processor 901 and a memory 902.
[0170] The processor 901 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0171] The memory 902 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 902 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage media in the memory 902 is used to store at least one program code, and the at least one program code is used to be executed by the processor 901 to implement the method for controlling a screen based on a virtual environment provided in the method embodiments of the present application.
[0172] In some embodiments, the computer device 900 may further optionally include: a peripheral device interface 903 and at least one peripheral device. The processor 901, the memory 902, and the peripheral device interface 903 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 903 through a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, and a power supply 909.
[0173] The peripheral device interface 903 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.
[0174] The radio frequency circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 904 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so on. The radio frequency circuit 904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, each generation of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 904 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.
[0175] The display screen 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to collect touch signals on or above the surface of the display screen 905. The touch signals can be input as control signals to the processor 901 for processing. At this time, the display screen 905 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there can be one display screen 905, which is set on the front panel of the computer device 900; in other embodiments, there can be at least two display screens 905, which are respectively set on different surfaces of the computer device 900 or are in a folding design; in other embodiments, the display screen 905 can be a flexible display screen, which is set on a curved surface or a folding surface of the computer device 900. Even more, the display screen 905 can also be set as an irregular non-rectangular shape, that is, an irregular-shaped screen. The display screen 905 can be prepared using materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0176] The camera assembly 906 is used to collect images or videos. Optionally, the camera assembly 906 includes a front camera and a rear camera. Generally, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera respectively, to implement functions such as the combination of the main camera and the depth-of-field camera to achieve the background blurring function, the combination of the main camera and the wide-angle camera to achieve panoramic shooting and VR (Virtual Reality) shooting functions, or other combined shooting functions. In some embodiments, the camera assembly 906 can also include a flash. The flash can be a single-color-temperature flash or a two-color-temperature flash. A two-color-temperature flash refers to the combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.
[0177] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 901 for processing, or input to the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 900. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 907 may further include a headphone jack.
[0178] The power supply 909 is used to supply power to each component in the computer device 900. The power supply 909 may be alternating current, direct current, a disposable battery or a rechargeable battery. When the power supply 909 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charging technology.
[0179] In some embodiments, the computer device 900 further includes one or more sensors 910. The one or more sensors 910 include but are not limited to: an acceleration sensor 911, a gyroscope sensor 912, a pressure sensor 913, an optical sensor 915, and a proximity sensor 916.
[0180] The acceleration sensor 911 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the computer device 900. For example, the acceleration sensor 911 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 911. The acceleration sensor 911 can also be used for collecting game or user's motion data.
[0181] The gyroscope sensor 912 can detect the body direction and rotation angle of the computer device 900. The gyroscope sensor 912 can cooperate with the acceleration sensor 911 to collect the 3D actions of the user on the computer device 900. According to the data collected by the gyroscope sensor 912, the processor 901 can achieve the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0182] The pressure sensor 913 can be disposed on the side frame of the computer device 900 and / or the lower layer of the display screen 905. When the pressure sensor 913 is disposed on the side frame of the computer device 900, it can detect the holding signal of the user on the computer device 900, and the processor 901 can perform left and right hand recognition or quick operation according to the holding signal collected by the pressure sensor 913. When the pressure sensor 913 is disposed on the lower layer of the display screen 905, the processor 901 can control the operable controls on the UI interface according to the pressure operation of the user on the display screen 905. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0183] The optical sensor 915 is used to collect the ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 according to the ambient light intensity collected by the optical sensor 915. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is decreased. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 915.
[0184] The proximity sensor 916, also known as the distance sensor, is usually disposed on the front panel of the computer device 900. The proximity sensor 916 is used to collect the distance between the user and the front of the computer device 900. In one embodiment, when the proximity sensor 916 detects that the distance between the user and the front of the computer device 900 is gradually decreasing, the processor 901 controls the display screen 905 to switch from the lit screen state to the off screen state; when the proximity sensor 916 detects that the distance between the user and the front of the computer device 900 is gradually increasing, the processor 901 controls the display screen 905 to switch from the off screen state to the lit screen state.
[0185] Those skilled in the art can understand that Figure 9 the structure shown in does not constitute a limitation on the computer device 900, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
[0186] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including program code, and the above program code can be executed by a processor in a computer device to complete the method for controlling a screen based on a virtual environment in the above embodiment. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0187] In an exemplary embodiment, a computer program product or a computer program is also provided. The computer program product or the computer program includes computer program code, and the computer program code is stored in a computer-readable storage medium. A processor of the computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, so that the computer device executes the above method for controlling a screen based on a virtual environment.
[0188] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiment can be completed by hardware, or can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, or an optical disc, etc.
[0189] The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling a screen based on a virtual environment, characterized in that, The method includes: In the editing stage of the target application, importing a first static model into the target engine to form a first static mesh; the first static model is the original object model corresponding to before the scene destruction, and the original object corresponding to the first static model is a static object in the virtual environment; Importing a second static model into the target engine to form a second static mesh; the second static model is the object model with the scene destruction effect corresponding to after the scene destruction, and the second static model is obtained by geometric dissection of the first static model; In the editing stage, obtaining editing data related to the scene destruction effect, performing serialization processing on the editing data to obtain serialized data, and storing the serialized data; the editing data is predefined data, and the editing data includes spatial position movement information after triggering the scene destruction effect, and the spatial position movement information includes the position, rotation angle, and scaling ratio of the second static mesh; In the running stage of the target application, in response to satisfying the scene destruction trigger condition, controlling the target application to switch from displaying a first virtual environment screen to displaying a second virtual environment screen, the first virtual environment screen includes the first static mesh, and the second virtual environment screen includes the second static mesh; In the running stage, obtaining the stored serialized data, and instantiating the serialized data according to the scene destruction trigger condition, so that the second static mesh is displayed according to the spatial position movement information after the scene destruction effect.
2. The method according to claim 1, characterized in that, The method further includes: In the editing stage, adding a geometric collision body to the first static mesh, and the geometric collision body is used for collision detection in the running stage; Wherein, the scene destruction trigger condition includes: the first static mesh collides with a virtual weapon or virtual ammunition in the virtual environment.
3. The method according to claim 1, characterized in that The method further includes: In the running stage, in response to satisfying the scene destruction trigger condition, displaying a skeletal animation; or, In the running stage, in response to satisfying the scene destruction trigger condition, displaying particle effects; Wherein, the particle effects include explosion effects, flame effects, and flash effects.
4. The method according to claim 3, wherein The type of the scene destruction is terrain destruction, and the displaying of the particle effects includes: Displaying particle effects matching the surface type information of the terrain destruction trigger position.
5. The method according to claim 1, wherein The editing data related to the scene destruction effect further includes: The triggering action range of the scene destruction effect and the triggering condition of the scene destruction effect; The special effect presentation type, and the special effect presentation type includes skeletal animation and particle effects.
6. The method according to claim 1, characterized in that, The first virtual environment screen and the second virtual environment screen are obtained by stylized rendering through a custom rendering pipeline; Wherein, the stylized rendering depends on a static lighting model; the static lighting model corresponds to static lighting and static models in the virtual environment.
7. The method according to claim 6, wherein The first static mesh and the second static mesh correspond to the same set of light maps.
8. The method according to claim 6 or 7, characterized in that The method further includes: The target engine performs light baking on the first static mesh to generate the light map; Associate the light map with a first material instance referenced by the first static mesh; Associate the light map with a second material instance referenced by the second static mesh.
9. A screen control device based on a virtual environment, characterized in that The device includes: An editing unit configured to import a first static model into a target engine during an editing stage of a target application to form a first static mesh; the first static model is an original object model corresponding to before a scene destruction, and the original object corresponding to the first static model is a static object in a virtual environment; The editing unit is further configured to import a second static model into the target engine to form a second static mesh; the second static model is an object model with a scene destruction effect corresponding to after the scene destruction, and the second static model is obtained by geometric dissection of the first static model; The editing unit is further configured to, during the editing stage, obtain editing data related to the scene destruction effect, perform serialization processing on the editing data to obtain serialized data, and store the serialized data; the editing data is predefined data, and the editing data includes spatial position movement information after triggering the scene destruction effect, and the spatial position movement information includes the position, rotation angle, and scaling ratio of the second static mesh; A running unit configured to, during a running stage of the target application, in response to satisfying a scene destruction trigger condition, control the target application to switch from displaying a first virtual environment screen to displaying a second virtual environment screen, where the first virtual environment screen includes the first static mesh, and the second virtual environment screen includes the second static mesh; The running unit is further configured to, during the running stage, obtain the stored serialized data, and instantiate the serialized data according to the scene destruction trigger condition, so that the second static mesh is displayed according to the spatial position movement information after the scene destruction effect.
10. The device according to claim 9, characterized in that The editing unit is further configured to, during the editing stage, add a geometric collision body to the first static mesh, and the geometric collision body is used for collision detection during the running stage; Wherein, the scene destruction trigger condition includes: the first static mesh collides with a virtual weapon or virtual ammunition in the virtual environment.
11. The device according to claim 9, characterized in that, The running unit is further configured to, during the running stage, in response to satisfying the scene destruction trigger condition, display a skeletal animation; or, during the running stage, in response to satisfying the scene destruction trigger condition, display a particle effect; Wherein, the particle effect includes an explosion effect, a flame effect, and a flash effect.
12. The device according to claim 11, characterized in that, The type of the scene destruction is terrain destruction, and the running unit is further configured to display a particle effect matching the surface type information of the terrain destruction trigger position.
13. The device according to claim 9, characterized in that, The editing data related to the scene destruction effect further includes: The trigger action range of the scene destruction effect and the trigger condition of the scene destruction effect; Special effect presentation types, including skeletal animation and particle effects.
14. The device according to claim 9, wherein, The first virtual environment image and the second virtual environment image are obtained through stylized rendering by a custom rendering pipeline; Among them, the stylized rendering depends on a static lighting model; the static lighting model corresponds to static lighting and static models in the virtual environment.
15. The device according to claim 14, characterized in that, The first static mesh and the second static mesh correspond to the same set of light maps.
16. The device according to claim 14 or 15, characterized in that, The editing unit is further configured to: Perform light baking processing on the first static mesh through the target engine to generate the light map; Associate the light map with the first material instance referenced by the first static mesh; Associate the light map with the second material instance referenced by the second static mesh.
17. A computer device, characterized in that, The device includes a processor and a memory. At least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the virtual environment-based screen control method according to any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that, At least one program code is stored in the storage medium, and the at least one program code is loaded and executed by a processor to implement the virtual environment-based screen control method according to any one of claims 1 to 8.
19. A computer program product, characterized in that, The computer program product includes computer program code stored in a computer-readable storage medium. The processor of the computer device reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code, causing the computer device to execute the virtual environment-based screen control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Unity 3D-based game scene tree destroying method
CN112891948A
Game system and information storing medium
JP2001204957A