Model rendering method and device, electronic equipment and storage medium

By dividing and arranging the initial map into a target map with a shape closer to a square, and sampling the target model, the problems of low map space utilization and excessive memory resource utilization in the existing technology are solved, and efficient rendering is achieved Effect.

CN119444959APending Publication Date: 2025-02-14NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411319788.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In games and films, when creating continuous translation effects of long-frame text or patterns, the prior art requires stretching slender maps into squares to facilitate the rendering engine to compress them, resulting in reduced map space utilization and memory resources Too much use.

Method used

By obtaining the initial map and target model, determine the slicing parameters and arrangement parameters of the initial map, divide them into multiple submaps and arrange them, and generate a target map with a length-to-width ratio smaller than the initial map. Then, the sampling coordinates of the target model are converted based on the slicing parameters and arrangement parameters, and sampled to generate rendering data to achieve the translation effect of the map.

Benefits of technology

This improves the utilization rate of map space during rendering, reduces the memory resources occupied by the entire map content, and achieves these effects without affecting the translation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444959A_ABST
    Figure CN119444959A_ABST
Patent Text Reader

Abstract

The invention provides a model rendering method and apparatus, an electronic device and a storage medium. The method comprises the steps of obtaining an initial map and a target model; the initial map has a first length-width ratio; determining a segmentation parameter and an arrangement parameter corresponding to the initial map, segmenting the initial map into a plurality of sub-maps according to the segmentation parameter, and arranging the plurality of sub-maps according to the arrangement parameter to generate a target map; wherein the length-width ratio of the target map is smaller than the first length-width ratio; and obtaining a first sampling coordinate sampled from the initial map by the target model, performing coordinate conversion on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter to obtain a second sampling coordinate, and sampling the target map according to the second sampling coordinate to obtain a rendering effect of translation of the content of the initial map on the target model. According to the method, on the basis of not influencing the translation effect of the content of the initial map on the target model, the utilization rate of the map space during rendering is improved, and the map content is prevented from occupying more memory resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of model rendering, and in particular to a rendering method, device, electronic device and storage medium for a model. Background Art

[0002] Image circular translation is a common special effect in games and movies, for example: displaying a continuous translation and scrolling effect of text or a continuous translation effect of a pattern on a model. When the rendering engine renders text or pattern maps, it needs to compress the texture of the map first. Generally, square maps are more convenient for the rendering engine to compress the texture of the map. Therefore, in the related art, if you want to create a continuous translation effect of long-frame text or long-frame patterns, you need to first stretch the originally long and thin frame content into a square map to facilitate the rendering engine to compress it. This method will not only reduce the utilization rate of the map space, but also make the entire map content occupy more memory resources. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a rendering method, device, electronic device and storage medium for a model to improve the utilization rate of the texture space and avoid the texture content occupying more memory resources.

[0004] In a first aspect, an embodiment of the present invention provides a rendering method for a model, the method comprising: obtaining an initial map and a target model; wherein the initial map has a first aspect ratio; determining a segmentation parameter and an arrangement parameter corresponding to the initial map, segmenting the initial map into a plurality of sub-maps according to the segmentation parameter, arranging the plurality of sub-maps according to the arrangement parameter, and generating a target map; wherein the aspect ratio of the target map is less than the first aspect ratio; the segmentation parameter is used to indicate: the number of sub-maps into which the initial map is segmented; the arrangement parameter is used to indicate: the arrangement of the plurality of sub-maps in the target map; obtaining a first sampling coordinate sampled from the initial map by the target model, performing a coordinate transformation on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter, and obtaining a second sampling coordinate corresponding to the target map; sampling the target map based on the second sampling coordinate, and rendering the target model through the rendering data obtained by sampling, and obtaining a rendering effect in which the content of the initial map is translated on the target model.

[0005] In a second aspect, an embodiment of the present invention further provides a model rendering device, the device comprising: a first acquisition module, used to acquire an initial map and a target model; wherein the initial map has a first aspect ratio; a first generation module, used to determine a segmentation parameter and an arrangement parameter corresponding to the initial map, segment the initial map into a plurality of sub-maps according to the segmentation parameter, and arrange the plurality of sub-maps according to the arrangement parameter to generate a target map; wherein the aspect ratio of the target map is less than the first aspect ratio; the segmentation parameter is used to indicate: the number of sub-maps into which the initial map is segmented; the arrangement parameter is used to indicate: the arrangement of the plurality of sub-maps in the target map; a first conversion module, used to acquire a first sampling coordinate sampled from the initial map by the target model, perform coordinate conversion on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter, and obtain a second sampling coordinate corresponding to the target map; a first rendering module, used to sample the target map based on the second sampling coordinate, and perform rendering processing on the target model through the rendering data obtained by sampling, and obtain a rendering effect in which the content of the initial map is translated on the target model.

[0006] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned model rendering method.

[0007] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the rendering method of the above-mentioned model.

[0008] The embodiments of the present invention bring the following beneficial effects:

[0009] The present invention provides a rendering method, device, electronic device and storage medium for a model, the method comprising: obtaining an initial map and a target model; wherein the initial map has a first aspect ratio; determining a segmentation parameter and an arrangement parameter corresponding to the initial map, segmenting the initial map into a plurality of sub-maps according to the segmentation parameter, arranging the plurality of sub-maps according to the arrangement parameter, and generating a target map; wherein the aspect ratio of the target map is smaller than the first aspect ratio; the segmentation parameter is used to indicate: the number of sub-maps into which the initial map is segmented; the arrangement parameter is used to indicate: the arrangement mode of the plurality of sub-maps in the target map; obtaining a first sampling coordinate sampled from the initial map by the target model, performing coordinate conversion on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter, and obtaining a second sampling coordinate corresponding to the target map; sampling the target map based on the second sampling coordinate, rendering the target model through the rendering data obtained by sampling, and obtaining a rendering effect in which the content of the initial map is translated on the target model.

[0010] In this method, the initial texture has a first aspect ratio, the segmentation parameters and arrangement parameters corresponding to the initial texture are determined, the initial texture is segmented into a plurality of sub-textures according to the segmentation parameters, the plurality of sub-textures are arranged according to the arrangement parameters to generate a target texture with an aspect ratio less than the first aspect ratio, that is, a target texture whose shape is closer to a square than the shape of the initial texture, then, according to the segmentation parameters and / or the arrangement parameters, the sampling coordinates of the target model on the initial texture are transformed to obtain the sampling coordinates of the target model on the target texture, the target texture is sampled according to the sampling coordinates, and the target model is rendered using the rendering data obtained by the sampling to obtain a rendering effect of the content of the initial texture being translated on the target model. This method segments and splices the initial texture into a target texture with a shape closer to a square, and then renders the target model according to the target texture to obtain a rendering effect of the content of the initial texture being translated on the target model. This method improves the utilization rate of the texture space during rendering without affecting the translation effect of the content of the initial texture on the target model, and avoids the entire texture content occupying more memory resources.

[0011] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0012] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0014] Figure 1 A rendering method of a model provided by an embodiment of the present invention;

[0015] Figure 2 A schematic diagram of an initial mapping provided by an embodiment of the present invention;

[0016] Figure 3 A schematic diagram of generating a target map provided by an embodiment of the present invention;

[0017] Figure 4 A schematic diagram of an operation of generating a target map provided by an embodiment of the present invention;

[0018] Figure 5 A schematic diagram of a model rendering device provided by an embodiment of the present invention;

[0019] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0021] Based on this, an embodiment of the present invention provides a model rendering method, device, electronic device and storage medium. This technology can be applied to various model rendering processes, especially to the rendering process of creating a continuous translation effect of long-frame text or patterns.

[0022] To facilitate understanding of this embodiment, a rendering method of a model disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:

[0023] Step S102, obtaining an initial map and a target model; wherein the initial map has a first aspect ratio;

[0024] The above-mentioned target model is a carrier model that carries the initial map content. The corresponding map can be fitted and covered on the surface of the target model to carry the translation effect of the initial map content. The target model can be a three-dimensional model built by mesh connection. Optionally, the three-dimensional model can be a model built by triangular facets, a model built by quadrilateral meshes, or a model built by other polygonal meshes.

[0025] Design the texture content to be rendered as needed to obtain an initial texture. The shape of the initial texture can be determined according to the texture content. For example, if you want to create a continuous translation effect of long text or long pattern, you can create a long and thin texture with the content of the long text or pattern. For example, to create a horizontal translation effect of numbers 1-16, you can design a rectangular texture with numbers 1-16, such as Figure 2 As shown, the characteristic is that the ratio of the length to the width of the map is large.

[0026] Here, the initial texture has a length and a width, the length dimension is greater than the width dimension, and a ratio of the length to the width of the initial texture is a first aspect ratio.

[0027] In this step, an initial map and a target model are obtained, and a ratio of the length to the width of the initial map is determined as a first aspect ratio.

[0028] Step S104, determining a segmentation parameter and an arrangement parameter corresponding to the initial texture, segmenting the initial texture into a plurality of sub-textures according to the segmentation parameter, arranging the plurality of sub-textures according to the arrangement parameter, and generating a target texture; wherein the aspect ratio of the target texture is smaller than the first aspect ratio; the segmentation parameter is used to indicate: the number of the plurality of sub-textures into which the initial texture is segmented; and the arrangement parameter is used to indicate: the arrangement method of the plurality of sub-textures in the target texture;

[0029] The target texture is a target texture whose shape is closer to a square than the shape of the initial texture, which is obtained by slicing the initial texture into a plurality of sub-textures and then splicing them together. The aspect ratio of the target texture is smaller than the first aspect ratio. The slicing parameter is used to indicate: the number of sub-textures into which the initial texture is sliced. Here, the slicing parameter is the number of sub-textures into which the initial texture is sliced. The arrangement parameter is used to indicate: the arrangement of the plurality of sub-textures in the target texture. In one case, if the slicing sub-textures are arranged in a column to obtain a target texture, the arrangement parameter is only the number of rows of the sub-textures contained in the target texture; if the slicing sub-textures are arranged in a row to obtain a target texture, the arrangement parameter is only the number of columns of the sub-textures contained in the target texture. In another case, if the slicing sub-textures are arranged in multiple rows and columns to obtain a target texture closer to a square, the arrangement parameter includes the number of rows and columns of the sub-textures contained in the target texture.

[0030] Here, the segmentation parameters and arrangement parameters corresponding to the initial texture are determined, the initial texture is segmented into a corresponding number of sub-textures according to the segmentation parameters, and these sub-textures are spliced ​​into a target texture whose shape is closer to a square than that of the initial texture according to the arrangement parameters.

[0031] For example, in one method, a segmentation parameter n can be determined according to the first aspect ratio to achieve n equal divisions in the length direction of the initial texture. After the initial texture is cut into n sub-textures of the same size, a target texture with a shape closer to a square can be obtained by arranging the multiple sub-textures in a row in the width direction of the initial texture. For example: if the length and width ratio of the initial texture is 4:1, the initial texture can be divided into 2 equal parts in the length direction, that is, the initial texture is evenly divided into 2 sub-textures of the same size along the length direction perpendicular to the initial texture, and the 2 sub-textures are closely arranged in a row up and down to obtain a square texture with an aspect ratio of 1:1, and the square texture can be used as the target texture.

[0032] Step S106, obtaining a first sampling coordinate of the target model sampled from the initial map, performing coordinate transformation on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter, and obtaining a second sampling coordinate corresponding to the target map;

[0033] The first sampling coordinates are the sampling coordinates of the target model on the initial texture when the target model is rendered by the initial texture before the initial texture is split to achieve a rendering effect in which the content of the initial texture is translated on the target model. The second sampling coordinates are the sampling coordinates of the target model on the target texture after the initial texture is split and spliced ​​into the target texture.

[0034] Here, according to the generation method of the target map, the segmentation parameter and the arrangement parameter, or one of the segmentation parameter and the arrangement parameter, can be used to perform coordinate transformation on the first sampling coordinate to obtain the second sampling coordinate.

[0035] For example, if the target texture is generated by dividing the length of the initial texture into equal parts, cutting the initial texture into multiple sub-textures of the same size, and arranging the multiple sub-textures in a row in the width direction of the initial texture according to the sequential order of the contents of the sub-textures in the initial texture to obtain a target texture containing multiple rows of sub-textures, then the first sampling coordinates can be transformed only according to the corresponding arrangement parameters to obtain the second sampling coordinates.

[0036] Step S108: sampling the target map based on the second sampling coordinates, and rendering the target model using the rendering data obtained by sampling to obtain a rendering effect of translating the content of the initial map onto the target model.

[0037] Finally, the rendering engine samples the target texture according to the second sampling coordinates, and renders the target model using the rendering data obtained by sampling, thereby obtaining a rendering effect in which the content of the initial texture is translated on the target model. Compared with the initial texture, the target texture is more convenient for the rendering engine to compress the texture of the texture. At the same time, the texture space utilization rate of the target texture is higher, and the entire texture content occupies less memory resources.

[0038] In one embodiment, a method of changing an initial texture into a target texture whose shape is closer to a square than the shape of the initial texture is provided by using a first segmentation parameter and a first arrangement parameter.

[0039] Specifically, based on the first aspect ratio, determine the first segmentation parameter and the first arrangement parameter corresponding to the initial texture; wherein the first segmentation parameter is used to indicate: the number of sub-textures into which the initial texture is evenly segmented along a length direction perpendicular to the initial texture; the first arrangement parameter is used to indicate: the number of rows corresponding to when the multiple sub-textures are generated by arranging them in a row along the width direction of the initial texture in accordance with the consecutive order of the contents of the sub-textures in the initial texture.

[0040] In this method, if Figure 3 As shown, a first segmentation parameter n can be determined according to the first aspect ratio, and the initial texture is divided into n equal parts along the length direction perpendicular to the length direction of the initial texture, and the initial texture is cut into n sub-textures of the same size. According to the continuous order of the contents of the sub-textures in the initial texture, multiple sub-textures are arranged in a row in the width direction of the initial texture to obtain a target texture, and the shape of the target texture is closer to a square. In this method, the first arrangement parameter is the number of rows corresponding to arranging multiple sub-textures in a row along the width direction of the initial texture according to the continuous order of the contents of the sub-textures in the initial texture. The value of the first arrangement parameter is equal to the value of the first segmentation parameter n.

[0041] Specifically, the first segmentation parameter and the first arrangement parameter may be determined according to the following method:

[0042] Perform an arithmetic square root operation on the first aspect ratio to obtain a first operation result; determine a first integer value based on the first operation result; wherein a difference between the first integer value and the first operation result is smaller than a difference between other integers other than the first integer value in natural numbers and the first operation result; determine the first integer value as a first segmentation parameter; and determine a first arrangement parameter based on the first segmentation parameter.

[0043] That is to say, an arithmetic square root operation is performed on the first aspect ratio to obtain a first operation result, and an integer closest to the first operation result is determined as the first integer value, such as integer n. The integer n is used as the first segmentation parameter, and the first arrangement parameter is the number of rows n corresponding to when multiple sub-maps are arranged in a row in the width direction of the initial map according to the consecutive order of the contents of the sub-maps in the initial map.

[0044] After determining the first segmentation parameter and the first arrangement parameter, the initial texture is divided into n equal parts in the length direction, and the initial texture is cut into n sub-textures of the same size. According to the continuous order of the contents of the sub-textures in the initial texture, the multiple sub-textures are arranged in a row in the width direction of the initial texture to obtain a target texture containing n rows of sub-textures. The shape of the target texture is closer to a square than the initial texture.

[0045] For example, Figure 2 The initial texture shown in the figure contains a rectangular texture with numbers 1-16. The ratio of the length to the width of the texture is 14:1. Perform a square root operation on 14 to determine the The nearest integer is 4, so the initial texture is divided into 4 equal parts in the length direction, and the initial texture is cut into 4 sub-textures of the same size. According to the continuous order of the sub-texture contents in the initial texture, multiple sub-textures are closely arranged in a row in the width direction of the initial texture to obtain a target texture containing 4 rows of sub-textures. The generation method of the target texture is as follows: Figure 4 shown.

[0046] In this method, the initial texture is divided into multiple sub-textures according to the first segmentation parameter, and the multiple sub-textures are arranged according to the first arrangement parameter to generate a target texture whose shape is closer to a square than the shape of the initial texture. The target model can be rendered according to the target texture to obtain a rendering effect in which the content of the initial texture is translated on the target model. Since the shape of the target texture is closer to a square than the initial texture, when the target texture is stretched into a square texture, the stretching degree is small, thereby avoiding reducing the utilization rate of the texture space and reducing the memory resources occupied by the entire texture content.

[0047] In one method, after the target texture is generated, if the aspect ratio of the target texture is not 1, the target texture is stretched along the width direction of the target texture to stretch the aspect ratio of the target texture to 1.

[0048] That is to say, if the shape of the target map obtained by dividing and splicing the initial map is not a square, the target map needs to be stretched along the width direction of the target map to stretch the shape of the target map into a square to facilitate the rendering engine to compress the texture of the map.

[0049] In this method, since the shape of the target texture is closer to a square than the initial texture, when the target texture is stretched into a square texture, the stretching degree is small, thereby reducing the occupied texture space.

[0050] The following embodiments provide an implementation method for obtaining the first sampling coordinates.

[0051] Specifically, the texture coordinates of the target model, as well as the content tiling density and the content translation speed are obtained; wherein the content tiling density indicates: the arrangement density of the content of the initial map on the target model; the content translation speed indicates: the translation speed of the content of the initial map on the target model; the texture coordinates are offset based on the time parameter, the content tiling density and the content translation speed to obtain the first sampling coordinates; wherein the time parameter is used to indicate: the time elapsed after the target model is sampled from the initial map.

[0052] In order to achieve the preset translation effect, it is necessary to pre-set the content tiling density and content translation speed. The above content tiling density indicates the arrangement density of the content of the initial map on the target model. For example, if you want to make a translation effect of numbers 1-16 extending in the horizontal direction, the content tiling density can be the number of numbers displayed on the target model at the same time. The content translation speed indicates the translation speed value and translation direction of the content of the initial map on the target model, such as the movement speed value and movement direction of the numbers in the digital translation effect. The texture coordinates of the above target model refer to the UV coordinates of the target model unfolded in the modeling software. The UV coordinates are the range between 0 and 1 on the x and y axes. Using the UV coordinates, each point on the map can be accurately matched to the surface of the target model, so that the target model can present the corresponding visual effect. The above time parameter is the time after the target model starts sampling from the initial map.

[0053] Here, the texture coordinates of the target model, the content tiling density, and the content translation speed are obtained. The texture coordinates of the target model are offset based on the time parameter, the content tiling density, and the content translation speed for the abscissa value in the texture coordinates to obtain the first sampling coordinates.

[0054] Specifically, the texture coordinates may be offset in the following manner to obtain the first sampling coordinates:

[0055] For the horizontal coordinate value in the texture coordinate, the horizontal coordinate value in the texture coordinate is offset based on the time parameter, the content tiling density, and the content translation speed to obtain a first offset result; the decimal part corresponding to the first offset result is determined as the horizontal coordinate value of the first sampling coordinate; the vertical coordinate value in the texture coordinate is determined as the vertical coordinate value of the first sampling coordinate to obtain the first sampling coordinate.

[0056] In actual implementation, the first sampling coordinates can be obtained by the following algorithm:

[0057] UVX0=frac(UV.x*patternDensity+Time*patternSpeed);

[0058] UVNew00=float2(UVX0,UV.y);

[0059] Among them, the frac() function is used to extract the decimal part of its internal function value; UV.x is the horizontal coordinate value in the texture coordinate; patternDensity is the content tiling density; Time is the time parameter; patternSpeed ​​is the content translation speed; UVX0 is the horizontal coordinate value in the first sampling coordinate; UV.y is the vertical coordinate value in the first sampling coordinate; UVNew00 is the first sampling coordinate.

[0060] After the first sampling coordinates are obtained in the above manner, it is necessary to perform coordinate transformation on the first sampling coordinates to determine the second sampling coordinates corresponding to the target map.

[0061] Specifically, the arrangement parameters include a first arrangement parameter, which is used to indicate: the number of rows corresponding to arranging multiple sub-maps in a column along the width direction of the initial map according to the consecutive order of the contents of the sub-maps in the initial map; and performing coordinate transformation on the first sampling coordinate based on the first arrangement parameter to obtain the second sampling coordinate corresponding to the target map.

[0062] That is, if the target texture is a target texture containing multiple rows of sub-textures obtained by equally dividing the length of the initial texture into multiple sub-textures of the same size, and arranging the multiple sub-textures in a row in the width direction of the initial texture according to the sequential order of the contents of the sub-textures in the initial texture, then the first sampling coordinates can be transformed only according to the first arrangement parameter to obtain the second sampling coordinates corresponding to the target texture.

[0063] Specifically, the horizontal coordinate value in the first sampling coordinate is multiplied by the first arrangement parameter to obtain a second operation result; the decimal part in the second operation result is determined as the sampling horizontal coordinate value in the second sampling coordinate; based on the second operation result and the first arrangement parameter, the vertical coordinate value in the first sampling coordinate is offset to obtain the sampling vertical coordinate value in the second sampling coordinate.

[0064] In actual implementation, the sampling horizontal coordinate value in the second sampling coordinate can be obtained by the following algorithm:

[0065] UVXF = UVNew00.x*RowNum;

[0066] UVX = frac(UVXF);

[0067] Among them, UVXF is the second operation result; UVNew00.x is the horizontal coordinate value in the first sampling coordinate; RowNum is the first arrangement parameter; UVX is the sampling horizontal coordinate value in the second sampling coordinate; the frac() function is used to extract the decimal part of its internal function value.

[0068] Further, according to the second operation result and the first arrangement parameter, the ordinate value in the first sampling coordinate is offset to obtain the sampling ordinate value in the second sampling coordinate. The specific method is:

[0069] The integer part of the second operation result is obtained, and the ordinate value in the first sampling coordinate is added to the integer part in the second operation result to obtain a first addition result, and the ratio of the first addition result to the first arrangement parameter is used as the sampling ordinate value in the second sampling coordinate.

[0070] In actual implementation, the sampling ordinate value in the second sampling coordinate can be obtained by the following algorithm:

[0071] UVY=(UVNew00.y+floor(UVXF)) / RowNum;

[0072] Among them, UVNew00.y is the vertical coordinate value in the aforementioned first sampling coordinate; the floor() function is used to extract the integer part of its internal function value; UVXF is the aforementioned second operation result; and RowNum is the first arrangement parameter.

[0073] According to the above method, the sampling horizontal coordinate value and the sampling vertical coordinate value in the second sampling coordinate can be obtained respectively, and the second sampling coordinate can be obtained by sampling the horizontal coordinate value and the sampling vertical coordinate value. The target map is sampled according to the second sampling coordinate, and the target model is rendered by the rendering data obtained by sampling, so as to obtain the rendering effect of translating the content of the initial map on the target model.

[0074] The specific algorithm is:

[0075] UVNew ​​= float(UVX, UVY);

[0076] output=sample(Texture,UVNew);

[0077] Among them, UVNew ​​is the second sampling coordinate; Texture is the target texture; Sample() is the sampling texture function built into the rendering engine; output is the output sampling result, that is, the rendering data obtained by sampling.

[0078] In this method, the length of the initial texture is divided into equal parts, and the initial texture is cut into multiple sub-textures of the same size. According to the continuous order of the contents of the sub-textures in the initial texture, the multiple sub-textures are arranged in a row in the width direction of the initial texture to obtain a target texture containing multiple rows of sub-textures, and then the sampling coordinates of the target model on the initial texture are converted according to the corresponding arrangement parameters to obtain the sampling coordinates of the target model on the target texture. In this method, the arrangement density of the contents of the initial texture on the target model can be conveniently controlled by adjusting the content tiling density, and the speed and direction of the contents of the initial texture can be controlled by adjusting the content translation speed, so as to obtain the rendering effect of the translation of the contents of the initial texture on the target model.

[0079] This method improves the utilization of the texture space during rendering without affecting the translation effect of the initial texture content on the target model, and avoids the entire texture content occupying more memory resources.

[0080] Corresponding to the above method embodiment, see Figure 5 A schematic diagram of a rendering device of a model shown, the device comprising:

[0081] A first acquisition module 502 is used to acquire an initial map and a target model; wherein the initial map has a first aspect ratio;

[0082] The first generation module 504 is used to determine the segmentation parameter and arrangement parameter corresponding to the initial texture, segment the initial texture into multiple sub-textures according to the segmentation parameter, and arrange the multiple sub-textures according to the arrangement parameter to generate a target texture; wherein the aspect ratio of the target texture is smaller than the first aspect ratio; the segmentation parameter is used to indicate: the number of sub-textures into which the initial texture is segmented; and the arrangement parameter is used to indicate: the arrangement method of the multiple sub-textures in the target texture;

[0083] A first conversion module 506 is used to obtain a first sampling coordinate of the target model sampled from the initial map, and perform coordinate conversion on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter to obtain a second sampling coordinate corresponding to the target map;

[0084] The first rendering module 508 is used to sample the target map based on the second sampling coordinates, and render the target model using the rendering data obtained by sampling to obtain a rendering effect of translating the content of the initial map onto the target model.

[0085] In this method, the initial texture has a first aspect ratio, the segmentation parameters and arrangement parameters corresponding to the initial texture are determined, the initial texture is segmented into a plurality of sub-textures according to the segmentation parameters, the plurality of sub-textures are arranged according to the arrangement parameters to generate a target texture with an aspect ratio less than the first aspect ratio, that is, a target texture whose shape is closer to a square than the shape of the initial texture, then, according to the segmentation parameters and / or the arrangement parameters, the sampling coordinates of the target model on the initial texture are transformed to obtain the sampling coordinates of the target model on the target texture, the target texture is sampled according to the sampling coordinates, and the target model is rendered using the rendering data obtained by the sampling to obtain a rendering effect of the content of the initial texture being translated on the target model. This method segments and splices the initial texture into a target texture with a shape closer to a square, and then renders the target model according to the target texture to obtain a rendering effect of the content of the initial texture being translated on the target model. This method improves the utilization rate of the texture space during rendering without affecting the translation effect of the content of the initial texture on the target model, and avoids the entire texture content occupying more memory resources.

[0086] The first generation module is used to determine the first segmentation parameter and the first arrangement parameter corresponding to the initial texture based on the first aspect ratio; wherein the first segmentation parameter is used to indicate: the number of sub-textures into which the initial texture is evenly segmented along the length direction perpendicular to the initial texture; and the first arrangement parameter is used to indicate: the number of rows corresponding to arranging the multiple sub-textures in a row along the width direction of the initial texture according to the continuous order of the contents of the sub-textures in the initial texture.

[0087] The above-mentioned device includes a first determination module, which is used to perform an arithmetic square root operation on the first aspect ratio to obtain a first operation result; determine a first integer value based on the first operation result; wherein the difference between the first integer value and the first operation result is smaller than the difference between other integers other than the first integer value in natural numbers and the first operation result; determine the first integer value as a first segmentation parameter; and determine a first arrangement parameter based on the first segmentation parameter.

[0088] The above-mentioned first conversion module is used to obtain the texture coordinates of the target model, as well as the content tiling density and the content translation speed; wherein the content tiling density indicates: the arrangement density of the content of the initial map on the target model; the content translation speed indicates: the translation speed of the content of the initial map on the target model; based on the time parameter, the content tiling density and the content translation speed, the texture coordinates are offset to obtain the first sampling coordinates; wherein the time parameter is used to indicate: the time elapsed after the target model starts sampling from the initial map.

[0089] The device includes a second determination module, which is used to perform an offset process on the abscissa value in the texture coordinates based on the time parameter, the content tiling density, and the content translation speed to obtain a first offset result; determine the decimal part corresponding to the first offset result as the abscissa value of the first sampling coordinate; determine the ordinate value in the texture coordinates as the ordinate value of the first sampling coordinate, and obtain the first sampling coordinate.

[0090] The above-mentioned arrangement parameters include a first arrangement parameter; the first arrangement parameter is used to indicate: according to the continuous order of the contents of the sub-maps in the initial map, the corresponding number of rows when multiple sub-maps are arranged in a row along the width direction of the initial map. The above-mentioned first conversion module is also used to perform coordinate conversion on the first sampling coordinate based on the first arrangement parameter to obtain the second sampling coordinate corresponding to the target map.

[0091] The above-mentioned device includes a third determination module, which is used to multiply the horizontal coordinate value in the first sampling coordinate by the first arrangement parameter to obtain a second operation result; determine the decimal part in the second operation result as the sampling horizontal coordinate value in the second sampling coordinate; based on the second operation result and the first arrangement parameter, offset the vertical coordinate value in the first sampling coordinate to obtain the sampling vertical coordinate value in the second sampling coordinate.

[0092] The above-mentioned device includes a fourth determination module, which is used to obtain the integer part of the second operation result, add the vertical coordinate value in the first sampling coordinate and the integer part in the second operation result to obtain a first addition result, and use the ratio of the first addition result to the first arrangement parameter as the sampling vertical coordinate value in the second sampling coordinate.

[0093] The above-mentioned device includes a first stretching module, which is used to stretch the target map along the width direction of the target map if the aspect ratio of the target map is not 1, so as to stretch the aspect ratio of the target map to 1.

[0094] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the above-mentioned model rendering method. The electronic device can be a server or a terminal device.

[0095] See also Figure 6 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores computer executable instructions that can be executed by the processor 100. The processor 100 executes the computer executable instructions to implement the above-mentioned model rendering method.

[0096] Further, Figure 6The electronic device shown also includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103 and the memory 101 are connected through the bus 102. Among them, the memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 102 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but it does not mean that there is only one bus or one type of bus. The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

[0097] The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer-executable instructions: obtaining an initial map and a target model; wherein the initial map has a first aspect ratio; determining a segmentation parameter and an arrangement parameter corresponding to the initial map, segmenting the initial map into multiple sub-maps according to the segmentation parameter, arranging the multiple sub-maps according to the arrangement parameter, and generating a target map; wherein the aspect ratio of the target map is less than the first aspect ratio; the segmentation parameter is used to indicate: the number of sub-maps into which the initial map is segmented; the arrangement parameter is used to indicate: the arrangement method of the multiple sub-maps in the target map; obtaining a first sampling coordinate sampled from the initial map by the target model, performing coordinate transformation on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter, and obtaining a second sampling coordinate corresponding to the target map; sampling the target map based on the second sampling coordinate, rendering the target model through the rendering data obtained by sampling, and obtaining a rendering effect in which the content of the initial map is translated on the target model.

[0098] In this method, the initial texture has a first aspect ratio, the segmentation parameters and arrangement parameters corresponding to the initial texture are determined, the initial texture is segmented into a plurality of sub-textures according to the segmentation parameters, the plurality of sub-textures are arranged according to the arrangement parameters to generate a target texture with an aspect ratio less than the first aspect ratio, that is, a target texture whose shape is closer to a square than the shape of the initial texture, then, according to the segmentation parameters and / or the arrangement parameters, the sampling coordinates of the target model on the initial texture are transformed to obtain the sampling coordinates of the target model on the target texture, the target texture is sampled according to the sampling coordinates, and the target model is rendered using the rendering data obtained by the sampling to obtain a rendering effect of the content of the initial texture being translated on the target model. This method segments and splices the initial texture into a target texture with a shape closer to a square, and then renders the target model according to the target texture to obtain a rendering effect of the content of the initial texture being translated on the target model. This method improves the utilization rate of the texture space during rendering without affecting the translation effect of the content of the initial texture on the target model, and avoids the entire texture content occupying more memory resources.

[0099] The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer-executable instructions: based on the first aspect ratio, determine the first segmentation parameter and the first arrangement parameter corresponding to the initial map; wherein the first segmentation parameter is used to indicate: the number of sub-maps into which the initial map is evenly segmented along the length direction perpendicular to the initial map; the first arrangement parameter is used to indicate: the number of rows corresponding to arranging multiple sub-maps in a row along the width direction of the initial map according to the continuous order of the contents of the sub-maps in the initial map.

[0100] The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer-executable instructions: performing an arithmetic square root operation on the first aspect ratio to obtain a first operation result; determining a first integer value based on the first operation result; wherein the difference between the first integer value and the first operation result is smaller than the difference between other integers other than the first integer value in natural numbers and the first operation result; determining the first integer value as a first segmentation parameter; and determining a first arrangement parameter based on the first segmentation parameter.

[0101] The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer-executable instructions: obtaining the texture coordinates of the target model, as well as the content tiling density and the content translation speed; wherein the content tiling density indicates: the arrangement density of the content of the initial map on the target model; the content translation speed indicates: the translation speed of the content of the initial map on the target model; based on the time parameter, the content tiling density and the content translation speed, the texture coordinates are offset to obtain the first sampling coordinates; wherein the time parameter is used to indicate: the time elapsed after the target model is sampled from the initial map.

[0102] The processor in the electronic device can implement the following operations of the rendering method of the model by executing the computer executable instructions: for the horizontal coordinate value in the texture coordinate, based on the time parameter, the content tiling density, and the content translation speed, the horizontal coordinate value in the texture coordinate is offset to obtain a first offset result; the decimal part corresponding to the first offset result is determined as the horizontal coordinate value of the first sampling coordinate; the vertical coordinate value in the texture coordinate is determined as the vertical coordinate value of the first sampling coordinate, and the first sampling coordinate is obtained.

[0103] The above-mentioned arrangement parameters include a first arrangement parameter; the first arrangement parameter is used to indicate: according to the continuous order of the contents of the sub-maps in the initial map, the corresponding number of rows when multiple sub-maps are arranged in a column along the width direction of the initial map. The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer-executable instructions: based on the first arrangement parameter, the first sampling coordinate is converted to obtain the second sampling coordinate corresponding to the target map.

[0104] The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer-executable instructions: multiplying the horizontal coordinate value in the first sampling coordinate by the first arrangement parameter to obtain a second operation result; determining the decimal part in the second operation result as the sampling horizontal coordinate value in the second sampling coordinate; based on the second operation result and the first arrangement parameter, offsetting the vertical coordinate value in the first sampling coordinate to obtain the sampling vertical coordinate value in the second sampling coordinate.

[0105] The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer-executable instructions: obtaining the integer part of the second operation result, adding the vertical coordinate value in the first sampling coordinate and the integer part in the second operation result to obtain a first addition result, and using the ratio of the first addition result to the first arrangement parameter as the sampling vertical coordinate value in the second sampling coordinate.

[0106] The processor in the above-mentioned electronic device can implement the following operations of the rendering method of the above-mentioned model by executing computer executable instructions: if the aspect ratio of the target map is not 1, the target map is stretched along the width direction of the target map to stretch the aspect ratio of the target map to 1.

[0107] This embodiment also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned model rendering method.

[0108] The computer executable instructions stored in the above-mentioned computer-readable storage medium can implement the following operations in the above-mentioned model rendering method by executing the computer executable instructions: obtaining an initial map and a target model; wherein the initial map has a first aspect ratio; determining a segmentation parameter and an arrangement parameter corresponding to the initial map, segmenting the initial map into a plurality of sub-maps according to the segmentation parameter, arranging the plurality of sub-maps according to the arrangement parameter, and generating a target map; wherein the aspect ratio of the target map is less than the first aspect ratio; the segmentation parameter is used to indicate: the number of sub-maps into which the initial map is segmented; the arrangement parameter is used to indicate: the arrangement method of the plurality of sub-maps in the target map; obtaining a first sampling coordinate sampled from the initial map by the target model, performing coordinate transformation on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter, and obtaining a second sampling coordinate corresponding to the target map; sampling the target map based on the second sampling coordinate, and rendering the target model through the rendering data obtained by sampling, and obtaining a rendering effect in which the content of the initial map is translated on the target model.

[0109] In this method, the initial texture has a first aspect ratio, the segmentation parameters and arrangement parameters corresponding to the initial texture are determined, the initial texture is segmented into a plurality of sub-textures according to the segmentation parameters, the plurality of sub-textures are arranged according to the arrangement parameters to generate a target texture with an aspect ratio less than the first aspect ratio, that is, a target texture whose shape is closer to a square than the shape of the initial texture, then, according to the segmentation parameters and / or the arrangement parameters, the sampling coordinates of the target model on the initial texture are transformed to obtain the sampling coordinates of the target model on the target texture, the target texture is sampled according to the sampling coordinates, and the target model is rendered using the rendering data obtained by the sampling to obtain a rendering effect of the content of the initial texture being translated on the target model. This method segments and splices the initial texture into a target texture with a shape closer to a square, and then renders the target model according to the target texture to obtain a rendering effect of the content of the initial texture being translated on the target model. This method improves the utilization rate of the texture space during rendering without affecting the translation effect of the content of the initial texture on the target model, and avoids the entire texture content occupying more memory resources.

[0110] The computer executable instructions stored in the above-mentioned computer-readable storage medium can implement the following operations in the rendering method of the above-mentioned model by executing the computer executable instructions: based on the first aspect ratio, determine the first segmentation parameter and the first arrangement parameter corresponding to the initial map; wherein the first segmentation parameter is used to indicate: the number of sub-maps into which the initial map is evenly segmented along the length direction perpendicular to the initial map; the first arrangement parameter is used to indicate: the number of rows corresponding to arranging multiple sub-maps in a row along the width direction of the initial map according to the continuous order of the contents of the sub-maps in the initial map.

[0111] The computer executable instructions stored in the above-mentioned computer-readable storage medium can implement the following operations in the rendering method of the above-mentioned model by executing the computer executable instructions: performing an arithmetic square root operation on the first aspect ratio to obtain a first operation result; determining a first integer value based on the first operation result; wherein the difference between the first integer value and the first operation result is smaller than the difference between other integers other than the first integer value in natural numbers and the first operation result; determining the first integer value as a first segmentation parameter; and determining a first arrangement parameter based on the first segmentation parameter.

[0112] The computer executable instructions stored in the above-mentioned computer-readable storage medium can implement the following operations in the rendering method of the above-mentioned model by executing the computer executable instructions: obtaining the texture coordinates of the target model, as well as the content tiling density and the content translation speed; wherein the content tiling density indicates: the arrangement density of the content of the initial map on the target model; the content translation speed indicates: the translation speed of the content of the initial map on the target model; based on the time parameter, the content tiling density and the content translation speed, the texture coordinates are offset to obtain the first sampling coordinates; wherein the time parameter is used to indicate: the time elapsed after the target model starts sampling from the initial map.

[0113] The computer executable instructions stored in the computer readable storage medium can implement the following operations in the rendering method of the model by executing the computer executable instructions: for the horizontal coordinate value in the texture coordinate, based on the time parameter, the content tiling density, and the content translation speed, the horizontal coordinate value in the texture coordinate is offset to obtain a first offset result; the decimal part corresponding to the first offset result is determined as the horizontal coordinate value of the first sampling coordinate; the vertical coordinate value in the texture coordinate is determined as the vertical coordinate value of the first sampling coordinate, and the first sampling coordinate is obtained.

[0114] The above-mentioned arrangement parameters include a first arrangement parameter; the first arrangement parameter is used to indicate: the number of rows corresponding to arranging multiple sub-maps in a column along the width direction of the initial map according to the continuous order of the contents of the sub-maps in the initial map; the computer executable instructions stored in the above-mentioned computer-readable storage medium can implement the following operations in the rendering method of the above-mentioned model by executing the computer executable instructions: based on the first arrangement parameter, the first sampling coordinates are converted into coordinates to obtain the second sampling coordinates corresponding to the target map.

[0115] The computer executable instructions stored in the above-mentioned computer-readable storage medium can implement the following operations in the rendering method of the above-mentioned model by executing the computer executable instructions: multiplying the horizontal coordinate value in the first sampling coordinate by the first arrangement parameter to obtain a second operation result; determining the decimal part in the second operation result as the sampling horizontal coordinate value in the second sampling coordinate; and offsetting the vertical coordinate value in the first sampling coordinate based on the second operation result and the first arrangement parameter to obtain the sampling vertical coordinate value in the second sampling coordinate.

[0116] The computer executable instructions stored in the above-mentioned computer-readable storage medium can be executed to implement the following operations in the rendering method of the above-mentioned model: obtain the integer part of the second operation result, add the vertical coordinate value in the first sampling coordinate and the integer part in the second operation result to obtain a first addition result, and use the ratio of the first addition result to the first arrangement parameter as the sampling vertical coordinate value in the second sampling coordinate.

[0117] The computer executable instructions stored in the above-mentioned computer-readable storage medium can be executed to implement the following operations in the rendering method of the above-mentioned model: if the aspect ratio of the target map is not 1, the target map is stretched along the width direction of the target map to stretch the aspect ratio of the target map to 1.

[0118] The computer program product of the model rendering method, device, electronic device and storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0119] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0120] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0121] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0122] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0123] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A rendering method of a model, characterized in that: The method comprises: Acquire an initial map and a target model; wherein the initial map has a first aspect ratio; Determine a segmentation parameter and an arrangement parameter corresponding to the initial texture, segment the initial texture into a plurality of sub-textures according to the segmentation parameter, and arrange the plurality of sub-textures according to the arrangement parameter to generate a target texture; wherein the aspect ratio of the target texture is smaller than the first aspect ratio; the segmentation parameter is used to indicate: the number of the plurality of sub-textures into which the initial texture is segmented; and the arrangement parameter is used to indicate: the arrangement method of the plurality of sub-textures in the target texture; Acquire a first sampling coordinate of the target model sampled from the initial map, and perform coordinate transformation on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter to obtain a second sampling coordinate corresponding to the target map; The target map is sampled based on the second sampling coordinates, and the target model is rendered using the rendering data obtained by sampling to obtain a rendering effect in which the content of the initial map is translated onto the target model.

2. The method according to claim 1, characterized in that The step of determining the segmentation parameters and arrangement parameters corresponding to the initial map includes: Based on the first aspect ratio, determine a first segmentation parameter and a first arrangement parameter corresponding to the initial texture; wherein the first segmentation parameter is used to indicate: the number of sub-textures into which the initial texture is evenly segmented along a length direction perpendicular to the initial texture; and the first arrangement parameter is used to indicate: the number of rows corresponding to arranging the multiple sub-textures in a row along a width direction of the initial texture according to the sequential order of the contents of the sub-textures in the initial texture.

3. The method according to claim 2, characterized in that The step of determining a first segmentation parameter and a first arrangement parameter corresponding to the initial map based on the first aspect ratio includes: Performing an arithmetic square root operation on the first aspect ratio to obtain a first operation result; Based on the first operation result, determine a first integer value; wherein the difference between the first integer value and the first operation result is smaller than the difference between other integers other than the first integer value in natural numbers and the first operation result; Determine the first integer value as a first segmentation parameter; Based on the first segmentation parameter, a first arrangement parameter is determined.

4. The method according to claim 1, characterized in that: The step of obtaining the first sampling coordinates of the target model sampled from the initial map comprises: Acquire the texture coordinates, content tiling density, and content translation speed of the target model; wherein the content tiling density indicates: the arrangement density of the content of the initial map on the target model; the content translation speed indicates: the translation speed of the content of the initial map on the target model; The texture coordinates are offset based on a time parameter, the content tiling density, and the content translation speed to obtain the first sampling coordinates; wherein the time parameter is used to indicate: the time elapsed after the target model starts sampling from the initial map.

5. The method according to claim 4, characterized in that The step of performing offset processing on the texture coordinates based on the time parameter, the content tiling density, and the content translation speed to obtain the first sampling coordinates includes: For the abscissa value in the texture coordinate, offset processing is performed on the abscissa value in the texture coordinate based on a time parameter, the content tiling density, and the content translation speed to obtain a first offset result; The decimal part corresponding to the first offset result is determined as the abscissa value of the first sampling coordinate; the ordinate value in the texture coordinate is determined as the ordinate value of the first sampling coordinate, to obtain the first sampling coordinate.

6. The method according to claim 1, characterized in that The arrangement parameters include a first arrangement parameter; the first arrangement parameter is used to indicate: according to the sequential order of the contents of the sub-maps in the initial map, the corresponding number of rows when the multiple sub-maps are arranged in a row along the width direction of the initial map; The step of performing coordinate transformation on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter to obtain the second sampling coordinate corresponding to the target map comprises: The first sampling coordinates are transformed based on the first arrangement parameters to obtain second sampling coordinates corresponding to the target map.

7. The method according to claim 6, characterized in that The step of performing coordinate transformation on the first sampling coordinate based on the first arrangement parameter to obtain the second sampling coordinate corresponding to the target map includes: Perform a product operation on the abscissa value in the first sampling coordinate and the first arrangement parameter to obtain a second operation result; Determine the decimal part of the second operation result as the sampling horizontal coordinate value in the second sampling coordinate; Based on the second operation result and the first arrangement parameter, an offset process is performed on the ordinate value in the first sampling coordinate to obtain a sampling ordinate value in the second sampling coordinate.

8. The method according to claim 7, characterized in that The step of performing offset processing on the ordinate value in the first sampling coordinate based on the second operation result and the first arrangement parameter to obtain the sampling ordinate value in the second sampling coordinate includes: Obtain the integer part of the second operation result, add the ordinate value in the first sampling coordinate and the integer part in the second operation result to obtain a first addition result, and use the ratio of the first addition result to the first arrangement parameter as the sampling ordinate value in the second sampling coordinate.

9. The method according to claim 1, characterized in that: After the step of generating the target map, the method further comprises: If the aspect ratio of the target texture is not 1, the target texture is stretched along the width direction of the target texture to stretch the aspect ratio of the target texture to 1.

10. A rendering device for a model, characterized in that: The device comprises: A first acquisition module, used to acquire an initial map and a target model; wherein the initial map has a first aspect ratio; A first generation module is used to determine a segmentation parameter and an arrangement parameter corresponding to the initial texture, segment the initial texture into a plurality of sub-textures according to the segmentation parameter, and arrange the plurality of sub-textures according to the arrangement parameter to generate a target texture; wherein the aspect ratio of the target texture is smaller than the first aspect ratio; the segmentation parameter is used to indicate: the number of sub-textures into which the initial texture is segmented; and the arrangement parameter is used to indicate: the arrangement method of the plurality of sub-textures in the target texture; A first conversion module, used for acquiring a first sampling coordinate of the target model sampled from the initial map, and performing coordinate conversion on the first sampling coordinate based on the segmentation parameter and / or the arrangement parameter to obtain a second sampling coordinate corresponding to the target map; The first rendering module is used to sample the target map based on the second sampling coordinates, and render the target model using the rendering data obtained by sampling to obtain a rendering effect in which the content of the initial map is translated onto the target model.

11. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the model rendering method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the model rendering method according to any one of claims 1 to 9.