Model quadrilateral wireframe rendering method, system and model rendering device
By obtaining and mapping the UV position information of the quadrilateral wireframe from the UV coordinate system, and rendering in the two-dimensional coordinate system based on the color space value, the performance degradation problem caused by quadrilateral wireframe rendering in the three-dimensional scene is solved, and resource consumption is reduced and Performance improvements.
Patent Information
- Application Number
- CN202111514450.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-12-10
AI Technical Summary
When displayed in a three-dimensional scene, the quadrilateral wireframe rendering of an object requires real-time calculation of a large amount of data, which leads to a decrease in CPU performance, a large footprint in video memory, and affects the performance of the display terminal.
By obtaining the UV position information of the quadrilateral wireframe from the UV coordinate system and mapping it to the two-dimensional coordinate system, the quadrilateral wireframe is rendered in the two-dimensional coordinate system based on the color space value to avoid calculating point, line, and light and shadow data.
It effectively reduces the computing resource consumption and video memory usage of the three-dimensional scene environment, and improves the performance of the display terminal.
Smart Images

Figure CN114170368B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a rendering method and system for a quadrilateral wireframe of a model and a model rendering device. Background Art
[0002] When an object is displayed in a three-dimensional scene, there is an increasing demand for quadrilateral wireframe rendering of the object's Polygon model. In related technologies, the wireframe effect is achieved by reconstructing the object's wireframe model and then rendering the points, lines, surfaces, light and shadow information of the quadrilateral wireframe model through the engine. There are the following disadvantages: a large amount of wireframe model data information needs to be calculated in real time, and the calculation process will generate a large amount of cache, occupying most of the CPU performance, and ultimately causing a significant drop in the performance of the display terminal. Summary of the invention
[0003] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a rendering method, system and model rendering device for the quadrilateral wireframe of a model, which can effectively reduce the consumption of computing resources and the occupancy of video memory during the display of a three-dimensional scene environment, thereby improving the performance of the display terminal.
[0004] In a first aspect, an embodiment of the present application provides a method for rendering a quadrilateral wireframe of a model, comprising:
[0005] Get the UV position information of the object in the UV coordinate system;
[0006] Obtaining target UV position information from the UV position information, wherein the target UV position information is UV position information of a quadrilateral wireframe of the object;
[0007] Mapping the target UV position information into a two-dimensional coordinate system;
[0008] A color space value of the object is obtained, and based on a mapping relationship of the color space value in the two-dimensional coordinate system, a quadrilateral wireframe of the object is rendered.
[0009] In some examples, obtaining target UV position information from the UV position information includes:
[0010] Based on the type of mesh vertex information of the object, UV position information on the quadrilateral wireframe is obtained, and the UV position information on the quadrilateral wireframe is used as the target UV position information.
[0011] In some examples, obtaining UV position information on the quadrilateral wireframe based on the type of mesh vertex information of the object, and using the UV position information on the quadrilateral wireframe as the target UV position information includes:
[0012] Obtaining mesh vertex information of the object, and marking and bridging the mesh vertices to obtain a plurality of quadrilaterals, wherein the mesh vertex information on the quadrilaterals is defined as a first type;
[0013] The mesh vertices corresponding to the first type are mapped to the two-dimensional coordinate system to obtain the target UV position information.
[0014] In some examples, mapping the target UV position information into a two-dimensional coordinate system includes:
[0015] Obtain the vector values of the X-axis and Y-axis directions of the target UV position information;
[0016] Based on the vector value, obtaining an offset between the quadrilateral wireframe and a standard quadrilateral wireframe;
[0017] Based on the offset, the standard quadrilateral wireframe is mapped into the two-dimensional coordinate system.
[0018] In some examples, obtaining the color space value of the object and rendering a quadrilateral wireframe of the object based on a mapping relationship of the color space value in the two-dimensional coordinate system includes:
[0019] Acquire the color space value of the object, and establish a mapping relationship between the color space value and a four-dimensional vector group, wherein the four-dimensional vector group is determined by mapping the target UV position information to a position in the two-dimensional coordinate system;
[0020] Based on the mapping relationship between the color space value and the four-dimensional vector group, a quadrilateral wireframe of the object is rendered.
[0021] In some examples, obtaining UV position information of the object in a UV coordinate system includes:
[0022] Get the UV coordinate system of the object;
[0023] The UV position information of the object on any channel is obtained from the UV coordinate system.
[0024] In a second aspect, an embodiment of the present application provides a rendering system for a quadrilateral wireframe of a model, comprising:
[0025] An acquisition module, used to acquire UV position information of an object in a UV coordinate system, wherein the UV position information is UV position information of any channel;
[0026] A quadrilateral wireframe determination module, used to obtain target UV position information from the UV position information;
[0027] A mapping module, used to map the target UV position information into a two-dimensional coordinate system;
[0028] The rendering module is used to obtain the color space value of the object and render the quadrilateral wireframe of the object based on the mapping relationship of the color space value in the two-dimensional coordinate system.
[0029] In some examples, the quadrilateral wireframe determination module is specifically used to:
[0030] Based on the type of mesh vertex information of the object, UV position information on the quadrilateral wireframe is obtained, and the UV position information on the quadrilateral wireframe is used as the target UV position information.
[0031] In some examples, the mapping module is specifically used to:
[0032] Obtain the vector values of the X-axis and Y-axis directions of the target UV position information;
[0033] Based on the vector value, obtaining an offset between the quadrilateral wireframe and a standard quadrilateral wireframe;
[0034] Based on the offset, the standard quadrilateral wireframe is mapped into the two-dimensional coordinate system.
[0035] In some examples, the rendering module is specifically used to:
[0036] Acquire the color space value of the object, and establish a mapping relationship between the color space value and a four-dimensional vector group, wherein the four-dimensional vector group is determined by mapping the target UV position information to a position in the two-dimensional coordinate system;
[0037] Based on the mapping relationship between the color space value and the four-dimensional vector group, a quadrilateral wireframe of the object is rendered.
[0038] In a third aspect, an embodiment of the present application provides a model rendering device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to implement a method for rendering a quadrilateral wireframe of a model as described in the first aspect above when executing the program.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to implement the method for rendering a quadrilateral wireframe of a model as described in the first aspect above.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product having a computer program stored thereon, wherein the computer program is used to implement the method for rendering a quadrilateral wireframe of a model as described in the first aspect above.
[0041] The rendering method, system and model rendering device of the quadrilateral wireframe of the model provided in the embodiment of the present application first obtain the UV position information of the quadrilateral wireframe of the object from the UV coordinate system and map it to the two-dimensional coordinate system. Then, by obtaining the color space value of the object, a mapping relationship between the color space value and the quadrilateral wireframe can be established, thereby conveniently realizing the color rendering of the quadrilateral wireframe. Compared with the prior art, there is no need to calculate the point, line and light and shadow data of the object, thereby effectively reducing the consumption of computing resources and the occupation of video memory, etc. in the display process of the three-dimensional scene environment, and improving the performance of the display terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0043] Figure 1 A flowchart of a method for rendering a quadrilateral wireframe of a model according to an embodiment of the present application;
[0044] Figure 2 A schematic diagram of a spherical object in a UV plane space of a method for rendering a quadrilateral wireframe of a model according to an embodiment of the present application;
[0045] Figure 3 A schematic diagram of mesh vertex information of a spherical object in a method for rendering a quadrilateral wireframe of a model according to an embodiment of the present application;
[0046] Figure 4 A schematic diagram of diagonal information of a spherical object in a method for rendering a quadrilateral wireframe of a model according to an embodiment of the present application;
[0047] Figure 5 A schematic diagram of the mapping relationship of the triangle surface of a spherical object in a method for rendering a quadrilateral wireframe of a model according to an embodiment of the present application;
[0048] Figure 6 A structural block diagram of a rendering system for a quadrilateral wireframe of a model according to an embodiment of the present application;
[0049] Figure 7 A schematic diagram of the structure of a model rendering device according to an embodiment of the present application. DETAILED DESCRIPTION
[0050] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant disclosure, rather than to limit the disclosure. It should also be noted that, for ease of description, only the parts related to the disclosure are shown in the accompanying drawings.
[0051] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0052] The following describes a method, system and model rendering device for a quadrilateral wireframe of a model according to an embodiment of the present invention in conjunction with the accompanying drawings.
[0053] Figure 1 is a flowchart of a method for rendering a quadrilateral wireframe of a model according to an embodiment of the present application, such as Figure 1 As shown, according to an embodiment of the present application, a method for rendering a quadrilateral wireframe of a model includes the following steps:
[0054] S101: Obtain UV position information of an object in a UV coordinate system.
[0055] Among them, UV coordinate system refers to UV space vector coordinate system. UV is the abbreviation of U and V texture mapping coordinates, which defines the position information of each point on the image. These points are interconnected with the 3D model to determine the position of the surface texture mapping. UV is to accurately correspond each point on the image to the surface of the model object, and the gap between points is processed by the software to smooth the image interpolation.
[0056] In one embodiment of the present invention, an object generally refers to a Polygon model, that is, the object in the embodiment of the present invention can be a Polygon model of any shape, and the number of models can be multiple or one. Taking a sphere Polygon model as an example, some existing DCC tools such as Houdini, Maya, Max, Cinema4D and Blender and other 3D software, of course, Zbrush, Nuke, Kantana, SD, Realflow and other special tools can be used to obtain the UV position information of the object and the mesh vertex information of the object itself. In this example, the UV plane space of the sphere Polygon model is shown as follows: Figure 2 As shown, the mesh vertex information of the sphere is as follows Figure 3 shown.
[0057] It should be noted that the UV position information of the object in the UV coordinate system may include UV position information on multiple channels. In one embodiment of the present invention, the UV position information may be UV position information on any channel, that is, obtaining the UV position information of the object in the UV coordinate system generally includes obtaining the UV coordinate system of the object, and obtaining the UV position information of the object on any channel from the UV coordinate system.
[0058] S102: Obtain target UV position information from the UV position information, wherein the target UV position information is UV position information of a quadrilateral wireframe of the object.
[0059] That is, the target UV position information refers to the UV position information of the quadrilateral wireframe of the object. The target UV position information is obtained from the UV position information, including:
[0060] Based on the type of mesh vertex information of the object, UV position information on the quadrilateral wireframe is obtained, and the UV position information on the quadrilateral wireframe is used as the target UV position information. In this example, based on the type of mesh vertex information of the object, UV position information on the quadrilateral wireframe is obtained, and the UV position information on the quadrilateral wireframe is used as the target UV position information, specifically including: obtaining mesh vertex information of the object, marking and bridging the mesh vertices to obtain a plurality of quadrilateral faces, wherein the mesh vertex information on the quadrilateral faces is defined as a first type; mapping the mesh vertices corresponding to the first type to the two-dimensional coordinate system to obtain the target UV position information.
[0061] That is to say, obtain the mesh vertex information of the object itself, mark and bridge the mesh vertices, cut the quadrilateral, and cut it into 2 standard triangular faces, thereby obtaining the data information of the diagonal lines of the object's quadrilateral. Then, classify the mesh vertices, and define the points on the diagonal lines of the quadrilateral as "N", and the points on the non-diagonal lines as "M". In this way, all points of type M can be mapped to a two-dimensional coordinate system, such as mapping to the [0, 1] position in the two-dimensional coordinate system, and mapping the points on the diagonal lines of type N to the straight line Y=X in the two-dimensional coordinate system. Thus, the mapping relationship diagram of the cut triangular faces in the two-dimensional coordinate system can be obtained. Figure 4 and Figure 5 As shown, it is cut into 2 standard triangle faces with diagonal information as follows Figure 4 As shown, the mapping relationship of the cut triangle surface in the two-dimensional coordinate system is as follows Figure 5 In this way, the target UV position information can be obtained, that is, the UV position information of the quadrilateral wireframe of the four sides.
[0062] S103: Mapping the target UV position information into a two-dimensional coordinate system.
[0063] In one embodiment of the present invention, mapping the target UV position information into a two-dimensional coordinate system includes: obtaining vector values in the X-axis and Y-axis directions of the target UV position information; obtaining an offset between the quadrilateral wireframe and a standard quadrilateral wireframe based on the vector values; and mapping the standard quadrilateral wireframe into the two-dimensional coordinate system based on the offset.
[0064] Specifically, the vector values of the two axes, X and Y, in the UV vector space are split and extracted, and are re-edited and remapped to the [0, 1] plane space in the first quadrant of the two-dimensional coordinate system. For example, the vector values of the two axes, X and Y, are divided into four floating-point values, R, G, B, and A, by means of component masking, and X=0 is defined, Y is defined as an indefinite constant, and [X, Y] is defined as the Offset value (i.e., offset) of the rectangular UV space to control the length and width of the rectangular frame (i.e., the quadrilateral wireframe). The vector values of the two axes, X and Y, that are re-edited, are remapped to the first quadrant of the two-dimensional coordinate system, for example, linear interpolation is performed between the x and y components of the input In Min Max according to the input In value, and the value between the x and y components of the output Out Min Max is output.
[0065] In this example, [X, Y] is defined as the Offset value of the rectangle UV space, and a rectangle is generated based on the input UV with the size specified by the input Width and Height. The generated shape can be offset or tiled by connecting a Tiling And Offset node. It should be noted that in order to retain the ability to offset shapes within the UV vector space, the shape will not be repeated if it is tiled.
[0066] In the above description, Offset refers to the required offset, In Min Max: the minimum and maximum values of the input interpolation, and Out Min Max: the minimum and maximum values of the output interpolation.
[0067] S104: Obtain the color space value of the object, and render a quadrilateral wireframe of the object based on a mapping relationship of the color space value in the two-dimensional coordinate system.
[0068] In a specific example, the color space value of the object is obtained, and based on the mapping relationship of the color space value in the two-dimensional coordinate system, the quadrilateral wireframe of the object is rendered, including: obtaining the color space value of the object, and establishing a mapping relationship between the color space value and a four-dimensional vector group, wherein the four-dimensional vector group is determined by the position mapped from the target UV position information to the two-dimensional coordinate system; based on the mapping relationship between the color space value and the four-dimensional vector group, the quadrilateral wireframe of the object is rendered. That is: obtaining the RGB color space value of the object itself, and establishing a mapping relationship between it and the four-dimensional vector group. For example: using the Color field to define a constant vector 4 value in the shader. It can be converted to the Color attribute type through the context menu of the node. The value of the object's own parameters is also considered when generating attributes; the Color node is in the gamma space or the linear space. Among them, a four-dimensional vector group [R, G, B, A] can be defined, and its mapping relationship with the linear space can be established. Among them, linear space means that the result obtained by adding and multiplying digitized color and light intensity in linear space is still consistent with the real result, and gamma space means that the digitized color and light intensity are processed nonlinearly in gamma space to obtain appropriate recognition.
[0069] According to the method for rendering the quadrilateral wireframe of the model of the embodiment of the present invention, the UV position information of the quadrilateral wireframe of the object is first obtained from the UV coordinate system and mapped to the two-dimensional coordinate system. Then, by obtaining the color space value of the object, a mapping relationship between the color space value and the quadrilateral wireframe can be established, thereby conveniently realizing the color rendering of the quadrilateral wireframe. Compared with the prior art, there is no need to calculate the point, line and light and shadow data of the object, thereby effectively reducing the consumption of computing resources and the occupation of video memory, etc. in the display process of the three-dimensional scene environment, and improving the performance of the display terminal.
[0070] On the other hand, Figure 6 As shown, the embodiment of the present application provides a rendering system for a quadrilateral wireframe of a model, including: an acquisition module 610, a quadrilateral wireframe determination module 620, a mapping module 630 and a rendering module 640, wherein:
[0071] An acquisition module 610 is used to acquire UV position information of an object in a UV coordinate system, wherein the UV position information is UV position information of any channel;
[0072] A quadrilateral wireframe determination module 620, configured to obtain target UV position information from the UV position information;
[0073] A mapping module 630, used to map the target UV position information into a two-dimensional coordinate system;
[0074] The rendering module 640 is used to obtain the color space value of the object and render the quadrilateral wireframe of the object based on the mapping relationship of the color space value in the two-dimensional coordinate system.
[0075] In one embodiment of the present invention, the quadrilateral wireframe determination module 620 is specifically used to:
[0076] Based on the type of mesh vertex information of the object, UV position information on the quadrilateral wireframe is obtained, and the UV position information on the quadrilateral wireframe is used as the target UV position information.
[0077] In one embodiment of the present invention, the mapping module 630 is specifically used to:
[0078] Obtain the vector values of the X-axis and Y-axis directions of the target UV position information;
[0079] Based on the vector value, obtaining an offset between the quadrilateral wireframe and a standard quadrilateral wireframe;
[0080] Based on the offset, the standard quadrilateral wireframe is mapped into the two-dimensional coordinate system.
[0081] In one embodiment of the present invention, the rendering module 640 is specifically used to:
[0082] Acquire the color space value of the object, and establish a mapping relationship between the color space value and a four-dimensional vector group, wherein the four-dimensional vector group is determined by mapping the target UV position information to a position in the two-dimensional coordinate system;
[0083] Based on the mapping relationship between the color space value and the four-dimensional vector group, a quadrilateral wireframe of the object is rendered.
[0084] According to the rendering system of the quadrilateral wireframe of the model of the embodiment of the present invention, the UV position information of the quadrilateral wireframe of the object is first obtained from the UV coordinate system, and it is mapped to the two-dimensional coordinate system. Then, by obtaining the color space value of the object, a mapping relationship between the color space value and the quadrilateral wireframe can be established, thereby conveniently realizing the color rendering of the quadrilateral wireframe. Compared with the prior art, there is no need to calculate the point, line and light and shadow data of the object, so that the consumption of computing resources and the occupation of video memory, etc. in the display process of the three-dimensional scene environment can be effectively reduced, and the performance of the display terminal is improved.
[0085] It should be noted that the specific implementation method of the rendering system of the quadrilateral wireframe of the model in the embodiment of the present application is similar to the specific implementation method of the rendering method of the quadrilateral wireframe of the model in the embodiment of the present application. Please refer to the description of the method part for details and will not be repeated here.
[0086] Figure 7 A schematic diagram of the structure of a model rendering device according to an embodiment of the present application.
[0087] like Figure 7 As shown, the model rendering device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from the storage part 602 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the model rendering device 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0088] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.
[0089] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, the above-mentioned functions defined in the model rendering device of the present application are executed.
[0090] It should be noted that the computer-readable medium shown in the present application 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 model rendering device, apparatus 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 application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction-executing model rendering device, apparatus or device. In the present application, 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 electromagnetic signals, optical signals, 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-executing model rendering device, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0091] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the processing receiving device, method and computer program product according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the aforementioned module, 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 alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based model rendering device that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0092] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The described units or modules may also be set in a processor, and the processor is used to implement a method for rendering a quadrilateral wireframe of a model when executing the program: obtaining UV position information of an object in a UV coordinate system; obtaining target UV position information from the UV position information, wherein the target UV position information is the UV position information of the quadrilateral wireframe of the object; mapping the target UV position information to a two-dimensional coordinate system; obtaining the color space value of the object, and rendering the quadrilateral wireframe of the object based on the mapping relationship of the color space value in the two-dimensional coordinate system.
[0093] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the model rendering device described in the above embodiment; or it may exist independently and not be assembled into the model rendering device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the method for rendering the quadrilateral wireframe of the model described in the present application: obtaining the UV position information of the object in the UV coordinate system; obtaining the target UV position information from the UV position information, wherein the target UV position information is the UV position information of the quadrilateral wireframe of the object; mapping the target UV position information to a two-dimensional coordinate system; obtaining the color space value of the object, and rendering the quadrilateral wireframe of the object based on the mapping relationship of the color space value in the two-dimensional coordinate system.
[0094] As another aspect, the present application also provides a computer program product, which may be included in the model rendering device described in the above embodiment; or it may exist independently and not be assembled into the model rendering device. The above computer program product stores one or more programs, and when the above programs are used by one or more processors to execute the method for rendering the quadrilateral wireframe of the model described in the present application: obtaining the UV position information of the object in the UV coordinate system; obtaining the target UV position information from the UV position information, wherein the target UV position information is the UV position information of the quadrilateral wireframe of the object; mapping the target UV position information to a two-dimensional coordinate system; obtaining the color space value of the object, and rendering the quadrilateral wireframe of the object based on the mapping relationship of the color space value in the two-dimensional coordinate system.
[0095] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution 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 aforementioned disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for rendering a quadrilateral wireframe of a model, characterized in that: include: Get the UV position information of the object in the UV coordinate system; Obtaining target UV position information from the UV position information, wherein the target UV position information is UV position information of a quadrilateral wireframe of the object, specifically comprising: obtaining UV position information on the quadrilateral wireframe based on the type of mesh vertex information of the object, and using the UV position information on the quadrilateral wireframe as the target UV position information; Mapping the target UV position information into a two-dimensional coordinate system specifically includes: obtaining vector values of the target UV position information in the X-axis and Y-axis directions; obtaining an offset between the quadrilateral wireframe and the standard quadrilateral wireframe based on the vector values; and mapping the standard quadrilateral wireframe into the two-dimensional coordinate system based on the offset; Obtaining the color space value of the object, and rendering the quadrilateral wireframe of the object based on the mapping relationship of the color space value in the two-dimensional coordinate system, specifically includes: obtaining the color space value of the object, and establishing a mapping relationship between the color space value and a four-dimensional vector group, wherein the four-dimensional vector group is determined by the position mapped from the target UV position information to the two-dimensional coordinate system; and rendering the quadrilateral wireframe of the object based on the mapping relationship between the color space value and the four-dimensional vector group.
2. The method for rendering a quadrilateral wireframe of a model according to claim 1, characterized in that: The obtaining, based on the type of mesh vertex information of the object, UV position information on the quadrilateral wireframe, and using the UV position information on the quadrilateral wireframe as the target UV position information, includes: Obtaining mesh vertex information of the object, and marking and bridging the mesh vertices to obtain a plurality of quadrilaterals, wherein the mesh vertex information on the quadrilaterals is defined as a first type; The mesh vertices corresponding to the first type are mapped to the two-dimensional coordinate system to obtain the target UV position information.
3. The method for rendering a quadrilateral wireframe of a model according to claim 1, characterized in that: Mapping the target UV position information to a two-dimensional coordinate system includes: Obtain the vector values of the X-axis and Y-axis directions of the target UV position information; Based on the vector value, obtaining an offset between the quadrilateral wireframe and a standard quadrilateral wireframe; Based on the offset, the standard quadrilateral wireframe is mapped into the two-dimensional coordinate system.
4. The method for rendering a quadrilateral wireframe of a model according to any one of claims 1 to 3, characterized in that: The step of obtaining UV position information of the object in the UV coordinate system includes: Get the UV coordinate system of the object; The UV position information of the object on any channel is obtained from the UV coordinate system.
5. A rendering system for a quadrilateral wireframe of a model, characterized in that: include: An acquisition module, used to acquire UV position information of an object in a UV coordinate system, wherein the UV position information is UV position information of any channel; A quadrilateral wireframe determination module is used to obtain target UV position information from the UV position information, specifically for: obtaining UV position information on the quadrilateral wireframe based on the type of mesh vertex information of the object, and using the UV position information on the quadrilateral wireframe as the target UV position information; A mapping module, used to map the target UV position information into a two-dimensional coordinate system, specifically used to: obtain vector values of the target UV position information in the X-axis and Y-axis directions; based on the vector values, obtain an offset between the quadrilateral wireframe and the standard quadrilateral wireframe; based on the offset, map the standard quadrilateral wireframe into the two-dimensional coordinate system; A rendering module is used to obtain the color space value of the object and render the quadrilateral wireframe of the object based on the mapping relationship of the color space value in the two-dimensional coordinate system, specifically used to: obtain the color space value of the object and establish a mapping relationship between the color space value and a four-dimensional vector group, wherein the four-dimensional vector group is determined by the position mapped from the target UV position information to the two-dimensional coordinate system; and render the quadrilateral wireframe of the object based on the mapping relationship between the color space value and the four-dimensional vector group.
6. A model rendering device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to implement a method for rendering a quadrilateral wireframe of a model according to any one of claims 1 to 4 when executing the program.
7. A computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to implement the method for rendering a quadrilateral wireframe of a model according to any one of claims 1 to 4.
8. A computer program product, characterized in that A computer program is stored thereon, and the computer program is used to implement a method for rendering a quadrilateral wireframe of a model according to any one of claims 1-4.
Citation Information
Patent Citations
3D display handling of subtitles
AU2011202552A1
Ink painting simulation method of three-dimensional tree model
CN103218846A
Method and system for object rendering in 3D engine
CN103810745A
Intelligent device control and arrangement system and method applied to indoor design
CN103823949A
Rendering method and device
CN106502667A
