Three-dimensional virtual object generation method, device, equipment, medium and program product

By receiving a three-dimensional grid model, building and processing height maps to generate three-dimensional virtual objects, the complex and inreusable process in the existing technology is solved, and more flexible and efficient virtual object generation is achieved.

CN114693885BActive Publication Date: 2025-04-11BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210374552.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2025-04-11
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

The existing software methods to produce art works require high-quality texture engraving and then baking normal information, resulting in many process steps and prone to errors, and the production results cannot be reused.

Method used

By receiving the 3D mesh model, building a height map, processing it to obtain a transparency map, a base color texture image, and a rough map, and finally fusing these maps to generate a 3D virtual object.

Benefits of technology

The traditional industrial process of producing virtual objects has been shortened, making the production process flexible, changeable, easy to modify and reusable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693885B_ABST
    Figure CN114693885B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, device, equipment, storage medium and program product for generating a three-dimensional virtual object, the method comprising: receiving a three-dimensional mesh model; constructing a height map based on the three-dimensional mesh model, the height map referring to a grayscale map including height data of a three-dimensional virtual object; processing the height map to obtain a transparency map, a basic color texture image and a roughness map, and fusing the transparency map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object. The technical solution provided by the embodiments of the present disclosure shortens the traditional industrial process of making virtual objects, and makes the production process flexible, easy to modify and reusable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, equipment, medium and program product for generating a three-dimensional virtual object. Background Art

[0002] With the development of the market and the improvement of user aesthetics, art assets such as scenes and characters made with hand-painted textures cannot meet the aesthetic preferences of users. Using software to design art works has become the mainstream of the market, and the conversion of project products has become a trend.

[0003] The existing software method for creating art works is mainly to first use 3D carving software to carve high-quality textures, then make a low-quality model based on the topology, and bake the normal information of the high-quality textures into the low-quality model. However, this method, which requires first carving high-quality textures and then baking normal information, has many steps in the whole process and is prone to errors. When one step goes wrong, all subsequent related steps need to be modified, and the production results cannot be reused. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a three-dimensional virtual object generation method, device, equipment, medium and program product, which shorten the traditional industrial process of making virtual objects and make the production process flexible, easy to modify and reusable.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating a three-dimensional virtual object, the method comprising:

[0006] receiving a three-dimensional mesh model;

[0007] Building a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale map including height data of the three-dimensional virtual object;

[0008] Processing the height map to obtain a transparency map, a basic color texture image, and a roughness map, wherein the transparency map refers to a grayscale image including transparency information of the three-dimensional virtual object, the basic color texture refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale image including roughness information of the three-dimensional virtual object;

[0009] The transparent map, the basic color texture image and the rough map are fused to obtain a three-dimensional virtual object.

[0010] In a second aspect, an embodiment of the present disclosure provides a three-dimensional virtual object generation device, the device comprising:

[0011] A model receiving module, used for receiving a three-dimensional mesh model;

[0012] A height map construction module, used to construct a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale map including height data of a three-dimensional virtual object;

[0013] a height map processing module, configured to process the height map to obtain a transparency map, a basic color texture image, and a roughness map, wherein the transparency map refers to a grayscale map including transparency information of the three-dimensional virtual object, the basic color texture refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale map including roughness information of the three-dimensional virtual object;

[0014] The texture fusion module is used to fuse the transparent texture, the basic color texture image and the rough texture to obtain a three-dimensional virtual object.

[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, the electronic device comprising:

[0016] one or more processors;

[0017] A storage device for storing one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the three-dimensional virtual object generation method as described in any one of the first aspects above.

[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a three-dimensional virtual object generation method as described in any one of the above-mentioned first aspects.

[0020] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, a three-dimensional virtual object generation method as described in any one of the first aspects above is implemented.

[0021] The disclosed embodiments provide a method, device, equipment, storage medium and program product for generating a three-dimensional virtual object, the method comprising: receiving a three-dimensional mesh model; constructing a height map based on the three-dimensional mesh model, the height map being a grayscale map including height data of the three-dimensional virtual object; processing the height map to obtain a transparency map, a basic color texture image and a roughness map, and fusing the transparency map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object. The technical solution provided by the disclosed embodiments shortens the traditional industrial process of making virtual objects, and makes the production process flexible, easy to modify and reusable. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0023] Figure 1 is a flow chart of a method for generating a three-dimensional virtual object in an embodiment of the present disclosure;

[0024] Figure 2 is a schematic diagram of a three-dimensional grid model in an embodiment of the present disclosure;

[0025] Figure 3 is a schematic structural diagram of a three-dimensional virtual object generating device in an embodiment of the present disclosure;

[0026] Figure 4 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0029] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0033] The following will describe in detail the three-dimensional virtual object generation method proposed in the embodiment of the present application in conjunction with the accompanying drawings.

[0034] Figure 1 This is a flowchart of a three-dimensional virtual object generation method in an embodiment of the present disclosure. This embodiment is applicable to the case of making a three-dimensional virtual image. The method can be executed by a three-dimensional virtual object generation device. The three-dimensional virtual object generation device can be implemented in software and / or hardware. The three-dimensional virtual object generation device can be configured in an electronic device.

[0035] For example: the electronic device can be a mobile terminal, a fixed terminal or a portable terminal, such as a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof.

[0036] For another example: the electronic device may be a server, wherein the server may be a physical server or a cloud server, and the server may be a server or a server cluster.

[0037] like Figure 1 The method for generating a three-dimensional virtual object provided by the embodiment of the present disclosure mainly includes the following steps:

[0038] S101: Receive a three-dimensional mesh model.

[0039] Among them, the three-dimensional grid model can be understood as a three-dimensional mesh grid model. Further, Figure 2 As shown, the three-dimensional grid model can be a mesh grid with a certain curvature.

[0040] In this embodiment, the three-dimensional mesh model is generated by mesh generation software. The mesh generation software performs UV tiling processing on the produced three-dimensional mesh model to obtain a three-dimensional mesh model represented by two-dimensional data, which is then input into a three-dimensional virtual object generation device.

[0041] In this embodiment, the received three-dimensional mesh model is a three-dimensional mesh model represented by two-dimensional data after UV tiling processing.

[0042] S102: construct a height map based on the three-dimensional mesh model, where the height map refers to a grayscale map including height data of the three-dimensional virtual object.

[0043] Among them, the height map is generally a grayscale image, each pixel represents the height of a mesh vertex, generally 0 (black) represents the lowest point, and 255 (white) represents the highest point.

[0044] Furthermore, a plurality of noise maps are created in advance, processed, and applied to the three-dimensional mesh model to obtain a height map.

[0045] Furthermore, the noise map can be set as a built-in node of the three-dimensional virtual object generation device. When needed, the built-in node can be directly called to obtain a height map after merging, clipping, deleting and other processing methods on multiple noise maps.

[0046] S103, processing the height map to obtain an alpha map, a base color texture image, and a roughness map, wherein the alpha map refers to a grayscale image including transparency information of the three-dimensional virtual object, the base color texture image refers to a texture image including base color information of the three-dimensional virtual object, and the roughness map refers to a grayscale image including roughness information of the three-dimensional virtual object.

[0047] The transparency information refers to whether the mesh vertex is transparent. The transparency information can be any value between 0 and 1. When the transparency is 1, it means that the vertex is opaque, and when the transparency is 0, it means that the vertex is transparent.

[0048] In this embodiment, the virtual object is three-dimensional, so some vertices in the mesh need to be set to be transparent, so as to display the vertices blocked behind the vertex, thereby achieving a three-dimensional display effect.

[0049] The basic color texture image can be understood as an image with basic color and texture. For example, when the virtual object to be generated is grass, the basic color texture image is an image with various green colors intersecting and having a certain grass texture.

[0050] In this embodiment, the basic color texture image can be selected from the pre-set texture images. For example, a variety of texture images are pre-stored in the 3D virtual object generation device, such as grass texture images, beach texture images, blue sky texture images, etc., so that the user can directly select a similar texture image, reduce the time of generating virtual objects, and improve the operability of the 3D virtual object generation device.

[0051] In a possible implementation, the height map is processed to obtain a basic color texture image, including: dividing the height map into multiple areas; setting a different basic color for each area; and obtaining a basic color texture image based on the basic color of each area and a normal texture image.

[0052] In this embodiment, the height map is divided into multiple areas according to the actual appearance of the virtual object. In this embodiment, the three-dimensional virtual object is a three-dimensional virtual jewelry as an example for explanation, and the height map can be divided into multiple areas such as gem area, petal area, wing area, chain area, etc. For each area, a different basic color is set. For example: the gem area is set to dark green, the petal area is set to brown, and so on.

[0053] In this embodiment, other auxiliary maps are calculated according to the normal texture image, and the other auxiliary maps are merged with the basic color of each area to obtain a basic color texture image.

[0054] In this embodiment, after the height map is divided into a plurality of regions, a different color is set for each region to obtain a basic color image, so as to set different colors for different regions and produce a three-dimensional image with richer colors.

[0055] The roughness map is also called the roughness map. Roughness is used to indicate whether the texture is smooth. In 3D computer graphics, a black value indicates a roughness of 0 (smooth) and a white value indicates a roughness of 1 (not smooth). The roughness of each vertex in the roughness map can be set according to the actual situation of the virtual object.

[0056] In a possible implementation, processing the height map to obtain a coarse map includes: processing the basic color texture image to obtain a coarse map.

[0057] In this embodiment, the basic color texture image can be directly switched to a rough map channel to obtain a rough map.

[0058] In this embodiment, a channel switching method is adopted to obtain a coarse map through a basic color texture image, thereby avoiding the cumbersome steps of making a coarse map and streamlining the production process of a three-dimensional image.

[0059] S104: Fusing the transparent map, the basic color texture image and the rough map to obtain a three-dimensional virtual object.

[0060] In this embodiment, the transparent map, the basic color texture image and the rough map are fused to obtain a three-dimensional virtual image.

[0061] The fusion may be direct superposition or fusion according to a preset rule, which is not specifically limited in this embodiment.

[0062] The disclosed embodiment provides a method for generating a three-dimensional virtual object, including: receiving a three-dimensional mesh model; constructing a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale map including height data of the three-dimensional virtual object; processing the height map to obtain a transparency map, a basic color texture image, and a roughness map, and fusing the transparency map, the basic color texture image, and the roughness map to obtain a three-dimensional virtual object. The technical solution provided by the disclosed embodiment shortens the traditional industrial process of making virtual objects, and makes the production process flexible, easy to modify, and reusable.

[0063] On the basis of the above-mentioned embodiments, the embodiments of the present disclosure further optimize the above-mentioned embodiments. The three-dimensional virtual generation method provided by the embodiments of the present disclosure also includes: processing the height map to obtain a normal texture image (Normal Texture), wherein the normal texture image refers to an image that visually has a concave-convex effect and has color information; fusing the normal texture image, the transparent map, the basic color texture image and the rough map to obtain a three-dimensional virtual object.

[0064] Among them, in 3D computer graphics, normal texture images are a technology that simulates the lighting effect of bumps and depressions. It is an implementation of bump mapping. Normal texture images can add details to models without adding polygons. Common usage scenarios are to improve the appearance and add details to low-polygon models. Among them, normal texture images are generally generated based on height maps. Normal texture images are usually stored in the form of ordinary RGB images, where the R, G, and B components correspond to the X, Y, and Z coordinates of the normal, respectively.

[0065] The process of determining the normal texture image includes: subtracting each pixel of the height map from a pixel above it to obtain a height difference as the x value of the normal of the point; subtracting each pixel of the height map from a pixel to its right to obtain a height difference as the y value of the normal of the point; taking 1 as the z value of the normal of the point.

[0066] In this embodiment, a normal texture image is added to the three-dimensional virtual object, so that the three-dimensional virtual object has richer details.

[0067] On the basis of the above-mentioned embodiments, the embodiments of the present disclosure further optimize the above-mentioned embodiments. The three-dimensional virtual generation method provided by the embodiments of the present disclosure also includes: processing the height map to obtain an ambient occlusion (Ambient Occiusion Map, AO) map, wherein the AO map refers to a grayscale map including ambient occlusion information of the three-dimensional virtual object; fusing the AO map, the transparent map, the basic color texture image and the rough map to obtain a three-dimensional virtual object.

[0068] The calculation of the AO map is not affected by any light. It only calculates the distance between objects and generates an 8-bit channel based on the distance. When calculating the AO map of an object, the program makes each pixel emit a light according to the normal of the object. When this light touches the object, it will generate feedback, marking that there is an object nearby, and it will appear black. The light emitted by the pixels above the ball does not touch any object, so it is marked as white. Furthermore, the AO map simulates the distance between the various faces of the model.

[0069] In this embodiment, an AO map is added to the three-dimensional virtual object to reflect the influence of light and provide richer details.

[0070] On the basis of the above-mentioned embodiments, the embodiments of the present disclosure further optimize the above-mentioned embodiments. The three-dimensional virtual generation method provided by the embodiments of the present disclosure also includes: processing the height map to obtain a metalness map, wherein the metalness map refers to a grayscale map including the metalness information of the three-dimensional virtual object; fusing the metalness map, the transparent map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object.

[0071] Specifically, the metal map is used to distinguish between insulators and metals in the map. The value of the metal part is 1 (white), and the value of the insulator part is 0 (black). It is easy to understand that in the height map, except for the metal material part, everything in the metal map is black. Therefore, if there is a local area in the height map that is metal, the local area is extracted and the local metal map of the local area is calculated. For the remaining local areas, the black map can be directly determined as its local metal map.

[0072] In a possible implementation, the height map is processed to obtain a metalness map, including: dividing the height map into multiple regions; setting a different basic color for each region; determining the metalness of each region according to the basic color of each region to obtain a metalness map.

[0073] In this embodiment, the height map is divided into a plurality of regions; the process of setting a different basic color for each region can refer to the description in the above implementation, and will not be described in detail in this embodiment.

[0074] In this embodiment, after the height map is divided into multiple areas, a different color is set for each area, and the metallicity of each area is determined according to the basic color, so as to set different metallicities for different areas and produce a three-dimensional image with richer metallic color.

[0075] Furthermore, the metallicity of each region can be determined based on its color, such as Figure 3 As shown, when the color of the region tends to be yellow, the metalness of the region is determined to be 1, and when the color of the region tends to be green, the metalness of the region is determined to be 0.

[0076] In this embodiment, a metalness map is added to the three-dimensional virtual object to reflect the glossiness of the metal, so that the three-dimensional image has more details and is more realistic.

[0077] On the basis of the above embodiment, the normal texture image, the metalness map, the AO map, the transparency map, the basic color texture image and the roughness map can also be merged to obtain a three-dimensional virtual object. In this way, the obtained three-dimensional virtual object has more details and is more realistic.

[0078] Figure 3 This is a structural diagram of a three-dimensional virtual object generating device in an embodiment of the present disclosure. This embodiment can be applied to the case of producing a three-dimensional virtual image. The three-dimensional virtual object generating device can be implemented in software and / or hardware. The three-dimensional virtual object generating device can be configured in an electronic device.

[0079] like Figure 3 As described above, the three-dimensional virtual object generation device 30 provided in the embodiment of the present disclosure mainly includes a model receiving module 31 , a height map construction module 32 , a height map processing module 33 and a map fusion module 34 .

[0080] Wherein, the model receiving module 31 is used to receive the three-dimensional grid model;

[0081] A height map construction module 32, configured to construct a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale image including height data of a three-dimensional virtual object;

[0082] A height map processing module 33 is used to process the height map to obtain a transparency map, a basic color texture image and a roughness map, wherein the transparency map refers to a grayscale map including transparency information of the three-dimensional virtual object, the basic color texture refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale map including roughness information of the three-dimensional virtual object;

[0083] The texture fusion module 34 is used to fuse the transparent texture, the basic color texture image and the rough texture to obtain a three-dimensional virtual object.

[0084] In one possible implementation, the height map processing module 33 is further used to process the height map to obtain a normal texture image, where the normal texture image refers to an image that visually has a concave-convex effect and contains color information; the texture fusion module 34 is further used to fuse the normal texture image, the transparent map, the basic color texture image and the rough map to obtain a three-dimensional virtual object.

[0085] In one possible implementation, the height map processing module 33 is further used to process the height map to obtain an ambient occlusion (AO) map, where the AO map refers to a grayscale map including ambient occlusion information of a three-dimensional virtual object; the map fusion module 34 is further used to fuse the AO map, the transparent map, the basic color texture image and the rough map to obtain a three-dimensional virtual object.

[0086] In one possible implementation, the height map processing module 33 is further used to process the height map to obtain a metalness map, where the metalness map refers to a grayscale map that includes metalness information of a three-dimensional virtual object; the map fusion module 34 is further used to fuse the metalness map, the transparency map, the base color texture image and the roughness map to obtain a three-dimensional virtual object.

[0087] In one possible embodiment, the height map processing module 33 is also used to process the height map to obtain a metalness map, including: a region division unit, used to divide the height map into multiple regions; a basic color setting unit, used to set a different basic color for each region; a metalness determination unit, used to determine the metalness of each region according to the basic color of each region, to obtain a metalness map.

[0088] In one possible implementation, the height map processing module 33 is used to process the height map to obtain a basic color texture image, and includes: a region division unit, used to divide the height map into multiple regions; a basic color setting unit, used to set a different basic color for each region; a basic color texture image determination unit, used to obtain a basic color texture image based on the basic color of each region and a normal texture image.

[0089] In a possible implementation, the height map processing module 33 is specifically configured to process the basic color texture image to obtain a rough map.

[0090] The three-dimensional virtual object generation device provided in the embodiment of the present disclosure can execute the steps executed by the three-dimensional virtual object generation method provided in the embodiment of the present disclosure, and the specific execution steps and beneficial effects are not repeated here.

[0091] Figure 4 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The electronic device 400 in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable terminal devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 4 The terminal device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0092] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403 to implement the picture rendering method of the embodiment described in the present disclosure. In RAM 403, various programs and data required for the operation of the terminal device 400 are also stored. The processing device 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0093] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the terminal device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The terminal device 400 is shown to have various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0094] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart, thereby implementing the page jump method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0095] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0096] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0097] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0098] The computer-readable medium carries one or more programs. When the one or more programs are executed by the terminal device, the terminal device: receives a three-dimensional mesh model; constructs a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale map including height data of a three-dimensional virtual object; processes the height map to obtain a transparency map, a basic color texture image and a roughness map, wherein the transparency map refers to a grayscale map including transparency information of the three-dimensional virtual object, the basic color texture image refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale map including roughness information of the three-dimensional virtual object; and fuses the transparency map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object.

[0099] Optionally, when the above one or more programs are executed by the terminal device, the terminal device may also execute other steps described in the above embodiments.

[0100] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0101] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0102] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0103] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0104] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0105] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a three-dimensional virtual object, including: receiving a three-dimensional mesh model; constructing a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale map including height data of the three-dimensional virtual object; processing the height map to obtain a transparency map, a basic color texture image and a roughness map, wherein the transparency map refers to a grayscale map including transparency information of the three-dimensional virtual object, the basic color texture image refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale map including roughness information of the three-dimensional virtual object; and fusing the transparency map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object.

[0106] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a three-dimensional virtual object, wherein the method further includes: processing the height map to obtain a normal texture image, wherein the normal texture image refers to an image that visually has a concave-convex effect and contains color information; fusing the normal texture image, the transparent map, the basic color texture image and the rough map to obtain a three-dimensional virtual object.

[0107] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a three-dimensional virtual object, wherein the method further includes: processing the height map to obtain an ambient occlusion (AO) map, wherein the AO map refers to a grayscale map including ambient occlusion information of the three-dimensional virtual object; fusing the AO map, the transparent map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object.

[0108] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a three-dimensional virtual object, wherein the method further includes: processing the height map to obtain a metalness map, wherein the metalness map refers to a grayscale map including metalness information of the three-dimensional virtual object; fusing the metalness map, the transparency map, the base color texture image and the roughness map to obtain the three-dimensional virtual object.

[0109] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a three-dimensional virtual object, wherein the height map is processed to obtain a metalness map, including: dividing the height map into multiple areas; setting a different basic color for each area; determining the metalness of each area according to the basic color of each area to obtain a metalness map.

[0110] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a three-dimensional virtual object, wherein the height map is processed to obtain a basic color texture image, including: dividing the height map into multiple areas; setting a different basic color for each area; and obtaining a basic color texture image based on the basic color of each area and a normal texture image.

[0111] According to one or more embodiments of the present disclosure, the present disclosure provides a method for generating a three-dimensional virtual object, wherein the height map is processed to obtain a rough map, including: processing the basic color texture image to obtain a rough map.

[0112] According to one or more embodiments of the present disclosure, the present disclosure provides a three-dimensional virtual object generation device, including: a model receiving module, used to receive a three-dimensional mesh model; a height map construction module, used to construct a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale map including height data of the three-dimensional virtual object; a height map processing module, used to process the height map to obtain a transparency map, a basic color texture image and a roughness map, wherein the transparency map refers to a grayscale map including transparency information of the three-dimensional virtual object, the basic color texture refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale map including roughness information of the three-dimensional virtual object; a map fusion module, used to fuse the transparency map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object.

[0113] According to one or more embodiments of the present disclosure, the present disclosure provides a three-dimensional virtual object generation device, wherein the height map processing module is also used to process the height map to obtain a normal texture image, and the normal texture image refers to an image that visually has a concave-convex effect and contains color information; the map fusion module is also used to fuse the normal texture image, the transparent map, the basic color texture image and the rough map to obtain a three-dimensional virtual object.

[0114] According to one or more embodiments of the present disclosure, the present disclosure provides a three-dimensional virtual object generation device, wherein a height map processing module is further used to process the height map to obtain an ambient occlusion (AO) map, wherein the AO map refers to a grayscale map including ambient occlusion information of the three-dimensional virtual object; and a map fusion module is further used to fuse the AO map, the transparent map, the basic color texture image and the roughness map to obtain a three-dimensional virtual object.

[0115] According to one or more embodiments of the present disclosure, the present disclosure provides a three-dimensional virtual object generation device, wherein a height map processing module is also used to process the height map to obtain a metalness map, and the metalness map refers to a grayscale map including the metalness information of the three-dimensional virtual object; the map fusion module is also used to fuse the metalness map, the transparent map, the basic color texture image and the roughness map to obtain the three-dimensional virtual object.

[0116] According to one or more embodiments of the present disclosure, the present disclosure provides a three-dimensional virtual object generation device, wherein a height map processing module is also used to process the height map to obtain a metalness map, including: a region division unit, used to divide the height map into multiple regions; a basic color setting unit, used to set a different basic color for each region; a metalness determination unit, used to determine the metalness of each region according to the basic color of each region, to obtain a metalness map.

[0117] According to one or more embodiments of the present disclosure, the present disclosure provides a three-dimensional virtual object generation device, wherein a height map processing module is used to process the height map to obtain a basic color texture image, including: a region division unit, used to divide the height map into multiple regions; a basic color setting unit, used to set a different basic color for each region; a basic color texture image determination unit, used to obtain a basic color texture image based on the basic color of each region and a normal texture image.

[0118] According to one or more embodiments of the present disclosure, the present disclosure provides a three-dimensional virtual object generation device, wherein a height map processing module is specifically used to process the basic color texture image to obtain a rough map.

[0119] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0120] one or more processors;

[0121] A memory for storing one or more programs;

[0122] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the three-dimensional virtual object generation methods provided in the present disclosure.

[0123] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the three-dimensional virtual object generation methods provided by the present disclosure.

[0124] The embodiments of the present disclosure further provide a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the three-dimensional virtual object generation method as described above is implemented.

[0125] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0126] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0127] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for generating a three-dimensional virtual object, characterized in that: The method comprises: Receiving a three-dimensional mesh model, wherein the three-dimensional mesh model is a three-dimensional mesh model represented by two-dimensional data after UV tiling processing; Constructing a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale map including height data of a three-dimensional virtual object, wherein constructing the height map based on the three-dimensional mesh model comprises: pre-creating a plurality of noise maps, processing the plurality of noise maps, and applying the processed noise maps to the three-dimensional mesh model to obtain the height map; Processing the height map to obtain a transparent map, a basic color texture image, and a roughness map, wherein the transparent map refers to a grayscale image including transparency information of the three-dimensional virtual object, the basic color texture image refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale image including roughness information of the three-dimensional virtual object; The transparent map, the basic color texture image and the rough map are fused to obtain a three-dimensional virtual object.

2. The method according to claim 1, characterized in that The method further comprises: Processing the height map to obtain a normal texture image, wherein the normal texture image refers to an image having a visual concave-convex effect and having color information; The normal texture image, the transparent map, the basic color texture image and the rough map are fused to obtain a three-dimensional virtual object.

3. The method according to claim 1, characterized in that: The method further comprises: Processing the height map to obtain an ambient occlusion (AO) map, wherein the AO map refers to a grayscale map including ambient occlusion information of a three-dimensional virtual object; The AO map, the transparent map, the basic color texture image and the rough map are fused to obtain a three-dimensional virtual object.

4. The method according to claim 1, characterized in that: The method further comprises: Processing the height map to obtain a metalness map, wherein the metalness map refers to a grayscale map including metalness information of a three-dimensional virtual object; The metalness map, the transparency map, the basic color texture image and the roughness map are fused to obtain a three-dimensional virtual object.

5. The method according to claim 4, characterized in that The height map is processed to obtain a metalness map, including: Dividing the height map into a plurality of regions; Set a different base color for each area; The metalness of each area is determined according to the base color of each area to obtain a metalness map.

6. The method according to claim 1, characterized in that Processing the height map to obtain a basic color texture image includes: Dividing the height map into a plurality of regions; Set a different base color for each area; Based on the base color of each area and the normal texture image, a base color texture image is obtained.

7. The method according to claim 1, characterized in that The height map is processed to obtain a rough map, including: The basic color texture image is processed to obtain a rough map.

8. A three-dimensional virtual object generation device, characterized in that: The device comprises: A model receiving module, used for receiving a three-dimensional mesh model, wherein the three-dimensional mesh model is a three-dimensional mesh model represented by two-dimensional data after UV tiling processing; A height map construction module is used to construct a height map based on the three-dimensional mesh model, wherein the height map refers to a grayscale image including height data of a three-dimensional virtual object, wherein the height map is constructed based on the three-dimensional mesh model, including: pre-creating a plurality of noise maps, processing the plurality of noise maps, and applying the processed noise maps to the three-dimensional mesh model to obtain a height map; a height map processing module, configured to process the height map to obtain a transparent map, a basic color texture image, and a roughness map, wherein the transparent map refers to a grayscale image including transparency information of the three-dimensional virtual object, the basic color texture refers to a texture image including basic color information of the three-dimensional virtual object, and the roughness map refers to a grayscale image including roughness information of the three-dimensional virtual object; The texture fusion module is used to fuse the transparent texture, the basic color texture image and the rough texture to obtain a three-dimensional virtual object.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program or instructions, which implements the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Virtual model processing method and device and electronic device

    CN112619154A

  • Map making method, apparatus and device, and computer readable medium

    CN114288671A

  • Systems and methods for generating refined, high fidelity normal maps for 2d and 3D textures

    US20150348285A1