CN111462343A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111462343A
CN111462343A CN202010244543.3A CN202010244543A CN111462343A CN 111462343 A CN111462343 A CN 111462343A CN 202010244543 A CN202010244543 A CN 202010244543A CN 111462343 A CN111462343 A CN 111462343A
Authority
CN
China
Prior art keywords
texture coordinate
skeleton
texture
vertex
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010244543.3A
Other languages
Chinese (zh)
Other versions
CN111462343B (en
Inventor
黄舒怀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010244543.3A priority Critical patent/CN111462343B/en
Publication of CN111462343A publication Critical patent/CN111462343A/en
Application granted granted Critical
Publication of CN111462343B publication Critical patent/CN111462343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Abstract

The invention provides a data processing method, which comprises the following steps: determining a corresponding skeleton based on the texture coordinate set; determining the corresponding relation between all texture coordinate vertexes in the texture coordinate set and a skeleton; determining a texture coordinate line segment set to be optimized; the invention further provides a data processing device, electronic equipment and a storage medium. The invention can realize automatic adjustment of the target object in the virtual environment, improves the efficiency of the machine for automatically processing the image data of the virtual environment and reduces the waiting time of image processing.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to data processing technology in a virtual environment, and in particular, to a data processing method, an apparatus, an electronic device, and a storage medium.
Background
In the related art, virtual objects (e.g., three-dimensional virtual characters) are used in a social application or a game application to simulate a user character or avatar, and the avatar is vivid. A terminal (development terminal) generally uses a Unity development tool to generate a three-dimensional virtual object, and first, the terminal (development terminal) may obtain a design model from a model design tool and import the design model into the Unity development tool to process a three-dimensional scene and a three-dimensional virtual object. In this process, in order to reduce the size of the game volume in game development, it is common to texture the illumination pattern with the lowest resolution possible. The low-resolution texture carries illumination information with limited precision, and the jump of illumination among pixels is obvious. If a straight or vertical edge of the three-dimensional object is mapped to an illumination map and is an oblique line, sawteeth are easily generated after illumination operation, and the use experience of a user is influenced. The traditional technology popularizes a manual processing mode to adjust the line of the texture coordinate line segment to be in a completely horizontal or vertical state for solving the problem, but the manual processing speed is low, and the processing of a target object in a three-dimensional virtual environment with large quantity and large volume is not facilitated.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data processing method, an apparatus, an electronic device, and a storage medium, and a technical solution of an embodiment of the present invention is implemented as follows:
the embodiment of the invention provides a data processing method, which comprises the following steps:
acquiring a texture coordinate set matched with a target object, and determining a corresponding skeleton based on the texture coordinate set;
determining a texture coordinate line segment set to be optimized based on the corresponding relation between all texture coordinate vertexes in the texture coordinate set and the skeleton;
optimizing the texture coordinate line segment set to be optimized based on the inner angle set matched with the texture coordinate set to determine new coordinates of each vertex in the texture coordinate set;
and replacing all elements in the texture coordinate set by the new coordinates of each texture coordinate vertex so as to adjust the target object in the virtual environment.
An embodiment of the present invention further provides a data processing apparatus, where the apparatus includes:
the information processing module is used for acquiring a texture coordinate set matched with a target object in a virtual environment and determining a corresponding skeleton based on the texture coordinate set;
the information processing module is used for determining a texture coordinate line segment set to be optimized based on the corresponding relation between all texture coordinate vertexes in the texture coordinate set and the skeleton;
the information processing module is used for optimizing the texture coordinate line segment set to be optimized based on the inner angle set matched with the texture coordinate set so as to determine new coordinates of each vertex in the texture coordinate set;
and the information adjusting module is used for replacing all elements in the texture coordinate set through the new coordinates of each texture coordinate vertex so as to adjust the target object.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining the outer contour of the texture coordinate set matched with the target object and deleting the closed area contained in the outer contour of the texture coordinate set;
the information processing module is used for determining a segmented Thiessen polygon corresponding to the outer contour of the texture coordinate set;
the information processing module is used for deleting the sidelines of the segmented Thiessen polygon exceeding the outer contour and the sidelines of the segmented Thiessen polygon connected with the outer contour based on the segmented Thiessen polygon corresponding to the outer contour;
and the information processing module is used for determining a corresponding skeleton based on the segmented Thiessen polygon corresponding to the outer contour subjected to edge line deletion.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a corresponding undirected graph based on the vertex and the side line of the segmented Thiessen polygon corresponding to the outer contour subjected to side line deletion;
the information processing module is used for determining a root node of the skeleton and a rotation amount attribute parameter matched with the root node based on an indifferent neutral line of the undirected graph;
the information processing module is used for performing global traversal according to the root node of the skeleton so as to determine tree structures corresponding to different nodes of the skeleton;
and the information processing module is used for configuring corresponding rotation quantity attribute parameters for the sidelines of the segmented Thiessen polygons respectively corresponding to different nodes in the tree structure to form a complete framework.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining the side line of the segmented Thiessen polygon connected with the texture coordinate vertex when the texture coordinate vertex is superposed with the vertex of the segmented Thiessen polygon and the texture coordinate vertex is positioned in the boundary of the texture coordinate set, and taking a skeleton node corresponding to the vertex at the other end of the side line of the segmented Thiessen polygon as a binding point corresponding to the texture coordinate vertex;
and the information processing module is used for determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a skeleton node coincident with the vertex of the texture coordinate as a binding point corresponding to the vertex of the texture coordinate when the vertex of the texture coordinate is coincident with the vertex of the Thiessen polygon and the vertex of the texture coordinate exceeds the boundary of the texture coordinate set;
and the information processing module is used for determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining a parent node corresponding to the sideline of the segmented Thiessen polygon as the skeleton node corresponding to all the texture coordinate vertexes as a binding point set when the texture coordinate vertexes are located in the sideline of the segmented Thiessen polygon and the texture coordinate vertexes are not overlapped with the vertexes of the segmented Thiessen polygon, so as to determine the corresponding relation between all the texture coordinate vertexes and the skeleton in the texture coordinate set.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for determining binding points corresponding to all points which are not in the texture coordinate set in the segmented Thiessen polygon when the texture coordinate vertex is positioned in the segmented Thiessen polygon;
and the information processing module is used for determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton.
The information processing module is used for clustering all texture coordinate line segments in the texture coordinate set to form different multi-segment texture coordinate line segments matched with the clusters;
the information processing module is used for clustering the multiple texture coordinate line segments;
and the information processing module is used for deleting a plurality of texture coordinate line segments matched with preset conditions based on the clustering results of the plurality of texture coordinate line segments so as to form a texture coordinate line segment set serving as an optimization target.
In the above-mentioned scheme, the first step of the method,
the information processing module is used for deleting the clustering results corresponding to the single multi-section texture coordinate line segments;
and the information processing module is used for deleting the clustering results corresponding to the multiple texture coordinate line segments which exceed the boundary of the texture coordinate set and have the length difference larger than the corresponding length threshold.
In the above-mentioned scheme, the first step of the method,
the information adjusting module is used for determining a corresponding framework rotation amount parameter based on the internal angle set matched with the texture coordinate set;
and the information adjusting module is used for optimizing the texture coordinate line segment set to be optimized through the framework rotation amount parameter so as to determine a new coordinate of each vertex in the texture coordinate set.
In the above-mentioned scheme, the first step of the method,
the information adjusting module is used for determining the slope amount corresponding to the side line of the segmented Thiessen polygon through the skeleton rotation amount parameter;
the information adjusting module is used for determining the right angle constraint quantity matched with the vertex of the texture coordinate through the framework rotation quantity parameter;
and the information adjusting module is used for determining a new coordinate of the texture coordinate vertex based on the slope amount corresponding to the edge of the segmented Thiessen polygon and the right angle constraint amount.
In the above scheme, the apparatus further comprises:
the display module is used for displaying a user interface and displaying the target object in the user interface;
the display module is used for displaying a file configuration path matched with a target object on the user interface when receiving a trigger operation on the target object in the virtual environment, and editing the target object through a control component;
and the display module is used for acquiring all elements in the texture coordinate set and displaying the target object through the new coordinates of each vertex in the user interface through the control component.
An embodiment of the present invention further provides an electronic device, where the electronic device includes:
a memory for storing executable instructions;
and the processor is used for realizing the data processing method of the preamble when the executable instruction stored in the memory is operated.
The embodiment of the invention also provides a computer-readable storage medium, which stores executable instructions, and the executable instructions are executed by a processor to realize the data processing method of the preamble.
The embodiment of the invention has the following beneficial effects:
the embodiment of the invention obtains a texture coordinate set matched with a target object, and determines a corresponding skeleton based on the texture coordinate set; determining a texture coordinate line segment set to be optimized based on the corresponding relation between all texture coordinate vertexes in the texture coordinate set and the skeleton; determining a corresponding framework rotation amount parameter based on the internal angle set matched with the texture coordinate set; optimizing the texture coordinate line segment set to be optimized through the framework rotation amount parameter so as to determine a new coordinate of each vertex in the texture coordinate set; all elements in the texture coordinate set are replaced through the new coordinates of each texture coordinate vertex to adjust the target object, so that the target object in the virtual environment can be automatically adjusted, the efficiency of the machine for automatically processing the image data of the virtual environment is improved, the waiting time of image processing is reduced, and the use experience of a user is improved.
Drawings
FIG. 1 is a schematic diagram of an environment for use in a data processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 3A is an alternative flow chart of a data processing method according to an embodiment of the present invention;
FIG. 3B is a schematic diagram illustrating a target object display of a virtual environment according to an embodiment of the present invention;
FIG. 3C is a diagram illustrating processing of a target object of a virtual environment according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a front-end display for determining a texture coordinate set according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an outer contour of a target object formed by a set of texture coordinates with holes according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating an outer contour of a target object formed by a set of texture coordinates without holes according to an embodiment of the present invention;
fig. 7 is an alternative flow chart of the data processing method according to the embodiment of the present invention;
FIG. 8 is a schematic view of a segmented Thiessen polygon of the outer contour of the texture coordinate set in an embodiment of the present invention;
FIG. 9 is a schematic diagram of a segmented Thiessen polygon with edge deletion according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a root node of a skeleton of a texture coordinate set of a target object according to an embodiment of the present invention;
FIG. 11 is a diagram illustrating the binding of vertices to a skeleton for a set of texture coordinates of a target object according to an embodiment of the present invention;
FIG. 12 is a schematic diagram illustrating an embodiment of adjusting a skeleton of a texture coordinate set of a target object;
fig. 13 is an alternative flow chart of the data processing method according to the embodiment of the present invention;
FIG. 14 is a schematic diagram of a front-end display interface of the data processing method provided by the present invention;
FIG. 15 is a schematic diagram of a front-end display input path interface of the data processing method provided by the present invention;
FIG. 16 is a schematic diagram of a front-end function execution interface of the data processing method provided by the present invention;
FIG. 17 is a schematic diagram of a front-end display interface of a data processing method according to the present invention;
FIG. 18 is a schematic diagram of a target object display effect interface of the data processing method according to the present invention;
FIG. 19 is a schematic diagram illustrating an effect of the data processing method according to the present invention;
fig. 20 is a schematic diagram illustrating an effect of the data processing method provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
Before further detailed description of the embodiments of the present invention, terms and expressions mentioned in the embodiments of the present invention are explained, and the terms and expressions mentioned in the embodiments of the present invention are applied to the following explanations.
1) In response to the condition or state on which the performed operation depends, one or more of the performed operations may be in real-time or may have a set delay when the dependent condition or state is satisfied; there is no restriction on the order of execution of the operations performed unless otherwise specified.
2) Terminals, including but not limited to: the system comprises a common terminal and a special terminal, wherein the common terminal is in long connection and/or short connection with a sending channel, and the special terminal is in long connection with the sending channel.
3) The client, the carrier in the terminal implementing the specific function, e.g. the mobile client (APP), is the carrier of the specific function in the mobile terminal, e.g. the function of editing the target object in the virtual environment.
4) Light map: an illumination map is a data structure for storing illumination information (brightness, radiance, etc.) of a pre-computed object surface in a virtual scene for subsequent rendering operations, usually represented as a two-dimensional image. The illumination map is widely used for a static object of real-time three-dimensional rendering, and is a global illumination method with low calculation cost.
5) UV Mapping (UV Mapping), which is a process of Mapping a two-dimensional image onto the surface of a three-dimensional object in a three-dimensional modeling process, wherein the two-dimensional subscript of a texel in an array representing the texture (i.e. its two-dimensional coordinates in a bitmap) is called texture coordinate, typically expressed in letters (u, v), also called texture coordinate (UV coordinate).
6) The texture coordinate set, also called UV island, is a coordinate set formed by all UV coordinates in a UV mapping, where there is an association relationship, and the texture coordinates in the texture coordinate set may be combined to form different UV line segments.
7) Virtual environment: is a virtual environment that is displayed (or provided) when an application is run on the terminal. The virtual environment may be a simulation environment of a real world, a semi-simulation semi-fictional three-dimensional environment, or a pure fictional three-dimensional environment. The virtual environment may be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment, and a three-dimensional virtual environment. The three-dimensional virtual environment is typically generated by an application program in a computer device such as a terminal and is presented based on hardware (such as a screen) in the terminal. The terminal can be a mobile terminal such as a smart phone, a tablet computer or an electronic book reader; alternatively, the terminal may be a personal computer device such as a notebook computer or a stationary computer.
8) And the target object refers to an object in a three-dimensional virtual environment. The target object may be at least one of a virtual building, a virtual plant, a virtual terrain, a virtual character, a virtual furniture, a virtual vehicle, and a virtual animal/pet.
Fig. 1 is a schematic view of a usage scenario of a data processing method according to an embodiment of the present invention, referring to fig. 1, a terminal (including a terminal 10-1 and a terminal 10-2) is provided with a client capable of displaying software for corresponding data processing, such as a client or a plug-in for different game editions, and a user can obtain and display data processing through the corresponding client, and trigger a corresponding data processing process (for example, design and modification of different target objects in a virtual environment) in a virtual resource change process; the terminal is connected to the server 200 through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of the two, and uses a wireless link to realize data transmission.
As an example, the server 200 is configured to deploy the data processing apparatus to implement the data processing method provided by the present invention, so as to implement the method by acquiring a texture coordinate set matching with a target object and determining a corresponding skeleton based on the texture coordinate set; determining a texture coordinate line segment set to be optimized based on the corresponding relation between all texture coordinate vertexes in the texture coordinate set and the skeleton; determining a corresponding framework rotation amount parameter based on the internal angle set matched with the texture coordinate set; optimizing the texture coordinate line segment set to be optimized through the framework rotation amount parameter so as to determine a new coordinate of each vertex in the texture coordinate set; and replacing all elements in the texture coordinate set by the new coordinates of each texture coordinate vertex so as to realize the adjustment of the target object.
Of course, the data processing apparatus provided by the present invention may be applied to different game environments including, but not limited to, a virtual reality application program, a three-dimensional map program, a military simulation program, a First-person shooter game (FPS First-person shooting game), a Multiplayer online tactical sports game (MOBA Multiplayer O nline Battle arena games), and the like, and finally presents a target object in the three-dimensional virtual environment on a User Interface (UI User Interface).
As will be described in detail below with respect to the structure of the data processing apparatus according to the embodiment of the present invention, the data processing apparatus may be implemented in various forms, such as a dedicated terminal with a processing function of the data processing apparatus, or a server provided with a processing function of the data processing apparatus, for example, the server 200 in the foregoing fig. 1. Fig. 2 is a schematic diagram of a component structure of a data processing apparatus according to an embodiment of the present invention, and it is understood that fig. 2 only shows an exemplary structure of the data processing apparatus, and not a whole structure, and a part of or the whole structure shown in fig. 2 may be implemented as needed.
The data processing device provided by the embodiment of the invention comprises: at least one processor 201, memory 202, user interface 203, and at least one network interface 204. The various components in the data processing apparatus are coupled together by a bus system 205. It will be appreciated that the bus system 205 is used to enable communications among the components. The bus system 205 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 205 in fig. 2.
The user interface 203 may include, among other things, a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touch pad, or a touch screen.
It will be appreciated that the memory 202 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. The memory 202 in embodiments of the present invention is capable of storing data to support operation of the terminal (e.g., 10-1). Examples of such data include: any computer program, such as an operating system and application programs, for operating on a terminal (e.g., 10-1). The operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application program may include various application programs.
For example, the processor in the form of a hardware decoding processor may employ one or more Application Specific integrated circuits (asic), DSPs, Programmable logic devices (P L D, Programmable L) Complex Programmable logic devices (CP L D, Complex Programmable mac L) Field Programmable Gate Arrays (FPGA), or other electronic components.
As an example of the data processing apparatus provided by the embodiment of the present invention implemented by combining software and hardware, the data processing apparatus provided by the embodiment of the present invention may be directly embodied as a combination of software modules executed by the processor 201, where the software modules may be located in a storage medium located in the memory 202, and the processor 201 reads executable instructions included in the software modules in the memory 202, and completes the data processing method provided by the embodiment of the present invention in combination with necessary hardware (for example, including the processor 201 and other components connected to the bus 205).
By way of example, the Processor 201 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor or the like.
As an example of the data processing apparatus provided by the embodiment of the present invention implemented by hardware, the apparatus provided by the embodiment of the present invention may be implemented by directly using the processor 201 in the form of a hardware decoding processor, for example, by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable logic devices (P L D, Programmable L analog devices), complex Programmable logic devices (CP L D, complex Programmable L analog devices), Field Programmable Gate Arrays (FPGAs), or other electronic components, to implement the data processing method provided by the embodiment of the present invention.
The memory 202 in the embodiments of the present invention is used to store various types of data to support the operation of the data processing apparatus. Examples of such data include: any executable instructions for operating on a data processing apparatus, such as executable instructions, may be included in the program for implementing the slave data processing method of an embodiment of the present invention.
In other embodiments, the data processing apparatus provided in the embodiments of the present invention may be implemented by software, and fig. 2 shows the data processing apparatus stored in the memory 202, which may be software in the form of programs, plug-ins, and the like, and includes a series of modules, and as an example of the programs stored in the memory 202, the data processing apparatus may include the following software modules, an information transmission module 2081, and an information processing module 2082. When the software module in the data processing apparatus is read into the rram by the processor 201 and executed, the data processing method provided by the embodiment of the present invention is implemented, where the functions of each software module in the data processing apparatus include:
the information processing module 2081 is configured to obtain a texture coordinate set matched with a target object in a virtual environment, and determine a corresponding skeleton based on the texture coordinate set;
the information processing module 2081 is configured to determine correspondence between vertices of all texture coordinates in the texture coordinate set and the skeleton;
the information processing module 2081 is configured to determine a texture coordinate line segment set to be optimized based on a corresponding relationship between the texture coordinate vertex and the skeleton;
the information processing module 2081 is configured to perform optimization adjustment on the skeleton based on the internal angle set matched with the texture coordinate set, and determine a corresponding skeleton rotation amount parameter;
the information adjusting module 2082 is configured to determine a new coordinate of each vertex in the texture coordinate set according to the skeleton rotation amount parameter, and replace all elements in the texture coordinate set with the new coordinate of each vertex of the texture coordinate, so as to adjust the target object in the virtual environment.
Referring to fig. 3A, fig. 3A is an optional flowchart of the data processing method provided by the embodiment of the present invention, and it can be understood that the steps shown in fig. 3A may be executed by various electronic devices operating the data processing apparatus, such as a server with the data processing apparatus or a server cluster, where a dedicated terminal with the data processing apparatus may be packaged in the server shown in fig. 1 to execute corresponding software modules in the data processing apparatus shown in the foregoing fig. 2.
Before introducing the data processing method provided by the present invention, firstly, an adjustment process of a two-dimensional image and a three-dimensional image matched with a target object in a three-dimensional virtual environment is introduced in combination with a use environment shown in fig. 1, where, referring to fig. 3B and 3C, fig. 3B is a target object display schematic diagram of the virtual environment in the embodiment of the present invention, fig. 3C is a processing schematic diagram of the target object of the virtual environment in the embodiment of the present invention, and in the three-dimensional image processing process of the virtual environment, a target object (for example, a three-dimensional virtual character) is adopted in a social application or a game application at present to simulate a user role or an image, and the user role or the image is vivid. In the process of generating a three-dimensional object by using a Unity development tool, a terminal (development terminal) may acquire a design model from the model design tool, and introduce the design model into the Unity development tool to process a three-dimensional scene and the three-dimensional object. As shown in 302 on the right side of fig. 3B, a schematic diagram of a display effect of a texture coordinate line segment is shown, and an outer contour of the target object is formed by the texture coordinate line segment (UV line segment), wherein the texture coordinate line segment shown in 302 has a large tortuosity, the precision of illumination information carried by a low-resolution texture is limited, and jump of illumination between pixels is obvious. Specifically, the left side 301 of fig. 3B shows the display effect of the texture coordinate line segment in the three-dimensional environment, and if a straight or vertical edge of the three-dimensional object is mapped to an illumination map and is an oblique line, jaggies are easily generated after the illumination operation, and the jagged outline affects the display effect of the target object.
In order to solve this problem, referring to fig. 3C, during the manual processing, the corresponding texture coordinate line segment is often adjusted to be completely horizontal or vertical, for example, 304 shows a schematic diagram of the adjusted texture coordinate line segment, the jagged outer contour disappears after the illumination operation, 303 shows a display effect of the adjusted texture coordinate line segment in the three-dimensional environment, and the target object displayed to the user is clear, but the manual processing efficiency during this manual processing is slow, which is not favorable for the large-scale processing of the game animation.
To solve the above-mentioned drawback, the following is described with respect to the steps shown in fig. 3A.
Step 301: the data processing device acquires a texture coordinate set matched with the target object in the virtual environment and determines a corresponding skeleton based on the texture coordinate set.
The texture coordinates (UV coordinates) are abbreviated as texture map coordinates. Which defines information of the position of each point on the picture. These points are correlated with the 3D model to determine the position of the surface texture map. UV is the exact mapping of each point on the image to the surface of the model object. Taking the building in the game application scene as an example, each building model is composed of individual faces, and the UV texture can be regarded as the "skin" of the model composed of all the faces, and the operation mode is to two-dimensionally distribute the three-dimensional "skin" on a square canvas, and then project the details of the map from the square canvas to a three-dimensional space through the drawn map to form the building model. The representation form of the texture coordinate can be a two-dimensional array for storing color values. Each color value in the array has a unique address in the texture, which can be considered as the number of rows and columns, which are labeled U and V, respectively, i.e., texture coordinates, where U represents the abscissa of the texture and V represents the ordinate of the texture.
Further, the texture coordinates are located in the texture space, that is, their coordinate positions in the texture storage area [0, 1], and thus, the range of the texture coordinates is [0, 1 ]. When a texture is attached to the surface of a primitive in three-dimensional space, the color values of the texture must first be mapped to the object coordinate system and then transformed to the screen coordinate system, or pixel location.
In some embodiments of the invention, determining a corresponding skeleton based on the set of texture coordinates comprises:
determining an outer contour of a texture coordinate set matched with a target object, and deleting a closed area contained in the outer contour of the texture coordinate set; determining a segmented Thiessen polygon corresponding to the outer contour of the texture coordinate set; deleting the side lines of the segmented Thiessen polygons exceeding the outer contour and the side lines of the segmented Thiessen polygons connected with the outer contour based on the segmented Thiessen polygons corresponding to the outer contour; and determining a corresponding skeleton based on the segmented Thiessen polygon corresponding to the outer contour subjected to the edge line deletion. The types of the target objects in the virtual environment are various, and the specifications and the complexity of the target objects are different, so that by deleting the closed area contained in the outer contour of the texture coordinate set, and deleting the side line of the segmented Thiessen polygon exceeding the outer contour and the side line of the segmented Thiessen polygon connected with the outer contour, the maximization of the reserved outer contour of the texture coordinate set can be ensured, the integrity of the target objects is realized, the outer contour can be ensured not to contain the closed area, the minimization of the calculated amount of the outer contour of the target objects to be adjusted is ensured, and the efficiency of automatic processing is improved.
Referring to fig. 4, fig. 4 is a schematic front-end display diagram of determining a texture coordinate set according to an embodiment of the present invention. After the target object is extended, a texture coordinate set (i.e., UV island) matched to the target object may be calculated using a polygon boolean operation, where U and V indicate acronyms for texture coordinates that define information for the location of each point in the target object that is interrelated with the form to be rendered by the target object to determine the location of the surface texture map. The UV is to accurately correspond each point on the image to the surface of the target object, and the position of the gap between the points can be processed by image smooth interpolation to simulate the parameters of brightness, hue, etc. of the target object in the virtual environment. Specifically, the method comprises the following steps: the outer contour corresponding to the texture coordinate set is shown in 401, the closed region corresponding to the texture coordinate set is shown in 402, and further, in order to reasonably distribute the UV texture of the object-oriented model on the canvas, the three-dimensional surface may be reasonably paved on the two-dimensional canvas, which is called as extending the target object. Meanwhile, after the target object is extended, polygons with intersection can be generated, and corresponding texture coordinates can be determined by determining the intersection of the polygons, which specifically includes: the polygon necessarily partitions the plane into two separate regions: an inner region and an outer region. The following definitions are determined: each linear object of the polygon has a normal vector associated with it, the region pointed to by the normal being marked "outer"; the opposite region is "interior". If the linear object is advanced in the specified direction, the inner region is located on the left, and the outer region is located on the right. Therefore, the intersection of the polygons is definitely divided, the texture coordinates matched with the target object are determined, and the texture coordinates can be collected into a corresponding texture coordinate set.
Further, the polygon that makes up the target object necessarily partitions the plane into two separate regions: in the inner area and the outer area, since the jaggies that are easily generated after the illumination operation are both located at the edge of the target object, referring to fig. 5 and fig. 6, fig. 5 is a schematic diagram of an outer contour of the target object formed by a texture coordinate set with holes in the embodiment of the present invention, where 501 shows an outer contour of the texture coordinate set with holes, and 502 shows holes in the outer contour of the target object; FIG. 6 is a schematic diagram of an outer contour of a target object formed by a texture coordinate set without holes in an embodiment of the present invention, where 601 shows an outer contour of a texture coordinate set with holes; it is necessary to extract the texture coordinate set outer contour corresponding to the target object and delete all holes in the outer contour (fig. 5 and 6 show an example of deleting only one hole as an embodiment).
With continuing reference to fig. 7, fig. 7 is an optional flowchart of the data processing method according to the embodiment of the present invention, and it can be understood that the steps shown in fig. 7 may be executed by various electronic devices operating the data processing apparatus, and specifically include the following steps:
step 701: and determining a corresponding undirected graph based on the vertex and the edge of the segmented Thiessen polygon corresponding to the outer contour subjected to edge deletion.
The segmented Thiessen polygon is composed of a group of continuous polygons composed of perpendicular bisectors connecting two adjacent point line segments. The distance from any point in the segmented Thiessen polygon to the control point forming the polygon is smaller than the distance from any point in the segmented Thiessen polygon to the control point forming the other polygon control points, and an Undirected Graph (Undirected Graph) is formed by all Undirected edges, namely the side edges of the segmented Thiessen polygon.
Step 702: determining a root node of the skeleton and a rotation amount attribute parameter matched with the root node based on an intermediate neutral line of the undirected graph;
wherein, the ending neutral (between centers) is the ratio of a node appearing on the shortest path between two other nodes; determining a skeleton according to a texture coordinate set (uv island), and then, in the adjustment of uv line segments, as long as the position relation relative to the skeleton is unchanged, the form of a target object formed after illumination mapping is not changed, corresponding texture coordinate line segments can be formed among texture coordinates of vertexes in the texture coordinate set, and if the shortest path among all the texture coordinate vertexes passes through a certain node, the node is regarded as a root node of the skeleton in Betwenness centre. It can be understood that the root node of the skeleton is necessarily located on the ending neutral line, and after the skeleton is determined, the shape of the target object cannot be changed no matter which direction the outer contour of the target object is turned over, so that the shape of the target object can be monitored conveniently.
Step 703: and performing global traversal according to the root node of the skeleton to determine the tree structures corresponding to different nodes of the skeleton.
The framework corresponding to the texture coordinate set is a tree structure, the tree structure is composed of different nodes in the framework, the rendering performance of the target object is driven by the framework and the animation together, the animation can drive the framework to move, and then the deviation of the position of the framework can reflect each texture coordinate vertex so as to ensure that the deformation of the target object is not distorted.
Step 704: and configuring corresponding rotation amount attribute parameters for the sidelines of the segmented Thiessen polygons respectively corresponding to different nodes in the tree structure to form a complete framework.
Based on the forward kinematics principle, the relative position relationship between the texture coordinate vertex and the topological structure of the whole model framework is determined according to the topological structure of the whole model framework by the tree structures corresponding to different nodes of the framework.
And storing the skeleton information and the rotation amount attribute parameters obtained by the solution in a standard BVH file (B ioVision Hierarchichalcataldata) (or other data structure files), wherein the standard BVH file comprises the relative translation and initial angle of the skeleton root node corresponding to the skeleton and the topological structure relative position relationship of the texture coordinate vertex and the whole model skeleton, so as to adjust the direction of the outer contour of the texture coordinate set.
Further, determining a segmented Thiessen polygon corresponding to the outer contour of the texture coordinate set; in the process of deleting the borderline of the segmented Thiessen polygon exceeding the outer contour and the borderline of the segmented Thiessen polygon connected with the outer contour based on the segmented Thiessen polygon corresponding to the outer contour, referring to FIG. 8, FIG. 8 is a schematic view of a segmented Thiessen polygon of the outer contour of a texture coordinate set in an embodiment of the present invention, wherein 801 shows a Thiessen polygon 1, 802 shows a Thiessen polygon 2, 802 shows an outer contour of a texture coordinate set, in particular, a segmented Thiessen polygon is composed of a set of continuous polygons composed of perpendicular bisectors connecting two adjacent point straight lines, by deleting the side lines of the segmented Thiessen polygons exceeding the outer contour and the side lines of the segmented Thiessen polygons connected with the outer contour, the side lines of the segmented Thiessen polygons only remaining inside the texture coordinate set can be obtained.
With continuing reference to fig. 9 and 10, fig. 9 is a schematic diagram of a segmented thiessen polygon with edge deletion according to an embodiment of the present invention, specifically, 901 shows an outer contour of a texture coordinate set, and 902 shows a skeleton of the texture coordinate set; fig. 10 is a schematic diagram of a root node of a skeleton of a texture coordinate set of a target object according to an embodiment of the present invention. Wherein 1001 shows an outer outline of the texture coordinate set, 1002 shows a skeleton of the texture coordinate set, and 1003 shows a root node of the skeleton of the texture coordinate set; specifically, an undirected graph can be constructed by using the vertices (Voronoi vertices) of the remaining segmented thieson polygons and the edges (Voronoi edges) of the segmented thieson polygons, and the median neutral Betweenness center of the graph can be calculated as the root node of the skeleton. And adding a rotation quantity attribute R to the root node to represent the global rotation quantity of the skeleton. And then performing breadth-first traversal from the determined root node, determining the parent-child relationship of the skeleton node according to the access arrival precedence relationship, and further forming a tree structure. A rotation attribute r is added to each node's edge connecting with its corresponding parent node to represent the amount of rotation relative to the parent node.
Step 302: the data processing device determines the corresponding relation between all texture coordinate vertexes in the texture coordinate set and the skeleton.
Because the representation forms of the target object in the virtual environment are all the same, the corresponding texture coordinate vertex and the position relation of the segmented Thiessen polygon are also different, for example:
in some embodiments of the present invention, determining the correspondence between all texture coordinate vertices in the texture coordinate set and the skeleton may be implemented by:
when the texture coordinate vertex is coincided with the vertex of the segmented Thiessen polygon and the texture coordinate vertex is located in the boundary of the texture coordinate set, determining the side line of the segmented Thiessen polygon connected with the texture coordinate vertex, and taking a skeleton node corresponding to the vertex at the other end of the side line of the segmented Thiessen polygon as a binding point corresponding to the texture coordinate vertex; and determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton. Referring to fig. 11, fig. 11 is a schematic diagram illustrating binding of a vertex of a texture coordinate set of a target object to a skeleton according to an embodiment of the present invention, where 1101 shows an outer contour of the texture coordinate set, 1102 shows the skeleton of the texture coordinate set, and 1103 shows a root node of the skeleton of the texture coordinate set; 1104 shows the edges of the segmented Thiessen polygon (Voronoi), 1104 shows the vertices of the segmented Thiessen polygon; specifically, if the UV vertex coincides with the Voro noi vertex and is on the UV island boundary, the set of skeleton nodes bound by the UV vertex is selected as follows: and all the framework nodes corresponding to the Voronoi vertexes at the other ends of the Voronoi edges connected with the framework nodes.
In some embodiments of the present invention, determining the correspondence between all texture coordinate vertices in the texture coordinate set and the skeleton may be implemented by:
when the texture coordinate vertex is coincided with the vertex of the Thiessen polygon and the texture coordinate vertex exceeds the boundary of the texture coordinate set, determining a skeleton node coincided with the texture coordinate vertex as a binding point corresponding to the texture coordinate vertex; and determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton. Wherein, if the UV vertex coincides with the Voronoi vertex and is not on any UV island boundary, the set of skeleton nodes selected for binding is: and the skeleton nodes corresponding to the V oronoi vertexes coincident with the V oronoi vertexes.
In some embodiments of the present invention, determining the correspondence between all texture coordinate vertices in the texture coordinate set and the skeleton may be implemented by:
when the texture coordinate vertex is located in an edge line of the segmented Thiessen polygon and the texture coordinate vertex is not overlapped with the vertex of the segmented Thiessen polygon, determining a parent node corresponding to the edge line of the segmented Thiessen polygon as the skeleton node corresponding to all the texture coordinate vertices as a binding point set so as to determine the corresponding relation between all the texture coordinate vertices in the texture coordinate set and the skeleton. Wherein, if the UV vertex point falls on the Voronoi edge and is not coincident with all Voronoi vertex points, the framework node set bound by the UV vertex point is selected as: the parent node of the skeleton corresponding to the Voronoi edge.
In some embodiments of the present invention, determining the correspondence between all texture coordinate vertices in the texture coordinate set and the skeleton may be implemented by:
when the texture coordinate vertex is positioned in a segmented Thiessen polygon, determining binding points corresponding to all points in the segmented Thiessen polygon, which are not in the texture coordinate set; and determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton. Wherein, if the UV vertex falls inside the Voronoi surface, the skeleton node set bound by the UV vertex is selected as follows: and all the framework nodes of the Voronoi surface which are not corresponding to the vertex of the UV island boundary.
With continuing reference to fig. 12, fig. 12 is a schematic diagram illustrating an adjustment performed on the skeleton of the texture coordinate set of the target object in the embodiment of the present invention, specifically including 1201 and 1202 states of the skeletons of two different texture coordinate sets, where the states are recorded
Figure BDA0002433635690000181
Represents the amount of rotation of the skeleton as a whole, where rxRepresenting the amount of rotation of the bone node x. Building binding functions for all UV vertices
Figure BDA0002433635690000182
For calculating at
Figure BDA0002433635690000183
Driven, new coordinates of UV vertex i:
Figure BDA0002433635690000184
wherein O isiIs the original coordinate of all UV vertices, BiIs a collection of all bound skeleton nodes of i, where djIs the distance from the UV vertex to the skeleton node j, where:
Figure BDA0002433635690000185
wherein, VjIs a set of all the nodes passing through when tracing back from the j node of the skeleton to the root node of the skeleton, RiIs the amount of rotation attached to the bone node l, and r (r) translates the amount of rotation r into a two-dimensional rotation matrix.
Step 303: and the data processing device determines a texture coordinate line segment set to be optimized based on the corresponding relation between the texture coordinate vertex and the skeleton.
In some embodiments of the present invention, determining a texture coordinate line segment set to be optimized based on a corresponding relationship between the texture coordinate vertex and the skeleton may be implemented by:
clustering all texture coordinate line segments in the texture coordinate set to form different multi-segment texture coordinate line segments matched with the clusters; clustering the multiple texture coordinate line segments; and deleting the multiple texture coordinate line segments matched with preset conditions based on the clustering results of the multiple texture coordinate line segments to form a texture coordinate line segment set serving as an optimization target.
Further, in some embodiments of the present invention, based on the clustering result of the multiple texture coordinate line segments, deleting the multiple texture coordinate line segments matching the preset condition to form a texture coordinate line segment set as an optimization target, which may be implemented by: deleting the clustering results corresponding to the single multi-section texture coordinate line segments; and deleting the clustering results corresponding to the multiple texture coordinate line segments which exceed the boundary of the texture coordinate set and have length difference larger than the corresponding length threshold. Taking the foregoing example as an example, the following conditions are satisfied for the multi-segment texture coordinate line segment similarity clustering in fig. 12 of the foregoing fig. 11 if two UV line segments satisfy: a) there is one and only one coincident end point; b) the included angle is more than 175 degrees; then the two UV segments belong to the same cluster. Each cluster formed constitutes a multi-segment UV line segment. Further, clustering the multiple UV line segments, wherein if any pair of sub-line segments can be found by two UV multiple-segment lines, the following conditions are satisfied:
there are adjacent polygons in common and the number of polygon edges is greater than 3, while the included angle is greater than 175 degrees or less than 5 degrees and the two UV polylines belong to the same cluster. And then, removing clusters with only one UV multi-segment line, and simultaneously removing clusters with only two UV multi-segment lines, wherein the multi-segment lines are not UV island boundaries and have the length difference of more than 10%. Finally, the set of all UV line segments in the remaining clusters is denoted as E.
Step 304: and the data processing device optimizes and adjusts the framework based on the internal angle set which is matched with the texture coordinate set and serves as a constraint condition, and determines a corresponding framework rotation amount parameter.
Taking the preceding embodiment as an example, after the temporary clustering of the multiple texture coordinate line segments in fig. 11 and 12 is completed, the internal angle of each UV polygon whose deviation from the right angle is not more than 5 degrees and whose adjacent internal angles also meet the same angle deviation may be selected. Let the set of selected interior angles be a.
Step 305: and the data processing device determines the new coordinates of each vertex in the texture coordinate set through the framework rotation amount parameters, and replaces all elements in the texture coordinate set through the new coordinates of each texture coordinate vertex.
Thereby, an adjustment of the target object in the virtual environment may be achieved.
With continuing reference to fig. 13, fig. 13 is an optional flowchart of the data processing method according to the embodiment of the present invention, and it can be understood that the steps shown in fig. 13 may be executed by various electronic devices operating the data processing apparatus, and specifically include the following steps:
step 1301: determining the slope amount corresponding to the side line of the segmented Thiessen polygon through the skeleton rotation amount parameter;
step 1302: determining right angle constraint quantity matched with the vertex of the texture coordinate through the framework rotation quantity parameter;
step 1303: and determining new coordinates of the texture coordinate vertex based on the slope quantity corresponding to the edge of the segmented Thiessen polygon and the right angle constraint quantity.
Taking the preamble embodiment as an example, after the characteristic clustering of the multiple texture coordinate line segments in fig. 11 and fig. 12 is completed, the set score E and the set a of the internal angle of all UV line segments in the corresponding cluster are determined, and the slope measure term of the edge may be first constructed:
Figure BDA0002433635690000201
wherein the content of the first and second substances,
Figure BDA0002433635690000202
is composed of
Figure BDA0002433635690000203
The normal vector of (c):
Figure BDA0002433635690000204
then, a right angle constraint quantity term is constructed:
Figure BDA0002433635690000205
final determination
Figure BDA0002433635690000206
And, will
Figure BDA0002433635690000207
Substitution into
Figure BDA0002433635690000208
New coordinates can be obtained. And replacing all elements in the texture coordinate set by the new coordinate of each texture coordinate vertex so as to adjust the target object in the virtual environment and avoid jagged edges.
In some embodiments of the invention, the method further comprises:
displaying a user interface, and displaying a target object needing to be adjusted in the user interface; further, when a trigger operation on a target object in the virtual environment is received, displaying a file configuration path matched with the target object on a user interface, and editing the target object through a control component; all elements in the texture coordinate set are fetched and the target object is exposed by the control component in the user interface by the new coordinates of each vertex. Specifically, referring to fig. 14-18, fig. 14 is a schematic diagram of a front-end display interface of the data processing method provided by the present invention; FIG. 15 is a schematic diagram of a front-end display input path interface of the data processing method provided by the present invention; FIG. 16 is a schematic diagram of a front-end function execution interface of the data processing method provided by the present invention; FIG. 17 is a schematic diagram of a front-end display interface of a data processing method according to the present invention; FIG. 18 is a schematic diagram of a target object display effect interface of the data processing method according to the present invention; among them, a tool for automatically processing art resources (fig. 14). One of the functions of the tool is to perform the "low-fragment 2U auto-generation" function by the auto-processing component 1401 shown in fig. 14, which can fully automatically generate the UV coordinates of the lightmap of the three-dimensional model. When the tool is used, an input path and an output path of data need to be set, wherein 1501 in fig. 15 shows a configuration page in a data processing process, 1502 shows a target object input path, which facilitates a user to check the configuration process of a target object, the user places a three-dimensional model file in an FBX format into the input path (fig. 15) to execute the function (fig. 16), wherein a legend 1601 in fig. 16 shows an execution code display interface of the data processing process, the user can adjust different length thresholds in time according to the use environment of the target object through execution code running in the display interface 1601 shown in fig. 17, and then obtains a generated file from the output path (fig. 17), wherein 1701 in fig. 17 shows an output path of the target object, 1702 shows a configuration page corresponding to the output path, which facilitates the user to check the output process of the adjusted target object, the generated UV coordinates are contained in the file. The user can open the FBX file through the commonly used three-dimensional modeling software to view the generated UV coordinates (fig. 18), wherein 1801 shows the three-dimensional display effect of the target object and 1802 shows the adjusted texture coordinate line segment of the target object.
Referring to fig. 19 and 20, fig. 19 is a schematic diagram illustrating an effect of the data processing method provided by the present invention, wherein 1901 is a texture coordinate line segment before adjustment, and 1902 is an adjusted texture coordinate line segment; fig. 20 is a schematic diagram illustrating the effect of the data processing method provided by the present invention, 2001 is a texture coordinate line segment before adjustment, and 2002 is an adjusted texture coordinate line segment; through the data processing method provided by the invention, the texture coordinate set generated by the scheme can generate certain deformation, the UV line segment is adjusted to be in a horizontal, flat and vertical state, the subsequent calculation of the full-automatic texture coordinate set is convenient, and meanwhile, the jump of illumination among pixels is natural. A straight or vertical edge of the three-dimensional object is mapped to the illumination map without a diagonal line and without easy sawtooth generation. The processing efficiency is obviously improved effectively, the processing of the target objects in the three-dimensional virtual environment with large quantity and large volume is facilitated, and the waiting time of a user is reduced.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (15)

1. A method of data processing, the method comprising:
acquiring a texture coordinate set matched with a target object, and determining a corresponding skeleton based on the texture coordinate set;
determining a texture coordinate line segment set to be optimized based on the corresponding relation between all texture coordinate vertexes in the texture coordinate set and the skeleton;
optimizing the texture coordinate line segment set to be optimized based on the inner angle set matched with the texture coordinate set to determine new coordinates of each vertex in the texture coordinate set;
and replacing all elements in the texture coordinate set by the new coordinates of each texture coordinate vertex so as to realize the adjustment of the target object.
2. The method of claim 1, wherein determining the corresponding skeleton based on the set of texture coordinates comprises:
determining an outer contour of a texture coordinate set matched with a target object, and deleting a closed area contained in the outer contour of the texture coordinate set;
determining a segmented Thiessen polygon corresponding to the outer contour of the texture coordinate set;
based on the segmented Thiessen polygon corresponding to the outer contour, deleting the sidelines of the segmented Thiessen polygon exceeding the outer contour, and deleting the sidelines of the segmented Thiessen polygon connected with the outer contour;
and determining a corresponding skeleton based on the segmented Thiessen polygon corresponding to the outer contour subjected to the edge line deletion.
3. The method of claim 2, wherein determining the corresponding skeleton based on the segmented Thiessen polygon corresponding to the outer contour subjected to edge deletion comprises:
determining a corresponding undirected graph based on the top point and the side line of the segmented Thiessen polygon corresponding to the deleted outer contour;
determining a root node of the skeleton and a rotation amount attribute parameter matched with the root node based on an intermediate neutral line of the undirected graph;
performing global traversal according to the root node of the skeleton to determine tree structures corresponding to different nodes of the skeleton;
and configuring corresponding rotation amount attribute parameters for the sidelines of the segmented Thiessen polygons respectively corresponding to different nodes in the tree structure to form a complete framework.
4. The method of claim 1, wherein the determining correspondence of all texture coordinate vertices in the set of texture coordinates to the skeleton comprises:
when the texture coordinate vertex coincides with a vertex of a segmented Thiessen polygon and the texture coordinate vertex is located in a boundary of the set of texture coordinates,
determining the side line of the segmented Thiessen polygon connected with the texture coordinate vertex, and taking a skeleton node corresponding to the vertex at the other end of the side line of the segmented Thiessen polygon as a binding point corresponding to the texture coordinate vertex;
and determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton.
5. The method of claim 2, wherein the determining correspondence of all texture coordinate vertices in the set of texture coordinates to the skeleton comprises:
when the texture coordinate vertex coincides with a vertex of the segmented Thiessen polygon and the texture coordinate vertex exceeds a boundary of the set of texture coordinates,
determining a skeleton node coincident with the texture coordinate vertex as a binding point corresponding to the texture coordinate vertex;
and determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton.
6. The method of claim 1, wherein the determining correspondence of all texture coordinate vertices in the set of texture coordinates to the skeleton comprises:
when the texture coordinate vertex is located in an edge of a segmented Thiessen polygon and neither the texture coordinate vertex nor a vertex of the segmented Thiessen polygon coincide,
and determining a father node corresponding to the edge line of the segmented Thiessen polygon as the skeleton node corresponding to all texture coordinate vertexes as a binding point set so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton.
7. The method of claim 1, wherein the determining correspondence of all texture coordinate vertices in the set of texture coordinates to the skeleton comprises:
when the texture coordinate vertex is positioned in a segmented Thiessen polygon, determining binding points corresponding to all points in the segmented Thiessen polygon, which are not in the texture coordinate set;
and determining the skeleton nodes corresponding to all texture coordinate vertexes as a binding point set based on the binding points so as to determine the corresponding relation between all the texture coordinate vertexes in the texture coordinate set and the skeleton.
8. The method of claim 1, wherein determining the set of texture coordinate line segments to be optimized based on the correspondence between the texture coordinate vertices and the skeleton comprises:
clustering all texture coordinate line segments in the texture coordinate set to form different multi-segment texture coordinate line segments matched with the clusters;
clustering the multiple texture coordinate line segments;
and deleting the multiple texture coordinate line segments matched with preset conditions based on the clustering results of the multiple texture coordinate line segments to form a texture coordinate line segment set serving as an optimization target.
9. The method according to claim 8, wherein the removing, based on the clustering result of the plurality of texture coordinate line segments, the plurality of texture coordinate line segments matching a preset condition to form a set of texture coordinate line segments as an optimization target comprises at least one of:
deleting the clustering results corresponding to the single multi-section texture coordinate line segments;
and deleting the clustering results corresponding to the multiple texture coordinate line segments which exceed the boundary of the texture coordinate set and have length difference larger than the corresponding length threshold.
10. The method of claim 1, wherein optimizing the set of texture coordinate segments to be optimized based on the set of internal angles matched to the set of texture coordinates to determine new coordinates for each vertex in the set of texture coordinates comprises:
determining a corresponding framework rotation amount parameter based on the internal angle set matched with the texture coordinate set;
and optimizing the texture coordinate line segment set to be optimized through the framework rotation amount parameter so as to determine a new coordinate of each vertex in the texture coordinate set.
11. The method of claim 10, wherein optimizing the set of texture coordinate line segments to be optimized by the skeleton rotation amount parameter to determine new coordinates for each vertex in the set of texture coordinates comprises:
determining slope amount corresponding to the side line of the segmented Thiessen polygon according to the skeleton rotation amount parameter;
determining right angle constraint quantity matched with the vertex of the texture coordinate through the framework rotation quantity parameter;
and determining new coordinates of the texture coordinate vertex based on the slope quantity corresponding to the edge of the segmented Thiessen polygon and the right angle constraint quantity.
12. The method of claim 1, further comprising:
displaying a user interface, and displaying the target object in the user interface;
when receiving a trigger operation on a target object in a virtual environment, displaying a file configuration path matched with the target object on the user interface, and editing the target object through a control component;
all elements in the texture coordinate set are acquired, and the target object is shown in the user interface through the new coordinates of each vertex through the control component.
13. A data processing apparatus, characterized in that the apparatus comprises:
the information processing module is used for acquiring a texture coordinate set matched with a target object in a virtual environment and determining a corresponding skeleton based on the texture coordinate set;
the information processing module is used for determining a texture coordinate line segment set to be optimized based on the corresponding relation between all texture coordinate vertexes in the texture coordinate set and the skeleton;
the information processing module is used for optimizing the texture coordinate line segment set to be optimized based on the inner angle set matched with the texture coordinate set so as to determine new coordinates of each vertex in the texture coordinate set;
and the information adjusting module is used for replacing all elements in the texture coordinate set through the new coordinates of each texture coordinate vertex so as to adjust the target object.
14. An electronic device, characterized in that the electronic device comprises:
a memory for storing executable instructions;
a processor for implementing the data processing method of any one of claims 1 to 12 when executing the executable instructions stored by the memory.
15. A computer-readable storage medium storing executable instructions, wherein the executable instructions, when executed by a processor, implement the data processing method of any one of claims 1 to 12.
CN202010244543.3A 2020-03-31 2020-03-31 Data processing method and device, electronic equipment and storage medium Active CN111462343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010244543.3A CN111462343B (en) 2020-03-31 2020-03-31 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010244543.3A CN111462343B (en) 2020-03-31 2020-03-31 Data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111462343A true CN111462343A (en) 2020-07-28
CN111462343B CN111462343B (en) 2023-03-17

Family

ID=71680652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010244543.3A Active CN111462343B (en) 2020-03-31 2020-03-31 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111462343B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114419240A (en) * 2022-04-01 2022-04-29 腾讯科技(深圳)有限公司 Illumination rendering method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885348A (en) * 2005-06-21 2006-12-27 中国科学院计算技术研究所 Randomly topologically structured virtual role driving method based on skeleton
CN101203888A (en) * 2005-10-07 2008-06-18 科乐美数码娱乐株式会社 Image processing device, image processing method, and information storage medium
CN101515374A (en) * 2008-02-20 2009-08-26 中国科学院自动化研究所 Individualized realistic virtual character modeling method based on images
CN108510577A (en) * 2018-01-31 2018-09-07 中国科学院软件研究所 A kind of sense of reality action migration and generation method and system based on existing action data
CN108876910A (en) * 2018-06-15 2018-11-23 郑州云海信息技术有限公司 A kind of three-dimensional modeling method, device, equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1885348A (en) * 2005-06-21 2006-12-27 中国科学院计算技术研究所 Randomly topologically structured virtual role driving method based on skeleton
CN101203888A (en) * 2005-10-07 2008-06-18 科乐美数码娱乐株式会社 Image processing device, image processing method, and information storage medium
CN101515374A (en) * 2008-02-20 2009-08-26 中国科学院自动化研究所 Individualized realistic virtual character modeling method based on images
CN108510577A (en) * 2018-01-31 2018-09-07 中国科学院软件研究所 A kind of sense of reality action migration and generation method and system based on existing action data
CN108876910A (en) * 2018-06-15 2018-11-23 郑州云海信息技术有限公司 A kind of three-dimensional modeling method, device, equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114419240A (en) * 2022-04-01 2022-04-29 腾讯科技(深圳)有限公司 Illumination rendering method and device, computer equipment and storage medium
CN114419240B (en) * 2022-04-01 2022-06-17 腾讯科技(深圳)有限公司 Illumination rendering method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111462343B (en) 2023-03-17

Similar Documents

Publication Publication Date Title
CN112215934B (en) Game model rendering method and device, storage medium and electronic device
CN107358649B (en) Processing method and device of terrain file
CN109685909B (en) Image display method, image display device, storage medium and electronic device
CN108765520B (en) Text information rendering method and device, storage medium and electronic device
CN111145326A (en) Processing method of three-dimensional virtual cloud model, storage medium, processor and electronic device
CN111282277B (en) Special effect processing method, device and equipment and storage medium
CN110148203B (en) Method and device for generating virtual building model in game, processor and terminal
KR20080018404A (en) Computer readable recording medium having background making program for making game
CN110930486A (en) Rendering method and device of virtual grass in game and electronic equipment
CN109102560A (en) Threedimensional model rendering method and device
CN114119818A (en) Rendering method, device and equipment of scene model
CN111710020B (en) Animation rendering method and device and storage medium
CN111968214A (en) Volume cloud rendering method and device, electronic equipment and storage medium
CN112587921A (en) Model processing method and device, electronic equipment and storage medium
CN111462343B (en) Data processing method and device, electronic equipment and storage medium
CN114359458A (en) Image rendering method, device, equipment, storage medium and program product
CN114612641A (en) Material migration method and device and data processing method
EP4231243A1 (en) Data storage management method, object rendering method, and device
CN111681317B (en) Data processing method and device, electronic equipment and storage medium
CN114299202A (en) Processing method and device for virtual scene creation, storage medium and terminal
CN114255312A (en) Processing method and device of vegetation image and electronic equipment
CN114742970A (en) Processing method of virtual three-dimensional model, nonvolatile storage medium and electronic device
CN112473135A (en) Real-time illumination simulation method, device, equipment and storage medium for mobile game
KR20080018405A (en) Computer-readable recording medium for recording of 3d terrain production program
CN114119925B (en) Game image modeling method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40026149

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant