CN112915536A - Rendering method and device of virtual model - Google Patents

Rendering method and device of virtual model Download PDF

Info

Publication number
CN112915536A
CN112915536A CN202110361951.1A CN202110361951A CN112915536A CN 112915536 A CN112915536 A CN 112915536A CN 202110361951 A CN202110361951 A CN 202110361951A CN 112915536 A CN112915536 A CN 112915536A
Authority
CN
China
Prior art keywords
virtual model
rendering
target
maps
rendered
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110361951.1A
Other languages
Chinese (zh)
Other versions
CN112915536B (en
Inventor
郑健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110361951.1A priority Critical patent/CN112915536B/en
Publication of CN112915536A publication Critical patent/CN112915536A/en
Application granted granted Critical
Publication of CN112915536B publication Critical patent/CN112915536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images

Abstract

The invention discloses a rendering method and device of a virtual model. Wherein, the method comprises the following steps: acquiring at least one virtual model participating in mirror reflection and a plurality of maps corresponding to the virtual model; screening the surface to be rendered of at least one virtual model to obtain a target virtual model; carrying out size optimization processing on the multiple maps to obtain a target map; and rendering the target virtual model in the reflective camera according to the target map. The invention solves the technical problem of high rendering consumption of rendering specular reflection in the prior art.

Description

Rendering method and device of virtual model
Technical Field
The invention relates to the field of image rendering, in particular to a rendering method and device of a virtual model.
Background
With the development of computer technology, people have higher and higher requirements on game experience in games. In order to improve the experience degree of people in game, the terminal equipment running the game renders the game scene in game.
In order to improve the reality of the game scene, mirror reflection rendering is often performed on smooth ground, glass, mirrors and the like in the game scene. If accurate reflection rendering needs to be realized, all virtual models in a game scene need to be acquired in real time so as to ensure that the mirror reflection effect is accurate at all angles.
In the existing solutions, a camera opposite to the main camera is usually used to capture all virtual models in the game scene, render the captured virtual models, and project the rendered virtual models onto a reflection plane to simulate the effect of specular reflection.
Although the method can ensure that the effect of specular reflection is accurate and controllable, all the reflected virtual models need to be rendered once more, so that the overall rendering consumption of the rendering system is increased, namely the number, the number of surfaces, the number of materials and the like of the virtual models are multiplied, and the rendering consumption is increased.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a rendering method and a rendering device of a virtual model, which are used for at least solving the technical problem of high rendering consumption in rendering specular reflection in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a rendering method of a virtual model, including: acquiring at least one virtual model participating in mirror reflection and a plurality of maps corresponding to the virtual model; screening the surface to be rendered of at least one virtual model to obtain a target virtual model; carrying out size optimization processing on the multiple maps to obtain a target map; and rendering the target virtual model in the reflective camera according to the target map.
Further, the rendering method of the virtual model further comprises: determining a model to be rendered, the model distance of which meets a preset condition, from at least one virtual model, wherein the model distance is the distance between the at least one virtual model and a game main camera; screening a target rendering surface from the surfaces to be rendered of the model to be rendered according to a preset rule; and generating a target virtual model according to the target rendering surface.
Further, the rendering method of the virtual model further comprises: acquiring the original sizes of a plurality of pictures; and adjusting the original sizes of the multiple maps to preset sizes to obtain the target map, wherein the preset sizes are smaller than the original sizes.
Further, the rendering method of the virtual model further comprises: before the multiple maps are subjected to size optimization processing to obtain a target map, removing preset attribute map channels corresponding to the multiple maps; and/or removing the preset material variants corresponding to the multiple maps.
Further, the rendering method of the virtual model further comprises: after the original sizes of the multiple maps are adjusted to be preset sizes, collecting mapping information contained in the multiple maps; and merging the plurality of size-adjusted maps based on the map information to obtain the target map.
Further, the rendering method of the virtual model further comprises: acquiring an original position of at least one virtual model before rendering a target virtual model in a reflective camera according to a target map; the target virtual model is set at the original position.
Further, the rendering method of the virtual model further comprises: the target virtual model is disposed in the reflective layer.
Further, the rendering method of the virtual model further comprises: and setting a reflecting layer in the reflecting camera, and rendering the target virtual model according to the target map.
Further, the rendering method of the virtual model further comprises: and eliminating the reflecting layer in the game master camera, and rendering at least one virtual model.
According to another aspect of the embodiments of the present invention, there is also provided a rendering apparatus of a virtual model, including: the acquisition module is used for acquiring at least one virtual model participating in mirror reflection and a plurality of maps corresponding to the virtual model; the screening module is used for screening the surface to be rendered of at least one virtual model to obtain a target virtual model; the processing module is used for carrying out size optimization processing on the multiple maps to obtain a target map; and the rendering module is used for rendering the target virtual model in the reflective camera according to the target map.
According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned rendering method of the virtual model when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: one or more processors and a storage device, wherein the storage device is configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a rendering method for executing a program, wherein the program is configured to execute the above-described virtual model when executed.
In the embodiment of the invention, a mode of reducing the number of the maps of the virtual models and reducing the size of the maps is adopted, after at least one virtual model participating in mirror reflection and a plurality of maps corresponding to the virtual model are obtained, a target virtual model is obtained by screening the surface to be rendered of the at least one virtual model, then size optimization processing is carried out on the plurality of maps to obtain a target map, and finally the target virtual model is rendered in the reflection camera according to the target map.
In the process, the target rendering surface to be rendered can be selected from the multiple surfaces to be rendered of the virtual model by screening the surfaces to be rendered of the virtual model, so that the number of surfaces rendered by the virtual model is reduced, and the rendering consumption of specular reflection is reduced. In addition, in the application, size optimization processing is further performed on multiple maps of the virtual model, so that the size of the maps is reduced, and rendering consumption of specular reflection is further reduced.
Therefore, the scheme provided by the application achieves the aim of performing mirror reflection rendering on a plurality of virtual models, so that the technical effect of reducing rendering consumption in the mirror reflection rendering process is achieved, and the technical problem that rendering consumption is large in the mirror reflection rendering process in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method for rendering a virtual model according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an alternative game scenario in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of an alternative game scenario in accordance with an embodiment of the present invention;
FIG. 4 is a schematic illustration of an alternative production target model according to an embodiment of the invention;
FIG. 5 is an interface diagram of an alternative rendering virtual model according to an embodiment of the invention;
FIG. 6 is a schematic view of an alternative setup interface for a game host according to an embodiment of the present invention;
FIG. 7 is a schematic view of an alternative placement interface for a reflective camera according to embodiments of the present invention;
fig. 8 is a schematic diagram of a rendering apparatus for a virtual model according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention 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 invention 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.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for rendering a virtual model, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system, such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
In addition, it should be noted that a terminal device (e.g., a mobile phone, a tablet, etc.) allowing a game may be an execution subject of the rendering method of the virtual model provided in the present embodiment.
Optionally, fig. 1 is a flowchart of a rendering method of a virtual model according to an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
step S102, at least one virtual model participating in mirror reflection and a plurality of maps corresponding to the virtual model are obtained.
In step S102, the virtual model is a model participating in mirror reflection in the game, such as a table, a chair on a smooth ground, a virtual character opposite to a mirror, trees and buildings beside a lake, and the like. In addition, each virtual model corresponds to multiple tiles, where each face of the virtual model corresponds to one tile, and typically, a virtual model has multiple faces.
In an alternative embodiment, the terminal device first determines a predetermined virtual object, such as a mirror, a smooth floor, a glass, a water surface, etc., that produces a mirror image effect from the game scene. Then, determining a virtual model which can be reflected by a preset virtual object in a game scene to obtain at least one virtual model participating in mirror reflection, and simultaneously, acquiring a plurality of maps corresponding to the virtual model by the terminal equipment.
It should be noted that, the scheme provided by this embodiment may obtain the virtual model and the multiple maps corresponding to the virtual model in the game scene during the game operation, and may also obtain the virtual model and the multiple maps corresponding to the virtual model in the process of creating the game in the early stage.
And step S104, carrying out surface to be rendered screening processing on at least one virtual model to obtain a target virtual model.
It should be noted that, during the process of rendering the virtual model, there may be surfaces that do not need to be rendered, for example, one surface of the virtual model a is attached to one surface of the virtual model B, and at this time, the surfaces attached to each other between the virtual models a and B do not need to be rendered.
In step S104, the to-be-rendered surface processing is performed on the virtual model, a surface that does not need to be rendered (for example, the above attaching surface) is removed from the plurality of surfaces of the virtual model, the to-be-rendered surface that needs to be rendered is selected, and only the to-be-rendered surface that needs to be rendered is rendered, thereby reducing rendering consumption.
And step S106, carrying out size optimization processing on the multiple maps to obtain the target map.
In step S106, the size optimization process may be performed on the plurality of maps, and the sizes of the plurality of maps may be reduced.
It should be noted that, the larger the size of the map is, the more system resources are consumed when rendering the virtual model, and under the condition that the display effect is not affected, the size of the map is appropriately reduced, so that the rendering consumption can be effectively reduced, and the rendering efficiency is improved.
And step S108, rendering the target virtual model in the reflective camera according to the target map.
In step S108, the reflection camera is a virtual camera automatically generated by the game program, and captures an inverted image of the virtual model based on the reflection plane opposite to the shooting direction of the game host camera, so as to achieve the effect of simulating mirror reflection. The reflection camera can change in real time along with the position change of the game main camera, and the game main camera is a main visual angle camera used for rendering all image information in a game scene during game running.
It should be noted that the terminal device may only enable the reflection camera to render the target virtual model, and the game host camera does not render the target virtual model any more, so that the rendering times of the target virtual model are reduced, and the rendering consumption is reduced. Moreover, the target virtual model rendered by the reflex camera is the virtual model with the reduced number of maps and the reduced size of the maps, so that compared with the existing method for directly rendering the virtual model, the method provided by the embodiment can effectively reduce rendering consumption.
Based on the solutions defined in steps S102 to S108, it can be known that, in the embodiment of the present invention, after at least one virtual model participating in mirror reflection and multiple maps corresponding to the virtual model are obtained by reducing the number of maps of the virtual model and reducing the size of the maps, a target virtual model is obtained by performing to-be-rendered surface screening processing on the at least one virtual model, then size optimization processing is performed on the multiple maps to obtain a target map, and finally, the target virtual model is rendered in the reflex camera according to the target map.
It is easy to note that, in the above process, by performing to-be-rendered surface screening processing on the virtual model, a target rendering surface to be rendered can be selected from a plurality of to-be-rendered surfaces of the virtual model, so that the number of surfaces rendered by the virtual model is reduced, and rendering consumption of specular reflection is reduced. In addition, in the application, size optimization processing is further performed on multiple maps of the virtual model, so that the size of the maps is reduced, and rendering consumption of specular reflection is further reduced.
Therefore, the scheme provided by the application achieves the aim of performing mirror reflection rendering on a plurality of virtual models, so that the technical effect of reducing rendering consumption in the mirror reflection rendering process is achieved, and the technical problem that rendering consumption is large in the mirror reflection rendering process in the prior art is solved.
In an optional embodiment, after obtaining at least one virtual model participating in mirror reflection and multiple maps corresponding to the virtual model, the terminal device performs to-be-rendered surface screening processing on the at least one virtual model to obtain a target virtual model. Specifically, the terminal device determines a model to be rendered, of which the model distance meets a preset condition, from at least one virtual model, then screens out a target rendering surface from the surfaces to be rendered of the model to be rendered according to a preset rule, and generates a target virtual model according to the target rendering surface. Wherein, the model distance is the distance between at least one virtual model and the game main camera.
Optionally, the terminal device obtains a distance (i.e., a model distance) between at least one virtual model participating in the mirror reflection and the game host camera, compares the model distances corresponding to each virtual model, and determines a preset number of virtual models closest to each other as the models to be rendered. Then, the terminal device screens out a target rendering surface from a plurality of to-be-rendered surfaces of the to-be-rendered model. The terminal equipment can screen the target rendering surface according to whether the sight direction and the illumination direction corresponding to the main game camera on the surface to be rendered of the virtual model are the same. For example, the terminal device obtains a sight vector corresponding to a sight direction corresponding to a game master camera on a surface to be rendered of the virtual model and an illumination vector corresponding to an illumination direction, and calculates a dot product result of the sight vector and the illumination vector, if the dot product result is greater than 0, the sight direction corresponding to a main camera on the surface to be rendered of the virtual model is represented to be the same as the illumination direction, and at the moment, the terminal device marks the surface to be rendered as a target rendering surface; if the dot product result is not greater than 0, it indicates that the sight line direction is not the same as the illumination direction, and at this time, the terminal device does not mark the to-be-rendered logo, that is, the to-be-rendered logo is not the target rendering face.
In an optional embodiment, after the target virtual model is obtained, the terminal device further performs size optimization on the multiple maps to obtain the target map. Specifically, the terminal device obtains the original sizes of the multiple maps, and adjusts the original sizes of the multiple maps to preset sizes to obtain the target map, wherein the preset sizes are smaller than the original sizes. For example, the terminal device adjusts a plurality of tiles having a pixel size of 1024 × 1024 to a tile having a pixel size of 320 × 320.
It should be noted that the preset size may be set by a game developer, or the size of the map may be adjusted according to a preset proportion, where the preset proportion may be determined according to image information of the map and/or actual requirements, for example, in actual applications, if the map needs to be displayed in high definition, a preset proportion with a smaller value may be set; for another example, the definition of the map is relatively high, but in practical application, a preset ratio with a relatively large value is set without displaying the map in a high definition.
In an optional embodiment, before performing size optimization processing on the multiple maps to obtain the target map, the terminal device may further remove preset attribute map channels corresponding to the multiple maps; and/or removing the preset material variants corresponding to the multiple maps.
It should be noted that, in the game, the terminal device may render the virtual model using the physical material of PBR (physical-Based Rendering), but the calculation is relatively complex, and the pixel precision of the used map is typically 128 pixels/meter. However, in most cases, the reflection image does not require too much fine detail, so in the present application, the purpose of reducing the rendering consumption of the target virtual model can be achieved by simplifying the complexity of the material. For example, removing the attribute mapping channel that expresses texture (i.e., pre-setting the attribute mapping channel), reducing texture variations, using the simplest color mapping, and reducing mapping accuracy, e.g., compressing mapping accuracy to 32 pixels/m or less.
The rendering consumption can be further reduced on the basis of the existing scheme by any one of the three modes.
In an optional embodiment, after the original sizes of the multiple maps are adjusted to the preset size, the terminal device further acquires the map information included in the multiple maps, and combines the multiple maps after the size adjustment based on the map information to obtain the target map.
It should be noted that a set of maps includes a basic color map, a metallization map, a roughness map, a normal map, and the like. These maps work together in the same material, affecting different attributes to achieve different material effects. Wherein, a set of maps comprises one or more maps, depending on the technology used.
Alternatively, a simple scenario is taken as an example for explanation, for example, in the game scenario shown in fig. 2, the big cube is composed of 8 independent small cubes, and each small cube has an independent material, where a dotted line portion in fig. 2 represents a mirror image of the big cube through a mirror surface, a value of Batches corresponding to fig. 2 is 24, a value of TRIS corresponding to 19.4k, and a value of SetPass calls corresponding to 24. After the specular reflection is turned off, for example, in the game scene with the specular reflection turned off shown in fig. 3, the number of faces to be rendered is reduced by 9600 faces, the value of Batches is 12, the value corresponding to TRIS is 9.8k, the value corresponding to SetPass calls is 12, and the values corresponding to Batches and SetPass calls are both reduced, where the reduced parts are the number of faces, the number of individuals, and the number of materials of eight small cubes.
Further, based on the scenes shown in fig. 2 and 3, the multiple maps corresponding to the minicubes in fig. 2 and 3 are merged. Alternatively, the three-dimensional production software such as MAX may be used to produce, and finally obtain a map with 12 triangular surfaces, for example, a map corresponding to a cube in a white frame in the schematic diagram of the production target model shown in fig. 4.
It should be noted that, in the baking software MAX, by re-expanding the target virtual model, information of multiple maps corresponding to the target virtual model is collected into one map, and the map is the target map corresponding to the target virtual model.
Through the process, the whole model with lower surface number can be obtained, and the maps of the target virtual model are combined into one set, so that a set of optimized low-model maps can be obtained.
In an alternative embodiment, the terminal device further obtains an original position of the at least one virtual model and sets the target virtual model at the original position before rendering the target virtual model in the reflex camera according to the target map.
Optionally, the optimized target map is imported into a game engine, and the target virtual model is placed at a position overlapping with the virtual model in the original scene. For example, in the interface of the rendering virtual model shown in fig. 5, the macrocube (i.e., the target virtual model) after the face to be rendered is subjected to the filtering process is placed at the position of the macrocube before the face to be rendered is subjected to the filtering process.
In an alternative embodiment, after obtaining the target map, the terminal device further sets the target virtual model in the reflective layer. For example, in fig. 5, the large cube (i.e., the target virtual model) after the surface to be rendered is filtered is individually layered and disposed in the Reflection layer (i.e., the Reflection layer).
Optionally, the terminal device sets a reflective layer in the reflective camera, renders the target virtual model according to the target map, removes the reflective layer from the game master camera, and renders at least one virtual model. For example, in the setting interface of the game master camera shown in fig. 6, the game master camera culling layer is set; in the setting interface of the reflective camera shown in fig. 7, the specular reflection script is set to render only the reflection layer.
In another alternative embodiment, the reflective layer is removed from the game master camera and at least one virtual model is rendered, i.e. the game master camera only renders the virtual model in the non-reflective layer.
In the above, the specular reflection script is a reflection script added to the plane in the game engine to realize a real-time specular reflection effect. The specular reflection script may set parameters such as the degree of blurring of the reflection, the hierarchical culling of the content of the reflection, etc. Rendering culling means that the game master camera culls the images acquired by the game master camera through a layer (e.g., a Reflection layer), and if the layer in which the virtual model is set to be culled by the camera, the camera does not render the virtual model any more.
It should be noted that, in the game engine, each virtual model may perform layer setting, where the type of the layer may be defined according to actual needs. Setting up different layers can realize performing different processing on virtual models in different layers when rendering the virtual models, for example, in this embodiment, the rendering rejection of the game master camera can be realized by setting up a reflective layer.
Furthermore, when the game is run, the virtual model is not rendered according to the merged mapping (namely the target mapping) in the game master camera, but the virtual model is rendered according to the mapping before merging, and the target virtual model is rendered only according to the merged mapping in the reflection camera, so that the consumption of the rendering model is reduced.
After the scheme provided by the application is adopted to render the large cube in fig. 2, the corresponding value of Batches is 17, the value corresponding to TRIS is 9.8k, and the value corresponding to SetPass caps is 17. Therefore, after the number of the maps of the virtual model is reduced and the size of the maps is reduced, the combined maps are used for rendering the target virtual model, rendering data are obviously improved after the combined maps participate in reflection, the consumption required by the operation of a game engine is eliminated, the rendering consumption of the virtual model is reduced to half of the original consumption, and the rendering effect is not obviously reduced.
According to the scheme, the reflection rendering consumption can be reduced on the premise that the reflection effect is not influenced, the high-quality effect can be achieved, and the game running performance can be improved. Moreover, the scheme provided by the method has strong flexibility, and in practical application, the complexity of the virtual model material, the mapping precision and the like can be further reduced according to the effect requirement, so that the purpose of effectively reducing the rendering consumption is achieved. In addition, the virtual model in the game scene can be partitioned, blocked, integrated and optimized according to the size of the game scene, so that the number of simultaneously rendered faces is further reduced. Finally, the scheme provided by the application can flexibly adopt different scheme combinations according to the data of the actual QA test.
According to an embodiment of the present invention, an embodiment of a rendering apparatus for a virtual model is further provided, where fig. 8 is a schematic diagram of the rendering apparatus for a virtual model according to the embodiment of the present invention, and as shown in fig. 8, the apparatus includes: an acquisition module 801, a screening module 803, a processing module 805, and a rendering module 807.
The acquiring module 801 is configured to acquire at least one virtual model participating in mirror reflection and multiple corresponding maps thereof; the screening module 803 is configured to perform screening processing on a to-be-rendered surface of at least one virtual model to obtain a target virtual model; the processing module 805 is configured to perform size optimization on multiple maps to obtain a target map; a rendering module 807 for rendering the virtual model of the object in the reflex camera according to the object map.
It should be noted that the acquiring module 801, the screening module 803, the processing module 805, and the rendering module 807 correspond to steps S102 to S108 in the foregoing embodiment, and the four modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in the foregoing embodiment.
Optionally, the screening module includes: the device comprises a first determining module, a screening submodule and a generating module. The first determining module is used for determining a model to be rendered, the model distance of which meets a preset condition, from at least one virtual model, wherein the model distance is the distance between the at least one virtual model and the game main camera; the screening submodule is used for screening a target rendering surface from the surfaces to be rendered of the model to be rendered according to a preset rule; and the generating module is used for generating a target virtual model according to the target rendering surface.
Optionally, the processing module includes: the device comprises a first obtaining module and an adjusting module. The first obtaining module is used for obtaining the original sizes of the multiple pictures; and the adjusting module is used for adjusting the original sizes of the multiple maps into preset sizes to obtain the target maps, wherein the preset sizes are smaller than the original sizes.
Optionally, the rendering apparatus for a virtual model further includes: the device comprises a first processing module and a second processing module. The first processing module is used for removing preset attribute mapping channels corresponding to the plurality of mapping before size optimization processing is carried out on the plurality of mapping to obtain a target mapping; and/or the second processing module is used for removing the preset material variants corresponding to the multiple maps.
Optionally, the rendering apparatus for a virtual model further includes: the device comprises an acquisition module and a merging module. The device comprises an acquisition module, a display module and a control module, wherein the acquisition module is used for acquiring the mapping information contained in a plurality of mapping after the original sizes of the plurality of mapping are adjusted to be preset sizes; and the merging module is used for merging the plurality of size-adjusted maps based on the map information to obtain the target map.
Optionally, the rendering apparatus for a virtual model further includes: the device comprises a second acquisition module and a setting module. The second obtaining module is used for obtaining the original position of at least one virtual model before the target virtual model is rendered in the reflection camera according to the target map; and the setting module is used for setting the target virtual model at the original position.
Optionally, the rendering module includes: a first setting module for setting the target virtual model in the reflective layer.
Optionally, the rendering module includes: and the second setting module is used for setting a reflecting layer in the reflecting camera and rendering the target virtual model according to the target map.
Optionally, the rendering apparatus for a virtual model further includes: and the rendering submodule is used for eliminating the reflecting layer in the game main camera and rendering at least one virtual model.
According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned rendering method of the virtual model when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including: one or more processors and a storage device, wherein the storage device is configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a rendering method for executing a program, wherein the program is configured to execute the above-described virtual model when executed.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, 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 embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or 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 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 invention 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 integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: 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 foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A method for rendering a virtual model, comprising:
acquiring at least one virtual model participating in mirror reflection and a plurality of maps corresponding to the virtual model;
screening the surface to be rendered of the at least one virtual model to obtain a target virtual model;
carrying out size optimization processing on the multiple maps to obtain a target map;
and rendering the target virtual model in a reflective camera according to the target map.
2. The method according to claim 1, wherein performing a to-be-rendered surface screening process on the at least one virtual model to obtain a target virtual model comprises:
determining a model to be rendered, wherein the model distance meets a preset condition, from the at least one virtual model, wherein the model distance is the distance between the at least one virtual model and a game host computer;
screening a target rendering surface from the surfaces to be rendered of the model to be rendered according to a preset rule;
and generating the target virtual model according to the target rendering surface.
3. The method of claim 1, wherein performing a size optimization process on the plurality of maps to obtain a target map comprises:
acquiring the original sizes of the multiple maps;
and adjusting the original sizes of the multiple maps to preset sizes to obtain the target map, wherein the preset sizes are smaller than the original sizes.
4. The method of claim 3, wherein before performing the size optimization on the plurality of maps to obtain the target map, the method further comprises:
removing preset attribute mapping channels corresponding to the plurality of mapping; and/or the presence of a gas in the gas,
and removing the preset material variants corresponding to the plurality of maps.
5. The method of claim 3, wherein after resizing the original size of the plurality of tiles to the preset size, the method further comprises:
collecting the mapping information contained in the plurality of mappings;
and merging the plurality of maps after the size is adjusted based on the map information to obtain the target map.
6. The method of claim 5, wherein prior to rendering the target virtual model in a reflective camera according to the target map, the method further comprises:
acquiring an original position of the at least one virtual model;
setting the target virtual model at the original position.
7. The method of claim 1, wherein rendering the target virtual model in a reflective camera according to the target map comprises:
the target virtual model is disposed in a reflective layer.
8. The method of claim 7, wherein rendering the target virtual model in a reflective camera according to the target map comprises:
and setting the reflecting layer in the reflecting camera, and rendering the target virtual model according to the target map.
9. The method according to claim 7 or 8, characterized in that the method further comprises:
and eliminating the reflection layer in a game master camera, and rendering the at least one virtual model.
10. An apparatus for rendering a virtual model, comprising:
the acquisition module is used for acquiring at least one virtual model participating in mirror reflection and a plurality of maps corresponding to the virtual model;
the screening module is used for screening the surface to be rendered of the at least one virtual model to obtain a target virtual model;
the processing module is used for carrying out size optimization processing on the multiple maps to obtain a target map;
and the rendering module is used for rendering the target virtual model in a reflective camera according to the target map.
11. A non-volatile storage medium, in which a computer program is stored, wherein the computer program is arranged to execute a rendering method of a virtual model according to any one of claims 1 to 9 when running.
12. An electronic device, characterized in that the electronic device comprises: one or more processors and storage, wherein the storage is configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a method for running a program, wherein the program is arranged to perform the method for rendering a virtual model as claimed in any one of claims 1 to 9 when running.
CN202110361951.1A 2021-04-02 2021-04-02 Virtual model rendering method and device Active CN112915536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110361951.1A CN112915536B (en) 2021-04-02 2021-04-02 Virtual model rendering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110361951.1A CN112915536B (en) 2021-04-02 2021-04-02 Virtual model rendering method and device

Publications (2)

Publication Number Publication Date
CN112915536A true CN112915536A (en) 2021-06-08
CN112915536B CN112915536B (en) 2024-03-22

Family

ID=76173979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110361951.1A Active CN112915536B (en) 2021-04-02 2021-04-02 Virtual model rendering method and device

Country Status (1)

Country Link
CN (1) CN112915536B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113947657A (en) * 2021-10-18 2022-01-18 网易(杭州)网络有限公司 Target model rendering method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390288A (en) * 2012-05-09 2013-11-13 上海幻维数码创意科技有限公司 Three-dimensional rendering file rendering layer batch splitting processing system
CN106056658A (en) * 2016-05-23 2016-10-26 珠海金山网络游戏科技有限公司 Virtual object rendering method and virtual object rendering device
US20160378720A1 (en) * 2015-06-29 2016-12-29 Amazon Technologies, Inc. Dynamic adjustment of rendering parameters to optimize reading speed
CN108022285A (en) * 2017-11-30 2018-05-11 杭州电魂网络科技股份有限公司 Map rendering intent and device
CN109377546A (en) * 2018-12-07 2019-02-22 网易(杭州)网络有限公司 Virtual reality model rendering method and device
CN109603155A (en) * 2018-11-29 2019-04-12 网易(杭州)网络有限公司 Merge acquisition methods, device, storage medium, processor and the terminal of textures
CN110196746A (en) * 2019-05-30 2019-09-03 网易(杭州)网络有限公司 Interactive interface rendering method and device, electronic equipment, storage medium
CN111028361A (en) * 2019-11-18 2020-04-17 杭州群核信息技术有限公司 Three-dimensional model and material merging method, device, terminal, storage medium and rendering method
CN112274934A (en) * 2020-11-19 2021-01-29 网易(杭州)网络有限公司 Model rendering method, device, equipment and storage medium
CN112354187A (en) * 2020-11-12 2021-02-12 珠海剑心互动娱乐有限公司 Fog dispersal system based on GPU and fog dispersal generation method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103390288A (en) * 2012-05-09 2013-11-13 上海幻维数码创意科技有限公司 Three-dimensional rendering file rendering layer batch splitting processing system
US20160378720A1 (en) * 2015-06-29 2016-12-29 Amazon Technologies, Inc. Dynamic adjustment of rendering parameters to optimize reading speed
CN106056658A (en) * 2016-05-23 2016-10-26 珠海金山网络游戏科技有限公司 Virtual object rendering method and virtual object rendering device
CN108022285A (en) * 2017-11-30 2018-05-11 杭州电魂网络科技股份有限公司 Map rendering intent and device
CN109603155A (en) * 2018-11-29 2019-04-12 网易(杭州)网络有限公司 Merge acquisition methods, device, storage medium, processor and the terminal of textures
CN109377546A (en) * 2018-12-07 2019-02-22 网易(杭州)网络有限公司 Virtual reality model rendering method and device
CN110196746A (en) * 2019-05-30 2019-09-03 网易(杭州)网络有限公司 Interactive interface rendering method and device, electronic equipment, storage medium
CN111028361A (en) * 2019-11-18 2020-04-17 杭州群核信息技术有限公司 Three-dimensional model and material merging method, device, terminal, storage medium and rendering method
CN112354187A (en) * 2020-11-12 2021-02-12 珠海剑心互动娱乐有限公司 Fog dispersal system based on GPU and fog dispersal generation method
CN112274934A (en) * 2020-11-19 2021-01-29 网易(杭州)网络有限公司 Model rendering method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113947657A (en) * 2021-10-18 2022-01-18 网易(杭州)网络有限公司 Target model rendering method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112915536B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN107993216B (en) Image fusion method and equipment, storage medium and terminal thereof
TWI451358B (en) Banana codec
CN103426163B (en) System and method for rendering affected pixels
JP7007348B2 (en) Image processing equipment
EP3534336B1 (en) Panoramic image generating method and apparatus
CN108475327A (en) three-dimensional acquisition and rendering
US20100315424A1 (en) Computer graphic generation and display method and system
KR20170134513A (en) How to Display an Object
CN107862718B (en) 4D holographic video capture method
CN110610546B (en) Video picture display method, device, terminal and storage medium
TW200426708A (en) A multilevel texture processing method for mapping multiple images onto 3D models
CN110689626A (en) Game model rendering method and device
CN112446939A (en) Three-dimensional model dynamic rendering method and device, electronic equipment and storage medium
CA2540538C (en) Stereoscopic imaging
CN108391116A (en) Total body scan unit based on 3D imaging technique and scan method
CN112915536A (en) Rendering method and device of virtual model
US11288774B2 (en) Image processing method and apparatus, storage medium, and electronic apparatus
Liu et al. Stereo-based bokeh effects for photography
CN112866507B (en) Intelligent panoramic video synthesis method and system, electronic device and medium
JP7387029B2 (en) Single-image 3D photography technology using soft layering and depth-aware inpainting
Matsuyama Exploitation of 3D video technologies
CN114066715A (en) Image style migration method and device, electronic equipment and storage medium
CN109729285A (en) Fuse lattice special efficacy generation method, device, electronic equipment and storage medium
CN116245741B (en) Image processing method and related device
CN108540790A (en) It is a kind of for the three-dimensional image acquisition method of mobile terminal, device and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant