WO2022033009A1 - 一种渲染处理的方法及装置、电子设备、存储介质 - Google Patents

一种渲染处理的方法及装置、电子设备、存储介质 Download PDF

Info

Publication number
WO2022033009A1
WO2022033009A1 PCT/CN2021/077307 CN2021077307W WO2022033009A1 WO 2022033009 A1 WO2022033009 A1 WO 2022033009A1 CN 2021077307 W CN2021077307 W CN 2021077307W WO 2022033009 A1 WO2022033009 A1 WO 2022033009A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
grid
simulation
mesh
vertex
Prior art date
Application number
PCT/CN2021/077307
Other languages
English (en)
French (fr)
Inventor
刘忠源
Original Assignee
网易(杭州)网络有限公司
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 网易(杭州)网络有限公司 filed Critical 网易(杭州)网络有限公司
Priority to US18/041,218 priority Critical patent/US20230338842A1/en
Publication of WO2022033009A1 publication Critical patent/WO2022033009A1/zh

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images

Definitions

  • the present disclosure relates to the technical field of image processing, and in particular, to a method and apparatus for rendering processing, an electronic device, and a storage medium.
  • the use of cloth in the game is gradually increasing.
  • the vertices are usually simulated and calculated directly on the cloth rendering grid to obtain the rendering position, and then the cloth simulation effect can be produced later.
  • One embodiment of the present disclosure provides a rendering processing method, the method includes:
  • the virtual model includes a display grid and a simulation grid, and the number of vertices of the simulation grid is less than the number of vertices of the display grid;
  • the target mapping information is information for the target mapping point of the target sub-grid in the simulation grid
  • the display mesh is rendered according to the target vertex position information.
  • the determining the target vertex position information of the display grid according to the target mapping information and the vertex position parameters of the simulation grid includes:
  • the target mapping information and the vertex position parameters of the simulation grid determine the target mapping point position information of the target mapping point
  • the target distance vector is the distance vector between the target vertex and the target mapping point
  • the target vertex position information of the display mesh is determined.
  • determining the target vertex position information of the display grid according to the target distance vector and the target mapping point position information including:
  • the target vertex position information of the display grid is determined by combining the target normal vector, the target distance vector, and the target mapping point position information.
  • determining the target mapping point position information of the target mapping point according to the target mapping information and the vertex position parameters of the simulation grid including:
  • the target subgrid index is the subgrid index corresponding to the target subgrid in the simulation grid;
  • the target mapping point position information of the target mapping point is determined according to the target sub-grid index and the vertex position parameter of the simulation grid.
  • determining the target mapping point position information of the target mapping point according to the target sub-grid index and the vertex position parameter of the simulation grid including:
  • the target barycentric coordinates are the barycentric coordinates corresponding to the target mapping points in the target subgrid;
  • the target mapping point position information of the target mapping point in the target sub-grid is determined in combination with the target sub-grid index, the target barycentric coordinates, and the vertex position parameters of the simulation grid.
  • One embodiment of the present disclosure provides a rendering processing method, the method includes:
  • the virtual model includes a display grid and a simulation grid, and the number of vertices of the simulation grid is less than the number of vertices of the display grid;
  • Target mapping information corresponding to target vertices of the display grid; wherein, the target mapping information is information for target mapping points of target sub-grids in the simulation grid.
  • the target mapping information includes a target subgrid index corresponding to the target subgrid
  • the generating target mapping information corresponding to a target vertex of the display grid includes:
  • a target subgrid index corresponding to the target subgrid is determined.
  • determining the target sub-grid corresponding to the target vertex of the display grid comprising:
  • For the target vertex of the display grid determine the distance information corresponding to the sub-grid in the simulation grid
  • the sub-grid corresponding to the smallest distance information is determined to be the target sub-grid corresponding to the target vertex of the display grid.
  • the target mapping information includes target barycentric coordinates corresponding to the target mapping points
  • the generating target mapping information corresponding to the target vertices of the display grid includes:
  • the target mapping information includes a target distance vector between the target vertex and the target mapping point
  • the generating target mapping information corresponding to the target vertex of the display grid includes:
  • a target distance vector between the target vertex and the target map point is determined.
  • An embodiment of the present disclosure provides an apparatus for rendering processing, the apparatus includes:
  • a first virtual model obtaining module configured to obtain a virtual model; wherein the virtual model includes a display mesh and a simulation mesh, and the number of vertices of the simulation mesh is smaller than the number of vertices of the display mesh;
  • a vertex position parameter determination module of the simulation network configured to respond to a deformation event that triggers the deformation of the virtual model, and determine the vertex position parameter of the simulation network according to the deformation event;
  • a target mapping information determining module configured to determine target mapping information corresponding to a target vertex of the display grid; wherein the target mapping information is information for target mapping points of a target sub-grid in the simulation grid;
  • a target vertex position information determination module configured to determine target vertex position information of the display grid according to the target mapping information and the vertex position parameters of the simulation grid;
  • a display mesh rendering module is configured to render the display mesh according to the target vertex position information.
  • An embodiment of the present disclosure provides an apparatus for rendering processing, the apparatus includes:
  • a second virtual model obtaining module configured to obtain a virtual model; wherein the virtual model includes a display grid and a simulation grid, and the number of vertices of the simulation grid is smaller than the number of vertices of the display grid;
  • the target mapping information generating module is configured to generate target mapping information corresponding to target vertices of the display grid; wherein, the target mapping information is information for target mapping points of target sub-grids in the simulation grid.
  • An electronic device provided by one of the embodiments of the present disclosure includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the computer program is implemented when executed by the processor The steps of the method of rendering processing as described above.
  • An embodiment of the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the rendering processing method as described above are implemented.
  • FIG. 1 is a flowchart of steps of a method for rendering processing provided by an embodiment of the present disclosure
  • FIG. 2a is a schematic diagram of an example of rendering processing provided by an embodiment of the present disclosure
  • 2b is a schematic diagram of an example of a penetration effect provided by an embodiment of the present disclosure
  • FIG. 3 is a flowchart of steps of another rendering processing method provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic structural diagram of an apparatus for rendering processing provided by an embodiment of the present disclosure
  • FIG. 5 is a schematic structural diagram of another apparatus for rendering processing provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present disclosure.
  • the cloth simulation is involved.
  • the rendering mesh of the cloth can be directly solved by using the data in the rendering mesh (such as vertex and triangle indices) on the rendering mesh.
  • the simulation calculation of the vertices in the grid obtains the rendering position for the subsequent cloth simulation effect production.
  • Cloth simulation as a kind of physical simulation effect with a large amount of calculation, often needs to compromise between the calculation efficiency and the simulation effect during the production of cloth, especially for mobile phones with relatively weak computing power. A large amount of calculation will cause the game to freeze.
  • the simulation calculation is performed on each layer of rendering grids to produce the cloth simulation effect, which will result in a gap between the two layers of rendering grids. Interleaving occurs, and the calculation amount will also be increased when the cloth simulation collision detection is performed in the mobile game.
  • the simulation calculation is performed by using a simulation grid with a smaller number of vertices than the rendering grid (ie, the display grid), and then according to the mapping information established between the rendering grid and the simulation grid, the target object can be obtained through interpolation mapping.
  • the rendering position of the rendering grid is used for rendering, which reduces the calculation amount of the cloth simulation and improves the smoothness of the game running, and the vertices of the rendering grid can be kept at a fixed distance relative to the simulation grid through interpolation, avoiding double layers. Penetration when rendering mesh simulations.
  • FIG. 1 a flowchart of steps of a rendering processing method provided by an embodiment of the present disclosure is shown, which may specifically include the following steps:
  • Step 101 obtaining a virtual model; wherein, the virtual model includes a display mesh and a simulation mesh, and the number of vertices of the simulation mesh is less than the number of vertices of the display mesh;
  • the display mesh may be a mesh for a virtual model, which may have fine effects and may have multiple layers of meshes, such as a two-layer display mesh;
  • the simulation mesh may be a mesh for a virtual model, which may have The effect is simplified and can be a single-layer mesh.
  • the number of vertices in the simulation mesh can be smaller than the number of vertices in the display mesh.
  • a layer of simulation mesh can be inserted in the middle of the double-layer display mesh. The number of vertices in the simulation mesh smaller than the display grid.
  • a display mesh for rendering and a simulation mesh for simulation can be obtained for the virtual model to be rendered, and the number of vertices of the simulation mesh is smaller than the number of vertices of the display mesh.
  • a rendering grid ie, a display grid
  • a simulation grid ie, a simulation grid
  • the virtual object ie, the virtual model
  • the rendering grid can be used for rendering to obtain a cloth simulation effect
  • the simulation grid can be used for cloth simulation calculation.
  • the mesh for the virtual model can be triangular mesh data
  • the triangular mesh data can be a collection of multiple triangles, wherein each triangle (triangular patch) has three vertices, which can be used as a virtual
  • the sum of the vertices of all triangles in the mesh of the model is taken as the total vertices of the mesh, for example, the total vertices of the simulation mesh are less than the total vertices of the display mesh.
  • Step 102 in response to a deformation event that triggers the deformation of the virtual model, determining a vertex position parameter of the simulation network according to the deformation event;
  • the deformation event may be a simulation process for the simulation mesh of the virtual model, and the simulation process may be deformed for the simulation mesh;
  • the vertex position parameter of the simulation network may include the position of the vertex for the deformed simulation network, for example , when the game is running, the simplified simulation mesh can be simulated, and multiple triangles T in the simulation mesh can be moved, and then the positions of the three vertices after the movement and deformation can be obtained for each triangle T.
  • the three vertices It can be expressed as Ta, Tb, Tc.
  • the simulation mesh can be simulated, and then the vertex position parameters of the simulation network after the simulation process can be obtained.
  • Step 103 determining the target mapping information corresponding to the target vertex of the display grid; wherein, the target mapping information is information for the target mapping point of the target sub-grid in the simulation grid;
  • the target vertex can be one or more vertices of the display grid, which can be rendered in the game, and the target mapping information can be the target mapping point information for the target sub-grid in the simulation grid.
  • the mapping between the target vertex in the mesh and the target mapping point in the simulation mesh, and the mapping information can be stored in the cloth resource, so that the mapping information (such as a mapping tuple) corresponding to the target vertex of the displayed mesh can be obtained in the game,
  • the mapping establishment process will be described in detail below, and will not be repeated here.
  • the target mapping point may be the mapping point in the simulation grid for the target vertex of the display mesh;
  • the target sub-mesh may be the mesh in the simulation mesh for the target mapping point, for example, the vertex for the display mesh P may have a mapping point P' in triangle T of the simulation mesh.
  • the target mapping information corresponding to the target vertex of the display mesh can be obtained from the cloth resource of the game.
  • the target mapping information can be the target for the target sub-mesh in the simulation mesh. Information about the mapping point.
  • the mapping tuple corresponding to the vertex can be queried in the cloth mesh resource.
  • the mapping tuple of the vertex P of the display mesh can be (dist, wx, wy, indexT), where dist can be a distance, wx and wy can be the barycentric coordinate interpolation of the point P' mapped to the vertex P in the simulation mesh, and indexT can be the triangle index of the closest triangle T to the vertex P in the simulation mesh.
  • Step 104 determining the target vertex position information of the display grid according to the target mapping information and the vertex position parameters of the simulation grid;
  • the position information of the target vertex of the display grid may be the position information of the target vertex.
  • the position of the mapping point P' in the simulation grid obtained by interpolation is mapped to the display grid.
  • the updated position information of vertex P is obtained.
  • the mapping After determining the target mapping information corresponding to the target vertex, since the target mapping information may have information on the target mapping points of the target sub-grid in the simulation grid, and then according to the target mapping information and the vertex position parameters of the simulation grid, The mapping obtains the target vertex position information corresponding to the target vertex in the display mesh.
  • cloth simulation can be performed on the simulation grid.
  • the cloth simulation effect can be realized by the change of the vertex position in the simulation grid corresponding to each frame of animation.
  • the vertices in the simulation grid can be for the display grid.
  • the mapping point of the vertices in the middle, and then the updated vertex position in the display grid can be obtained as the rendering position from the position information of the mapping point after moving in the simulation grid.
  • step 104 may include the following sub-steps:
  • Sub-step 11 according to the target mapping information and the vertex position parameter of the simulation grid, determine the target mapping point position information of the target mapping point;
  • the position information of the target mapping point may be the position information of the target mapping point processed by simulation, for example, the mapping point P' in the simulation grid for the vertex P of the display grid, when the simulation is performed on the simulation grid, The position information of the mapped point P' after moving.
  • the interpolation calculation can be performed for the target mapping point according to the target mapping information and the vertex position parameters of the simulation grid, and obtain The location information of the target mapping point corresponding to the target mapping point.
  • sub-step 11 may include the following sub-steps:
  • Sub-step 111 from the target mapping information, determine the target subgrid index; wherein, the target subgrid index is the subgrid index corresponding to the target subgrid in the simulation grid;
  • the target subgrid index may be a subgrid index corresponding to the target subgrid in the simulation grid, for example, a triangle index corresponding to triangle T in the simulation grid.
  • the sub-grid index for the target vertex can be obtained from the target mapping information as the target sub-grid index.
  • the mapping tuple corresponding to the vertex of the display mesh can be queried, and the mapping tuple can have the triangle index indexT in the simulation mesh for the vertex P of the display mesh, and then indexT can be used as Target subgrid index.
  • Sub-step 112 Determine target mapping point position information of the target mapping point according to the target sub-grid index and the vertex position parameter of the simulation grid.
  • the information of the target mapping point in the simulation grid can be determined according to the target sub-grid index and the vertex position parameters of the simulation grid, and then interpolation calculation can be performed on the target mapping point to obtain the target mapping point Corresponding target mapping point location information.
  • the sub-step 112 may include the following sub-steps:
  • Sub-step 1121 from the target mapping information, determine the target barycentric coordinates; wherein, the target barycentric coordinates are the barycentric coordinates corresponding to the target mapping points in the target subgrid;
  • the barycentric coordinates of the target may be the barycentric coordinates corresponding to the target mapping points in the target sub-grid, such as wx, wy, and wz in the mapping tuple.
  • the barycentric coordinates of the target vertex can be obtained from the target mapping information as the target barycentric coordinates.
  • the mapping tuple corresponding to the vertex of the display mesh can be queried, and the mapping tuple can have the barycentric coordinate interpolation wx of the point P' mapped in the simulation mesh for the vertex P of the display mesh ,wy, and then wx,wy can be used as the target barycentric coordinates.
  • the target mapping point position information of the target mapping point in the target sub-grid is determined in combination with the target sub-grid index, the target barycentric coordinates, and the vertex position parameters of the simulation grid.
  • the vertex position parameters of the simulation grid may include position parameters of the vertexes of the target sub-grid, for example, three vertex positions corresponding to the triangle T in the simulation grid.
  • the target mapping point position information of the target mapping points in the target subgrid can be obtained through interpolation calculation by combining the target sub-grid index, the target barycentric coordinates, and the vertex position parameters of the simulation grid.
  • the mapping tuple (dist, wx, wy, indexT) can be obtained by querying the vertex P of the display mesh, and then the triangle T in the simulation mesh can be determined according to the triangle index T, and three of the moved triangle T can be obtained.
  • the position of the vertex, and then the position of the mapping point P' in the simulation grid for the display grid vertex P can be obtained by interpolation.
  • the interpolation calculation can be performed in the following way:
  • Ta, Tb, Tc can be the positions of the three vertices of the moved triangle T in the simulation grid, and wx and wy are the barycentric coordinate interpolation of the mapping point P' of the display grid vertex P in the simulation grid.
  • the mapping tuple corresponding to the target vertex can be inquired, and the triangle T in the simulation mesh can be determined according to the triangle index T in the mapping tuple, and then the positions of the three vertices of the triangle T (such as Ta, Tb, Tc), the positions of the three vertices can be the positions of the three vertices after the movement of the triangle T in the simulation grid when the simulation is performed on the simulation grid.
  • the mapping tuple corresponding to the target vertex can be inquired, and the triangle T in the simulation mesh can be determined according to the triangle index T in the mapping tuple, and then the positions of the three vertices of the triangle T (such as Ta, Tb, Tc), the positions of the three vertices can be the positions of the three vertices after the movement of the triangle T in the simulation grid when the simulation is performed on the simulation grid.
  • Sub-step 12 from described target mapping information, determine target distance vector; Wherein, described target distance vector is the distance vector between described target vertex and described target mapping point;
  • the target distance vector may be the distance vector between the target vertex and the target mapping point, eg, dist in the mapping tuple.
  • the distance vector between the target vertex and the target mapping point can be obtained from the target mapping information as the target distance vector.
  • the mapping tuple corresponding to the vertex of the displayed mesh can be queried, and the mapping tuple has the distance vector dist between the vertex P and the mapping point P', and then the dist can be used as the target distance vector .
  • Sub-step 13 Determine the target vertex position information of the display grid according to the target distance vector and the target mapping point position information.
  • the target distance vector and the target mapping point position information corresponding to the target mapping point in the simulation grid can be used, and the target vertex position information corresponding to the target vertex in the display grid can be obtained by interpolation.
  • sub-step 13 may include the following sub-steps:
  • Substep 131 determining the target normal vector for the target subgrid
  • the target normal vector may be the normal vector of the target sub-grid in the simulation grid, for example, the normal vectors of the three vertices corresponding to the triangles in the simulation grid.
  • the target sub-grid index can be obtained from the target mapping information, and then the target sub-grid can be determined by using the target sub-grid index to obtain the normal vector of the vertex of the target sub-grid.
  • the mapping tuple corresponding to the target vertex can be queried, and the triangle T in the simulation mesh can be determined according to the triangle index T in the mapping tuple, and then the normal vectors of the three vertices of the triangle T can be obtained (such as Na, Nb , Nc), the normal vector of the triangle T can be the average value of the normal vectors of all adjacent triangles of the triangle T, and then the normal vector N' of the mapping point P' can be obtained by interpolation, and the interpolation calculation can be performed in the following way:
  • Na, Nb, Nc can be the normal vectors of the three vertices of the moved triangle T in the simulation grid
  • wx, wy can be the barycentric coordinates of the vertex P of the display grid mapping point P' in the simulation grid.
  • Sub-step 132 combining the target normal vector, the target distance vector, and the target mapping point position information, determine the target vertex position information of the display grid.
  • the mapping tuple can be obtained by querying the vertex P of the display mesh, then the triangle T in the simulation mesh can be determined according to the triangle index T, and the mapping point P' can be obtained from the normal vectors of the three vertices of the triangle T
  • the normal vector of , and the position of the mapping point P' in the simulation grid for the vertex P of the display grid can be obtained by interpolation, and then the updated position of the vertex P in the display grid can be obtained by interpolation.
  • the interpolation calculation can be performed in the following way:
  • P' can be the position of the mapping point obtained by interpolation
  • dist can be the distance vector between the vertex P and the mapping point P'
  • N' can be the normal vector of the mapping point P'.
  • Step 105 Render the display mesh according to the target vertex position information.
  • the target vertex position information can be used to determine the rendering position of the target vertex in the display grid, and then the display grid can be rendered.
  • the simulation calculation is performed by using a simulation mesh with a number of vertices smaller than the display mesh, and then according to the mapping information established between the display mesh and the simulation mesh, the rendering position for the display mesh can be obtained through interpolation mapping for rendering. , so that the vertices of the display grid can keep a fixed distance from the simulation grid through interpolation, avoiding the penetration of the double-layer display grid simulation.
  • the virtual model includes a display mesh and a simulation mesh
  • the number of vertices of the simulation mesh is less than the number of vertices of the display mesh
  • Determine the vertex position parameters of the simulation network and then determine the target mapping information corresponding to the target vertex of the display grid.
  • the target mapping information is the information for the target mapping points of the target sub-grid in the simulation grid.
  • the vertex position parameter of the grid determines the target vertex position information of the display grid, and the display grid is rendered according to the target vertex position information, which realizes the optimization for the simulation of virtual model cloth. Display the vertices of the mesh, and then render the display mesh, which reduces the calculation amount of cloth simulation and improves the smoothness of game running.
  • FIG. 3 a flowchart of steps of another rendering processing method provided by an embodiment of the present disclosure is shown, which may specifically include the following steps:
  • Step 301 obtaining a virtual model; wherein, the virtual model includes a display mesh and a simulation mesh, and the number of vertices of the simulation mesh is less than the number of vertices of the display mesh;
  • a display mesh and a simulation mesh can be made for the virtual model to be rendered.
  • the display mesh can be used for rendering, and the simulation mesh can be used for simulation.
  • the number of vertices of the simulation mesh is smaller than that of the display mesh. number of vertices.
  • Step 302 generating target mapping information corresponding to target vertices of the display grid; wherein, the target mapping information is information for target mapping points of target sub-grids in the simulation grid.
  • the mapping between the target vertex in the display mesh and the target mapping point in the simulation mesh can be established, and the mapping information can be stored in the cloth resource as the corresponding target vertex of the display mesh.
  • Target mapping information can be stored in the cloth resource as the corresponding target vertex of the display mesh.
  • the target mapping information may include a target subgrid index corresponding to the target subgrid, and step 302 may include the following substeps:
  • Sub-step 21 in the simulation grid, determine the target sub-grid corresponding to the target vertex of the display grid;
  • the target sub-mesh may be a sub-mesh in the simulation mesh for the target vertex of the display mesh, for example, a triangle T at the closest distance to vertex P in the simulation mesh.
  • the target sub-mesh corresponding to the target vertex of the display mesh may be determined from the multiple sub-mesh of the simulation mesh.
  • sub-step 21 may include the following sub-steps:
  • Sub-step 211 for the target vertex of the display grid, determine the distance information corresponding to the sub-grid in the simulation grid;
  • the distance information may be distance information between a target vertex of the display mesh and a plurality of sub meshes in the simulation mesh.
  • the simulation mesh After acquiring the display mesh and the simulation mesh, for the target vertex of the display mesh, in the simulation mesh, obtain the distance information between the target vertex and multiple sub-mesh in the simulation mesh.
  • all triangles on the simulation grid can be traversed, and the spatial distance from the vertex P to each triangle can be calculated, for example, the vertex P and each vertex, each edge, and the triangle of each triangle plane distance.
  • Sub-step 212 determining that the sub-grid corresponding to the smallest distance information is the target sub-grid corresponding to the target vertex of the display grid.
  • the display mesh can have multiple vertices, and for each vertex, all triangles on the simulation mesh can be traversed, and the spatial distance from the vertex to each triangle can be calculated, and then the triangle with the smallest spatial distance for the vertex can be found ( Triangular patch), for example, the vertex P of the display mesh corresponds to the triangle T with the smallest spatial distance.
  • Sub-step 22 Determine the target subgrid index corresponding to the target subgrid.
  • the sub-grid index corresponding to the target sub-grid can be used as the target sub-grid index, for example, the triangle index indexT.
  • the target mapping information may include the target barycentric coordinates corresponding to the target mapping points, and step 302 may further include the following sub-steps:
  • Sub-step 31 in the target sub-grid determine the target mapping point corresponding to the target vertex
  • the target sub-mesh corresponding to the target vertex of the display mesh can be determined from the multiple sub-mesh of the simulation mesh, and then the corresponding target vertex can be determined in the target sub-mesh For example, after obtaining the vertex P in the triangle T of the simulation mesh, the mapping P' of the vertex P projected to the plane where the triangle T is located can be obtained.
  • Sub-step 32 Determine the target barycentric coordinates corresponding to the target mapping point.
  • the barycentric coordinates of the target mapping point relative to the vertices of the target sub-mesh can be obtained as the target barycentric coordinates.
  • the target mapping information may include a target distance vector between the target vertex and the target mapping point, and step 302 may further include the following sub-steps:
  • a target distance vector between the target vertex and the target map point is determined.
  • the target sub-mesh corresponding to the target vertex of the display mesh can be determined from the multiple sub-mesh of the simulation mesh, and then the target vertex corresponding to the target vertex can be determined in the target sub-mesh
  • the target mapping point of , and then the distance vector between the target vertex and the target mapping point can be used as the target distance vector.
  • the distance dist between the vertex P and the mapping point P' can be obtained by calculation, and dist can have a symbol to indicate the direction of the vertex P equivalent to the plane of the triangle T, for example, the vertex P is the triangle T for the simulation mesh
  • the upper layer of the plane displays the mesh, or the lower layer of the triangular T-plane for the simulation mesh.
  • the mapping point P' of the vertex P projected on the plane where the triangle T is located can be obtained, and then the vertex P and the mapping point P' can be calculated.
  • the triangle index in the grid is indexT, and then the mapping tuple (dist, wx, wy, indexT) can be obtained for the vertex P of the display mesh, and the mapping tuple can be saved in the cloth mesh resource.
  • the virtual model includes a display mesh and a simulation mesh
  • the number of vertices of the simulation mesh is smaller than the number of vertices of the display mesh
  • a target corresponding to the target vertex of the display mesh is generated
  • the target mapping information is the information for the target mapping point of the target sub-grid in the simulation grid, which realizes the optimization for the virtual model cloth simulation, and establishes the mapping information for the simulation grid with a small number of vertices and the display grid.
  • FIG. 4 a schematic structural diagram of an apparatus for rendering processing provided by an embodiment of the present disclosure is shown, which may specifically include the following modules:
  • a first virtual model obtaining module 401 configured to obtain a virtual model; wherein, the virtual model includes a display mesh and a simulation mesh, and the number of vertices of the simulation mesh is smaller than the number of vertices of the display mesh;
  • the vertex position parameter determination module 402 of the simulation network is configured to determine the vertex position parameter of the simulation network according to the deformation event in response to a deformation event that triggers the deformation of the virtual model;
  • the target mapping information determination module 403 is used to determine the target mapping information corresponding to the target vertex of the display grid; wherein, the target mapping information is information for the target mapping point of the target sub-grid in the simulation grid;
  • a target vertex position information determining module 404 configured to determine target vertex position information of the display grid according to the target mapping information and the vertex position parameters of the simulation grid;
  • the display mesh rendering module 405 is configured to render the display mesh according to the target vertex position information.
  • the target vertex position information determination module 404 includes:
  • a target mapping point position information determination submodule configured to determine the target mapping point position information of the target mapping point according to the target mapping information and the vertex position parameters of the simulation grid;
  • the first target distance vector determination submodule is used to determine the target distance vector from the target mapping information; wherein, the target distance vector is the distance vector between the target vertex and the target mapping point;
  • the target vertex position information determination submodule is configured to determine the target vertex position information of the display grid according to the target distance vector and the target mapping point position information.
  • the target vertex position information determination submodule includes:
  • a target normal vector determination unit for determining the target normal vector for the target subgrid
  • a target vertex position information determination unit configured to combine the target normal vector, the target distance vector, and the target mapping point position information to determine target vertex position information of the display grid.
  • the target mapping point location information determination submodule includes:
  • a target subgrid index determination unit configured to determine a target subgrid index from the target mapping information; wherein, the target subgrid index is a subgrid corresponding to the target subgrid in the simulation grid index;
  • a target mapping point position information determining unit configured to determine target mapping point position information of the target mapping point according to the target sub-grid index and the vertex position parameter of the simulation grid.
  • the unit for determining the location information of the target mapping point includes:
  • a target barycentric coordinate determination subunit configured to determine the target barycentric coordinates from the target mapping information; wherein, the target barycentric coordinates are the barycentric coordinates corresponding to the target mapping points in the target subgrid;
  • the target mapping point position information determination subunit is used to determine the target of the target mapping point in the target subgrid in combination with the target subgrid index, the target barycentric coordinates, and the vertex position parameters of the simulation grid Map point location information.
  • the virtual model includes a display mesh and a simulation mesh
  • the number of vertices of the simulation mesh is less than the number of vertices of the display mesh
  • Determine the vertex position parameters of the simulation network and then determine the target mapping information corresponding to the target vertex of the display grid.
  • the target mapping information is the information for the target mapping points of the target sub-grid in the simulation grid.
  • the vertex position parameter of the grid determines the target vertex position information of the display grid, and the display grid is rendered according to the target vertex position information, which realizes the optimization for the simulation of virtual model cloth. Display the vertices of the mesh, and then render the display mesh, which reduces the calculation amount of cloth simulation and improves the smoothness of game running.
  • FIG. 5 a schematic structural diagram of another apparatus for rendering processing provided by an embodiment of the present disclosure is shown, which may specifically include the following modules:
  • the second virtual model obtaining module 501 is configured to obtain a virtual model; wherein, the virtual model includes a display mesh and a simulation mesh, and the number of vertices of the simulation mesh is smaller than the number of vertices of the display mesh;
  • the target mapping information generating module 502 is configured to generate target mapping information corresponding to target vertices of the display grid; wherein, the target mapping information is information for target mapping points of target sub-grids in the simulation grid.
  • the target mapping information includes a target subgrid index corresponding to the target subgrid
  • the target mapping information generating module 502 includes:
  • a target subgrid determination submodule used for determining, in the simulation grid, a target subgrid corresponding to a target vertex of the display grid
  • the target sub-grid index determination sub-module is used for the target sub-grid index corresponding to the target sub-grid.
  • the target subgrid determination submodule includes:
  • a distance information determining unit configured to determine the distance information corresponding to the sub-grid in the simulation grid for the target vertex of the display grid
  • the target sub-grid determining unit is configured to determine that the sub-grid corresponding to the smallest distance information is the target sub-grid corresponding to the target vertex of the display grid.
  • the target mapping information includes target barycentric coordinates corresponding to the target mapping points
  • the target mapping information generating module 502 includes:
  • a target mapping point determination submodule for determining, in the target subgrid, the target mapping point corresponding to the target vertex
  • the target barycentric coordinate determination sub-module is used for determining the target barycentric coordinates corresponding to the target mapping point.
  • the target mapping information includes a target distance vector between the target vertex and the target mapping point
  • the target mapping information generating module 502 includes:
  • the second target distance vector determination sub-module is configured to determine the target distance vector between the target vertex and the target mapping point.
  • the virtual model includes a display mesh and a simulation mesh
  • the number of vertices of the simulation mesh is smaller than the number of vertices of the display mesh
  • a target corresponding to the target vertex of the display mesh is generated
  • the target mapping information is the information for the target mapping point of the target sub-grid in the simulation grid, which realizes the optimization of the virtual object cloth simulation, and establishes the mapping information for the simulation grid with a small number of vertices and the display grid.
  • FIG. 6 a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown, which may specifically include a processor 601, a memory 602, and a computer program stored in the memory and capable of running on the processor.
  • the computer program may The method that implements the above rendering processing when executed by the processor.
  • the computer-readable storage medium 701 can store a computer program, and the computer program can be executed by a processor to realize the above rendering process Methods.
  • embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media having computer-usable program code embodied therein, including but not limited to disk storage, CD-ROM, optical storage, and the like.
  • Embodiments of the present disclosure are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present disclosure. It will be understood that each flow and/or block in the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal equipment to produce a machine that causes the instructions to be executed by the processor of the computer or other programmable data processing terminal equipment Means are created for implementing the functions specified in the flow or flows of the flowcharts and/or the blocks or blocks of the block diagrams.
  • These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal equipment to operate in a particular manner, such that the instructions stored in the computer readable memory result in an article of manufacture comprising instruction means, the The instruction means implement the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

一种渲染处理的方法、装置、电子设备及存储介质,其中方法包括:获取虚拟模型,虚拟模型包括显示网格和仿真网格,仿真网格的顶点数量小于显示网格的顶点数量(101);响应触发虚拟模型进行形变的形变事件,根据形变事件确定仿真网络的顶点位置参数(102);确定显示网格的目标顶点对应的目标映射信息(103);根据目标映射信息和仿真网格的顶点位置参数确定显示网格的目标顶点位置信息(104);根据目标顶点位置信息,对显示网格进行渲染(105)。

Description

一种渲染处理的方法及装置、电子设备、存储介质
本申请要求于2020年08月11日提交的申请号为202010803958.X、名称为“一种渲染处理的方法及装置、电子设备、存储介质”的中国专利申请的优先权,该中国专利申请的全部内容通过引用全部并入全文。
技术领域
本公开涉及图像处理技术领域,特别是涉及一种渲染处理的方法及装置、电子设备、存储介质。
背景技术
目前,游戏中涉及布料的使用逐渐增多,针对布料仿真,通常是直接在布料的渲染网格上对顶点进行仿真计算得到渲染位置,以后续制作布料仿真效果。
然而,由于布料的渲染网格中顶点数目非常多,将导致游戏中对渲染网格的仿真计算量大,特别是在手机端计算能力相对偏弱时,较大的计算量会造成游戏卡顿。
发明内容
本公开其中一实施例提供的一种渲染处理的方法,所述方法包括:
获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
响应触发所述虚拟模型进行形变的形变事件,根据所述形变事件确定所述仿真网络的顶点位置参数;
确定所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息;
根据所述目标映射信息和所述仿真网格的顶点位置参数确定所述显示网格的目标顶点位置信息;
根据所述目标顶点位置信息,对所述显示网格进行渲染。
可选地,所述根据所述目标映射信息和所述仿真网格的顶点位置参数确定所述显示网格的目标顶点位置信息,包括:
根据所述目标映射信息和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息;
从所述目标映射信息中,确定目标距离向量;其中,所述目标距离向量为所述目标顶点和所述目标映射点之间的距离向量;
根据所述目标距离向量和所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
可选地,所述根据所述目标距离向量和所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息,包括:
确定针对所述目标子网格的目标法向量;
结合所述目标法向量、所述目标距离向量,以及所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
可选地,所述根据所述目标映射信息和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息,包括:
从所述目标映射信息中,确定目标子网格索引;其中,所述目标子网格索引为所述仿真网格中目标子网格对应的子网格索引;
根据所述目标子网格索引和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息。
可选地,所述根据所述目标子网格索引和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息,包括:
从所述目标映射信息中,确定目标重心坐标;其中,所述目标重心坐标为所述目标子网格中目标映射点对应的重心坐标;
结合所述目标子网格索引、所述目标重心坐标,以及所述仿真网格的顶点位置参数,确定所述目标子网格中目标映射点的目标映射点位置信息。
本公开其中一实施例提供的一种渲染处理的方法,所述方法包括:
获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
生成所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息。
可选地,所述目标映射信息包括所述目标子网格对应的目标子网格索引,所述生成所述显示网格的目标顶点对应的目标映射信息,包括:
在所述仿真网格中,确定所述显示网格的目标顶点对应的目标子网格;
确定所述目标子网格对应的目标子网格索引。
可选地,所述在所述仿真网格中,确定所述显示网格的目标顶点对应的目标子网格,包括:
针对所述显示网格的目标顶点,确定所述仿真网格中子网格对应的距离信息;
确定最小的距离信息对应的子网格为所述显示网格的目标顶点对应的目标子网格。
可选地,所述目标映射信息包括所述目标映射点对应的目标重心坐标,所述生成所述显示网格的目标顶点对应的目标映射信息,包括:
在所述目标子网格中,确定所述目标顶点对应的目标映射点;
确定所述目标映射点对应的目标重心坐标。
可选地,所述目标映射信息包括所述目标顶点和所述目标映射点之间的目标距离向量,所述生成所述显示网格的目标顶点对应的目标映射信息,包括:
确定所述目标顶点和所述目标映射点之间的目标距离向量。
本公开其中一实施例提供的一种渲染处理的装置,所述装置包括:
第一虚拟模型获取模块,被配置为获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
仿真网络的顶点位置参数确定模块,被配置为响应触发所述虚拟模型进行形变的形变事件,根据所述形变事件确定所述仿真网络的顶点位置参数;
目标映射信息确定模块,被配置为确定所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息;
目标顶点位置信息确定模块,被配置为根据所述目标映射信息和所述仿真网格的顶点位置参数确定所述显示网格的目标顶点位置信息;
显示网格渲染模块,被配置为根据所述目标顶点位置信息,对所述显示网格进行渲染。
本公开其中一实施例提供的一种渲染处理的装置,所述装置包括:
第二虚拟模型获取模块,被配置为获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
目标映射信息生成模块,被配置为生成所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息。
本公开其中一实施例提供的一种电子设备,包括处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的渲染处理的方法的步骤。
本公开其中一实施例提供的一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如上所述的渲染处理的方法的步骤。
附图说明
为了更清楚地说明本公开的技术方案,下面将对本公开的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本公开一实施例提供的一种渲染处理的方法的步骤流程图;
图2a是本公开一实施例提供的一种渲染处理示例的示意图;
图2b是本公开一实施例提供的一种穿透效果示例的示意图;
图3是本公开一实施例提供的另一种渲染处理的方法的步骤流程图;
图4是本公开一实施例提供的一种渲染处理的装置的结构示意图;
图5是本公开一实施例提供的另一种渲染处理的装置的结构示意图;
图6是本公开一实施例提供的一种电子设备的结构示意图;
图7是本公开一实施例提供的一种计算机可读存储介质的结构示意图。
具体实施方式
为使本公开的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本公开作进一步详细的说明。显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
在本公开实施例中,涉及布料仿真,在布料仿真时可以针对布料的渲染网格,采用渲染网格中的数据(如顶点和三角形索引)直接在渲染网格上进行求解,通过对渲染网格中顶点的仿真计算得出渲染位置,以进行后续布料仿真效果制作。
然而,在游戏中针对虚拟模型的布料的渲染网格中顶点数目越多,将会导致求解的计算量越大。布料仿真作为一种计算量极大的物理仿真效果,在布料制作时对于计算效率和仿真效果往往需要相互妥协,特别是针对计算能力相对偏弱的手机端,若直接使用渲染网格进行仿真,较大的计算量会造成游戏卡顿。
而且,在游戏中采用两层渲染网格来进行布料仿真时,按照传统布料仿真制作方法,分别对每一层渲染网格进行仿真计算以制作布料仿真效果,会导致两层渲染网格之间产生穿插,在手机端游戏中进行布料仿真碰撞检测时,也将增加计算量。
应用本公开实施例的方法,通过采用顶点数量小于渲染网格(即显示网格)的仿真网格进行仿真计算,然后根据渲染网格与仿真网格建立的映射信息,可以通过插值映射获取针对渲染网格的渲染位置以进行渲染,降低了布料仿真的计算量,提升了游戏运行的流畅度,且通过插值可以使渲染网格的顶点相对于仿真网格保持固定的距离,避免了双层渲染网格仿真时的穿透。
以下进行详细的说明:
参照图1,示出了本公开一实施例提供的一种渲染处理的方法的步骤流程图,具体可以包括如下步骤:
步骤101,获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
作为一示例,显示网格可以为针对虚拟模型的网格,其可以具有精细效果且可以多 层网格,如双层显示网格;仿真网格可以为针对虚拟模型的网格,其可以具有精简效果且可以为单层网格,仿真网格的顶点数量可以小于显示网格的顶点数量,例如,可以在双层显示网格中间插入一层仿真网格,该仿真网格中的顶点数量小于显示网格。
在渲染的过程中,可以针对待渲染的虚拟模型,获取用于渲染的显示网格和用于仿真模拟的仿真网格,仿真网格的顶点数量小于显示网格的顶点数量。
具体的,在游戏中进行渲染时,可以针对待渲染的游戏中虚拟模型,获取针对该虚拟对象(即虚拟模型)的渲染网格(即显示网格)和模拟网格(即仿真网格),该渲染网格可以用于渲染得到布料仿真效果,该模拟网格可以用于进行布料仿真计算。
在制作布料仿真时,针对虚拟模型的网格可以为三角网格数据,该三角网格数据可以为多个三角形的集合,其中,每个三角形(三角面片)具有三个顶点,可以将虚拟模型的网格中所有三角形的顶点数目总和作为网格的总顶点数,例如,仿真网格的总顶点数小于显示网格的总顶点数。
步骤102,响应触发所述虚拟模型进行形变的形变事件,根据所述形变事件确定所述仿真网络的顶点位置参数;
作为一示例,形变事件可以为针对虚拟模型的仿真网格进行仿真处理,该仿真处理可以针对仿真网格进行变形;仿真网络的顶点位置参数可以包括针对变形后的仿真网络的顶点的位置,例如,游戏运行时,可以针对精简的仿真网格进行仿真处理,可以使仿真网格中多个三角形T进行移动,进而针对每一三角形T可以得到移动变形后三个顶点的位置,该三个顶点可以表示为Ta,Tb,Tc。
针对游戏运行时进行渲染,可以在获取针对虚拟模型的显示网格和仿真网格后,对仿真网格进行仿真处理,进而可以得到仿真处理后仿真网络的顶点位置参数。
步骤103,确定所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息;
其中,目标顶点可以为显示网格的一个或多个顶点,在游戏中可以针对该顶点进行渲染,目标映射信息可以为针对仿真网格中目标子网格的目标映射点的信息,通过建立显示网格中目标顶点与仿真网格中目标映射点的映射,并可以将映射信息存储于布料资源中,以在游戏中可以获取显示网格的目标顶点对应的映射信息(如映射元组),该映射建立过程在下文进行详细介绍,在此不作赘述。
作为一示例,目标映射点可以为仿真网格中针对显示网格的目标顶点的映射点;目标子网格可以为仿真网格中针对目标映射点的网格,例如,针对显示网格的顶点P可以在仿真网格的三角形T中具有映射点P’。
在获取显示网格和仿真网格后,可以从游戏的布料资源中,获取针对显示网格的目标顶点对应的目标映射信息,该目标映射信息可以为针对仿真网格中目标子网格的目标映射点的信息。
在实际应用中,可以针对显示网格的每一顶点,在布料网格资源中查询顶点对应的映射元组,例如,显示网格的顶点P的映射元组可以为(dist,wx,wy,indexT),其中,dist可以为距离,wx和wy可以为针对顶点P在仿真网格中映射点P’的重心坐标插值,indexT可以为仿真网格中针对顶点P最近的三角形T的三角形索引。
步骤104,根据所述目标映射信息和所述仿真网格的顶点位置参数确定所述显示网格的目标顶点位置信息;
作为一示例,显示网格的目标顶点位置信息可以为针对目标顶点的位置信息,例如,在仿真网格上进行仿真后,将插值得到的仿真网格中映射点P’的位置映射到显示网格中,得到顶点P更新的位置信息。
在确定目标顶点对应的目标映射信息后,由于该目标映射信息中可以具有针对仿真网格中目标子网格的目标映射点的信息,进而可以根据目标映射信息和仿真网格的顶点位置参数,映射得到显示网格中目标顶点对应的目标顶点位置信息。
在游戏的渲染中,可以在仿真网格上进行布料仿真,布料仿真效果可以通过每一帧动画对应的仿真网格中顶点位置的变化而实现,该仿真网格中顶点可以为针对显示网格中顶点的映射点,进而可以由仿真网格中移动后映射点的位置信息,得到显示网格中更新的顶点位置作为渲染位置。
在本公开一实施例中,步骤104可以包括如下子步骤:
子步骤11,根据所述目标映射信息和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息;
作为一示例,目标映射点位置信息可以为经仿真处理的目标映射点的位置信息,例如,仿真网格中针对显示网格的顶点P的映射点P’,在仿真网格上进行仿真时,该映射点P’移动后的位置信息。
在确定目标顶点对应的目标映射信息后,由于该目标映射信息中可以具有针对目标映射点的信息,进而可以根据目标映射信息和仿真网格的顶点位置参数,针对目标映射点进行插值计算,得到目标映射点对应的目标映射点位置信息。
在本公开一实施例中,子步骤11可以包括如下子步骤:
子步骤111,从所述目标映射信息中,确定目标子网格索引;其中,所述目标子网格索引为所述仿真网格中目标子网格对应的子网格索引;
作为一示例,目标子网格索引可以为仿真网格中目标子网格对应的子网格索引,例如,仿真网格中三角形T对应的三角形索引。
在确定目标顶点对应的目标映射信息后,可以从目标映射信息中获取针对目标顶点的子网格索引,作为目标子网格索引。
具体的,由于在布料资源中,可以查询显示网格的顶点对应的映射元组,该映射元组中可以具有针对显示网格的顶点P在仿真网格中三角形索引indexT,进而可以将indexT 作为目标子网格索引。
子步骤112,根据所述目标子网格索引和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息。
在确定目标子网格索引后,可以根据目标子网格索引和仿真网格的顶点位置参数,确定仿真网格中目标映射点的信息,进而可以针对目标映射点进行插值计算,得到目标映射点对应的目标映射点位置信息。
本公开一实施例中,子步骤112可以包括如下子步骤:
子步骤1121,从所述目标映射信息中,确定目标重心坐标;其中,所述目标重心坐标为所述目标子网格中目标映射点对应的重心坐标;
作为一示例,目标重心坐标可以为目标子网格中目标映射点对应的重心坐标,如映射元组中wx,wy,wz。
在确定目标顶点对应的目标映射信息后,可以从目标映射信息中获取针对目标顶点的重心坐标,作为目标重心坐标。
具体的,由于在布料资源中,可以查询显示网格的顶点对应的映射元组,该映射元组中可以具有针对显示网格的顶点P在仿真网格中映射点P’的重心坐标插值wx,wy,进而可以将wx,wy作为目标重心坐标。
子步骤1122,结合所述目标子网格索引、所述目标重心坐标,以及所述仿真网格的顶点位置参数,确定所述目标子网格中目标映射点的目标映射点位置信息。
其中,仿真网格的顶点位置参数可以包括目标子网格的顶点的位置参数,例如,仿真网格中三角形T对应的三个顶点位置。
在得到目标重心坐标后,可以结合目标子网格索引、目标重心坐标,以及仿真网格的顶点位置参数,通过插值计算得到目标子网格中目标映射点的目标映射点位置信息。
例如,可以针对显示网格的顶点P查询得到其映射元组(dist,wx,wy,indexT),然后可以根据三角形索引indexT确定仿真网格中三角形T,可以获取移动后的三角形T的三个顶点的位置,进而可以通过插值得到仿真网格中针对显示网格顶点P的映射点P’的位置,具体可以采用如下方式进行插值计算:
P’(wx*Ta+wy*Tb+(1-wx-wy)*Tc)
其中,Ta、Tb、Tc可以为仿真网格中移动后的三角形T的三个顶点的位置,wx、wy为显示网格顶点P在仿真网格中映射点P’的重心坐标插值。
在一示例中,可以通过查询目标顶点对应的映射元组,并根据映射元组中三角形索引indexT确定仿真网格中三角形T,进而可以获取三角形T的三个顶点的位置(如Ta,Tb,Tc),这三个顶点的位置可以为针对仿真网格进行仿真时,仿真网格中三角形T移动后的三个顶点的位置。
子步骤12,从所述目标映射信息中,确定目标距离向量;其中,所述目标距离向量 为所述目标顶点和所述目标映射点之间的距离向量;
作为一示例,目标距离向量可以为目标顶点和目标映射点之间的距离向量,例如,映射元组中dist。
在确定目标顶点对应的目标映射信息后,可以从目标映射信息中获取目标顶点和目标映射点之间的距离向量,作为目标距离向量。
具体的,由于在布料资源中,可以查询显示网格的顶点对应的映射元组,该映射元组中具有顶点P和映射点P’之间的距离向量dist,进而可以将dist作为目标距离向量。
子步骤13,根据所述目标距离向量和所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
在具体实现中,可以采用目标距离向量和仿真网格中目标映射点对应的目标映射点位置信息,插值得到显示网格中目标顶点对应的目标顶点位置信息。
本公开一实施例中,子步骤13可以包括如下子步骤:
子步骤131,确定针对所述目标子网格的目标法向量;
其中,目标法向量可以为仿真网格中目标子网格的法向量,例如,仿真网格中三角形对应的三个顶点的法向量。
确定目标顶点对应的目标映射信息后,可以从目标映射信息中获取目标子网格索引,进而可以采用目标子网格索引确定目标子网格,以获取目标子网格的顶点的法向量。
在实际应用中,可以通过查询目标顶点对应的映射元组,并根据映射元组中三角形索引indexT确定仿真网格中三角形T,然后可以获取三角形T的三个顶点的法向量(如Na,Nb,Nc),该三角形T的法向量可以为三角形T所有相邻三角形的法向量平均值,进而可以插值得到映射点P’的法向量N’,具体可以采用如下方式进行插值计算:
N’(wx*Na+wy*Nb+(1-wx-wy)*Nc)
其中,Na、Nb、Nc可以为仿真网格中移动后的三角形T的三个顶点的法向量,wx、wy可以为显示网格的顶点P在仿真网格中映射点P’的重心坐标插值。
子步骤132,结合所述目标法向量、所述目标距离向量,以及所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
在实际应用中,可以针对显示网格的顶点P查询得到其映射元组,然后可以根据三角形索引indexT确定仿真网格中三角形T,由三角形T的三个顶点的法向量可以获取映射点P’的法向量,并通过插值得到仿真网格中针对显示网格的顶点P的映射点P’的位置,进而可以插值得到显示网格中顶点P的更新位置,具体可以采用如下方式进行插值计算:
P’+dist*N’
其中,P’可以为插值得到映射点的位置,dist可以为顶点P和映射点P’之间的距离向量,N’可以为映射点P’的法向量。
步骤105,根据所述目标顶点位置信息,对所述显示网格进行渲染。
在确定目标顶点对应的目标顶点位置信息后,可以采用目标顶点位置信息确定显示网格中目标顶点的渲染位置,进而可以对显示网格进行渲染。
在一示例中,通过采用顶点数量小于显示网格的仿真网格进行仿真计算,然后根据显示网格与仿真网格建立的映射信息,可以通过插值映射获取针对显示网格的渲染位置以进行渲染,从而通过插值可以使显示网格的顶点相对于仿真网格保持固定的距离,避免了双层显示网格仿真时的穿透。
例如,如图2a所示,由于显示网格(如图2a中201上层显示网格、202下层显示网格)的顶点相对于仿真网格(如图2a中203)保持固定的距离,避免了双层显示网格仿真时的穿透(如图2b中204为穿透效果)。
在本公开实施例中,通过获取虚拟模型,虚拟模型包括显示网格和仿真网格,仿真网格的顶点数量小于显示网格的顶点数量,响应触发虚拟模型进行形变的形变事件,根据形变事件确定仿真网络的顶点位置参数,然后确定显示网格的目标顶点对应的目标映射信息,目标映射信息为针对仿真网格中目标子网格的目标映射点的信息,进而根据目标映射信息和仿真网格的顶点位置参数确定显示网格的目标顶点位置信息,根据目标顶点位置信息,对显示网格进行渲染,实现了针对虚拟模型布料仿真的优化,通过从顶点数量较小的仿真网格映射出显示网格的顶点,进而对显示网格进行渲染,降低了布料仿真的计算量,提升了游戏运行的流畅度。
参照图3,示出了本公开一实施例提供的另一种渲染处理的方法的步骤流程图,具体可以包括如下步骤:
步骤301,获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
在渲染的过程中,可以针对待渲染的虚拟模型,制作显示网格和仿真网格,显示网格可以用于渲染,仿真网格可以用于仿真模拟,仿真网格的顶点数量小于显示网格的顶点数量。
步骤302,生成所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息。
在获取显示网格和仿真网格后,可以建立显示网格中目标顶点与仿真网格中目标映射点的映射,并可以将映射信息存储于布料资源中,作为显示网格的目标顶点对应的目标映射信息。
在本公开一实施例中,目标映射信息可以包括目标子网格对应的目标子网格索引,步骤302可以包括如下子步骤:
子步骤21,在所述仿真网格中,确定所述显示网格的目标顶点对应的目标子网格;
作为一示例,目标子网格可以为仿真网格中针对显示网格的目标顶点的子网格,例 如,在仿真网格中与顶点P为最近距离的三角形T。
在获取显示网格和仿真网格后,可以从仿真网格的多个子网格中,确定显示网格的目标顶点对应的目标子网格。
本公开一实施例中,子步骤21可以包括如下子步骤:
子步骤211,针对所述显示网格的目标顶点,确定所述仿真网格中子网格对应的距离信息;
作为一示例,距离信息可以为显示网格的目标顶点与仿真网格中多个子网格的距离信息。
在获取显示网格和仿真网格后,可以针对显示网格的目标顶点,在仿真网格中,获取目标顶点与仿真网格中多个子网格的距离信息。
具体的,可以对针对显示网格的顶点P,遍历仿真网格上所有三角形,并计算顶点P到各个三角形的空间距离,例如,顶点P与各个三角形的每一个顶点、每一条边、以及三角形平面的距离。
子步骤212,确定最小的距离信息对应的子网格为所述显示网格的目标顶点对应的目标子网格。
在实际应用中,显示网格可以有多个顶点,可以针对每个顶点,遍历仿真网格上所有三角形,并计算顶点到各个三角形的空间距离,进而可以找到针对顶点的最小空间距离的三角形(三角面片),例如,显示网格的顶点P对应有最小空间距离的三角形T。
子步骤22,确定所述目标子网格对应的目标子网格索引。
在确定目标子网格后,可以将目标子网格对应的子网格索引作为目标子网格索引,例如,三角形索引indexT。
在本公开一实施例中,目标映射信息可以包括目标映射点对应的目标重心坐标,步骤302还可以包括如下子步骤:
子步骤31,在所述目标子网格中,确定所述目标顶点对应的目标映射点;
在获取显示网格和仿真网格后,可以从仿真网格的多个子网格中,确定显示网格的目标顶点对应的目标子网格,进而可以在目标子网格中,确定目标顶点对应的目标映射点,例如,获取顶点P在仿真网格的三角形T后,可以得到顶点P投影到三角形T所在平面的映射P’。
子步骤32,确定所述目标映射点对应的目标重心坐标。
在确定目标映射点后,可以获取目标映射点相对于目标子网格的顶点的重心坐标,作为目标重心坐标,例如,映射点P’相对于三角形T的三个顶点的重心坐标插值wx,wy,wz,其中,wx+wy+wz=1.0。
在本公开一实施例中,目标映射信息可以包括目标顶点和目标映射点之间的目标距离向量,步骤302还可以包括如下子步骤:
确定所述目标顶点和所述目标映射点之间的目标距离向量。
在获取显示网格和仿真网格后,可以从仿真网格的多个子网格中,确定显示网格的目标顶点对应的目标子网格,然后可以在目标子网格中,确定目标顶点对应的目标映射点,进而可以将目标顶点和目标映射点之间的距离向量作为目标距离向量。
在实际应用中,可以通过计算得到顶点P与映射点P’的距离dist,dist可以具有符号,用于表示顶点P相当于三角形T平面的方向,例如,顶点P为针对仿真网格的三角形T平面的上层显示网格,或针对仿真网格的三角形T平面的下层显示网格。
在一示例中,针对显示网格的顶点P确定在仿真网格中最近三角形T后,可以得到顶点P投影在三角形T所在平面的映射点P’,然后可以计算出顶点P与映射点P’的距离dist,可以获取P’相对于三角形T的三个顶点的重心坐标插值wx,wy,wz,重心坐标插值三者关系为wx+wy+wz=1.0,并可以记录下三角形T在仿真网格中的三角形索引indexT,进而可以针对显示网格的顶点P得到映射元组(dist,wx,wy,indexT),可以将映射元组保存在布料网格资源中。
在本公开实施例中,通过获取针对虚拟模型,该虚拟模型包括显示网格和仿真网格,仿真网格的顶点数量小于显示网格的顶点数量,然后生成显示网格的目标顶点对应的目标映射信息,目标映射信息为针对仿真网格中目标子网格的目标映射点的信息,实现了针对虚拟模型布料仿真的优化,通过对顶点数量较小的仿真网格与显示网格建立映射信息,以用于后续对显示网格的渲染,降低了布料仿真的计算量,提升了游戏运行的流畅度,且通过插值可以使显示网格的顶点相对于仿真网格保持固定的距离,避免了双层显示网格仿真时的穿透。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本公开实施例并不受所描述的动作顺序的限制,因为依据本公开实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本公开实施例所必须的。
参照图4,示出了本公开一实施例提供的一种渲染处理的装置的结构示意图,具体可以包括如下模块:
第一虚拟模型获取模块401,用于获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
仿真网络的顶点位置参数确定模块402,用于响应触发所述虚拟模型进行形变的形变事件,根据所述形变事件确定所述仿真网络的顶点位置参数;
目标映射信息确定模块403,用于确定所述显示网格的目标顶点对应的目标映射信息; 其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息;
目标顶点位置信息确定模块404,用于根据所述目标映射信息和所述仿真网格的顶点位置参数确定所述显示网格的目标顶点位置信息;
显示网格渲染模块405,用于根据所述目标顶点位置信息,对所述显示网格进行渲染。
在本公开一实施例中,所述目标顶点位置信息确定模块404包括:
目标映射点位置信息确定子模块,用于根据所述目标映射信息和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息;
第一目标距离向量确定子模块,用于从所述目标映射信息中,确定目标距离向量;其中,所述目标距离向量为所述目标顶点和所述目标映射点之间的距离向量;
目标顶点位置信息确定子模块,用于根据所述目标距离向量和所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
在本公开一实施例中,所述目标顶点位置信息确定子模块包括:
目标法向量确定单元,用于确定针对所述目标子网格的目标法向量;
目标顶点位置信息确定单元,用于结合所述目标法向量、所述目标距离向量,以及所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
在本公开一实施例中,所述目标映射点位置信息确定子模块包括:
目标子网格索引确定单元,用于从所述目标映射信息中,确定目标子网格索引;其中,所述目标子网格索引为所述仿真网格中目标子网格对应的子网格索引;
目标映射点位置信息确定单元,用于根据所述目标子网格索引和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息。
在本公开一实施例中,所述目标映射点位置信息确定单元包括:
目标重心坐标确定子单元,用于从所述目标映射信息中,确定目标重心坐标;其中,所述目标重心坐标为所述目标子网格中目标映射点对应的重心坐标;
目标映射点位置信息确定子单元,用于结合所述目标子网格索引、所述目标重心坐标,以及所述仿真网格的顶点位置参数,确定所述目标子网格中目标映射点的目标映射点位置信息。
在本公开实施例中,通过获取虚拟模型,虚拟模型包括显示网格和仿真网格,仿真网格的顶点数量小于显示网格的顶点数量,响应触发虚拟模型进行形变的形变事件,根据形变事件确定仿真网络的顶点位置参数,然后确定显示网格的目标顶点对应的目标映射信息,目标映射信息为针对仿真网格中目标子网格的目标映射点的信息,进而根据目标映射信息和仿真网格的顶点位置参数确定显示网格的目标顶点位置信息,根据目标顶点位置信息,对显示网格进行渲染,实现了针对虚拟模型布料仿真的优化,通过从顶点数量较小的仿真网格映射出显示网格的顶点,进而对显示网格进行渲染,降低了布料仿真的计算量,提升了游戏运行的流畅度。
参照图5,示出了本公开一实施例提供的另一种渲染处理的装置的结构示意图,具体可以包括如下模块:
第二虚拟模型获取模块501,用于获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
目标映射信息生成模块502,用于生成所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息。
在本公开一实施例中,所述目标映射信息包括所述目标子网格对应的目标子网格索引,所述目标映射信息生成模块502包括:
目标子网格确定子模块,用于在所述仿真网格中,确定所述显示网格的目标顶点对应的目标子网格;
目标子网格索引确定子模块,用于所述目标子网格对应的目标子网格索引。
在本公开一实施例中,所述目标子网格确定子模块包括:
距离信息确定单元,用于针对所述显示网格的目标顶点,确定所述仿真网格中子网格对应的距离信息;
目标子网格确定单元,用于确定最小的距离信息对应的子网格为所述显示网格的目标顶点对应的目标子网格。
在本公开一实施例中,所述目标映射信息包括所述目标映射点对应的目标重心坐标,所述目标映射信息生成模块502包括:
目标映射点确定子模块,用于在所述目标子网格中,确定所述目标顶点对应的目标映射点;
目标重心坐标确定子模块,用于确定所述目标映射点对应的目标重心坐标。
在本公开一实施例中,所述目标映射信息包括所述目标顶点和所述目标映射点之间的目标距离向量,所述目标映射信息生成模块502包括:
第二目标距离向量确定子模块,用于确定所述目标顶点和所述目标映射点之间的目标距离向量。
在本公开实施例中,通过获取针对虚拟模型,该虚拟模型包括显示网格和仿真网格,仿真网格的顶点数量小于显示网格的顶点数量,然后生成显示网格的目标顶点对应的目标映射信息,目标映射信息为针对仿真网格中目标子网格的目标映射点的信息,实现了针对虚拟对象布料仿真的优化,通过对顶点数量较小的仿真网格与显示网格建立映射信息,以用于后续对显示网格的渲染,降低了布料仿真的计算量,提升了游戏运行的流畅度,且通过插值可以使显示网格的顶点相对于仿真网格保持固定的距离,避免了双层显示网格仿真时的穿透。
参照图6,示出了本公开一实施例提供的一种电子设备的结构示意图,具体可以包括处理器601、存储器602及存储在存储器上并能够在处理器上运行的计算机程序,计算机程序可以被处理器执行时实现如上渲染处理的方法。
参照图7,示出了本公开一实施例提供的一种计算机可读存储介质的结构示意图,该计算机可读存储介质701上可以存储计算机程序,计算机程序可以被处理器执行时实现如上渲染处理的方法。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本公开实施例可提供为方法、装置、或计算机程序产品。因此,本公开实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本公开实施例是参照根据本公开实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本公开实施例的优选实施例,但本领域内的技术人员一旦得知了基本 创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本公开实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对所提供的一种渲染处理的方法及装置、电子设备、存储介质,进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。

Claims (14)

  1. 一种渲染处理的方法,所述方法包括:
    获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
    响应触发所述虚拟模型进行形变的形变事件,根据所述形变事件确定所述仿真网络的顶点位置参数;
    确定所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息;
    根据所述目标映射信息和所述仿真网格的顶点位置参数确定所述显示网格的目标顶点位置信息;
    根据所述目标顶点位置信息,对所述显示网格进行渲染。
  2. 根据权利要求1所述的方法,其中,所述根据所述目标映射信息和所述仿真网格的顶点位置参数确定所述显示网格的目标顶点位置信息,包括:
    根据所述目标映射信息和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息;
    从所述目标映射信息中,确定目标距离向量;其中,所述目标距离向量为所述目标顶点和所述目标映射点之间的距离向量;
    根据所述目标距离向量和所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
  3. 根据权利要求2所述的方法,其中,所述根据所述目标距离向量和所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息,包括:
    确定针对所述目标子网格的目标法向量;
    结合所述目标法向量、所述目标距离向量,以及所述目标映射点位置信息,确定所述显示网格的目标顶点位置信息。
  4. 根据权利要求2或3所述的方法,其中,所述根据所述目标映射信息和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息,包括:
    从所述目标映射信息中,确定目标子网格索引;其中,所述目标子网格索引为所述仿真网格中目标子网格对应的子网格索引;
    根据所述目标子网格索引和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息。
  5. 根据权利要求4所述的方法,其中,所述根据所述目标子网格索引和所述仿真网格的顶点位置参数,确定所述目标映射点的目标映射点位置信息,包括:
    从所述目标映射信息中,确定目标重心坐标;其中,所述目标重心坐标为所述目标子网格中目标映射点对应的重心坐标;
    结合所述目标子网格索引、所述目标重心坐标,以及所述仿真网格的顶点位置参数,确定所述目标子网格中目标映射点的目标映射点位置信息。
  6. 一种渲染处理的方法,所述方法包括:
    获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
    生成所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息。
  7. 根据权利要求6所述的方法,其中,所述目标映射信息包括所述目标子网格对应的目标子网格索引,所述生成所述显示网格的目标顶点对应的目标映射信息,包括:
    在所述仿真网格中,确定所述显示网格的目标顶点对应的目标子网格;
    确定所述目标子网格对应的目标子网格索引。
  8. 根据权利要求7所述的方法,其中,所述在所述仿真网格中,确定所述显示网格的目标顶点对应的目标子网格,包括:
    针对所述显示网格的目标顶点,确定所述仿真网格中子网格对应的距离信息;
    确定最小的距离信息对应的子网格为所述显示网格的目标顶点对应的目标子网格。
  9. 根据权利要求6或7或8所述的方法,其中,所述目标映射信息包括所述目标映射点对应的目标重心坐标,所述生成所述显示网格的目标顶点对应的目标映射信息,包括:
    在所述目标子网格中,确定所述目标顶点对应的目标映射点;
    确定所述目标映射点对应的目标重心坐标。
  10. 根据权利要求9所述的方法,其中,所述目标映射信息包括所述目标顶点和所述目标映射点之间的目标距离向量,所述生成所述显示网格的目标顶点对应的目标映射信息,包括:
    确定所述目标顶点和所述目标映射点之间的目标距离向量。
  11. 一种渲染处理的装置,所述装置包括:
    第一虚拟模型获取模块,被配置为获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
    仿真网络的顶点位置参数确定模块,被配置为响应触发所述虚拟模型进行形变的形变事件,根据所述形变事件确定所述仿真网络的顶点位置参数;
    目标映射信息确定模块,被配置为确定所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息;
    目标顶点位置信息确定模块,被配置为根据所述目标映射信息和所述仿真网格的顶 点位置参数确定所述显示网格的目标顶点位置信息;
    显示网格渲染模块,被配置为根据所述目标顶点位置信息,对所述显示网格进行渲染。
  12. 一种渲染处理的装置,所述装置包括:
    第二虚拟模型获取模块,被配置为获取虚拟模型;其中,所述虚拟模型包括显示网格和仿真网格,所述仿真网格的顶点数量小于所述显示网格的顶点数量;
    目标映射信息生成模块,被配置为生成所述显示网格的目标顶点对应的目标映射信息;其中,所述目标映射信息为针对所述仿真网格中目标子网格的目标映射点的信息。
  13. 一种电子设备,包括处理器、存储器及存储在所述存储器上并能够在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至10中任一项所述的渲染处理的方法。
  14. 一种计算机可读存储介质,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如权利要求1至10中任一项所述的渲染处理的方法。
PCT/CN2021/077307 2020-08-11 2021-02-22 一种渲染处理的方法及装置、电子设备、存储介质 WO2022033009A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/041,218 US20230338842A1 (en) 2020-08-11 2021-02-22 Rendering processing method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010803958.XA CN111773707A (zh) 2020-08-11 2020-08-11 一种渲染处理的方法及装置、电子设备、存储介质
CN202010803958.X 2020-08-11

Publications (1)

Publication Number Publication Date
WO2022033009A1 true WO2022033009A1 (zh) 2022-02-17

Family

ID=72761940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/077307 WO2022033009A1 (zh) 2020-08-11 2021-02-22 一种渲染处理的方法及装置、电子设备、存储介质

Country Status (3)

Country Link
US (1) US20230338842A1 (zh)
CN (1) CN111773707A (zh)
WO (1) WO2022033009A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115577021A (zh) * 2022-12-09 2023-01-06 云粒智慧科技有限公司 热力图数据存储方法、装置和电子设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111773707A (zh) * 2020-08-11 2020-10-16 网易(杭州)网络有限公司 一种渲染处理的方法及装置、电子设备、存储介质
CN114187397B (zh) * 2021-12-06 2023-03-21 完美世界(北京)软件科技发展有限公司 虚拟毛发渲染方法、装置、介质、电子设备及程序产品
CN115700779A (zh) * 2022-10-08 2023-02-07 网易(杭州)网络有限公司 虚拟模型的形变控制方法、装置和电子设备
CN116680930A (zh) * 2023-06-30 2023-09-01 南通大学 一种基于随机森林预测的布料仿真建模方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050280646A1 (en) * 2004-06-18 2005-12-22 Microsoft Corporation Real-time texture rendering using generalized displacement maps
CN101794462A (zh) * 2010-03-12 2010-08-04 中山大学 一种基于纹理的三维网格模型变形方法及系统
CN102752549A (zh) * 2011-05-17 2012-10-24 新奥特(北京)视频技术有限公司 一种基于网格形变的特效的实现方法
US20130106834A1 (en) * 2011-11-02 2013-05-02 Visual Technology Services Limited Compression of texture rendered wire mesh models
US20130314410A1 (en) * 2012-05-23 2013-11-28 1-800 Contacts, Inc. Systems and methods for rendering virtual try-on products
CN105354879A (zh) * 2015-10-12 2016-02-24 北京服装学院 基于质点弹簧结构的通用服装三维模型仿真方法及系统
CN111773707A (zh) * 2020-08-11 2020-10-16 网易(杭州)网络有限公司 一种渲染处理的方法及装置、电子设备、存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101098830B1 (ko) * 2008-12-01 2011-12-26 한국전자통신연구원 서피스 텍스처 매핑 장치 및 그 방법
CN102831280B (zh) * 2012-09-10 2014-12-03 北京航空航天大学 一种基于最小移动二乘的无网格物理形变仿真方法
CN103902747A (zh) * 2012-10-17 2014-07-02 北京临近空间飞行器系统工程研究所 一种滑翔飞行器总体性能仿真试验流程自动化管理方法
US10198847B2 (en) * 2015-08-17 2019-02-05 Side Effects Software Inc. Physically based simulation methods for modeling and animating two-and three-dimensional deformable objects
CN106547964B (zh) * 2016-10-21 2019-10-22 北京宇航系统工程研究所 一种用于异构网格界面数据映射方法
CN106960459B (zh) * 2016-12-26 2019-07-26 北京航空航天大学 角色动画中基于扩展位置动力学的蒙皮技术及权重重定位的方法
CN111028320B (zh) * 2019-12-11 2021-12-03 腾讯科技(深圳)有限公司 布料动画的生成方法、装置、计算机可读存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050280646A1 (en) * 2004-06-18 2005-12-22 Microsoft Corporation Real-time texture rendering using generalized displacement maps
CN101794462A (zh) * 2010-03-12 2010-08-04 中山大学 一种基于纹理的三维网格模型变形方法及系统
CN102752549A (zh) * 2011-05-17 2012-10-24 新奥特(北京)视频技术有限公司 一种基于网格形变的特效的实现方法
US20130106834A1 (en) * 2011-11-02 2013-05-02 Visual Technology Services Limited Compression of texture rendered wire mesh models
US20130314410A1 (en) * 2012-05-23 2013-11-28 1-800 Contacts, Inc. Systems and methods for rendering virtual try-on products
CN105354879A (zh) * 2015-10-12 2016-02-24 北京服装学院 基于质点弹簧结构的通用服装三维模型仿真方法及系统
CN111773707A (zh) * 2020-08-11 2020-10-16 网易(杭州)网络有限公司 一种渲染处理的方法及装置、电子设备、存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115577021A (zh) * 2022-12-09 2023-01-06 云粒智慧科技有限公司 热力图数据存储方法、装置和电子设备

Also Published As

Publication number Publication date
CN111773707A (zh) 2020-10-16
US20230338842A1 (en) 2023-10-26

Similar Documents

Publication Publication Date Title
WO2022033009A1 (zh) 一种渲染处理的方法及装置、电子设备、存储介质
US10325035B2 (en) Interactive dimensioning of parametric models
EP4120199A1 (en) Image rendering method and apparatus, and electronic device and storage medium
US8154544B1 (en) User specified contact deformations for computer graphics
US20120280991A1 (en) Employing mesh files to animate transitions in client applications
US9704282B1 (en) Texture blending between view-dependent texture and base texture in a geographic information system
US9311749B2 (en) Method for forming an optimized polygon based shell mesh
JP2012238309A (ja) 幾何学的三次元モデルオブジェクトを設計する方法
US20150145891A1 (en) Methods and Systems for Viewing a Three-Dimensional (3D) Virtual Object
WO2014117559A1 (en) 3d-rendering method and device for logical window
JP2012190428A (ja) 立体映像視覚効果処理方法
AU2017272304A1 (en) Auto vr: an assistant system for virtual reality painting
JP2016126795A5 (zh)
US8587586B2 (en) Electronic device and method for meshing curved surface
CA2357962C (en) System and method for the coordinated simplification of surface and wire-frame descriptions of a geometric model
US8358311B1 (en) Interpolation between model poses using inverse kinematics
JP2023529790A (ja) フロアプランを生成するための方法、装置およびプログラム
US10726621B2 (en) Traversal selection of components for a geometric model
CN110738719A (zh) 一种基于视距分层优化的Web3D模型渲染方法
EP4083794A1 (en) Rendering of persistent particle trails for dynamic displays
CN114564268A (zh) 一种设备管理方法、装置、电子设备和存储介质
US10636210B2 (en) Dynamic contour volume deformation
CN107895388A (zh) 图形的颜色填充方法、装置、计算机设备及存储介质
US10964081B2 (en) Deformation mesh control for a computer animated artwork
CN115857778A (zh) 页面生成方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21855065

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21855065

Country of ref document: EP

Kind code of ref document: A1