CN117582669A - Virtual object model generation method and device, storage medium and electronic equipment - Google Patents

Virtual object model generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117582669A
CN117582669A CN202311623855.5A CN202311623855A CN117582669A CN 117582669 A CN117582669 A CN 117582669A CN 202311623855 A CN202311623855 A CN 202311623855A CN 117582669 A CN117582669 A CN 117582669A
Authority
CN
China
Prior art keywords
virtual object
target
layer
model
object material
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.)
Pending
Application number
CN202311623855.5A
Other languages
Chinese (zh)
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.)
Shanghai Neteasy Brilliant Network Technology Co ltd
Original Assignee
Shanghai Neteasy Brilliant Network Technology 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 Shanghai Neteasy Brilliant Network Technology Co ltd filed Critical Shanghai Neteasy Brilliant Network Technology Co ltd
Priority to CN202311623855.5A priority Critical patent/CN117582669A/en
Publication of CN117582669A publication Critical patent/CN117582669A/en
Pending legal-status Critical Current

Links

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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • 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/6009Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The present disclosure relates to the field of computer technologies, and in particular, to a virtual object model generating method, a virtual object model generating device, a computer readable storage medium, and an electronic device, where the method includes: acquiring an initial virtual object model; determining a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material; and rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model. By the technical scheme of the embodiment of the disclosure, the problem of poor rendering effect of the virtual object model in the related technology can be solved.

Description

Virtual object model generation method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a virtual object model generation method, a virtual object model generation apparatus, a computer-readable storage medium, and an electronic device.
Background
With the development of terminal equipment and game industry, a large number of games with different themes are developed to meet the demands of users.
In the related art, a virtual object model is generally manufactured by using software such as Maya (auto mask Maya) or 3ds Max (3 d modeling rendering and manufacturing software), UV (Texture Coordinate, texture coordinates) of the virtual object model is modified, then a texture of the virtual object model is manufactured, and finally the virtual object model is imported into UE4 (game Engine) to be rendered using virtual object materials.
However, in the scheme in the related art, in the game scene optimization stage, after the scene is subjected to the operation of dividing the level, the number of virtual object materials is greatly increased, so that the sampling times of the virtual object textures are more, the performance cost of the virtual object materials is further increased, the game frame rate is reduced, and the rendering effect of the virtual object model is poor.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure aims to provide a virtual object model generation method and device, a computer readable storage medium and electronic equipment, which can solve the problem of poor rendering effect of a virtual object model in the related art.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a virtual object model generating method, which is characterized in that the method includes: acquiring an initial virtual object model; wherein the initial virtual object model corresponds to a target grade; determining a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates; determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material; rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model; the target virtual object model is a virtual object model of a virtual object material with a target grade.
According to a second aspect of the present disclosure, there is provided a virtual object model generating apparatus, characterized in that the apparatus includes: the initial model acquisition module is used for acquiring an initial virtual object model; wherein the initial virtual object model corresponds to a target grade; an instance template determining module, configured to determine a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates; the target material determining module is used for determining a target virtual object material instance based on the target virtual object material instance template, and mixing the plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material; the target model rendering module is used for rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model; the target virtual object model is a virtual object model of a virtual object material with a target grade.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the virtual object model generation method of the first aspect as in the above-described embodiments.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising:
one or more processors; and
and a memory for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the virtual object model generation method as in the first aspect of the above embodiments.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
in the virtual object model generation method provided by the embodiment of the disclosure, an initial virtual object model may be acquired, a target virtual object material instance template is determined in a plurality of virtual object material instance templates based on a target grade, a target virtual object material instance is determined based on the target virtual object material instance template, a plurality of virtual object layers are mixed based on the target virtual object material instance to obtain a target virtual object material, and the initial virtual object model is rendered through the target virtual object material to obtain a target virtual object model, wherein the target virtual object model is a virtual object model of a virtual object material with the target grade. According to the scheme, the target virtual object material instance template can be determined based on the target grade, the target virtual object material to be applied is determined based on the target virtual object material template, the virtual object model is rendered according to the target virtual object material, the virtual object material to be applied can be determined according to game requirements, the number of virtual object materials and the sampling times can be adaptively adjusted, the overall performance cost of the virtual object material is further reduced, the overall game frame rate is improved, and the rendering effect of the virtual object model is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort. In the drawings:
FIG. 1 schematically illustrates a schematic diagram of an exemplary system architecture of a virtual object model generation method in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a virtual object model generation method in an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of rendering vertex color information for an initial virtual object model through a visualization interface in an exemplary embodiment of the present disclosure;
FIG. 4a schematically illustrates a schematic view of a rendering effect of a virtual object model without drawing vertex color information to the initial virtual object model in an exemplary embodiment of the present disclosure;
FIG. 4b schematically illustrates a schematic diagram of a rendering effect of a virtual object model for rendering vertex color information to an initial virtual object model in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of a blend mask texture in an exemplary embodiment of the present disclosure;
FIG. 6 schematically illustrates a schematic of a diffuse reflective texture in an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a schematic diagram of a hybrid texture in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a schematic diagram of a detail texture in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a schematic diagram of a target virtual object model rendered in an exemplary embodiment of the present disclosure including a road surface, a roadside, a graticule, and a footprint;
FIG. 10a schematically illustrates a schematic view of a set of coordinate points in different quadrants in an exemplary embodiment of the present disclosure;
FIG. 10b schematically illustrates a complementary and communicating relative positions within the quadrant in which each coordinate point is located in an exemplary embodiment of the present disclosure;
FIG. 11 schematically illustrates a schematic diagram of various virtual object topologies in an exemplary embodiment of the disclosure;
FIG. 12a schematically illustrates a schematic diagram of filling a first direction coordinate range with a position where a topological neutral line is located as a middle position of the first direction coordinate range in an exemplary embodiment of the present disclosure;
FIG. 12b schematically illustrates another example of filling a first direction coordinate range with a position of a topological neutral line as an intermediate position of the first direction coordinate range in an example embodiment of the disclosure;
FIG. 13 schematically illustrates a schematic diagram of filling a first direction coordinate range with a position of a topological neutral line as a middle position of the first direction coordinate range in an exemplary embodiment of the present disclosure;
FIG. 14 schematically illustrates a schematic diagram of a plurality of target virtual object models rendered by aspects of the present disclosure in an exemplary embodiment of the present disclosure;
FIG. 15 schematically illustrates a flowchart of another method of generating a virtual object model in an exemplary embodiment of the present disclosure;
FIG. 16 schematically illustrates a composition diagram of a virtual object model generating apparatus in an exemplary embodiment of the present disclosure;
fig. 17 schematically shows a schematic of a computer system suitable for use in implementing the electronic device of the exemplary embodiments of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the disclosed aspects may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more software-hardened modules, or in different networks and/or processor devices and/or microcontroller devices.
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which the virtual object model generation method of embodiments of the present disclosure may be applied.
As shown in fig. 1, system architecture 1000 may include one or more of terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 serves as a medium for providing a communication link between the terminal apparatuses 1001, 1002, 1003 and the server 1005. The network 1004 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 1005 may be a server cluster formed by a plurality of servers.
A user can interact with a server 1005 via a network 1004 using terminal apparatuses 1001, 1002, 1003 to receive or transmit messages or the like. The terminal devices 1001, 1002, 1003 may be various electronic devices having a display screen including, but not limited to, smartphones, tablet computers, portable computers, desktop computers, and the like. In addition, the server 1005 may be a server providing various services.
In one embodiment, an execution subject of the virtual object model generating method of the present disclosure may be a server 1005, where the server 1005 may obtain an initial virtual object model sent by the terminal device 1001, 1002, 1003, where the initial virtual object model corresponds to a target class, determine a target virtual object material instance template from a plurality of virtual object material instance templates based on the target class, where the virtual object material instance template is used to indicate a virtual object layer to be used, the plurality of virtual object material instance templates include a target virtual object material instance template, determine a target virtual object material instance based on the target virtual object material instance template, mix the plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material, and render the initial virtual object model through the target virtual object material to obtain a target virtual object model, where the target virtual object model is a virtual object model with a virtual object material of the target class.
In addition, the virtual object model generating method of the present disclosure may be further executed by the terminal device 1001, 1002, 1003, etc. to obtain an initial virtual object model, where the initial virtual object model corresponds to a target class, a target virtual object material instance template is determined from a plurality of virtual object material instance templates based on the target class, where the virtual object material instance template is used to indicate a virtual object layer to be used, the plurality of virtual object material instance templates include a target virtual object material instance template, a target virtual object material instance is determined based on the target virtual object material instance template, a plurality of virtual object layers are mixed based on the target virtual object material instance to obtain a target virtual object material, and the initial virtual object model is rendered by the target virtual object material to obtain a target virtual object model, where the target virtual object model is a virtual object model of the virtual object material with the target class.
In addition, the implementation procedure of the generation method of the screen special effects of the present disclosure may also be jointly implemented by the terminal apparatuses 1001, 1002, 1003 and the server 1005. For example, the terminal device 1001, 1002, 1003 may obtain an initial virtual object model, where the initial virtual object model corresponds to a target level, determine a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level, where the virtual object material instance templates are used to indicate virtual object layers to be used, the plurality of virtual object material instance templates include target virtual object material instance templates, determine a target virtual object material instance based on the target virtual object material instance templates, mix the plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material, and send the obtained target virtual object material to the server 1005, so that the server 1005 may render the initial virtual object model through the target virtual object material to obtain the target virtual object model, where the target virtual object model is a virtual object model with the virtual object material of the target level.
With the development of terminal equipment and game industry, a large number of games with different themes are developed to meet the demands of users.
In the related art, a virtual object model is generally created by using software such as Maya or 3ds Max, UV of the virtual object model is modified, textures of the virtual object model are then created, and finally the virtual object model is imported into the UE4, and is rendered using a virtual object material.
However, in the scheme in the related art, in the game scene optimization stage, after the scene is subjected to the operation of dividing the level, the number of virtual object materials is greatly increased, so that the sampling times of the virtual object textures are more, the performance cost of the virtual object materials is further increased, the game frame rate is reduced, and the rendering effect of the virtual object model is poor.
In an example embodiment of the present disclosure, an initial virtual object model may be obtained, a target virtual object material instance template may be determined from a plurality of virtual object material instance templates based on a target level, a target virtual object material instance may be determined based on the target virtual object material instance template, a plurality of virtual object layers may be mixed based on the target virtual object material instance to obtain a target virtual object material, and the initial virtual object model may be rendered by the target virtual object material to obtain the target virtual object model.
Referring to fig. 2, a flowchart illustrating a virtual object model generation method in the present exemplary embodiment may include the steps of:
step S210, an initial virtual object model is obtained; wherein the initial virtual object model corresponds to a target grade;
step S220, determining a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates;
step S230, determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material;
step S240, rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model; the target virtual object model is a virtual object model of a virtual object material with a target grade.
In the virtual object model generation method provided by the embodiment of the disclosure, an initial virtual object model may be acquired, a target virtual object material instance template is determined in a plurality of virtual object material instance templates based on a target grade, a target virtual object material instance is determined based on the target virtual object material instance template, a plurality of virtual object layers are mixed based on the target virtual object material instance to obtain a target virtual object material, and the initial virtual object model is rendered through the target virtual object material to obtain a target virtual object model, wherein the target virtual object model is a virtual object model of a virtual object material with the target grade. According to the scheme, the target virtual object material instance template can be determined based on the target grade, the target virtual object material to be applied is determined based on the target virtual object material template, the virtual object model is rendered according to the target virtual object material, the virtual object material to be applied can be determined according to game requirements, the number of virtual object materials and the sampling times can be adaptively adjusted, the overall performance cost of the virtual object material is further reduced, the overall game frame rate is improved, and the rendering effect of the virtual object model is further improved.
Next, steps S210 to S240 of the virtual object model generation method in the present exemplary embodiment will be described in more detail with reference to fig. 2 and the embodiment.
Step S210, an initial virtual object model is obtained; wherein the initial virtual object model corresponds to a target grade;
in one example embodiment of the present disclosure, an initial virtual object model may be obtained. In particular, the initial virtual object model may be a virtual model created by the 3D interactive content authoring platform. For example, an initial virtual object model may be created by 3ds Max; alternatively, an initial virtual object model may be created by the UE 4. It should be noted that, the method for obtaining the initial virtual object model is not particularly limited in this disclosure.
In one example embodiment of the present disclosure, the initial virtual object model may contain a Level of Detail (three-dimensional model complexity).
In one example embodiment of the present disclosure, the virtual object model corresponds to a target level. In particular, the target level may be used to indicate a level or degree of quality to be rendered by the virtual object model. Specifically, the higher the target level, the higher the level or degree of quality to be rendered by the virtual object model; the lower the target level, the lower the level or degree of quality that the virtual object model is to render.
For example, in a game, an image quality level may be set, which may be used to indicate the rendering quality or degree of a virtual object model within the game, and may be set as a target level of an initial virtual object model.
It should be noted that, the determination method of the target level corresponding to the initial virtual object model is not particularly limited in this disclosure.
Step S220, determining a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level;
in an example embodiment of the present disclosure, after the initial virtual object model is obtained through the above steps and the target level corresponding to the virtual object model is determined, a target virtual object material instance template may be determined from a plurality of virtual object material instance templates based on the target level. The virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates. Specifically, the multiple virtual object material instance templates have different grades, and the target virtual object material instance template corresponding to the target grade can be determined from the multiple virtual object material instance templates, so that the combinations of virtual object layers used in the different virtual object material instance templates are different.
Specifically, the virtual object materials corresponding to the plurality of virtual object material instance templates are different, for example, in the virtual object material instance template corresponding to the high level, the roughness information for realizing the virtual object material is derived from the roughness texture in the B color channel of the mixed texture, and in the virtual object material instance template corresponding to the low level, the roughness information for realizing the virtual object material is derived from the constant parameter node.
For example, the number of virtual object layers is 3, namely layer a, layer B, and layer C, and the combination of the 3 virtual object layers includes: layer A, layer B, layer C, layer A, layer B, layer C, and the combination of the above layers can form a plurality of virtual object material instance templates.
For example, in a racing scenario, the virtual object layers may include a normal asphaltic surface layer, an older asphaltic surface layer, a water stain layer, and so forth.
In one example embodiment of the present disclosure, creating a virtual object material instance template may effectively reduce the number of shader variants after compilation of the racetrack material. Specifically, when the modified virtual object material is stored in the material editor, the modified virtual object material needs to be recompiled, and the rendering effect of the modified virtual object material can be previewed after compiling is completed. The number of shader variants compiled for different virtual object material instance templates is different.
It should be noted that, the number of virtual object layers corresponding to the virtual object model and a specific manner of obtaining the plurality of virtual object material instance templates based on the plurality of virtual object layers are not limited in this disclosure.
Step S230, determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material;
in one example embodiment of the present disclosure, after the target virtual object material instance template is obtained through the above steps, a target virtual object material instance may be determined based on the target virtual object material instance template. Specifically, in the target virtual object material instance template, a plurality of adjustable instance parameters are provided, the plurality of adjustable instance parameters can be adjusted and selected, a target virtual object material instance is determined, and a plurality of virtual object layers are mixed based on the target virtual object material instance to obtain a target virtual object material.
Specifically, the target virtual object material instance template may be used to indicate a virtual object layer to be blended, and the target virtual object material instance determined based on the target virtual object material instance template may be used to indicate a specific instance parameter, and the target virtual object material to be applied when rendering the initial virtual object model may be determined based on the virtual object layer to be blended and the specific instance parameter.
In one example embodiment of the present disclosure, a target virtual object texture instance determined based on a target virtual object texture instance template may be renamed based on a naming convention of "mi_name_model type_hybrid layer_sample coordinate_layer type".
In one example embodiment of the present disclosure, blending the plurality of virtual object layers may include linearly interpolating the calculation results for each virtual object layer.
And step S240, rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model.
In an example embodiment of the present disclosure, after determining the target virtual object material through the above steps, the initial virtual object model may be rendered through the target virtual object material to obtain the target virtual object model. The target virtual object model is a virtual object model of a virtual object material with a target grade. Specifically, the target virtual object material may be used to indicate the appearance characteristics of the object, such as color, texture, reflection, etc., that is, the target virtual object material may be applied to the initial virtual object model, and the target virtual object model may be generated through a rendering process (e.g., illumination calculation and shadow generation).
In one example embodiment of the present disclosure, target virtual object materials may be applied to a Default lot (shading model) to enable rendering of an initial virtual object model.
In one example embodiment of the present disclosure, virtual object material instances are created based on virtual object material, i.e., virtual object material is a parent level and virtual object material instances are child levels. In the virtual object materials, the numerical value of the constant parameter is unique, and when a plurality of virtual object models use the same virtual object materials, the numerical value of the constant parameter of the virtual object materials is the same; constant parameters may be adjusted or selected at the virtual object texture instances, i.e., values of constant parameters of the virtual object texture instances may be different when multiple virtual object models use different virtual object texture instances.
In an example embodiment of the present disclosure, a target virtual object material may be selected at a material slot at a setting interface of an initial virtual object model, so as to render the initial virtual object model through the target virtual object material, to obtain a target virtual object model.
It should be noted that, in the present disclosure, the specific manner of rendering the initial virtual object model by using the target virtual object material to obtain the target virtual object model is not limited in particular.
In one example embodiment of the present disclosure, vertex color information drawn for an initial virtual object model may be obtained, and a plurality of virtual object layers may be blended based on the vertex color information to obtain a target virtual object material.
Specifically, when the target virtual object model is generated, vertex color information may be drawn for the initial virtual object model, where the vertex color information may be used to indicate a hybrid control manner of each virtual object layer in the initial virtual object model, and a plurality of virtual object layers may be mixed based on the vertex color information to obtain the target virtual object material. The blending control method may be used to indicate a blending range of each virtual object layer, and may blend a plurality of virtual object layers based on vertex color information to obtain a target virtual object material.
For example, the vertex color information includes the vertex color of the R channel, and the mixing range of the virtual object layer may be controlled based on the vertex color of the R channel.
In one example embodiment of the present disclosure, vertex color information may be drawn for an initial virtual object model through a visual interface. Specifically, an initial virtual object model can be set, grid volume drawing is performed, and a drawing function is used to determine a brush drawing radius and vertex color information of the initial virtual object model.
For example, as shown in fig. 3, the vertex color information is drawn for the initial virtual object model through the visual interface.
For example, as shown in fig. 4a, the rendering effect of the virtual object model is that the vertex color information is not drawn to the initial virtual object model; as shown in fig. 4b, to draw vertex color information to the initial virtual object model, the rendering effect of the virtual object model.
In one example embodiment of the present disclosure, a plurality of virtual object layers may be blended to obtain a target virtual object material based on vertex color information and blend mask textures. Wherein the blend mask texture is used to indicate blend detail information of each virtual object layer. In particular, in the blend mask texture, a blend mask for each virtual object layer may be included, and the blend mask may be used to indicate detail information of each virtual object layer when blending, for example, the blend mask may be noise. The method can determine a mode of mixing a plurality of virtual object layers by adopting the vertex color information and the blend mask texture at the same time, and blend the plurality of virtual object layers.
For example, a final blend mask may be determined based on the vertex color information and blend mask texture, and the multiple virtual object layers may be blended by the final blend mask.
It should be noted that, the method for obtaining the blend mask texture is not particularly limited in this disclosure.
In an example embodiment of the present disclosure, a plurality of virtual object layers may be blended to obtain a target virtual object material based on a plurality of color channel information in the vertex color information and a plurality of color channel information in the blend mask texture. Specifically, the vertex color information includes a plurality of color channels, each color channel corresponds to the vertex color channel information, and the blend mask texture also includes a plurality of color channels, each color channel corresponds to the mask color channel information, and when blending a plurality of virtual object layers, the plurality of virtual object layers may be blended based on each vertex color channel information and each mask color channel information, respectively.
For example, in the vertex color information, a plurality of color channels (RGB) are included; in blend mask texture, a plurality of color channels (RGB) are also included.
In one example embodiment of the present disclosure, the plurality of virtual object layers may be blended with vertex color channel information and mask color channel information for the same color channel.
In one example embodiment of the present disclosure, blending the first virtual object layer and the second virtual object layer based on the first vertex color channel information and the first mask color channel information to obtain a first intermediate virtual object layer; mixing the first intermediate virtual object image layer and the third virtual object image layer based on the second vertex color channel information and the second shade color channel information to obtain a second intermediate virtual object image layer; and mixing the second intermediate virtual object layer and the fourth virtual object layer based on the third vertex color channel information and the third shade color channel information to obtain the target virtual object material. The virtual object layers comprise a first virtual object layer, a second virtual object layer, a third virtual object layer and a fourth virtual object layer, the vertex color information comprises first vertex color channel information, second vertex color channel information and third vertex color channel information, and the mixed mask texture comprises first mask color channel information, second mask color channel information and third mask color channel information.
Specifically, when the virtual object layer has four layers, if only one layer of effect exists, mixing is not needed; for the two-layer blending effect, the first virtual object layer and the second virtual object layer may be blended based on the first vertex color channel information and the first mask color channel information; for the three-layer mixing effect, after the first virtual object image layer and the second virtual object image layer are mixed based on the first vertex color channel information and the first mask color channel information to obtain a first intermediate virtual object image layer, the second vertex color channel information and the second mask color channel information can be mixed with the first intermediate virtual object image layer and the third virtual object image layer on the basis of the first intermediate virtual object image layer to obtain a second intermediate virtual object image layer; for the four-layer mixing effect, after the second intermediate virtual object layer is obtained by mixing the first intermediate virtual object layer and the third virtual object layer based on the second vertex color channel information and the second mask color channel information, the target virtual object material may be obtained by mixing the second intermediate virtual object layer and the fourth virtual object layer based on the third vertex color channel information and the third mask color channel information.
For example, for a two-layer blending effect, blending the first virtual object layer and the second virtual object layer based on the vertex color channel information of the R channel and the mask color channel information of the R channel; aiming at the three-layer mixing effect, mixing the first virtual object image layer and the second virtual object image layer based on the vertex color channel information of the G channel and the shade color channel information of the G channel; for the four-layer blending effect, the first virtual object layer and the second virtual object layer are blended based on the vertex color channel information of the B channel and the mask color channel information of the B channel.
For example, as shown in fig. 5, a schematic diagram of a blend mask texture is shown.
In one example embodiment of the present disclosure, a blend mask of a plurality of color channels may be included in a blend mask texture corresponding to a virtual object layer. For example, a first virtual object layer blend mask for the R channel, a second virtual object layer blend mask for the G channel, a third virtual object layer blend mask for the B channel, and a global color for the a channel.
In an example embodiment of the present disclosure, a hybrid texture corresponding to each virtual object layer may be obtained, and a calculation result of the hybrid texture corresponding to each virtual object layer may be linearly interpolated to obtain a target virtual object material. Wherein the hybrid texture is used for indicating rendering related information of each virtual object layer. Specifically, each virtual object layer corresponds to a mixed texture, and the mixed texture may include various rendering related information, where the rendering related information may be used to indicate texture information to be applied when rendering the virtual object layer.
It should be noted that, the present disclosure is not limited to a specific type of rendering related information.
In one example embodiment of the present disclosure, the rendering-related information includes diffuse reflectance color information, normal information, roughness information, specular reflectance information.
In one example embodiment of the present disclosure, illumination information of a virtual object layer may be generated based on a mixed texture and a diffuse reflection texture, and rendering-related information of the virtual object layer may be generated based on the illumination information. Specifically, the diffuse reflection texture is used for simulating the diffuse reflection illumination effect of the surface, and diffuse reflection refers to the process that light is uniformly scattered and reflected on the surface of an object. Diffuse reflection illumination is light scattered in all directions after the light source irradiates the surface of an object, and the surface of the object presents natural, soft and uniform brightness distribution. In diffuse reflectance texturing, color information, texture maps, or other visual effects that affect the diffuse reflectance characteristics of the surface may be included.
For example, as shown in fig. 6, a schematic diagram of a diffuse reflection texture is shown.
Specifically, a mixed texture corresponding to a virtual object layer and a diffuse reflection texture corresponding to the virtual object layer may be obtained, illumination information of the virtual object layer may be generated based on the mixed texture corresponding to the virtual object layer and the diffuse reflection texture corresponding to the virtual object layer, the illumination information of the virtual object layer may be used to indicate an illumination effect of the virtual object layer, and rendering related information of the virtual object layer may be determined based on the illumination effect.
The specific manner of generating the rendering-related information of the virtual object layer based on the illumination information is not particularly limited in the present disclosure.
In one example embodiment of the present disclosure, the diffuse reflection texture for the plurality of color channels may be included in the diffuse reflection texture for the virtual object layer. Such as the diffuse reflectance texture of the R channel, the diffuse reflectance texture of the G channel, and the diffuse reflectance texture of the B channel.
In one example embodiment of the present disclosure, illumination information of a second virtual object layer is generated based on a mixed texture and a diffuse reflection texture, a first object edge mask is acquired, and the illumination information of an edge of the first virtual object layer is generated based on the first object edge mask, the mixed texture and the diffuse reflection texture such that a rendering effect of the illumination information of the edge of the first virtual object layer coincides with a rendering effect of the illumination information of the second virtual object layer.
Specifically, the virtual object material instance template includes a first object material instance template and a second object material instance template, that is, the target virtual object material to be applied includes two virtual object layers (a first virtual object layer and a second virtual object layer), when determining illumination information of the virtual object layer, illumination information of the second virtual object layer may be determined based on a mixed texture and a diffuse reflection texture of the virtual object layer, and the illumination information of the second virtual object layer may be used to render the second virtual object layer. And acquiring a first object edge mask, and generating illumination information of the edge of the first virtual object layer based on the first object edge mask, the mixed texture and the diffuse reflection texture, wherein the illumination information of the edge of the first virtual object layer can be used for rendering the edge of the second virtual object layer. The first object edge mask refers to a mask applied to an edge portion of the first virtual object layer, and the mask can enable irregular fluctuation to occur on the edge of the rendered first virtual object layer.
For example, as shown in fig. 7, a schematic diagram of a hybrid texture is shown.
In one example embodiment of the present disclosure, textures for multiple color channels may be included in a hybrid texture corresponding to a virtual object layer. Such as the normal texture of the R channel. Normal texture of G channel. Roughness texture of the B channel and specular reflection texture of the a channel.
In one example embodiment of the present disclosure, the illumination information of the other portion of the first virtual object layer except the edge portion may be generated by mixing textures and diffuse reflection textures, and the rendering-related information of the virtual object layer may be generated based on the illumination information of the other portion of the first virtual object layer except the edge portion, the illumination information of the edge of the first virtual object layer, and the illumination information of the second virtual object layer.
Specifically, the illumination information of the other part of the first virtual object layer than the edge part may be linearly mixed with the illumination information of the edge of the first virtual object layer using a Lerp function (linear interpolation function).
Further, a first object edge mask may be set in the a-channel of the diffuse reflection texture, and the edge-removed portion of the first virtual object layer and the edge of the first virtual object layer may be distinguished based on the first object edge mask.
In an example embodiment of the present disclosure, a virtual object material instance template includes a pavement material instance template and a roadside material instance template, the pavement material instance template is used to indicate a pavement layer to be used, the roadside material instance template is used to indicate a roadside layer to be used, and generating illumination information of the virtual object layer based on a mixed texture and a diffuse reflection texture includes: and generating illumination information of the roadside layer based on the mixed texture and the diffuse reflection texture, acquiring a pavement edge mask, and generating illumination information of the edge of the pavement layer based on the pavement edge mask, the mixed texture and the diffuse reflection texture, so that the rendering effect of the illumination information of the edge of the pavement layer is consistent with the rendering effect of the illumination information of the roadside layer.
In an example embodiment of the present disclosure, a plurality of virtual object layers may be mixed based on a target virtual object material instance to obtain a candidate virtual object material, and a detail texture may be mixed with the candidate virtual object material to obtain the target virtual object material. The detail texture is used for indicating texture information for forming material details, and comprises detail color textures and detail normal textures.
Specifically, after the target virtual object material instance is obtained through the above steps, a candidate virtual object material may be obtained by mixing multiple virtual object layers based on the target virtual object material instance. The detail texture is used for indicating texture information for forming material details, and comprises detail color textures and detail normal textures. In particular, detail textures may be used to achieve finer rendering effects, in detail textures may include detail color textures, which may be used to add more detail and change to the surface of the virtual object model, may contain various irregular, high frequency detail patterns or textures, such as micro-bumps, depressions, wear, deposits, wrinkles, etc. may be achieved. The detail normal texture can be used to add smaller, higher frequency details, by storing detail information in the normal direction of the surface, so that the illumination calculation can more accurately simulate the geometric details of the surface of the object, for example, tiny concave-convex, wrinkles, texture distortion, etc. can be realized.
After the target virtual object material instance is obtained through the steps, a plurality of virtual object layers can be mixed based on the target virtual object material instance to obtain candidate virtual object materials, and detail color textures and detail normal textures are overlapped on the basis of the candidate virtual object materials so as to achieve finer rendering effects.
In one example embodiment of the present disclosure, the detail texture may be granular noise that can be used to improve the problem of post-tile compression picture blurring for low performance terminal devices.
For example, as shown in fig. 8, a detailed texture is shown.
In one example embodiment of the present disclosure, textures for multiple color channels may be included in the detail textures corresponding to the virtual object layer. For example, the detail normal texture of the R channel, the detail normal texture of the G channel, the detail color texture of the B channel.
In an example embodiment of the present disclosure, the virtual object material instance templates include a first object material instance template for indicating a first virtual object layer to be used, a second object material instance template for indicating a second virtual object layer to be used, and a third object material instance template for indicating a third virtual object layer to be used.
Specifically, the virtual object material instance templates include a first object material instance template, a second object material instance template, and a third object material instance template, that is, three virtual object layers (a first virtual object layer, a second virtual object layer, and a third virtual object layer) are included in the target virtual object material to be applied, and the first object material instance template, the second object material instance template, and the third object material instance template may be used to generate the first virtual object layer, the second virtual object layer, and the third virtual object layer, respectively.
In an example embodiment of the present disclosure, the virtual object material instance templates include a road surface material instance template, a roadside material instance template, and a road sign material instance template, where the road surface material instance template is used to indicate a road surface layer to be used, the roadside material instance template is used to indicate a roadside layer to be used, and the road sign material instance template is used to indicate a road sign layer to be used. The road sign material can be used for rendering elements such as marked lines, tire marks and the like.
For example, as shown in fig. 9, the rendered target virtual object model includes a road surface, a roadside, a marking line, and a footprint.
In one example embodiment of the present disclosure, candidate virtual object textures are determined from a target virtual object texture instance; the candidate virtual object materials correspond to the material parameters of each virtual object layer, the material parameters of each virtual object layer are adjusted to obtain the target material parameters of each virtual object layer, and the target virtual object materials are generated based on the target material parameters of each virtual object layer. The candidate virtual object material corresponds to the material parameters of each virtual object layer.
Specifically, after determining the target virtual object texture, candidate virtual object textures may be generated based on the target virtual object texture, where the candidate virtual object textures include texture parameters of each virtual object layer, the target texture parameters of the virtual object layers may be determined by adjusting each texture parameter, and the target virtual object texture may be generated based on the target texture parameters of all the virtual object layers, that is, the target virtual object texture may be obtained after adjusting the multi-texture parameters in the candidate virtual object texture instance.
In one example embodiment of the present disclosure, the texture parameters may include diffuse reflectance texture parameters, blend texture parameters, PBR (Physically based rendering, physical-based rendering) effect parameters, and the like, as required for blending.
In one example embodiment of the present disclosure, the virtual object is a racetrack, the initial virtual object model includes an intersection virtual object model and a non-intersection virtual object model, and the map coordinates of model vertices of the intersection virtual object model and the non-intersection virtual object model are equal.
Specifically, the virtual object model has model vertices, and the virtual object model has corresponding map coordinates (e.g., UV coordinates), and the map coordinates of the model vertices of the intersection virtual object model and the non-intersection virtual object model are equal, that is, the virtual object model is connected with the map coordinates. The non-intersection virtual object model can comprise a straight road or a curved road, and the map coordinates of the non-intersection virtual object model are rectangular; the virtual object model of the turnout can comprise a three-way crossing or a complex crossing combined by the three-way crossing, and the map coordinates of the virtual object model of the turnout cannot be tiled in a single direction as a whole.
Specifically, the connection of the virtual object model and the map coordinates means that the map coordinates of the model vertices of the virtual object model are equal.
For example, model vertex a (Ua, va) of the virtual object model, model vertex B (Ub, vb), and if the values of the map coordinates of model vertex a and model vertex B are equal, it is that model vertex a is connected to model vertex B.
In an example embodiment of the present disclosure, the virtual object is a racetrack, the initial virtual object model includes a roundabout nested virtual object model, the roundabout nested virtual object model corresponds to a map coordinate, the map coordinate corresponds to a first direction coordinate and a second direction coordinate, a plurality of sets of coordinate points at adjacent positions of the map coordinate corresponding to the roundabout nested virtual object model are obtained, the first direction coordinates of the sets of coordinate points are the same, and a sum of fractional parts of the second direction coordinate of each set of coordinate points is one.
Specifically, the map coordinates of the ring island nested virtual object model cannot be connected, a plurality of groups of adjacent coordinate points are arranged at adjacent positions of the map coordinates corresponding to the ring island nested virtual object model, each group can comprise two coordinate points, the first direction coordinates of the coordinate points in the group are the same, and the sum of decimal parts of the second direction coordinates of the coordinate points is one.
Specifically, the map coordinates correspond to quadrants, the map coordinates of each quadrant may be 0 to 1, the texture may be mapped cyclically, if a set of coordinate points are in different quadrants, but the relative positions in the respective quadrants are complementary and connected, i.e. the texture mapping is seamless at the coordinate points.
For example, for adjacent coordinate points a (0, -1.4016), B (0,1.5984), where the first direction coordinates of coordinate point a and coordinate point B are the same, the sum of the fractional parts of the second direction coordinates of coordinate point a and coordinate point B is one, as shown in fig. 10a, a group of coordinate points are in different quadrants, but the relative positions in the respective quadrants are complementary and communicating, as shown in fig. 10B, i.e., the texture map is seamless at the coordinate points.
In one example embodiment of the present disclosure, an initial virtual object model is generated based on a virtual object topology.
Specifically, when the initial virtual object model is generated, a virtual object topological structure corresponding to the initial virtual object model can be firstly constructed, the virtual object topological structure can be used for indicating geometric connection relation and topological information in the virtual object model, and when the virtual object is created, the initial virtual object model is generated based on the virtual object topological structure, and a preliminary virtual object model is generated according to a preset virtual object topological structure.
In the process of generating an initial virtual object model based on the virtual object topology, geometric data such as model vertexes, edges, faces and the like can be added and adjusted, and the generated initial virtual object model is ensured to accord with the virtual object topology. The virtual object topology knot may be a dotted-line-plane layout of a polygon mesh, including a layout of map coordinates.
For example, as shown in fig. 11, a schematic diagram of various virtual object topologies is shown.
The virtual object topological structure corresponds to a mapping coordinate set, the mapping coordinate set corresponds to a first direction coordinate range and a second direction coordinate range, the virtual object topological structure corresponds to a topological center line, and the position of the topological center line is taken as the middle position of the first direction coordinate range to fill the first direction coordinate range.
Specifically, a central position of a map coordinate set corresponding to the virtual object topological structure can be determined, a line in a topological structure of the central position is used as a topological central line, and the position of the topological central line is used as a middle position of a first direction coordinate range to fill the first direction coordinate range.
For example, the first direction coordinate range is 0-1, the position of the topological centerline may be marked as (0.5, 0), and the first direction coordinate range may be marked as (0, 0) and (0, 1) at the end and end, respectively. I.e. the first direction coordinate range is uniformly filled to 0-1.
For example, as shown in fig. 12a and fig. 12b, a schematic diagram is shown in which the position of the topological centerline is taken as the middle position of the first direction coordinate range to fill the first direction coordinate range. The virtual object topology (the right part of the figure corresponds to the UV coordinates) may be stretched (the left part of the figure is obtained), the position of the topological center line of the stretched virtual object topology is taken as the middle position of the U coordinate range, for example, (0.5, 0), and the U coordinate range (0-1) is filled with the position of the topological center line as the middle position of the U coordinate range.
For example, as shown in fig. 13, a schematic diagram is shown in which the position of the topological centerline is taken as the middle position of the first direction coordinate range to fill the first direction coordinate range. The position of the topological neutral line of the virtual object topological structure can be used as the middle position of the U coordinate range, for example, (0.5, 0), and the U coordinate range (0-1) is filled by taking the position of the topological neutral line as the middle position of the U coordinate range.
In an example embodiment of the present disclosure, VS (Vertex Shader) instruction number (for describing attributes of model vertices, such as Vertex positions, texture coordinates, vertex colors, etc.), PS (Pixel Shader) instruction number (for describing features of pixels, such as rendered colors, depth, transparency, etc.), texture sample number may be used as a basis for determining performance of a material, where lower values represent better performance of the material. Through testing, in the process of generating the target virtual object model through the scheme disclosed by the invention, the VS instruction number, the PS instruction number and the texture sampling number of the target virtual object material are lower than those in the prior art.
As shown in fig. 14, a schematic diagram of a plurality of target virtual object models rendered by the scheme of the present disclosure is shown.
In an example embodiment of the present disclosure, as shown in fig. 15, a flowchart of a method for generating a virtual object model may include the following steps S1810 to S1820:
step S1501, acquiring an initial virtual object model; completion in C4D (Cinema 4D,3D modeling, animation, simulation, and rendering solution software);
step S1502, modifying the map coordinates of the initial virtual object model; completion in C4D;
step S1503, exporting a virtual object model file; completion in C4D;
step S1504, making a mapping to which the initial virtual object model is applied; completion in SD (Substance Designer, program texture generation software);
step S1505, merging the maps to which the initial virtual object model is applied; completed in SD;
step S1506, exporting a map file; completed in SD;
step S1507, importing the virtual object model file and the map file into the UE4; completion in UE4;
step S1508, creating a virtual object material; completion in UE4;
step S1509, implementing detail level layering in the texture editor; completion in UE4;
Step S1510, mixing the detail map with the normal map of the initial virtual object model in the texture editor; completion in UE 4;
step S1511, realizing material grading in a material editor; completion in UE 4;
step S1512, creating a plurality of virtual object material templates based on the material classification; completion in UE 4;
step S1513, determining a target virtual object material instance based on the target virtual object material instance template; completion in UE 4;
step S1514, setting candidate virtual object materials for the initial virtual object model; completion in UE 4;
step S1515, adjusting the material parameters in the candidate virtual object materials; completion in UE 4;
step S1516, drawing vertex color information for the initial virtual object model; completed in UE 4.
In the virtual object model generation method provided by the embodiment of the disclosure, an initial virtual object model may be acquired, a target virtual object material instance template is determined in a plurality of virtual object material instance templates based on a target grade, a target virtual object material instance is determined based on the target virtual object material instance template, a plurality of virtual object layers are mixed based on the target virtual object material instance to obtain a target virtual object material, and the initial virtual object model is rendered through the target virtual object material to obtain a target virtual object model, wherein the target virtual object model is a virtual object model of a virtual object material with the target grade. According to the scheme, the target virtual object material instance template can be determined based on the target grade, the target virtual object material to be applied is determined based on the target virtual object material template, the virtual object model is rendered according to the target virtual object material, the virtual object material to be applied can be determined according to game requirements, the number of virtual object materials and the sampling times can be adaptively adjusted, the overall performance cost of the virtual object material is further reduced, the overall game frame rate is improved, and the rendering effect of the virtual object model is further improved.
It is noted that the above-described figures are merely schematic illustrations of processes involved in a method according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
In addition, in an exemplary embodiment of the present disclosure, a virtual object model generating apparatus is also provided. Referring to fig. 16, a virtual object model generating apparatus 1600 includes an initial model acquisition module 1610, an instance template determination module 1620, a target material determination module 1630, and a target model rendering module 1640.
The initial model acquisition module is used for acquiring an initial virtual object model; wherein the initial virtual object model corresponds to a target grade; an instance template determining module, configured to determine a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates; the target material determining module is used for determining a target virtual object material instance based on the target virtual object material instance template, and mixing the plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material; the target model rendering module is used for rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model; the target virtual object model is a virtual object model of a virtual object material with a target grade.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the apparatus further includes: the vertex color information acquisition unit is used for acquiring vertex color information drawn for the initial virtual object model; the vertex color information is used for indicating a mixed control mode of each virtual object layer; and the first mixing unit is used for mixing the plurality of virtual object layers based on the vertex color information to obtain a target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the apparatus further includes: the second mixing unit is used for mixing the plurality of virtual object layers based on the vertex color information and the mixed mask texture to obtain a target virtual object material; wherein the blend mask texture is used to indicate blend detail information of each virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the blending of the plurality of virtual object layers based on the vertex color information and the blend mask texture to obtain the target virtual object material, the apparatus further includes: and the third mixing unit is used for mixing the plurality of virtual object layers based on the plurality of color channel information in the vertex color information and the plurality of color channel information in the mixed mask texture to obtain the target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object layer includes a first virtual object layer, a second virtual object layer, a third virtual object layer, and a fourth virtual object layer, the vertex color information includes first vertex color channel information, second vertex color channel information, and third vertex color channel information, the blend mask texture includes first mask color channel information, second mask color channel information, and third mask color channel information, and the blending of the plurality of virtual object layers based on the vertex color information and the blend mask texture results in a target virtual object material, the apparatus further includes: a first sub-mixing unit, configured to mix the first virtual object layer and the second virtual object layer based on the first vertex color channel information and the first mask color channel information to obtain a first intermediate virtual object layer; a second sub-mixing unit, configured to mix the first intermediate virtual object layer and the third virtual object layer based on the second vertex color channel information and the second mask color channel information to obtain a second intermediate virtual object layer; and the third sub-mixing unit is used for mixing the second intermediate virtual object image layer and the fourth virtual object image layer based on the third vertex color channel information and the third shade color channel information to obtain a target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the apparatus further includes: the mixed texture acquisition unit is used for acquiring mixed textures corresponding to each virtual object layer; the mixed texture is used for indicating rendering related information of each virtual object layer; and the interpolation calculation unit is used for carrying out linear interpolation on the calculation result of the mixed texture corresponding to each virtual object layer to obtain the target virtual object material.
In one exemplary embodiment of the present disclosure, the rendering-related information includes diffuse reflection color information, normal line information, roughness information, specular reflection information based on the foregoing scheme.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the apparatus further includes: and a first illumination information calculation unit for generating illumination information of the virtual object layer based on the mixed texture and the diffuse reflection texture, and generating rendering related information of the virtual object layer based on the illumination information.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object material instance template includes a first object material instance template, and a second object material instance template, where the first object material instance template is used to indicate a first virtual object layer to be used, the second object material instance template is used to indicate a second virtual object layer to be used, and the apparatus further includes: a second illumination information calculation unit for generating illumination information of a second virtual object layer based on the mixed texture and the diffuse reflection texture; and a first object edge mask acquisition unit configured to acquire a first object edge mask, and generate illumination information of an edge of the first virtual object layer based on the first object edge mask, the mixed texture, and the diffuse reflection texture, so that a rendering effect of the illumination information of the edge passing through the first virtual object layer is consistent with a rendering effect of the illumination information of the second virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the apparatus further includes: the candidate virtual object material obtaining unit is used for mixing the plurality of virtual object layers based on the target virtual object material instance to obtain candidate virtual object materials; the detail texture mixing unit is used for mixing detail textures of candidate virtual object materials to obtain target virtual object materials; the detail texture is used for indicating texture information for forming material details, and comprises detail color textures and detail normal textures.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object material instance template includes a first object material instance template, a second object material instance template, and a third object material instance template, where the first object material instance template is used to indicate a first virtual object layer to be used, the second object material instance template is used to indicate a second virtual object layer to be used, and the third object material instance template is used to indicate a third virtual object layer to be used.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the apparatus further includes: the candidate virtual object material determining unit is used for determining candidate virtual object materials according to the target virtual object material instance; wherein, the candidate virtual object material corresponds to the material parameters of each virtual object layer; and the material parameter adjustment unit is used for adjusting the material parameters of each virtual object layer to obtain the target material parameters of each virtual object layer, and generating target virtual object materials based on the target material parameters of each virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object is a track, the initial virtual object model includes an intersection virtual object model and a non-intersection virtual object model, and the map coordinates of model vertices of the intersection virtual object model and the non-intersection virtual object model are equal.
In an exemplary embodiment of the disclosure, based on the foregoing solution, the virtual object is a racetrack, the initial virtual object model includes a roundabout nested virtual object model, the roundabout nested virtual object model corresponds to a map coordinate, the map coordinate corresponds to a first direction coordinate and a second direction coordinate, a plurality of sets of coordinate points at adjacent positions of the map coordinate corresponding to the roundabout nested virtual object model are obtained, the first direction coordinates of the sets of coordinate points are the same, and a sum of fractional parts of the second direction coordinates of the sets of coordinate points is one.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the apparatus further includes: an initial virtual object model generation unit for generating an initial virtual object model based on the virtual object topology; the virtual object topological structure corresponds to a mapping coordinate set, the mapping coordinate set corresponds to a first direction coordinate range and a second direction coordinate range, the virtual object topological structure corresponds to a topological center line, and the position of the topological center line is taken as the middle position of the first direction coordinate range to fill the first direction coordinate range.
The virtual object model generating device provided by the embodiment of the disclosure may obtain an initial virtual object model, determine a target virtual object material instance template from a plurality of virtual object material instance templates based on a target level, determine a target virtual object material instance based on the target virtual object material instance template, mix a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material, and render the initial virtual object model through the target virtual object material to obtain a target virtual object model, wherein the target virtual object model is a virtual object model of a virtual object material with the target level. According to the scheme, the target virtual object material instance template can be determined based on the target grade, the target virtual object material to be applied is determined based on the target virtual object material template, the virtual object model is rendered according to the target virtual object material, the virtual object material to be applied can be determined according to game requirements, the number of virtual object materials and the sampling times can be adaptively adjusted, the overall performance cost of the virtual object material is further reduced, the overall game frame rate is improved, and the rendering effect of the virtual object model is further improved.
Since each functional module of the virtual object model generating apparatus according to the example embodiment of the present disclosure corresponds to a step of the example embodiment of the virtual object model generating method described above, for details not disclosed in the embodiment of the apparatus of the present disclosure, please refer to the embodiment of the virtual object model generating method described above in the present disclosure.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the virtual object model generation method is provided.
Those skilled in the art will appreciate that the various aspects of the present disclosure may be implemented as a system, method, or program product. Accordingly, various aspects of the disclosure may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" system.
An electronic device 1700 according to such an embodiment of the present disclosure is described below with reference to fig. 17. The electronic device 1700 shown in fig. 17 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 17, the electronic device 1700 is in the form of a general purpose computing device. The components of electronic device 1700 may include, but are not limited to: the at least one processing unit 1710, the at least one storage unit 1720, a bus 1730 connecting different system components (including the storage unit 1720 and the processing unit 1710), and a display unit 1740.
Wherein the storage unit stores program code that is executable by the processing unit 1710, such that the processing unit 1710 performs steps according to various exemplary embodiments of the present disclosure described in the above section of the "exemplary method" of the present specification. For example, the processing unit 1710 may perform step S210 shown in fig. 2, acquiring an initial virtual object model; wherein the initial virtual object model corresponds to a target grade; step S220, determining a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates; step S230, determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material; step S240, rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model; the target virtual object model is a virtual object model of a virtual object material with a target grade.
Based on the embodiments of the present disclosure, the following schemes may also be implemented:
in an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on a target virtual object material instance to obtain a target virtual object material includes: obtaining vertex color information drawn for an initial virtual object model; the vertex color information is used for indicating a mixed control mode of each virtual object layer; and mixing the plurality of virtual object layers based on the vertex color information to obtain the target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on vertex color information to obtain a target virtual object material includes: mixing the multiple virtual object layers based on the vertex color information and the mixed mask texture to obtain a target virtual object material; wherein the blend mask texture is used to indicate blend detail information of each virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, blending a plurality of virtual object layers based on vertex color information and blend mask textures to obtain a target virtual object material includes: and mixing the plurality of virtual object layers based on the plurality of color channel information in the vertex color information and the plurality of color channel information in the mixed mask texture to obtain the target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object layer includes a first virtual object layer, a second virtual object layer, a third virtual object layer, and a fourth virtual object layer, the vertex color information includes first vertex color channel information, second vertex color channel information, and third vertex color channel information, the blend mask texture includes first mask color channel information, second mask color channel information, and third mask color channel information, and blending the plurality of virtual object layers based on the vertex color information and the blend mask texture to obtain a target virtual object material includes: mixing the first virtual object image layer and the second virtual object image layer based on the first vertex color channel information and the first shade color channel information to obtain a first intermediate virtual object image layer; mixing the first intermediate virtual object image layer and the third virtual object image layer based on the second vertex color channel information and the second shade color channel information to obtain a second intermediate virtual object image layer; and mixing the second intermediate virtual object layer and the fourth virtual object layer based on the third vertex color channel information and the third shade color channel information to obtain the target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on a target virtual object material instance to obtain a target virtual object material includes: acquiring a mixed texture corresponding to each virtual object layer; the mixed texture is used for indicating rendering related information of each virtual object layer; and performing linear interpolation on the calculation results of the mixed textures corresponding to each virtual object layer to obtain the target virtual object material.
In one exemplary embodiment of the present disclosure, the rendering-related information includes diffuse reflection color information, normal line information, roughness information, specular reflection information based on the foregoing scheme.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the method further includes: illumination information of the virtual object layer is generated based on the mixed texture and the diffuse reflection texture, and rendering-related information of the virtual object layer is generated based on the illumination information.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, a virtual object material instance template includes a first object material instance template, and a second object material instance template, where the first object material instance template is used to indicate a first virtual object layer to be used, and the second object material instance template is used to indicate a second virtual object layer to be used, and generating illumination information of the virtual object layer based on a hybrid texture and a diffuse reflection texture includes: generating illumination information of a second virtual object layer based on the mixed texture and the diffuse reflection texture; and acquiring a first object edge mask, and generating illumination information of the edge of the first virtual object layer based on the first object edge mask, the mixed texture and the diffuse reflection texture so that the rendering effect of the illumination information of the edge of the first virtual object layer is consistent with the rendering effect of the illumination information of the second virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on a target virtual object material instance to obtain a target virtual object material includes: mixing a plurality of virtual object layers based on the target virtual object material instance to obtain candidate virtual object materials; mixing detail textures of candidate virtual object materials to obtain target virtual object materials; the detail texture is used for indicating texture information for forming material details, and comprises detail color textures and detail normal textures.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object material instance template includes a first object material instance template, a second object material instance template, and a third object material instance template, where the first object material instance template is used to indicate a first virtual object layer to be used, the second object material instance template is used to indicate a second virtual object layer to be used, and the third object material instance template is used to indicate a third virtual object layer to be used.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the method further includes: determining candidate virtual object materials according to the target virtual object material examples; wherein, the candidate virtual object material corresponds to the material parameters of each virtual object layer; and adjusting the material parameters of each virtual object layer to obtain target material parameters of each virtual object layer, and generating target virtual object materials based on the target material parameters of each virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object is a track, the initial virtual object model includes an intersection virtual object model and a non-intersection virtual object model, and the map coordinates of model vertices of the intersection virtual object model and the non-intersection virtual object model are equal.
In an exemplary embodiment of the disclosure, based on the foregoing solution, the virtual object is a racetrack, the initial virtual object model includes a roundabout nested virtual object model, the roundabout nested virtual object model corresponds to a map coordinate, the map coordinate corresponds to a first direction coordinate and a second direction coordinate, a plurality of sets of coordinate points at adjacent positions of the map coordinate corresponding to the roundabout nested virtual object model are obtained, the first direction coordinates of the sets of coordinate points are the same, and a sum of fractional parts of the second direction coordinates of the sets of coordinate points is one.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the method further includes: generating an initial virtual object model based on the virtual object topology; the virtual object topological structure corresponds to a mapping coordinate set, the mapping coordinate set corresponds to a first direction coordinate range and a second direction coordinate range, the virtual object topological structure corresponds to a topological center line, and the position of the topological center line is taken as the middle position of the first direction coordinate range to fill the first direction coordinate range.
According to the electronic device provided by the embodiment of the disclosure, an initial virtual object model can be obtained, a target virtual object material instance template is determined in a plurality of virtual object material instance templates based on a target grade, a target virtual object material instance is determined based on the target virtual object material instance template, a plurality of virtual object layers are mixed based on the target virtual object material instance to obtain a target virtual object material, the initial virtual object model is rendered through the target virtual object material to obtain a target virtual object model, and the target virtual object model is a virtual object model of the virtual object material with the target grade. According to the scheme, the target virtual object material instance template can be determined based on the target grade, the target virtual object material to be applied is determined based on the target virtual object material template, the virtual object model is rendered according to the target virtual object material, the virtual object material to be applied can be determined according to game requirements, the number of virtual object materials and the sampling times can be adaptively adjusted, the overall performance cost of the virtual object material is further reduced, the overall game frame rate is improved, and the rendering effect of the virtual object model is further improved.
Storage unit 1720 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 1721 and/or cache memory unit 1722, and may further include read only memory unit (ROM) 1723.
Storage unit 1720 may also include a program/utility 1724 having a set (at least one) of program modules 1725, such program modules 1725 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 1730 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, a graphics accelerator port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1700 may also communicate with one or more external devices 1770 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1700, and/or any device (e.g., router, modem, etc.) that enables the electronic device 1700 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 1750. Also, electronic device 1700 can communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, for example, the Internet, through network adapter 1760. As shown, network adapter 1760 communicates with other modules of electronic device 1700 via bus 1730. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 1700, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program product capable of implementing the method described above in the present specification is also provided. In some possible embodiments, the various aspects of the present disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the disclosure as described in the "exemplary methods" section of this specification, when the program product is run on the terminal device.
In one exemplary embodiment of the present disclosure, an initial virtual object model may be obtained; wherein the initial virtual object model corresponds to a target grade; determining a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates; determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material; rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model; the target virtual object model is a virtual object model of a virtual object material with a target grade.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on a target virtual object material instance to obtain a target virtual object material includes: obtaining vertex color information drawn for an initial virtual object model; the vertex color information is used for indicating a mixed control mode of each virtual object layer; and mixing the plurality of virtual object layers based on the vertex color information to obtain the target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on vertex color information to obtain a target virtual object material includes: mixing the multiple virtual object layers based on the vertex color information and the mixed mask texture to obtain a target virtual object material; wherein the blend mask texture is used to indicate blend detail information of each virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, blending a plurality of virtual object layers based on vertex color information and blend mask textures to obtain a target virtual object material includes: and mixing the plurality of virtual object layers based on the plurality of color channel information in the vertex color information and the plurality of color channel information in the mixed mask texture to obtain the target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object layer includes a first virtual object layer, a second virtual object layer, a third virtual object layer, and a fourth virtual object layer, the vertex color information includes first vertex color channel information, second vertex color channel information, and third vertex color channel information, the blend mask texture includes first mask color channel information, second mask color channel information, and third mask color channel information, and blending the plurality of virtual object layers based on the vertex color information and the blend mask texture to obtain a target virtual object material includes: mixing the first virtual object image layer and the second virtual object image layer based on the first vertex color channel information and the first shade color channel information to obtain a first intermediate virtual object image layer; mixing the first intermediate virtual object image layer and the third virtual object image layer based on the second vertex color channel information and the second shade color channel information to obtain a second intermediate virtual object image layer; and mixing the second intermediate virtual object layer and the fourth virtual object layer based on the third vertex color channel information and the third shade color channel information to obtain the target virtual object material.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on a target virtual object material instance to obtain a target virtual object material includes: acquiring a mixed texture corresponding to each virtual object layer; the mixed texture is used for indicating rendering related information of each virtual object layer; and performing linear interpolation on the calculation results of the mixed textures corresponding to each virtual object layer to obtain the target virtual object material.
In one exemplary embodiment of the present disclosure, the rendering-related information includes diffuse reflection color information, normal line information, roughness information, specular reflection information based on the foregoing scheme.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the method further includes: illumination information of the virtual object layer is generated based on the mixed texture and the diffuse reflection texture, and rendering-related information of the virtual object layer is generated based on the illumination information.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, a virtual object material instance template includes a first object material instance template, and a second object material instance template, where the first object material instance template is used to indicate a first virtual object layer to be used, and the second object material instance template is used to indicate a second virtual object layer to be used, and generating illumination information of the virtual object layer based on a hybrid texture and a diffuse reflection texture includes: generating illumination information of a second virtual object layer based on the mixed texture and the diffuse reflection texture; and acquiring a first object edge mask, and generating illumination information of the edge of the first virtual object layer based on the first object edge mask, the mixed texture and the diffuse reflection texture so that the rendering effect of the illumination information of the edge of the first virtual object layer is consistent with the rendering effect of the illumination information of the second virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, mixing a plurality of virtual object layers based on a target virtual object material instance to obtain a target virtual object material includes: mixing a plurality of virtual object layers based on the target virtual object material instance to obtain candidate virtual object materials; mixing detail textures of candidate virtual object materials to obtain target virtual object materials; the detail texture is used for indicating texture information for forming material details, and comprises detail color textures and detail normal textures.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object material instance template includes a first object material instance template, a second object material instance template, and a third object material instance template, where the first object material instance template is used to indicate a first virtual object layer to be used, the second object material instance template is used to indicate a second virtual object layer to be used, and the third object material instance template is used to indicate a third virtual object layer to be used.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the method further includes: determining candidate virtual object materials according to the target virtual object material examples; wherein, the candidate virtual object material corresponds to the material parameters of each virtual object layer; and adjusting the material parameters of each virtual object layer to obtain target material parameters of each virtual object layer, and generating target virtual object materials based on the target material parameters of each virtual object layer.
In an exemplary embodiment of the present disclosure, based on the foregoing solution, the virtual object is a track, the initial virtual object model includes an intersection virtual object model and a non-intersection virtual object model, and the map coordinates of model vertices of the intersection virtual object model and the non-intersection virtual object model are equal.
In an exemplary embodiment of the disclosure, based on the foregoing solution, the virtual object is a racetrack, the initial virtual object model includes a roundabout nested virtual object model, the roundabout nested virtual object model corresponds to a map coordinate, the map coordinate corresponds to a first direction coordinate and a second direction coordinate, a plurality of sets of coordinate points at adjacent positions of the map coordinate corresponding to the roundabout nested virtual object model are obtained, the first direction coordinates of the sets of coordinate points are the same, and a sum of fractional parts of the second direction coordinates of the sets of coordinate points is one.
In an exemplary embodiment of the present disclosure, based on the foregoing scheme, the method further includes: generating an initial virtual object model based on the virtual object topology; the virtual object topological structure corresponds to a mapping coordinate set, the mapping coordinate set corresponds to a first direction coordinate range and a second direction coordinate range, the virtual object topological structure corresponds to a topological center line, and the position of the topological center line is taken as the middle position of the first direction coordinate range to fill the first direction coordinate range.
The computer readable signal medium provided by an embodiment of the present disclosure may obtain an initial virtual object model, determine a target virtual object material instance template from a plurality of virtual object material instance templates based on a target level, determine a target virtual object material instance based on the target virtual object material instance template, mix a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material, and render the initial virtual object model through the target virtual object material to obtain a target virtual object model, where the target virtual object model is a virtual object model of a virtual object material having the target level. According to the scheme, the target virtual object material instance template can be determined based on the target grade, the target virtual object material to be applied is determined based on the target virtual object material template, the virtual object model is rendered according to the target virtual object material, the virtual object material to be applied can be determined according to game requirements, the number of virtual object materials and the sampling times can be adaptively adjusted, the overall performance cost of the virtual object material is further reduced, the overall game frame rate is improved, and the rendering effect of the virtual object model is further improved.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Furthermore, the above-described figures are only schematic illustrations of processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (18)

1. A method of virtual object model generation, the method comprising:
acquiring an initial virtual object model; wherein the initial virtual object model corresponds to a target grade;
determining a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates;
Determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material;
rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model;
the target virtual object model is a virtual object model of a virtual object material with a target grade.
2. The method of claim 1, wherein the blending the plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material comprises:
obtaining vertex color information drawn for the initial virtual object model; the vertex color information is used for indicating a mixed control mode of each virtual object layer;
and mixing the plurality of virtual object layers based on the vertex color information to obtain a target virtual object material.
3. The method according to claim 2, wherein the blending the plurality of virtual object layers based on the vertex color information to obtain the target virtual object material comprises:
Mixing a plurality of virtual object layers based on the vertex color information and the mixed mask texture to obtain a target virtual object material;
the blend mask texture is used for indicating blend detail information of each virtual object layer.
4. The method of claim 3, wherein blending the plurality of virtual object layers based on the vertex color information and blend mask texture to obtain a target virtual object material comprises:
and mixing the plurality of virtual object layers based on the plurality of color channel information in the vertex color information and the plurality of color channel information in the mixed mask texture to obtain a target virtual object material.
5. The method of claim 4, wherein the virtual object layers include a first virtual object layer, a second virtual object layer, a third virtual object layer, and a fourth virtual object layer, wherein the vertex color information includes first vertex color channel information, second vertex color channel information, and third vertex color channel information, wherein the blend mask texture includes first mask color channel information, second mask color channel information, and third mask color channel information, and wherein blending the plurality of virtual object layers based on the vertex color information and the blend mask texture results in a target virtual object material, comprising:
Mixing the first virtual object image layer and the second virtual object image layer based on the first vertex color channel information and the first shade color channel information to obtain a first intermediate virtual object image layer;
mixing the first intermediate virtual object image layer and the third virtual object image layer based on the second vertex color channel information and the second shade color channel information to obtain a second intermediate virtual object image layer;
and mixing the second intermediate virtual object layer and the fourth virtual object layer based on the third vertex color channel information and the third shade color channel information to obtain a target virtual object material.
6. The method of claim 1, wherein the blending the plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material comprises:
acquiring a mixed texture corresponding to each virtual object layer; wherein the hybrid texture is used for indicating rendering related information of each virtual object layer;
and carrying out linear interpolation on the calculation results of the mixed textures corresponding to each virtual object layer to obtain the target virtual object material.
7. The method of claim 6, wherein the rendering-related information includes diffuse reflectance color information, normal information, roughness information, specular reflectance information.
8. The method of claim 6, wherein the method further comprises:
generating illumination information of the virtual object layer based on the mixed texture and the diffuse reflection texture, and generating rendering related information of the virtual object layer based on the illumination information.
9. The method of claim 6, wherein the virtual object material instance templates include a first object material instance template for indicating a first virtual object layer to be used and a second object material instance template for indicating a second virtual object layer to be used, the generating illumination information of the virtual object layer based on the hybrid texture and the diffuse reflection texture, comprising:
generating illumination information of the second virtual object layer based on the mixed texture and the diffuse reflection texture;
and acquiring a first object edge mask, and generating illumination information of the edge of the first virtual object layer based on the first object edge mask, the mixed texture and the diffuse reflection texture, so that the rendering effect of the illumination information of the edge of the first virtual object layer is consistent with the rendering effect of the illumination information of the second virtual object layer.
10. The method of claim 1, wherein the blending the plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material comprises:
mixing a plurality of virtual object layers based on the target virtual object material instance to obtain candidate virtual object materials;
mixing detail textures of the candidate virtual object materials to obtain target virtual object materials;
the detail texture is used for indicating texture information for forming material details, and the detail texture comprises detail color textures and detail normal textures.
11. The method of claim 1, wherein the virtual object material instance templates include a first object material instance template for indicating a first virtual object layer to be used, a second object material instance template for indicating a second virtual object layer to be used, and a third object material instance template for indicating a third virtual object layer to be used.
12. The method according to claim 1, wherein the method further comprises:
Determining candidate virtual object materials according to the target virtual object material examples; wherein the candidate virtual object material corresponds to the material parameters of each virtual object layer;
and adjusting the material parameters of each virtual object layer to obtain target material parameters of each virtual object layer, and generating target virtual object materials based on the target material parameters of each virtual object layer.
13. The method of claim 1, wherein the virtual object is a racetrack, and the initial virtual object model comprises an intersection virtual object model and a non-intersection virtual object model, wherein the map coordinates of model vertices of the intersection virtual object model and the non-intersection virtual object model are equal.
14. The method of claim 1, wherein the virtual object is a racetrack, the initial virtual object model comprises a roundabout nested virtual object model, the roundabout nested virtual object model corresponds to a map coordinate, the map coordinate corresponds to a first direction coordinate and a second direction coordinate, a plurality of sets of coordinate points at adjacent positions of the map coordinate corresponding to the roundabout nested virtual object model are obtained, the first direction coordinates of each set of coordinate points are the same, and a sum of fractional parts of the second direction coordinates of each set of coordinate points is one.
15. The method according to claim 1, wherein the method further comprises:
generating the initial virtual object model based on a virtual object topology; the virtual object topological structure corresponds to a mapping coordinate set, the mapping coordinate set corresponds to a first direction coordinate range and a second direction coordinate range, the virtual object topological structure corresponds to a topological center line, and the first direction coordinate range is filled by taking the position of the topological center line as the middle position of the first direction coordinate range.
16. A virtual object model generation apparatus, the apparatus comprising:
the initial model acquisition module is used for acquiring an initial virtual object model; wherein the initial virtual object model corresponds to a target grade;
an instance template determining module, configured to determine a target virtual object material instance template from a plurality of virtual object material instance templates based on the target level; the virtual object material instance templates are used for indicating virtual object layers to be used, and the plurality of virtual object material instance templates comprise target virtual object material instance templates;
The target material determining module is used for determining a target virtual object material instance based on the target virtual object material instance template, and mixing a plurality of virtual object layers based on the target virtual object material instance to obtain a target virtual object material;
the target model rendering module is used for rendering the initial virtual object model through the target virtual object material to obtain a target virtual object model; the target virtual object model is a virtual object model of a virtual object material with a target grade.
17. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-15.
18. An electronic device, comprising:
one or more processors; and
a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-15.
CN202311623855.5A 2023-11-29 2023-11-29 Virtual object model generation method and device, storage medium and electronic equipment Pending CN117582669A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311623855.5A CN117582669A (en) 2023-11-29 2023-11-29 Virtual object model generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311623855.5A CN117582669A (en) 2023-11-29 2023-11-29 Virtual object model generation method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117582669A true CN117582669A (en) 2024-02-23

Family

ID=89916450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311623855.5A Pending CN117582669A (en) 2023-11-29 2023-11-29 Virtual object model generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117582669A (en)

Similar Documents

Publication Publication Date Title
US11024077B2 (en) Global illumination calculation method and apparatus
CN111340928B (en) Ray tracing-combined real-time hybrid rendering method and device for Web end and computer equipment
CN103946895B (en) The method for embedding in presentation and equipment based on tiling block
CN110196746B (en) Interactive interface rendering method and device, electronic equipment and storage medium
CN111462313B (en) Method, device and terminal for realizing fluff effect
CN109448137B (en) Interaction method, interaction device, electronic equipment and storage medium
US20050243094A1 (en) Systems and methods for providing an enhanced graphics pipeline
CN113674389B (en) Scene rendering method and device, electronic equipment and storage medium
Li et al. Multivisual animation character 3D model design method based on VR technology
BRPI0300983B1 (en) method for providing controllable texture sampling and co-processing device
US20130063472A1 (en) Customized image filters
CN113034662B (en) Virtual scene rendering method and device, storage medium and electronic equipment
CN102819855B (en) The generation method of two dimensional image and device
CN103426199B (en) A kind of Low-noise real-time global illumination method for drafting of three-dimensional geometry scene
CN113012273A (en) Illumination rendering method, device, medium and equipment based on target model
CN117582669A (en) Virtual object model generation method and device, storage medium and electronic equipment
WO2023025233A1 (en) Method and apparatus for writing animation playback program package, electronic device, and storage medium
CN114943797A (en) WebGL-based large-size thermodynamic diagram rendering method, system, medium and device
CN112182904A (en) Method, device and equipment for simulating brushing card by using simulated material
Doi et al. Global Illumination‐Aware Stylised Shading
US11657552B2 (en) Generating illuminated two-dimensional vector graphics using path tracing
CN116483358B (en) Method and system for realizing pseudo 3D user interface of desktop VR
CN117876568A (en) Custom data injection method and device for streaming transmission process
Algma Edge Chamfering Algorithm
Yutong et al. Study of water surface scattering model based on Unity3D Shader

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