CN116531750A - Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium - Google Patents

Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium Download PDF

Info

Publication number
CN116531750A
CN116531750A CN202310594955.3A CN202310594955A CN116531750A CN 116531750 A CN116531750 A CN 116531750A CN 202310594955 A CN202310594955 A CN 202310594955A CN 116531750 A CN116531750 A CN 116531750A
Authority
CN
China
Prior art keywords
reference point
candidate
initial
point
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310594955.3A
Other languages
Chinese (zh)
Inventor
沈忠勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202310594955.3A priority Critical patent/CN116531750A/en
Publication of CN116531750A publication Critical patent/CN116531750A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a mesh structure generation method, a mesh structure generation device, electronic equipment and a computer readable storage medium, wherein the embodiment of the application is realized by acquiring at least two reference objects; performing point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performing point adding processing on the initial reference points to obtain a target reference point corresponding to each reference object; determining the distance between the target reference points, and carrying out connection processing on the target reference points corresponding to the distance meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects; carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects; and carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects. The embodiment of the application can improve the efficiency of generating the mesh structure.

Description

Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium
Technical Field
The present application relates to the field of game technologies, and in particular, to a method and apparatus for generating a mesh structure, an electronic device, and a computer readable storage medium.
Background
With the development of the internet, people have more and more leisure and entertainment modes, for example, people can play games in leisure time, and the occurrence of the games greatly enriches the leisure and entertainment life of people.
Some games include a mesh structure that can be used as a game background or play object. However, currently, game developers manually create mesh structures in games, resulting in less efficient creation of mesh structures.
Disclosure of Invention
Embodiments of the present application provide a mesh structure generation method, apparatus, electronic device, and computer-readable storage medium, which can improve efficiency of generating a mesh structure.
In a first aspect, an embodiment of the present application provides a mesh structure generating method, where the method includes:
acquiring at least two reference objects;
performing point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performing point adding processing on the initial reference points to obtain a target reference point corresponding to each reference object;
determining the distance between the target reference points, and carrying out connection processing on the target reference points corresponding to the distance meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects;
Carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects;
and carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects.
In a second aspect, an embodiment of the present application further provides a mesh structure generating apparatus, where the apparatus includes:
the object acquisition module is used for acquiring at least two reference objects;
the point processing module is used for carrying out point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and carrying out point adding processing on the initial reference points to obtain a target reference point corresponding to the reference object;
the first connecting module is used for determining the distance between the target reference points, and carrying out connecting processing on the target reference points corresponding to the distance meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects;
the second connecting module is used for carrying out connecting processing on the initial reference points to obtain second candidate grid bodies of the reference objects;
and the object fusion module is used for carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects.
In a third aspect, embodiments of the present application further provide an electronic device, including a memory storing a plurality of instructions; the processor loads instructions from the memory to perform any of the mesh structure generation methods provided in the embodiments of the present application.
In a fourth aspect, embodiments of the present application further provide a computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform any of the mesh structure generation methods provided in the embodiments of the present application.
In the embodiment of the application, at least two reference objects are acquired; performing point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performing point adding processing on the initial reference points to obtain a target reference point corresponding to the reference object; determining the distance between target reference points, and carrying out connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects; carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects; and carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a mesh structure connected between the reference objects, so that the mesh structure can be automatically generated among a plurality of objects, the mesh structure does not need to be manually generated, and the efficiency of generating the mesh structure is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a mesh structure generating system according to an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment of a mesh structure generation method according to an embodiment of the present disclosure;
FIG. 3 is a schematic illustration of a reference object provided in an embodiment of the present application;
FIG. 4 is a schematic illustration of an initial reference point provided in an embodiment of the present application;
FIG. 5 is a schematic illustration of lines provided in an embodiment of the present application;
FIG. 6 is a schematic illustration of a target reference point provided in an embodiment of the present application;
FIG. 7 is a schematic illustration of a sphere provided in an embodiment of the present application;
FIG. 8 is a schematic illustration of another target reference point provided in an embodiment of the present application;
FIG. 9 is a schematic diagram of a first candidate mesh body provided in an embodiment of the present application;
FIG. 10 is a schematic view of a third candidate mesh body provided in an embodiment of the present application;
FIG. 11 is a schematic view of another first candidate mesh body provided in an embodiment of the present application;
FIG. 12 is a schematic view of a reference object and a candidate mesh body provided in an embodiment of the present application;
FIG. 13 is a schematic view of another first candidate mesh body provided in an embodiment of the present application;
FIG. 14 is a schematic view of another first candidate mesh body provided in an embodiment of the present application;
fig. 15 is a schematic view of a second candidate mesh body provided in an embodiment of the present application;
FIG. 16 is a schematic view of a reference object and an initial mesh body provided by an embodiment of the present application;
FIG. 17 is a schematic view of a mesh structure provided in an embodiment of the present application;
FIG. 18 is a schematic diagram of a static reference point provided by an embodiment of the present application;
FIG. 19 is a schematic view of another mesh structure provided in an embodiment of the present application;
fig. 20 is a flowchart of another mesh structure generating method according to an embodiment of the present disclosure;
FIG. 21 is a schematic diagram of a clss attribute provided by an embodiment of the present application;
FIG. 22 is a schematic diagram of mask attributes provided by an embodiment of the present application;
fig. 23 is a schematic structural view of a mesh structure generating device provided in an embodiment of the present application;
fig. 24 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Before explaining the embodiments of the present application in detail, some terms related to the embodiments of the present application are explained.
Wherein in the description of embodiments of the present application, the terms "first," "second," and the like may be used herein to describe various concepts, but such concepts are not limited by these terms unless otherwise specified. These terms are only used to distinguish one concept from another. The term "plurality" in the embodiments of the present application refers to two or more.
Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Embodiments of the present application provide a mesh structure generation method, apparatus, electronic device, and computer-readable storage medium. Specifically, the mesh structure generation method of the embodiment of the application may be executed by an electronic device, where the electronic device may be a device such as a terminal or a server.
The terminal may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), and the like, and the terminal may further include a client, which may be a game application client, a browser client carrying a game program, or an instant messaging client, and the like.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), basic cloud computing services such as big data and artificial intelligent platforms, and the like.
For example, as shown in fig. 1, the electronic device is illustrated with a terminal 10, and the terminal 10 may acquire at least two reference objects and transmit the reference objects to a server 20. The server 20 performs point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performs point adding processing on the initial reference point to obtain a target reference point corresponding to the reference object; determining the distance between target reference points, and carrying out connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects; carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects; the first candidate mesh body and the second candidate mesh body are subjected to fusion processing to obtain a mesh structure connected between the reference objects, and the mesh structure is returned to the terminal 10.
The following detailed description is provided with reference to the accompanying drawings. The following description of the embodiments is not intended to limit the preferred embodiments. Although a logical order is depicted in the flowchart, in some cases the steps shown or described may be performed in an order different than depicted in the figures.
In this embodiment, a terminal is taken as an example for explanation, and this embodiment provides a mesh structure generating method, as shown in fig. 2, the specific flow of the mesh structure generating method may be as follows:
201. at least two reference objects are acquired.
The reference object refers to a pattern selected when generating a mesh structure in a game, and the pattern can be a two-dimensional pattern or a three-dimensional pattern, and can be a regular pattern or an irregular pattern. The dimensions and shape of the reference object may be selected according to practical situations, and the embodiments of the present application are not limited herein.
For example, the reference object may be as shown in fig. 3, and in this case, the reference object may be a two-dimensional graph or a three-dimensional graph.
Alternatively, the terminal may display an object selection interface, and then respond to a selection operation of the object selection interface by a user, taking an object corresponding to the selection operation as a reference object. Then, the terminal may also drag the reference object to a position corresponding to the drag operation in response to the drag operation of the user on the reference object.
Alternatively, the terminal may display an object drawing interface, and then acquire the reference object in response to a drawing operation of the object drawing interface by the user.
Or the terminal can also acquire an image containing the object, then the terminal identifies the image to obtain each object contained in the image, and finally determines a reference object according to each object, for example, each object can be directly used as the reference object, and for example, the reference object can be screened out from each object.
Alternatively, the user may operate on another terminal, and the other terminal acquires the reference object and transmits the reference object to the terminal, and the terminal acquires the reference object.
The form of the reference object acquired by the terminal may be selected according to practical situations, and the embodiment of the present application is not limited herein.
202. And carrying out point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and carrying out point adding processing on the initial reference points to obtain a target reference point corresponding to the reference object.
The scattering point processing refers to processing of selecting coordinate points within the coordinate range of the reference object. The terminal may randomly select a coordinate point within the coordinate range of the reference object to obtain an initial reference point, or may select a coordinate point within the coordinate range of the reference object according to the shape and/or dimension of the reference object to obtain an initial reference point.
The number of initial reference points may be selected according to practical situations, and the number of initial reference points of different reference objects may be the same or different.
For example, as shown in fig. 3, when the reference object is a cuboid, a rectangle, and a bird, the initial reference points corresponding to the cuboid, the initial reference points corresponding to the rectangle, and the initial reference points corresponding to the bird may be as shown in fig. 4, and at this time, the number of initial reference points corresponding to the cuboid and the number of initial reference points corresponding to the rectangle are 3, and the number of initial reference points corresponding to the bird is 30.
The point adding process refers to a process of adding coordinate points between the reference objects, and after the point adding process is performed on the initial reference points, additional reference points can be obtained, so that a target reference point is obtained, wherein the target reference point comprises the initial reference points and the additional reference points.
In some embodiments, the process of adding points to the initial reference point to obtain the target reference point corresponding to the reference object may be:
performing interpolation processing or fitting processing according to the initial reference points to obtain interpolated reference points or fitted reference points;
And taking the initial reference point and the interpolated reference point as target reference points corresponding to the reference object, or taking the initial reference point and the fitted reference point as target reference points corresponding to the reference object.
Or, the process of adding points to the initial reference point to obtain the target reference point corresponding to the reference object may also be:
carrying out connection processing on the initial reference points to obtain lines connected between the reference objects;
and according to the line, performing point adding processing on the initial reference point to obtain a target reference point corresponding to the reference object.
For example, the initial reference points are connected in pairs, the obtained lines connected between the reference objects can be shown in fig. 5, then the initial reference points are added according to the lines, and the obtained target reference points corresponding to the reference objects can be shown in fig. 6.
The process of adding points to the initial reference point according to the line to obtain the target reference point corresponding to the reference object may be:
randomly selecting a preset number of coordinate points on the line to obtain target reference points corresponding to the reference object.
Or, according to the line, the process of adding the point to the initial reference point to obtain the target reference point corresponding to the reference object may be:
Performing interpolation processing on the initial reference point according to the line to obtain a reference point after interpolation;
and taking the interpolated reference point and the initial reference point as target reference points corresponding to the reference object.
Or, according to the line, the process of adding points to the initial reference point to obtain the target reference point corresponding to the reference object may also be:
performing interpolation processing on the initial reference point according to the line to obtain a reference point after interpolation;
acquiring a preset pattern length;
and adding points to the initial reference point according to the initial reference point, the interpolated reference point and the preset graph length to obtain a target reference point corresponding to the reference object.
The terminal can take coordinate points at two ends of the line as a start coordinate point and a stop coordinate point, then add the coordinate values of the start coordinate point and the stop coordinate point to obtain a total coordinate value, and divide the total coordinate value by 2 to obtain the coordinate value of the middle coordinate point. And finally, determining the current interpolation times, and if the current interpolation times do not reach the preset interpolation times, taking coordinate points at two ends of the line as initial coordinate points and taking the middle coordinate point as a termination coordinate point, and returning to execute the addition processing of the coordinate values of the initial coordinate point and the coordinate values of the termination coordinate point to obtain the total coordinate value. If the current interpolation times reach the preset interpolation times, stopping interpolation, and taking all the intermediate coordinate points obtained in the interpolation process as reference coordinate points after interpolation.
For example, the line L1 is illustrated as an example as shown in fig. 6. The coordinate points at the two ends of the line L1 are respectively A and B, A is used as a starting coordinate point, B is used as a stopping coordinate point, the coordinate value of A and the coordinate value of B are subjected to addition processing to obtain a total coordinate value, and then the total coordinate value is divided by 2 to obtain the coordinate value of the middle coordinate point C.
At this time, the current interpolation frequency of the line L1 is 1 and does not reach the preset interpolation frequency, so that both a and B are used as the start coordinate point, C is used as the end coordinate point, then the coordinate value of a and the coordinate value of C are subjected to addition processing to obtain a total coordinate value, then the total coordinate value is divided by 2 to obtain a coordinate value of the intermediate coordinate point D, the coordinate value of B and the coordinate value of C are subjected to addition processing to obtain a total coordinate value, then the total coordinate value is divided by 2 to obtain a coordinate value of the intermediate coordinate point E, at this time, the current interpolation frequency of the line L1 is 3 and reaches the preset interpolation frequency, and therefore, the interpolation is stopped, and C, D and E are used as reference points after the interpolation.
The preset pattern length refers to a preset length value for dotting processing. The terminal may add a first reference point at a preset pattern length from the initial reference point, add a second reference point at a preset pattern length from the interpolated reference point, and then use the initial reference point, the first reference point, the interpolated reference point, and the second reference point as target reference points.
Or, the terminal may also draw a graph corresponding to the initial reference point and a graph corresponding to the interpolated reference point with the initial reference point and the interpolated reference point as a graph center and with a preset graph length as a graph length, and then perform point scattering processing on the graph to obtain a target reference point corresponding to the reference object.
The dimensions and shapes of the graph corresponding to the initial reference point and the graph corresponding to the interpolated reference point may be selected according to practical situations, for example, the initial reference point and the interpolated reference point may be centers of spheres, the preset graph length may be radii of the spheres, the graph corresponding to the initial reference point and the graph corresponding to the interpolated reference point may be spheres, the spheres may be as shown in fig. 7, for example, the initial reference point and the interpolated reference point may be centers of rectangles, the preset graph length may be side lengths of the rectangles, and the graph corresponding to the initial reference point and the graph corresponding to the interpolated reference point may be rectangles.
In some embodiments, the drawing the graph corresponding to the initial reference point and the graph corresponding to the interpolated reference point with the initial reference point and the interpolated reference point as the graph center and the preset graph length as the graph length includes:
Acquiring a first length adjustment coefficient corresponding to the initial reference point and a second length adjustment coefficient corresponding to the interpolated reference point;
adjusting the length of the preset pattern according to the first length adjustment coefficient to obtain a first adjusted pattern length corresponding to the initial reference point, and adjusting the length of the preset pattern according to the second length adjustment coefficient to obtain a second adjusted pattern length corresponding to the interpolated reference point;
drawing a graph corresponding to the initial reference point by taking the initial reference point as a graph center and taking the graph length after the first adjustment as the graph length;
and drawing a graph corresponding to the interpolated reference point by taking the interpolated reference point as a graph center and taking the second adjusted graph length as a graph length.
The first length adjustment coefficient may be the same as the second length adjustment coefficient, or may be different from the second length adjustment coefficient. The first length adjustment coefficients of different initial reference points may be the same or different, and the second length adjustment coefficients of different interpolated reference points may be the same or different.
In the embodiment of the application, a first length adjustment coefficient corresponding to an initial reference point and a second length adjustment coefficient corresponding to an interpolated reference point are obtained, the first length adjustment coefficient is multiplied by a preset graph length to obtain a first adjusted graph length corresponding to the initial reference point, the second length adjustment coefficient is multiplied by the preset graph length to obtain a second adjusted graph length corresponding to the interpolated reference point, finally, the initial reference point is taken as a graph center, the first adjusted graph length is taken as the graph length, a graph corresponding to the initial reference point is drawn, the interpolated reference point is taken as the graph center, the second adjusted graph length is taken as the graph length, and a graph corresponding to the interpolated reference point is drawn, so that a user can set the graph corresponding to the initial reference point and the size of the graph corresponding to the interpolated reference point according to actual requirements, the subsequently obtained mesh structure can better meet the requirements of the user, and the user experience is improved.
After obtaining the graph corresponding to the initial reference point and the graph corresponding to the interpolated reference point, the terminal can directly perform point scattering processing on the graph, so as to obtain a target reference point corresponding to the reference object. For example, the target reference point may be as shown in fig. 8.
203. And determining the distance between the target reference points, and carrying out the connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain a first candidate grid body corresponding to the reference object.
After obtaining the target reference points, the terminal can determine the distance between the target reference points, and then perform the connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain the first candidate grid body corresponding to the reference object.
The first preset distance condition may be selected according to practical situations, for example, a target reference point in a preset range may be used as a target reference point that meets the first preset distance condition, or a target reference point corresponding to a distance equal to the preset distance may be used as a target reference point that meets the first preset distance condition.
For example, when the target reference point may be as shown in fig. 8, the target reference point corresponding to the distance satisfying the first preset distance condition is subjected to the connection processing, and the first candidate mesh body corresponding to the reference object may be as shown in fig. 9.
In some embodiments, in order to make the mesh structure obtained according to the first candidate mesh body more realistic, the process of performing the connection processing on the target reference point corresponding to the distance satisfying the first preset distance condition to obtain the first candidate mesh body corresponding to the reference object may be:
carrying out connection processing on a target reference point corresponding to a distance meeting a first preset distance condition to obtain a candidate grid body corresponding to a reference object;
and adjusting the candidate grid body according to the reference point on the candidate grid body to obtain a first candidate grid body corresponding to the reference object.
The process of adjusting the candidate mesh body according to the reference point on the candidate mesh body to obtain the first candidate mesh body corresponding to the reference object may be:
screening out reference points meeting a second preset distance condition from the reference points on the candidate grid body to obtain screened reference points;
and merging the screened reference points to realize the adjustment processing of the candidate grid bodies and obtain a first candidate grid body corresponding to the reference object.
Optionally, the process of screening the reference points satisfying the second preset distance condition from the reference points on the candidate mesh body to obtain the screened reference points may be:
Interpolation processing is carried out on the reference points on the candidate grid bodies to obtain third candidate grid bodies;
and screening out the reference points meeting the second preset distance condition from the reference points on the third candidate grid body to obtain screened reference points.
For example, the candidate mesh body may be as shown in fig. 9, the third candidate mesh body may be as shown in fig. 10, and the first candidate mesh body may be as shown in fig. 11.
In other embodiments, in order to make the mesh structure obtained by the first candidate mesh body and the second candidate mesh body more realistic, the method for adjusting the candidate mesh body according to the reference point on the candidate mesh body to obtain the first candidate mesh body corresponding to the reference object includes:
determining a target distance between a reference point on the candidate mesh body and the reference object;
and carrying out fuzzy processing on the candidate grid bodies according to the target distance to obtain first candidate grid bodies corresponding to the reference object.
The process of performing fuzzy processing on the candidate mesh body according to the target distance to obtain the first candidate mesh body corresponding to the reference object may be:
determining coordinate points corresponding to the target distances meeting the fifth preset distance condition to obtain target coordinate points;
And determining an average value of coordinate values of the target coordinate points, and adjusting coordinate values of the reference points on the candidate grid body according to the average value so as to realize fuzzy processing on the candidate grid body according to the target distance.
In the embodiment of the application, determining a target distance between a reference point on a candidate grid body and a reference object; and carrying out fuzzy processing on the candidate grid bodies according to the target distance to obtain first candidate grid bodies corresponding to the reference object, so that the subsequent mesh structure obtained according to the first candidate grid bodies and the second candidate grid bodies is more vivid.
For example, the candidate mesh body may be as shown in fig. 11, the reference object and the candidate mesh body may be as shown in fig. 12, and the candidate mesh body may be subjected to blurring processing according to the target distance, so as to obtain a first candidate mesh body corresponding to the reference object may be as shown in fig. 13.
Optionally, the process of adjusting the coordinate value of the reference point on the candidate grid body according to the average value may be:
adding the coordinate value and the average value of the reference points on the candidate grid body to obtain candidate coordinate values corresponding to the reference points on the candidate grid body;
multiplying the candidate coordinate values by the fuzzy intensity coefficient to obtain a first candidate grid body corresponding to the reference object.
Alternatively, the process of adjusting the coordinate value of the reference point on the candidate grid body according to the average value may be:
and taking the average value as a coordinate value of a reference point on the candidate grid body to obtain a first candidate grid body corresponding to the reference object.
In other embodiments, the process of performing the connection processing on the target reference point corresponding to the distance that satisfies the first preset distance condition to obtain the first candidate mesh body corresponding to the reference object may also be:
carrying out connection processing on a target reference point corresponding to a distance meeting a first preset distance condition to obtain a candidate grid body corresponding to a reference object;
and carrying out smoothing treatment on the candidate grid bodies to obtain first candidate grid bodies corresponding to the reference objects.
In the embodiment of the application, connecting a target reference point corresponding to a distance meeting a first preset distance condition to obtain a candidate grid body corresponding to a reference object; and carrying out smoothing treatment on the candidate grid bodies to obtain first candidate grid bodies corresponding to the reference objects, so that the subsequent mesh structures obtained according to the first candidate grid bodies and the second candidate grid bodies are more vivid.
For example, the candidate mesh body may be as shown in fig. 11, and the first candidate mesh body may be as shown in fig. 14.
204. And carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects.
The process of performing the connection processing on the initial reference point to obtain the second candidate mesh body of the reference object may be:
and carrying out pairwise connection processing on the initial reference points to obtain a second candidate grid body of the reference object.
Or, the process of performing the connection processing on the initial reference point to obtain the second candidate mesh body of the reference object may also be:
carrying out connection processing on the initial reference point to obtain a first line connected with the reference object;
according to the first line, carrying out interpolation processing on the initial reference point to obtain a first interpolated reference point;
and merging the initial reference point meeting the third preset distance condition and the first interpolated reference point to obtain a second candidate grid body of the reference object.
In the embodiment, the initial reference point is subjected to connection processing to obtain a first line connected with the reference object; according to the first line, carrying out interpolation processing on the initial reference point to obtain a first interpolated reference point; and combining the initial reference point meeting the third preset distance condition and the first interpolated reference point to obtain a second candidate grid body of the reference object, so that the reference points with a relatively close distance can be bonded, and the effect of fusing the first candidate grid body and the second candidate grid body is better.
For example, the initial reference point may be subjected to a connection process, and the first line for connecting the reference objects may be shown in fig. 5, and the second candidate mesh body of the reference object may be shown in fig. 15.
In some embodiments, merging the initial reference point and the first interpolated reference point that satisfy the third preset distance condition to obtain a second candidate mesh body of the reference object, including:
combining the initial reference point meeting the third preset distance condition and the first interpolated reference point to obtain an initial grid body of the reference object;
and according to the reference object, adjusting the reference point on the initial grid body to obtain a second candidate grid body of the reference object.
In the embodiment of the application, after the initial reference point meeting the third preset distance condition and the first interpolated reference point are combined to obtain the initial grid body of the reference object, the reference point on the initial grid body is adjusted according to the reference object to obtain the second candidate grid body of the reference object, so that the effect of fusing the first candidate grid body and the second candidate grid body is further improved.
For example, the initial mesh body may be as shown in fig. 15, and the reference object and the initial mesh body may be as shown in fig. 16.
Optionally, according to the reference object, the process of adjusting the reference point on the initial mesh body to obtain the second candidate mesh body of the reference object may be:
determining a first target distance between a reference point on the initial grid body and a coordinate point on the reference object;
and projecting the reference point corresponding to the first target distance meeting the sixth preset distance condition on the initial grid body onto the reference object so as to realize adjustment processing of the reference point on the initial grid body according to the reference object and obtain a second candidate grid body of the reference object.
The method includes projecting a reference point corresponding to a first target distance meeting a sixth preset distance condition onto a reference object, which can be understood as pulling the reference point corresponding to the first target distance meeting the sixth preset distance condition on the initial grid body onto the surface of the reference object.
205. And carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects.
The mesh structure refers to an entirety formed by connecting points, and the connecting lines between the points are crossed. The specific type of the mesh structure may be set according to practical situations, for example, the mesh structure may be a spider web or a fishing net, and the examples of the present application are not limited herein.
The terminal may directly add the first candidate mesh body and the second candidate mesh body to obtain a mesh structure connected between the reference objects. At this time, the mesh structure may be as shown in fig. 17, for example.
Alternatively, in order to make the mesh structure more realistic, in some embodiments, the process of fusing the first candidate mesh body and the second candidate mesh body to obtain the mesh structure connected between the reference objects may be:
carrying out fusion treatment on the first candidate grid body and the second candidate grid body to obtain candidate net structures connected between the reference objects;
determining a first distance between a reference point on the candidate mesh structure and a reference object;
screening out a reference point corresponding to the first distance meeting a fourth preset distance condition to obtain a static reference point;
and carrying out dynamic simulation on the candidate network structure according to the static reference points to obtain the network structure connected between the reference objects.
According to the dynamic simulation method, the positions of dynamic reference points on the candidate mesh structures are changed, and the dynamic reference points refer to reference points on the candidate mesh structures except the static reference points.
For example, the static reference points may be as shown in fig. 18, and then the candidate mesh structure may be dynamically modeled to obtain a mesh structure connected between the reference objects as shown in fig. 19.
In this embodiment, the first candidate mesh body and the second candidate mesh body are fused to obtain a candidate mesh structure connected between the reference objects, a first distance between a reference point on the candidate mesh structure and the reference object is determined, a reference point corresponding to the first distance satisfying a fourth preset distance condition is screened out to obtain a static reference point, and according to the static reference point, a dynamics simulation is performed on the candidate mesh structure to obtain a mesh structure connected between the reference objects, so that the mesh structure connected between the reference objects is more lifelike.
In the related art, when a mesh structure needs to be generated among a plurality of objects, the objects are generally linked into a mesh in a manual mode, so that the efficiency is low, and when iteration is needed on the mesh structure, namely, when the mesh structure needs to be changed, repeated labor is needed continuously, and the workload is huge.
In an embodiment of the present application, at least two reference objects for generating a mesh structure in a game are acquired; performing point scattering processing on the reference object to obtain an initial reference point corresponding to the reference object, and performing point adding processing on the initial reference point to obtain a target reference point corresponding to the reference object; determining the distance between target reference points, and carrying out connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects; carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects; the first candidate grid body and the second candidate grid body are fused to obtain the mesh structure connected between the reference objects, the mesh structure is automatically generated among the objects, the mesh structure is not required to be manually generated, the efficiency of generating the mesh structure is improved, labor and time are saved, and even if the mesh structure is required to be iterated, repeated work is not required to be manually performed, so that the efficiency of iteration is improved.
In other embodiments, the mesh structure generating method provided in the embodiments of the present application may exist in the form of a plugin, and then the plugin is integrated into each game engine, so that the mesh structure generating method in the plugin may be invoked in the game engine to generate a mesh structure network, without a platform limitation, so as to reduce the adaptation problem in the development process.
From the above, it can be seen that in the embodiment of the present application, at least two reference objects are acquired; performing point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performing point adding processing on the initial reference points to obtain a target reference point corresponding to the reference object; determining the distance between target reference points, and carrying out connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects; carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects; and carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a mesh structure connected between the reference objects, so that the mesh structure can be automatically generated among a plurality of objects, the mesh structure does not need to be manually generated, and the efficiency of generating the mesh structure is improved.
The mesh structure generation method of the present application will be further described with reference to fig. 20. In this embodiment, a procedure for realizing the mesh structure generation method is described by Houdini software.
2001. At least two reference objects are acquired.
2002. The class attribute of each reference object is assigned by the connectivity's private schema in Houdini software.
The class attribute may be understood as an identification corresponding to each reference object. For example, as shown in fig. 21.
2003. And calling a scanner node for each reference object by using a foreach cycle of Houdini software to perform scattering processing, so as to obtain an initial reference point corresponding to each reference object.
2004. The initial reference point is wired using the adjacent point mode of connectidjracentpieces in Houdini software, connecting lines between reference objects.
2005. And carrying out interpolation processing on the initial reference point according to the line by using a reset of Houdini software to obtain the interpolated reference point.
2006. And acquiring a first length adjustment coefficient corresponding to the initial reference point and a second length adjustment coefficient corresponding to the interpolated reference point by using attribrondomize of Houdini software.
The first length adjustment coefficient corresponding to the initial reference point and the second length adjustment coefficient corresponding to the interpolated reference point may be defined by a pseudo attribute of attribrondomize in Houdini software, that is, a value corresponding to the pseudo is the first length adjustment coefficient or the second length adjustment coefficient, for example, as shown in fig. 22.
2007. The center of the sphere is copied to the initial reference point or the interpolated reference point according to the first length adjustment coefficient, the second length adjustment coefficient and the preset pattern length using the copypoints of the Houdini software.
Copying the center of the sphere to an initial reference point or an interpolated reference point according to a first length adjustment coefficient, a second length adjustment coefficient and a preset pattern length, which can be understood as adjusting the preset pattern length according to the first length adjustment coefficient to obtain a first adjusted pattern length corresponding to the initial reference point, adjusting the preset pattern length according to the second length adjustment coefficient to obtain a second adjusted pattern length corresponding to the interpolated reference point, taking the initial reference point as the sphere center, taking the first adjusted pattern length as the sphere radius, and drawing the sphere corresponding to the initial reference point; and drawing a sphere corresponding to the interpolated reference point by taking the interpolated reference point as the sphere center and taking the second adjusted graph length as the sphere radius.
2008. And (3) performing point scattering processing on the sphere by using a scanner of Houdini software to obtain a target reference point corresponding to the reference object.
2009. And carrying out connection processing on the target reference points meeting the first preset distance condition by using connectiadjacentpieces of Houdini software to obtain candidate grid bodies corresponding to the reference objects.
20010. And carrying out interpolation processing on the reference points on the candidate grid bodies by using a reset of Houdini software to obtain a third candidate grid body corresponding to the reference object.
20011. And screening out the reference points meeting the second preset distance condition from the reference points on the third candidate grid body by using fuse of Houdini software to obtain screened reference points, and combining the screened reference points to obtain combined candidate grid bodies.
20012. And carrying out smoothing treatment on the combined candidate grid bodies to obtain smoothed grid bodies corresponding to the reference objects.
20013. Inputting the smoothed mesh body into a first port of a distance from geometry node of Houdini software, and inputting the reference object into a second port of the distance from geometry node to obtain a mask attribute value between the smoothed mesh body and the reference object.
The mask attribute value between the smoothed mesh body and the reference object may be understood as the target distance between the reference point on the smoothed mesh body and the coordinate point on the reference object.
20014. And adding an attriblur node in Houdini software, and performing fuzzy processing on the smoothed grid body according to the mask attribute value through the attriblur node to obtain a first candidate grid body corresponding to the reference object.
20015. And combining the initial reference point meeting the third preset distance condition and the interpolated reference point by using fuse of Houdini software to obtain an initial grid body of the reference object.
20016. And determining a first target distance between the reference point on the initial grid body and the reference object by using the ray of the Houdini software, and projecting the reference point corresponding to the first target distance meeting a sixth preset distance condition on the initial grid body onto the reference object to obtain a second candidate grid body of the reference object.
20017. And using fuse of Houdini software to perform fusion processing on the first candidate grid body and the second candidate grid body to obtain candidate network structures connected between the reference objects.
20018. Determining a first distance between a reference point on the candidate mesh structure and a reference object by using a distance from the Houdini software, and screening out a reference point corresponding to the first distance meeting a fourth preset distance condition to obtain a static reference point.
At this time, the terminal may pass if (@ mask < 0.07) { @ group_pin=1; and storing the reference points corresponding to the first distance meeting the fourth preset distance condition into the pin group.
20019. Using the vellumcloth of the Houdini software, a dynamic simulation was performed on the candidate mesh structure according to the static reference point, resulting in a mesh structure connected between the reference objects.
It should be appreciated that when performing kinetic simulations on candidate mesh structures, the mesh structure may be placed in a sagged state at frame 10 by vellumcloth.
In the embodiment of the application, a Houdini programming algorithm is used, a terminal is automatically linked with a plurality of objects by using a programming rule, a net structure is generated among the plurality of objects, the net structure is in a natural state after being processed by combining dynamics, the generated net structure can be rapidly applied to other main stream game engines or self-research game engines without being limited by a platform, the traditional manual manufacturing process is completely eliminated, the Houdini programming is utilized for automation, the production efficiency can be further improved, the manufacturing period required by asset production is shortened, and the consistency of the production result can be further ensured because of programming.
The specific implementation method and the corresponding beneficial effects in the embodiments of the present application may refer to the above embodiment of the mesh structure generation method, and the embodiments of the present application are not traced here.
In order to better implement the above method, the embodiment of the present application further provides a mesh structure generating apparatus, where the mesh structure generating apparatus may be specifically integrated in an electronic device, for example, a computer device, where the computer device may be a terminal, a server, or a device.
The terminal can be a mobile phone, a tablet personal computer, an intelligent Bluetooth device, a notebook computer, a personal computer and other devices; the server may be a single server or a server cluster composed of a plurality of servers.
For example, in this embodiment, a method of the embodiment of the present application will be described in detail by taking a specific integration of a mesh structure generating device in a terminal as an example, where the meaning of a noun is the same as that in the mesh structure generating method described above, and specific implementation details may refer to the description in the method embodiment. The present embodiment provides a mesh structure generating apparatus, as shown in fig. 23, which may include:
an object acquisition module 2301 for acquiring at least two reference objects.
And the point processing module 2302 is configured to perform point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and perform point adding processing on the initial reference point to obtain a target reference point corresponding to the reference object.
The first connection module 2303 is configured to determine a distance between target reference points, and perform a connection process on the target reference points corresponding to the distance that satisfies the first preset distance condition, so as to obtain a first candidate mesh body corresponding to the reference object.
And a second connection module 2304, configured to perform connection processing on the initial reference point, so as to obtain a second candidate mesh body of the reference object.
And the object fusion module 2305 is configured to perform fusion processing on the first candidate mesh body and the second candidate mesh body, so as to obtain a mesh structure connected between the reference objects.
In some embodiments, the point processing module 2302 is specifically configured to perform:
carrying out connection processing on the initial reference points to obtain lines connected between the reference objects;
and according to the line, performing point adding processing on the initial reference point to obtain a target reference point corresponding to the reference object.
In some embodiments, the point processing module 2302 is specifically configured to perform:
performing interpolation processing on the initial reference point according to the line to obtain a reference point after interpolation;
acquiring a preset pattern length;
and adding points to the initial reference point according to the initial reference point, the interpolated reference point and the preset graph length to obtain a target reference point corresponding to the reference object.
In some embodiments, the point processing module 2302 is specifically configured to perform:
drawing a graph corresponding to the initial reference point and a graph corresponding to the interpolated reference point by taking the initial reference point and the interpolated reference point as graph centers and taking the preset graph length as the graph length;
And performing point scattering processing on the graph to obtain a target reference point corresponding to the reference object.
In some embodiments, the point processing module 2302 is specifically configured to perform:
acquiring a first length adjustment coefficient corresponding to the initial reference point and a second length adjustment coefficient corresponding to the interpolated reference point;
adjusting the length of the preset pattern according to the first length adjustment coefficient to obtain a first adjusted pattern length corresponding to the initial reference point, and adjusting the length of the preset pattern according to the second length adjustment coefficient to obtain a second adjusted pattern length corresponding to the interpolated reference point;
drawing a graph corresponding to the initial reference point by taking the initial reference point as a graph center and taking the graph length after the first adjustment as the graph length;
and drawing a graph corresponding to the interpolated reference point by taking the interpolated reference point as a graph center and taking the second adjusted graph length as a graph length.
In some embodiments, the first connection module 2303 is specifically configured to perform:
carrying out connection processing on a target reference point corresponding to a distance meeting a first preset distance condition to obtain a candidate grid body corresponding to a reference object;
and adjusting the candidate grid body according to the reference point on the candidate grid body to obtain a first candidate grid body corresponding to the reference object.
In some embodiments, the first connection module 2303 is specifically configured to perform:
screening out reference points meeting a second preset distance condition from the reference points on the candidate grid body to obtain screened reference points;
and merging the screened reference points to realize the adjustment processing of the candidate grid bodies and obtain a first candidate grid body corresponding to the reference object.
In some embodiments, the first connection module 2303 is specifically configured to perform:
determining a target distance between a reference point on the candidate mesh body and the reference object;
and carrying out fuzzy processing on the candidate grid bodies according to the target distance to obtain first candidate grid bodies corresponding to the reference object.
In some embodiments, the second connection module 2304 is specifically configured to perform:
carrying out connection processing on the initial reference point to obtain a first line connected with the reference object;
according to the first line, carrying out interpolation processing on the initial reference point to obtain a first interpolated reference point;
and merging the initial reference point meeting the third preset distance condition and the first interpolated reference point to obtain a second candidate grid body of the reference object.
In some embodiments, the second connection module 2304 is specifically configured to perform:
Combining the initial reference point meeting the third preset distance condition and the first interpolated reference point to obtain an initial grid body of the reference object;
and according to the reference object, adjusting the reference point on the initial grid body to obtain a second candidate grid body of the reference object.
In some embodiments, the object fusion module 2305 is specifically configured to perform:
carrying out fusion treatment on the first candidate grid body and the second candidate grid body to obtain candidate net structures connected between the reference objects;
determining a first distance between a reference point on the candidate mesh structure and a reference object;
screening out a reference point corresponding to the first distance meeting a fourth preset distance condition to obtain a static reference point;
and carrying out dynamic simulation on the candidate network structure according to the static reference points to obtain the network structure connected between the reference objects.
In the specific implementation, each module may be implemented as an independent entity, or may be combined arbitrarily, and implemented as the same entity or a plurality of entities, and the specific implementation and the corresponding beneficial effects of each module may be referred to the foregoing method embodiments, which are not described herein again.
Correspondingly, the embodiment of the application also provides electronic equipment, which can be a terminal, and the terminal can be terminal equipment such as a smart phone, a tablet personal computer, a notebook computer, a touch screen, a game machine, a personal computer (PC, personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and the like. As shown in fig. 24, fig. 24 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 2400 includes a processor 2401 having one or more processing cores, a memory 2402 having one or more computer-readable storage media, and a computer program stored on the memory 2402 and executable on the processor. The processor 2401 is electrically connected to the memory 2402. It will be appreciated by those skilled in the art that the electronic device structure shown in the figures is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The processor 2401 is a control center of the electronic device 2400, connects various parts of the entire electronic device 2400 using various interfaces and lines, and performs various functions of the electronic device 2400 and processes data by running or loading software programs and/or modules stored in the memory 2402 and calling data stored in the memory 2402, thereby performing overall monitoring of the electronic device 2400.
In this embodiment of the present application, the processor 2401 in the electronic device 2400 loads the instructions corresponding to the processes of one or more application programs into the memory 2402 according to the following steps, and the processor 2401 executes the application programs stored in the memory 2402, so as to implement various functions, for example:
acquiring at least two reference objects;
performing point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performing point adding processing on the initial reference points to obtain a target reference point corresponding to the reference object;
determining the distance between target reference points, and carrying out connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects;
carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects;
and carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects.
The specific embodiments and the corresponding beneficial effects of the above operations can be referred to the above detailed description of the mesh structure generation method, and are not described herein.
Optionally, as shown in fig. 24, the electronic device 2400 further includes: touch display 2403, radio frequency circuit 2404, audio circuit 2405, input unit 2406 and power 2407. The processor 2401 is electrically connected to the touch display 2403, the radio frequency circuit 2404, the audio circuit 2405, the input unit 2406 and the power source 2407, respectively. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 24 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The touch display 2403 may be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display 2403 may include a display panel and a touch panel. Wherein the display panel may be used to display information entered by a user or provided to a user as well as various graphical user interfaces of the electronic device, which may be composed of graphics, text, icons, video, and any combination thereof. Alternatively, the display panel may be configured in the form of a liquid crystal display (LCD, liquid Crystal Display), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations on or near the user (such as operations on or near the touch panel by the user using any suitable object or accessory such as a finger, stylus, etc.), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 2401, and can receive commands sent from the processor 2401 and execute them. The touch panel may overlay the display panel, and upon detection of a touch operation thereon or thereabout, the touch panel is passed to the processor 2401 to determine the type of touch event, and the processor 2401 then provides a corresponding visual output on the display panel based on the type of touch event. In the embodiment of the application, the touch panel and the display panel may be integrated into the touch display screen 2403 to implement input and output functions. In some embodiments, however, the touch panel and the touch panel may be implemented as two separate components to perform the input and output functions. I.e. the touch display 2403 may also implement an input function as part of the input unit 2406.
The rf circuit 2404 may be configured to transmit and receive rf signals to and from a network device or other electronic device via wireless communication to and from the network device or other electronic device.
The audio circuit 2405 may be used to provide an audio interface between a user and the electronic device through a speaker, microphone. The audio circuit 2405 may transmit the received electrical signal converted from audio data to a speaker, which converts the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 2405 and converted into audio data, which is processed by the audio data output processor 2401 and sent to, for example, another electronic device via the radio frequency circuit 2404, or which outputs the audio data to the memory 2402 for further processing. Audio circuit 2405 may also include an ear bud jack to provide communication of a peripheral ear bud with the electronic device.
The input unit 2406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power source 2407 is used to power various components of the electronic device 2400. Optionally, the power source 2407 may be logically connected to the processor 2401 through a power management system, so as to implement functions of managing charging, discharging, and power consumption management through the power management system. The power source 2407 may also include one or more of any components, such as a direct current or alternating current power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown in fig. 24, the electronic device 2400 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., and will not be described herein.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of computer programs that can be loaded by a processor to perform any of the mesh structure generation methods provided by embodiments of the present application. For example, the computer program may perform the steps of:
Acquiring at least two reference objects;
performing point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performing point adding processing on the initial reference points to obtain a target reference point corresponding to the reference object;
determining the distance between target reference points, and carrying out connection processing on the target reference points corresponding to the distances meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects;
carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects;
and carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects.
The specific embodiments and the corresponding beneficial effects of each of the above operations can be found in the foregoing embodiments, and are not described herein again.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the computer program stored in the computer readable storage medium can execute any one of the mesh structure generating methods provided in the embodiments of the present application, the beneficial effects that any one of the mesh structure generating methods provided in the embodiments of the present application can achieve can be achieved, which are detailed in the previous embodiments and are not described herein.
The foregoing has described in detail the methods, apparatuses, electronic devices and computer readable storage medium for generating a mesh structure according to the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only for aiding in understanding the methods and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (14)

1. A method of generating a mesh structure, the method comprising:
acquiring at least two reference objects;
performing point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and performing point adding processing on the initial reference points to obtain a target reference point corresponding to each reference object;
determining the distance between the target reference points, and carrying out connection processing on the target reference points corresponding to the distance meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects;
Carrying out connection processing on the initial reference points to obtain second candidate grid bodies of the reference objects;
and carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects.
2. The mesh structure generation method of claim 1, wherein the performing the dotting process on the initial reference point to obtain the target reference point corresponding to the reference object includes:
carrying out connection processing on the initial reference points to obtain lines connected between the reference objects;
and according to the line, performing point adding processing on the initial reference point to obtain a target reference point corresponding to the reference object.
3. The mesh structure generation method of claim 2, wherein the performing the dotting process on the initial reference point according to the line to obtain the target reference point corresponding to the reference object includes:
according to the line, carrying out interpolation processing on the initial reference point to obtain an interpolated reference point;
acquiring a preset pattern length;
and according to the initial reference point, the interpolated reference point and the preset graph length, performing point adding processing on the initial reference point to obtain a target reference point corresponding to the reference object.
4. The mesh structure generation method as set forth in claim 3, wherein the performing the dotting process on the initial reference point according to the initial reference point, the interpolated reference point, and the preset pattern length to obtain the target reference point corresponding to the reference object includes:
drawing a graph corresponding to the initial reference point and a graph corresponding to the interpolated reference point by taking the initial reference point and the interpolated reference point as graph centers and taking the preset graph length as graph length;
and performing point scattering processing on the graph to obtain a target reference point corresponding to the reference object.
5. The mesh structure generation method of claim 4, wherein the drawing the graph corresponding to the initial reference point and the graph corresponding to the interpolated reference point with the initial reference point and the interpolated reference point as the graph center and the preset graph length as the graph length includes:
acquiring a first length adjustment coefficient corresponding to the initial reference point and a second length adjustment coefficient corresponding to the interpolated reference point;
adjusting the length of the preset pattern according to the first length adjustment coefficient to obtain a first adjusted pattern length corresponding to the initial reference point, and adjusting the length of the preset pattern according to the second length adjustment coefficient to obtain a second adjusted pattern length corresponding to the interpolated reference point;
Drawing a graph corresponding to the initial reference point by taking the initial reference point as a graph center and the first adjusted graph length as a graph length;
and drawing a graph corresponding to the interpolated reference point by taking the interpolated reference point as a graph center and the second adjusted graph length as a graph length.
6. The mesh structure generation method of claim 1, wherein the performing the connection processing on the target reference points corresponding to the distances satisfying the first preset distance condition to obtain the first candidate mesh bodies corresponding to the reference objects includes:
carrying out connection processing on a target reference point corresponding to a distance meeting a first preset distance condition to obtain a candidate grid body corresponding to the reference object;
and adjusting the candidate grid body according to the reference point on the candidate grid body to obtain a first candidate grid body corresponding to the reference object.
7. The mesh structure generation method as set forth in claim 6, wherein the adjusting the candidate mesh body according to the reference point on the candidate mesh body to obtain the first candidate mesh body corresponding to the reference object includes:
Screening out reference points meeting a second preset distance condition from the reference points on the candidate grid body to obtain screened reference points;
and merging the screened reference points to realize the adjustment processing of the candidate grid bodies and obtain a first candidate grid body corresponding to the reference object.
8. The mesh structure generation method as set forth in claim 6, wherein the adjusting the candidate mesh body according to the reference point on the candidate mesh body to obtain the first candidate mesh body corresponding to the reference object includes:
determining a target distance between a reference point on the candidate mesh body and the reference object;
and carrying out fuzzy processing on the candidate grid bodies according to the target distance to obtain first candidate grid bodies corresponding to the reference object.
9. The mesh structure generation method of claim 1, wherein the performing the connection processing on the initial reference point to obtain a second candidate mesh body of the reference object includes:
carrying out connection processing on the initial reference point to obtain a first line connected with the reference object;
performing interpolation processing on the initial reference point according to the first line to obtain a first interpolated reference point;
And combining the initial reference point meeting the third preset distance condition and the first interpolated reference point to obtain a second candidate grid body of the reference object.
10. The mesh structure generation method of claim 9, wherein the merging the initial reference point and the first interpolated reference point that satisfy the third preset distance condition to obtain the second candidate mesh body of the reference object includes:
combining the initial reference point meeting the third preset distance condition and the first interpolated reference point to obtain an initial grid body of the reference object;
and according to the reference object, adjusting the reference point on the initial grid body to obtain a second candidate grid body of the reference object.
11. The mesh structure generation method according to any one of claims 1 to 10, wherein the fusing process of the first candidate mesh body and the second candidate mesh body is performed to obtain a mesh structure connected between the reference objects, comprising:
carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain candidate net structures connected between the reference objects;
Determining a first distance between a reference point on the candidate mesh structure and the reference object;
screening out a reference point corresponding to the first distance meeting a fourth preset distance condition to obtain a static reference point;
and carrying out dynamic simulation on the candidate network structures according to the static reference points to obtain network structures connected between the reference objects.
12. A mesh structure generating apparatus, the apparatus comprising:
the object acquisition module is used for acquiring at least two reference objects;
the point processing module is used for carrying out point scattering processing on each reference object to obtain an initial reference point corresponding to each reference object, and carrying out point adding processing on the initial reference points to obtain a target reference point corresponding to the reference object;
the first connecting module is used for determining the distance between the target reference points, and carrying out connecting processing on the target reference points corresponding to the distance meeting the first preset distance condition to obtain first candidate grid bodies corresponding to the reference objects;
the second connecting module is used for carrying out connecting processing on the initial reference point to obtain a second candidate grid body of the reference object;
And the object fusion module is used for carrying out fusion processing on the first candidate grid body and the second candidate grid body to obtain a net structure connected between the reference objects.
13. An electronic device comprising a processor and a memory, the memory storing a plurality of instructions; the processor loads instructions from the memory to perform the mesh structure generation method of any one of claims 1 to 11.
14. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the mesh structure generation method of any one of claims 1 to 11.
CN202310594955.3A 2023-05-23 2023-05-23 Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium Pending CN116531750A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310594955.3A CN116531750A (en) 2023-05-23 2023-05-23 Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310594955.3A CN116531750A (en) 2023-05-23 2023-05-23 Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN116531750A true CN116531750A (en) 2023-08-04

Family

ID=87452299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310594955.3A Pending CN116531750A (en) 2023-05-23 2023-05-23 Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN116531750A (en)

Similar Documents

Publication Publication Date Title
CN112370783B (en) Virtual object rendering method, device, computer equipment and storage medium
CN112233211B (en) Animation production method, device, storage medium and computer equipment
CN112138386A (en) Volume rendering method and device, storage medium and computer equipment
CN112465945B (en) Model generation method and device, storage medium and computer equipment
CN113952720A (en) Game scene rendering method and device, electronic equipment and storage medium
CN112717414A (en) Game scene editing method and device, electronic equipment and storage medium
CN112206517A (en) Rendering method, device, storage medium and computer equipment
CN117058284A (en) Image generation method, device and computer readable storage medium
CN113436346A (en) Distance measuring method and device in three-dimensional space and storage medium
CN112348955B (en) Object rendering method
CN113362435B (en) Virtual component change method, device, equipment and medium of virtual object model
CN116212374A (en) Model processing method, device, computer equipment and storage medium
CN116531750A (en) Mesh structure generation method, mesh structure generation device, electronic device and readable storage medium
CN113350792B (en) Contour processing method and device for virtual model, computer equipment and storage medium
CN115222904A (en) Terrain processing method and device, electronic equipment and readable storage medium
CN117899468A (en) Scene content generation method, device and computer readable storage medium
CN117953150A (en) Three-dimensional human body reconstruction method, three-dimensional human body reconstruction device, electronic equipment and storage medium
CN115272432A (en) Model information processing method, device, storage medium and computer equipment
CN117618898A (en) Map generation method, map generation device, electronic device and computer readable storage medium
CN117197307A (en) Virtual model processing method and device, computer equipment and storage medium
CN117274474A (en) Method and device for generating ambient light mask, electronic equipment and storage medium
CN118015194A (en) Model processing method, device and computer readable storage medium
CN116109729A (en) Curve processing method, curve processing device, computer equipment and computer readable storage medium
CN117679747A (en) Model construction method, apparatus, computer device, and computer-readable storage medium
CN117274475A (en) Halo effect rendering method and device, electronic equipment and readable storage medium

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