CN115564884A - Map processing method and device, computer equipment and storage medium - Google Patents
Map processing method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN115564884A CN115564884A CN202211238095.1A CN202211238095A CN115564884A CN 115564884 A CN115564884 A CN 115564884A CN 202211238095 A CN202211238095 A CN 202211238095A CN 115564884 A CN115564884 A CN 115564884A
- Authority
- CN
- China
- Prior art keywords
- map
- target
- original
- tiled
- mapping
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 46
- 238000012545 processing Methods 0.000 claims abstract description 71
- 238000000034 method Methods 0.000 claims abstract description 39
- 230000008030 elimination Effects 0.000 claims abstract description 35
- 238000003379 elimination reaction Methods 0.000 claims abstract description 35
- 238000013507 mapping Methods 0.000 claims description 136
- 239000000463 material Substances 0.000 claims description 48
- 230000000873 masking effect Effects 0.000 claims description 25
- 230000000694 effects Effects 0.000 abstract description 28
- 238000009877 rendering Methods 0.000 abstract description 19
- 238000004590 computer program Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000001788 irregular Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 244000025254 Cannabis sativa Species 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000009792 diffusion process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000001815 facial effect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000012905 input function Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/04—Texture mapping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/60—Rotation of whole images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2219/00—Indexing scheme for manipulating 3D models or images for computer graphics
- G06T2219/20—Indexing scheme for editing of 3D models
- G06T2219/2016—Rotation, translation, scaling
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Architecture (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a map processing method, a map processing device, computer equipment and a storage medium; the method and the device can obtain an original map needing repeated elimination, wherein the original map is obtained by tiling at least one tiled map, determine the UV coordinates of each tiled map in the original map, obtain the rotation angle control parameter of each tiled map in the original map, and rotate each tiled map in the original map based on the rotation angle control parameter and the UV coordinates to obtain a target map with repeated elimination; in the embodiment of the invention, the tiling chartlets in the original chartlet are rotated according to the corresponding rotation angle control parameters, so that the repeated feeling brought to the original chartlets by orderly arranging the tiling chartlets can be eliminated under the condition of only occupying a small amount of storage space and computing resources, the repeated target chartlets are eliminated, and the picture rendering effect is improved.
Description
Technical Field
The invention relates to the technical field of rendering, in particular to a map processing method, a map processing device, computer equipment and a storage medium.
Background
With the rapid development of computer technology, tiling by using a map to achieve the effect of having content in a picture becomes an essential step in many rendering processes. In the process of tiling the map, in consideration of rendering effect and device performance, the map made of a single material is often adopted to perform tiling display operation on the whole screen.
However, in the scheme of tiling by using a single material map, a viewer can easily see that the map in the picture has repeatability and a poor rendering effect. If a large-size tile or a plurality of different material tiles are used for tiling, a larger storage space is required and more computing resources are required for rendering than a small-size single-material tile.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for processing a map, a computer device, and a storage medium, which can eliminate a sense of repetition in a picture obtained by tiling a map while occupying only a small amount of storage space and computing resources.
The embodiment of the invention provides a map processing method, which comprises the following steps:
acquiring an original map needing repeated elimination, wherein the original map is obtained by tiling at least one tiled map;
determining UV coordinates of each tiled map in the original map;
acquiring a rotation angle control parameter of each tiled map in the original map;
and rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinates to obtain a target map with the duplication eliminated.
Correspondingly, an embodiment of the present invention further provides a map processing apparatus, including:
an original map obtaining unit, configured to obtain an original map that needs to be subjected to repeated elimination processing, where the original map is obtained by tiling at least one tile map;
a UV coordinate determination unit, configured to determine a UV coordinate of each tile in the original tile;
the parameter acquisition unit is used for acquiring a rotation angle control parameter of each tiled map in the original map;
and the map rotating unit is used for rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinate to obtain a target map with the duplication eliminated.
Correspondingly, the embodiment of the invention also provides computer equipment, which comprises a memory and a processor; the memory stores an application program, and the processor is used for running the application program in the memory to execute the steps in any one of the map processing methods provided by the embodiments of the present invention.
Accordingly, the embodiment of the present invention further provides a computer-readable storage medium, where a plurality of instructions are stored, and the instructions are suitable for being loaded by a processor to perform any of the steps in the map processing method provided by the embodiment of the present invention.
In addition, the embodiment of the present invention further provides a computer program product, which includes a computer program or instructions, and when the computer program or instructions are executed by a processor, the computer program or instructions implement the steps in any of the map processing methods provided by the embodiment of the present invention.
By adopting the scheme of the embodiment of the invention, the original map which needs to be subjected to repeated elimination processing can be obtained, the original map is obtained by tiling at least one tiled map, the UV coordinate of each tiled map in the original map is determined, the rotation angle control parameter of each tiled map in the original map is obtained, each tiled map in the original map is rotated based on the rotation angle control parameter and the UV coordinate, and the target map subjected to repeated elimination is obtained; in the embodiment of the invention, the tiling maps in the original tiling maps are rotated according to the corresponding rotation angle control parameters, so that the repeated feeling brought to the original tiling maps by orderly arranging the tiling maps can be eliminated under the condition of only occupying a small amount of storage space and computing resources, and the picture rendering effect is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scene of a map processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a map processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a chartlet rotation process provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating the effect of fusing a target map with a first noise map texture according to an embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating the effect of increasing the noise frequency of the first noise map according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a saturation masking map provided by an embodiment of the present invention;
FIG. 7 is another flowchart of a map processing method according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a map processing apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic view of another structure of a map processing apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a map processing method and device, electronic equipment and a computer-readable storage medium. In particular, embodiments of the present invention provide a mapping processing method suitable for a mapping processing apparatus, which may be integrated in an electronic device.
The electronic device may be a terminal or other devices, including but not limited to a mobile terminal and a fixed terminal, for example, the mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a notebook computer, a smart car, and the like, wherein the fixed terminal includes but is not limited to a desktop computer, a smart television, and the like.
The electronic device may also be a device such as a server, and the server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), and a big data and artificial intelligence platform, but is not limited thereto.
The map processing method of the embodiment of the invention can be realized by a terminal, and can also be realized by the terminal and a server together.
The method will be described below by taking an example in which the terminal and the server implement the map processing method together.
As shown in fig. 1, the map processing system provided by the embodiment of the present invention includes a terminal 10, a server 20, and the like; the terminal 10 and the server 20 are connected via a network, such as a wired or wireless network connection, wherein the server 20 may exist as an electronic device responding to the HTTP request sent by the terminal 10.
Wherein the terminal 10 may be adapted to display the de-duplicated object map.
The server 20 may obtain an original map that needs to be subjected to the repeated elimination processing, where the original map is obtained by tiling at least one tile map, determine a UV coordinate of each tile map in the original map, obtain a rotation angle control parameter of each tile map in the original map, and rotate each tile map in the original map based on the rotation angle control parameter and the UV coordinate to obtain a target map subjected to the repeated elimination.
The server 20 may transmit the destination map from which the duplication is eliminated to the terminal 10 for display.
It is understood that, in some embodiments, the steps of the mapping process performed by the server 20 may also be performed by the terminal 10, which is not limited by the embodiment of the present invention.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Embodiments of the present invention will be described from the perspective of a map processing apparatus, which may be specifically integrated in a server and/or a terminal.
As shown in fig. 2, a specific flow of the map processing method of this embodiment may be as follows:
201. and acquiring an original map which needs to be subjected to repeated elimination processing, wherein the original map is obtained by tiling at least one tiled map.
Wherein the tile map may be a map image for continuous tiling. In the embodiment of the present invention, the tile map may be applied to rendering of scene images such as the ground, the sky, the wall, and the ocean.
In the application process of the related art, the tile maps are generally tiled in a regular arrangement manner such as square continuous tiling to generate the original map, so that the repeat feeling of the tile maps in the original map is very obvious, and the original map needs to be subjected to repeat elimination processing.
In some optional embodiments, in order to save storage space for storing the tile maps and reduce the tiling process and the rendering pressure during the rendering process, in an embodiment of the present invention, each tile map in the original map may be the same map.
In other alternative embodiments, in order to make the rendered and displayed picture richer, a small number of maps of different materials may be used for tiling to obtain the original map. That is to say, before the step "obtaining the original map that needs to be subjected to the duplicate elimination processing", the map processing method provided in the embodiment of the present invention may further include:
acquiring tiled pictures of at least two different materials;
and randomly and continuously tiling the tiled maps made of different materials to obtain the original map needing repeated elimination.
The tiling maps of different materials refer to tiling maps with different material parameters. For example, tiles of different materials may be tiles of the same texture but different color or transparency of diffusion, or tiles of different materials may be tiles of different diffusion properties (e.g., one material is a diffusing material and one material is a mixed material).
It can be understood that if a large number of material types of tiling maps are used to tile a picture, although great changes can be made in display accuracy and detail change, if the display requirement is that the whole picture has a small change range and only has some slight differences, the scheme of tiling by using a large number of material types of tiling maps needs a lot of time and energy for the design of the tiling maps by technicians, which consumes manpower resources.
In the embodiment of the present invention, since the step 202, the step 203, the step 204, and the like are performed to eliminate the duplicate feeling in the original map, even if the tile maps of different materials are used, the used material types are less, and a large amount of human resources are not occupied.
Optionally, in order to make the material closer to reality and further eliminate the repetitive feeling caused by tiling of the map, the method for processing the map provided in the embodiment of the present invention may further include:
determining the material corresponding to each tiled map in the target map;
and carrying out random fluctuation treatment on each tiled map in the target map based on the material corresponding to the tiled map to obtain the fluctuated target map.
That is to say, the fluctuation processing with random height can be carried out on each tile according to the material of different tiles in the target tile, and the material can be closer to the reality through the random fluctuation processing, so that the repeated feeling caused by tile tiling is further eliminated.
202. The UV coordinates of each tile in the original map are determined.
In the field of computer graphics, UV coordinates are short for U, V texture map coordinates, which may also be referred to as texture map coordinates, which may define the location of each point in a two-dimensional image.
Optionally, the determination of the UV coordinate of each tile map may be determined after a coordinate system is established based on the entire original map, or may be determined after a coordinate system is established based on the tile map itself, which is not limited in the embodiment of the present invention.
203. And acquiring a rotation angle control parameter of each tiled map in the original map.
And the rotation angle control parameter is used for controlling the rotation angle of each tiled map. The rotation angle control parameters corresponding to different tile maps may be the same or different, which is not limited in the embodiments of the present invention.
By setting the rotation angle control parameter, the controllability of the tiling chartlet can be enhanced, the tiling effect is richer, and the repeated feeling in the target chartlet is reduced.
In the actual application process, in order to match the obtained target map with the scene, the original map or each tile map in the original map needs to be scaled to control the degree of tiling of the finally obtained target map, so that the target map reaches the corresponding precision. Therefore, the map processing method provided by the embodiment of the present invention may further include:
and acquiring the scaling parameters required by the original map.
In particular, the scaling parameter indicates the scale at which the original map needs to be scaled down or up. The scaling parameters may be determined based on the size of the original tile being tiled and the size of the scene that needs to be matched.
For example, the size of the tiled original map is larger than the size of the scene to be matched, and at this time, the reduction parameter required by the original map may be determined, and the reduction processing may be performed on the tiled map in the original map.
Or, the tiled original map size is smaller than the scene size to be matched, and at this time, the enlargement parameter required by the original map may be determined to enlarge the tiled map in the original map.
It can be understood that before the original map is enlarged, it can be determined whether the resolution of the image enlarged by the current enlargement parameters of the original map can meet the display requirement. If the resolution of the image enlarged by the current enlargement parameter to the original map cannot meet the resolution required by display, at this time, the tiling map can be continuously adopted to tile to increase the size of the original map.
Correspondingly, after the scaling parameters corresponding to the original maps are determined, scaling calculation can be performed on the UV coordinates of each tile map according to the scaling parameters, so as to implement scaling of the tile maps. That is, before the step "rotating each tile map in the original map based on the rotation angle control parameter and the UV coordinate to obtain the target map with the repetition eliminated", the map processing method provided in the embodiment of the present invention may further include:
and carrying out scaling treatment on the UV coordinates of each tiled map in the original map based on the scaling parameters to obtain the scaled UV coordinates.
By zooming the tiled maps, the zooming of the original maps obtained by seamlessly splicing the tiled maps can be realized.
It should be noted that, for scaling the tile, the scaling may be performed after the tile is rotated, or the scaled tile may be scaled first and then the scaled tile is rotated according to the scaled UV coordinates, which is not limited in the embodiment of the present invention.
204. And rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinate to obtain the target map with the duplication eliminated.
Since the original arrangement regularity can be broken between the individual tiles by rotating the tiles, the problem of pattern duplication in the original tiles obtained by seamless tiling can be eliminated.
The step of rotating each tile map in the original map based on the rotation angle control parameter and the UV coordinate to obtain a target map from which duplication is eliminated may specifically include:
multiplying the UV coordinates of each tiling chartlet with the corresponding rotation angle control parameters to obtain transformed UV coordinates of each tiling chartlet;
and mapping the transformed UV coordinates of each tiled map in the original map into rotated UV coordinates according to the coordinate mapping relation corresponding to the map rotation processing, so as to obtain the target map with the duplication eliminated.
Specifically, the transformed UV coordinates may include rotation angle control information, and when the tile map is processed through the coordinate mapping relationship, the rotation angle of the tile map may be controlled.
The coordinate mapping relationship may be a functional relationship that maps a content corresponding to a certain coordinate point in the tile map to another coordinate point in the tile map when the tile map is subjected to rotation processing.
Specifically, the UV coordinates of each tile map and the corresponding rotation angle control parameter are multiplied, or after combination (combination), the result of the combination is multiplied by the specific rotation angle control parameter.
Optionally, the step of mapping the transformed UV coordinates of each tile map in the original map to rotated UV coordinates according to the coordinate mapping relationship corresponding to the map rotation processing to obtain the target map from which the repetition is eliminated may specifically include:
performing trigonometric function operation based on the transformed UV coordinates to obtain mapped UV coordinates;
fusing the mapped UV coordinates with the UV coordinates to obtain rotated UV coordinates;
and rotating each tiled map in the original map according to the rotated UV coordinates to obtain the target map with the duplication eliminated.
Specifically, the trigonometric function operation is performed on the transformed UV coordinates, and as shown in fig. 3, the transformed UV coordinates may be subjected to a Sine operation (Sine) and a Cosine operation (Cosine), respectively.
The mapping UV information and the UV information are fused, and the result of the transformed UV coordinates after sinusoidal operation can be respectively multiplied by U, V values in the UV coordinates to obtain a result A and a result B; multiplying the result of the transformed UV coordinates after cosine operation with a U, V value in the UV coordinates respectively to obtain a result a and a result b; and combining the result of subtracting B and a with the result of adding A and B to obtain the rotated UV coordinate.
In an actual application process, because the tiles in the original tile are generally arranged according to a regular arrangement rule, and after rotation, seams between the tiles may be obvious, the tile processing method provided by the embodiment of the present invention may further include:
acquiring a first noise mapping;
and based on the first noise UV information of the first noise map and the target UV information of the target map, fusing the texture in the first noise map into the target map to obtain the processed target map.
In the embodiment of the present invention, the texture is detailed information representing the surface of the object, including information such as lines, colors, or patterns. The texture of the first noise map may be one or more types of detail information.
Because the first noise mapping has irregular noise texture, after the first noise mapping is fused into the target mapping, straight seams among all tiled screenshots in the target mapping can be processed into irregular curves, and the splicing effect of the seams can be weakened. That is, the visual stitching of the target map is greatly reduced.
As shown in FIG. 4, after the object map is fused with the texture of the first noise map, the boundary of each tile map is no longer a straight line, but is an irregular curve.
Further, the first noise map may correspond to noise frequency control information, and when the first noise map is obtained, the first noise map corresponding to the noise frequency may be randomly generated according to the noise frequency control information. Generally, the larger the noise frequency set by the noise frequency control information is, the more the curve change of the straight seam in the target map is.
As shown in FIG. 5, after increasing the noise frequency, the texture of the first noise map is merged into the target map, and the boundary change of the region corresponding to each tile map in the target map is richer.
In some alternative embodiments, for a seamless map with a neat layout, rotation can make the map have a very abrupt effect, so that the rendering effect of the target map can be more realistic by modifying the hue of the target map. That is to say, the map processing method provided in the embodiment of the present invention may further include:
obtaining a hue mask map of the target map, wherein the hue mask map comprises a mask area and a non-mask area, and the transparency of the non-mask area is greater than that of the mask area;
determining a hue adjustable region corresponding to a non-mask region and a mask region with the transparency larger than zero in the hue mask map in the target map;
and obtaining hue adjustment parameters, and performing hue adjustment on the hue adjustable area according to the hue adjustment parameters to obtain a target chartlet after hue processing.
The size of the hue mask map can be not smaller than that of the target map, so that the hue of all the areas of the target map can be adjusted during hue adjustment by setting the mask areas and the non-mask areas in the hue mask map. Alternatively, the size of the hue mask map may be smaller than that of the target map, so that a part of the region in the target map is subjected to hue processing by the hue mask map having a smaller size than that of the target map, and so on.
Specifically, the hue adjustable region is a region in the target map corresponding to a non-mask region and a mask region having a transparency greater than zero in the hue mask map. The hue effect corresponding to the hue adjustment parameter can be displayed in the hue adjustable area in an overlapping manner based on the transparency of the non-mask area and the transparency of the mask area with the transparency larger than zero.
It will be appreciated that in practice, the texture of a scene surface in the real world will typically have subtle differences in hue, such as darker grass, lighter grass, other colors of grass, and so forth.
By setting the hue mask maps of the areas with different transparencies, different degrees of hue effects can be obtained on different areas of the target map when the hue of the target map is adjusted.
The transparency of the non-mask area is 100%, that is, the hue effect corresponding to the hue adjustment parameter can be completely displayed in the hue adjustable area corresponding to the non-mask area in the target map.
Wherein, the transparency of the mask area can be more than or equal to 0 percent and less than 100 percent. For the mask area with the transparency of 0%, that is, the hue effect corresponding to the hue adjustment parameter is not shown at all in the area corresponding to the mask area with the transparency of 0% in the target map.
The step of obtaining the hue mask map of the target map may specifically include:
acquiring a second noise mapping and a transparency control parameter of the target mapping;
determining a mask area and a non-mask area in the second noise mapping based on a second noise UV coordinate of the second noise mapping;
and setting the transparency of the mask area and the non-mask area in the second noise mapping according to the transparency control parameter to obtain the hue mask mapping.
Specifically, the determination of the masked area and the non-masked area may be obtained by random division in the second noise map, or the masked area and the non-masked area may be determined according to the UV coordinates of the texture in the second noise map. For example, some texture segments may be determined from their UV coordinates to constitute closed regions, which may then be determined as masked regions or non-masked regions.
In other optional embodiments, the saturation of different areas in the target map may also be modified, and the display effect of the target map is improved, that is, the map processing method provided in the embodiment of the present invention may further include:
acquiring a saturation masking map of the target map, wherein the saturation masking map comprises a masking region and a non-masking region, and the transparency of the non-masking region is greater than that of the masking region;
determining a saturation adjustable region corresponding to a non-mask region and a mask region with the transparency larger than zero in the saturation mask map in the target map;
and acquiring a saturation adjusting parameter, and adjusting the saturation of the saturation adjustable area according to the saturation adjusting parameter to obtain a target map after saturation processing.
Specifically, the definition of the mask region and the non-mask region in the saturation mask map is similar to the hue mask map, and the embodiment of the present invention is not described herein again.
For example, as shown in fig. 6, a color phase mask map is shown, in which a white area is a non-mask area, and a gray area is a mask area with a transparency of not 0. In some examples, black may be indicated for regions with transparency of 0.
Optionally, different transparencies may be set for different regions in a noise map, so that when saturation processing is performed on the target map, different saturation processing effects may be achieved for different regions in the target map. The step of obtaining the saturation degree mask map of the target map specifically comprises the following steps:
acquiring a third noise mapping and a transparency control parameter of the target mapping;
determining a mask area and a non-mask area in the third noise mapping based on a third noise UV coordinate of the third noise mapping;
and setting the transparency of the mask area and the non-mask area in the third noise mapping according to the transparency control parameter to obtain a saturation mask mapping.
The third noise map and the second noise map may be the same noise map or different noise maps. When the third noise map and the second noise map are the same noise map, the hue and saturation of the target map can be adjusted at the same time.
As can be seen from the above, in the embodiment of the present invention, an original map that needs to be subjected to repeated elimination processing may be obtained, where the original map is obtained by tiling at least one tile map, a UV coordinate of each tile map in the original map is determined, a rotation angle control parameter of each tile map in the original map is obtained, and each tile map in the original map is rotated based on the rotation angle control parameter and the UV coordinate, so as to obtain a target map from which repetition is eliminated; in the embodiment of the invention, the tiling maps in the original mapping are rotated according to the corresponding rotation angle control parameters, so that the repeated feeling brought to the original mapping by the orderly arrangement of the tiling maps can be eliminated by the embodiment of the invention under the condition of only occupying a small amount of storage space and computing resources, the repeated target mapping is eliminated, and the picture rendering effect is improved.
The method according to the preceding embodiment is illustrated in further detail below by way of example.
In this embodiment, the system of fig. 1 will be explained.
As shown in fig. 7, the detailed flow of the map processing method of this embodiment may be as follows:
701. and acquiring an original map which needs to be subjected to repeated elimination processing, wherein the original map is obtained by tiling at least one tiled map.
In some optional embodiments, in order to save storage space for storing the tile maps and reduce the tiling process and the rendering pressure during the rendering process, in an embodiment of the present invention, each tile map in the original tile map may be the same tile map.
In other alternative embodiments, in order to make the rendered and displayed picture richer, a small number of maps of different materials may be used for tiling to obtain the original map.
702. And acquiring scaling parameters required by the original map, and scaling the UV coordinates of each tiled map in the original map based on the scaling parameters to obtain the scaled UV coordinates.
In particular, the scaling parameter indicates the scale at which the original map needs to be scaled down or up. The scaling parameters may be determined based on the size of the original tiles tiled and the size of the scene that needs to be matched.
After the scaling parameters corresponding to the original maps are determined, scaling calculation may be performed on the UV coordinates of each tile map according to the scaling parameters, so as to implement scaling of the tile maps.
In some examples, as shown in fig. 3, X, Y coordinates may be separated from the UV coordinates, and the separated X, Y and Scale value (i.e., scaling parameter) are multiplied (multi), which is to make the UV coordinates of the tile change in equal proportion after the Scale value is modified; then, the information of X, Y is summarized by rounding operation (Round) respectively, and then the X and Y coordinates are combined.
Optionally, the X, Y coordinates after the multiplication may be subjected to subtraction (Subtract) so that the coordinates are shifted from the original positions by a certain amount.
In other examples, scaling may be performed on each tile in the target tile after the tile is rotated.
703. And acquiring a rotation angle control parameter of each tiled map in the original map.
And the rotation angle control parameter is used for controlling the rotation angle of each tiled map. The rotation angle control parameters corresponding to different tile maps may be the same or different, which is not limited in the embodiments of the present invention.
704. And rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinate to obtain the target map with the duplication eliminated.
Specifically, step 704 may include:
multiplying the UV coordinates of each tiled mapping with the corresponding rotation angle control parameters to obtain transformed UV coordinates of each tiled mapping;
and mapping the transformed UV coordinates of each tiled map in the original map into rotated UV coordinates according to the coordinate mapping relation corresponding to the map rotation processing, so as to obtain the target map with the duplication eliminated.
705. And acquiring a first noise mapping, and fusing the texture in the first noise mapping into the target mapping based on the first noise UV information of the first noise mapping and the target UV information of the target mapping to obtain the processed target mapping.
After the rotation problem is solved, because the seamless mapping is designed according to the arrangement, when the seamless mapping rotates, the seam between the mapping becomes obvious, and the solution is to break the straight seam and process the straight seam into an irregular curve, so that the seam effect is weakened.
Taking the image software blend as an example, a Noise map node (Noise Texture) can be added first, and then the Noise map node (difference) is mixed with X, Y respectively, a detail variable (Noise frequency control parameter) can be used in the Noise map node, the larger the value of the detail variable is, the more abundant the seam change is, and the less the seam change is otherwise. The effect of the difference node is like that in photoshop, the two pictures are subjected to difference layer mixing mode, wherein the variable factor of the difference node is similar to that in the layer mixing mode, one more color level is added to control the black-white contrast of the difference node, and the difference node is used for controlling the irregular amplitude change of the seam.
In the process of fusing the texture in the first noise mapping to the target mapping, after the X, Y of the noise mapping and the X of the target mapping are operated, the obtained effect is that the X changes, and after the X, Y of the noise mapping and the Y of the seamless mapping are operated, the obtained effect is that the Y changes.
706. And obtaining a mask map of the target map, wherein the hue mask map comprises a mask area and a non-mask area, and the transparency of the non-mask area is greater than that of the mask area.
Specifically, step 706 may include: acquiring a second noise mapping and a transparency control parameter of the target mapping;
determining a mask area and a non-mask area in the second noise mapping based on a second noise UV coordinate of the second noise mapping;
and setting the transparency of the mask area and the non-mask area in the second noise mapping according to the transparency control parameter to obtain the mask mapping.
By setting the mask maps with the areas with different transparencies, the hue and saturation effects of different degrees can be obtained on different areas of the target map when the hue and saturation of the target map are adjusted.
In some embodiments, a plurality of different mask maps can be obtained, different mask maps can be used in an overlapping manner according to different requirements, and different masks and different color changes can be adjusted to be matched with each other.
707. And obtaining hue adjustment parameters and saturation adjustment parameters, and adjusting the hue of a region corresponding to a non-mask region and a mask region with the transparency larger than zero in the hue mask map in the target map according to the hue adjustment parameters and the saturation adjustment parameters to obtain the target map after hue and saturation processing.
It can be understood that, if the original map is formed by tiling at least two tiled maps made of different materials, in order to make the materials closer to reality and further eliminate the sense of repetition caused by tiling of the map, the method for processing the map provided by the embodiment of the present invention may further include:
determining the material corresponding to each tiled map in the target map;
and carrying out random fluctuation treatment on each tiled map in the target map based on the material corresponding to the tiled map to obtain the fluctuated target map.
By the aid of the method, the different tiled maps in the target map can be subjected to random height fluctuation treatment according to materials of the different tiled maps, the materials can be closer to reality through random fluctuation treatment, and repeated feeling caused by tiling of the maps is further eliminated.
As can be seen from the above, in the embodiment of the present invention, an original map that needs to be subjected to the repeated elimination processing may be obtained, where the original map is obtained by tiling at least one tile map, a UV coordinate of each tile map in the original map is determined, a rotation angle control parameter of each tile map in the original map is obtained, and each tile map in the original map is rotated based on the rotation angle control parameter and the UV coordinate, so as to obtain a target map from which the repetition is eliminated; in the embodiment of the invention, the tiling maps in the original mapping are rotated according to the corresponding rotation angle control parameters, so that the repeated feeling brought to the original mapping by the orderly arrangement of the tiling maps can be eliminated by the embodiment of the invention under the condition of only occupying a small amount of storage space and computing resources, the repeated target mapping is eliminated, and the picture rendering effect is improved.
In order to better implement the method, correspondingly, the embodiment of the invention also provides a map processing device.
Referring to fig. 8, the apparatus includes:
an original map obtaining unit 801, configured to obtain an original map that needs to be subjected to duplicate elimination processing, where the original map is obtained by tiling at least one tiled map;
a UV coordinate determining unit 802, configured to determine a UV coordinate of each tile map in the original map;
a parameter obtaining unit 803, configured to obtain a rotation angle control parameter of each tile map in the original map;
a map rotating unit 804, configured to rotate each of the tiled maps in the original map based on the rotation angle control parameter and the UV coordinate, to obtain a target map with duplication eliminated.
Optionally, as shown in fig. 9, the map processing apparatus provided in the embodiment of the present invention further includes a texture fusion unit 805, configured to obtain a first noise map;
and fusing the texture in the first noise mapping into the target mapping based on the first noise UV information of the first noise mapping and the target UV information of the target mapping to obtain the processed target mapping.
Optionally, the map rotating unit 804 is configured to multiply the UV coordinate of each tiled map by the corresponding rotation angle control parameter to obtain a transformed UV coordinate of each tiled map;
and mapping the transformed UV coordinates of each tiled map in the original map into rotated UV coordinates according to the coordinate mapping relation corresponding to the map rotation processing, so as to obtain the target map with the duplication eliminated.
Optionally, the map processing apparatus provided in the embodiment of the present invention further includes a hue adjusting unit 806, configured to obtain a hue mask map of the target map, where the hue mask map includes a mask region and a non-mask region, and a transparency of the non-mask region is greater than a transparency of the mask region;
determining a hue adjustable region corresponding to a non-mask region in the hue mask map and a mask region with the transparency larger than zero in the target map;
and obtaining hue adjustment parameters, and performing hue adjustment on the hue adjustable area according to the hue adjustment parameters to obtain a target chartlet after hue processing.
Optionally, the hue adjusting unit 806 is configured to obtain a second noise mapping of the target mapping and a transparency control parameter;
determining a mask area and a non-mask area in the second noise mapping based on a second noise UV coordinate of the second noise mapping;
and setting the transparency of the mask area and the non-mask area in the second noise mapping according to the transparency control parameter to obtain the hue mask mapping.
Optionally, the map processing apparatus provided in the embodiment of the present invention further includes a saturation adjusting unit 807, configured to obtain a saturation mask map of the target map, where the saturation mask map includes a mask region and a non-mask region, and a transparency of the non-mask region is greater than a transparency of the mask region;
determining a saturation adjustable region corresponding to a non-mask region in the saturation mask map and a mask region with the transparency larger than zero in the target map;
and acquiring a saturation adjusting parameter, and adjusting the saturation of the saturation adjustable area according to the saturation adjusting parameter to obtain a target map after saturation processing.
Optionally, the saturation adjusting unit 807 is configured to obtain a third noise mapping and a transparency control parameter of the target mapping;
determining a mask area and a non-mask area in the third noise mapping based on a third noise UV coordinate of the third noise mapping;
and setting the transparency of the mask area and the non-mask area in the third noise mapping according to the transparency control parameter to obtain a saturation mask mapping.
Optionally, the map processing apparatus provided in the embodiment of the present invention further includes a multi-material map tiling unit 809, configured to obtain at least two tiled maps of different materials;
and randomly and continuously tiling the tiled pictures of different materials to obtain the original pictures to be subjected to repeated elimination.
Optionally, the map processing apparatus provided in the embodiment of the present invention further includes a map undulation unit 810, configured to determine a material corresponding to each tile map in the target map;
and carrying out random fluctuation treatment on each tiled map in the target map based on the material corresponding to the tiled map to obtain the target map after fluctuation treatment.
Optionally, the map processing apparatus provided in the embodiment of the present invention further includes a scaling parameter obtaining unit 811, configured to obtain a scaling parameter required by the original map;
the map processing apparatus provided in the embodiment of the present invention further includes a scaling unit 812, configured to perform scaling processing on the UV coordinates of each tile map in the original map based on the scaling parameter, so as to obtain scaled UV coordinates.
As can be seen from the above, with the map processing apparatus provided in the embodiment of the present invention, an original map that needs to be repeatedly eliminated may be obtained, where the original map is obtained by tiling at least one tiled map, determining a UV coordinate of each tiled map in the original map, obtaining a rotation angle control parameter of each tiled map in the original map, and rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinate to obtain a target map from which duplication is eliminated; in the embodiment of the invention, the tiling maps in the original mapping are rotated according to the corresponding rotation angle control parameters, so that the repeated feeling brought to the original mapping by the orderly arrangement of the tiling maps can be eliminated by the embodiment of the invention under the condition of only occupying a small amount of storage space and computing resources, the repeated target mapping is eliminated, and the picture rendering effect is improved.
In addition, correspondingly, the embodiment of the application also provides a computer device, and the computer device can be a terminal. As shown in fig. 10, fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present application. The computer device 1000 includes a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, and a computer program stored on the memory 1002 and executable on the processor. The processor 1001 is electrically connected to the memory 1002. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The processor 1001 is a control center of the computer apparatus 1000, connects various parts of the entire computer apparatus 1000 using various interfaces and lines, performs various functions of the computer apparatus 1000 and processes data by running or loading software programs and/or modules stored in the memory 1002, and calling data stored in the memory 1002, thereby performing overall monitoring of the computer apparatus 1000.
In this embodiment of the application, the processor 1001 in the computer device 1000 loads instructions corresponding to processes of one or more applications into the memory 1002, and the processor 1001 runs the applications stored in the memory 1002 according to the following steps, so as to implement various functions:
acquiring an original map needing repeated elimination, wherein the original map is obtained by tiling at least one tiled map;
determining UV coordinates of each tiled map in the original map;
acquiring a rotation angle control parameter of each tiled map in the original map;
and rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinate to obtain the target map with the duplication eliminated.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
acquiring a first noise mapping;
and based on the first noise UV information of the first noise map and the target UV information of the target map, fusing the texture in the first noise map into the target map to obtain the processed target map.
In some embodiments, rotating each tile map in the original map based on the rotation angle control parameter and the UV coordinates to obtain a target map with removed duplicates includes:
multiplying the UV coordinates of each tiled mapping with the corresponding rotation angle control parameters to obtain transformed UV coordinates of each tiled mapping;
and mapping the transformed UV coordinates of each tiled map in the original map into rotated UV coordinates according to the coordinate mapping relation corresponding to the map rotation processing, so as to obtain the target map with the duplication eliminated.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
obtaining a hue mask map of the target map, wherein the hue mask map comprises a mask area and a non-mask area, and the transparency of the non-mask area is greater than that of the mask area;
determining a hue adjustable region corresponding to a non-mask region and a mask region with the transparency larger than zero in the hue mask map in the target map;
and obtaining hue adjustment parameters, and performing hue adjustment on the hue adjustable area according to the hue adjustment parameters to obtain a target chartlet after hue processing.
In some embodiments, obtaining a hue mask map of a target map comprises:
acquiring a second noise mapping and a transparency control parameter of the target mapping;
determining a mask area and a non-mask area in the second noise mapping based on a second noise UV coordinate of the second noise mapping;
and setting the transparency of the mask area and the non-mask area in the second noise mapping according to the transparency control parameter to obtain the hue mask mapping.
In some embodiments, the method for processing a map provided in the embodiments of the present invention further includes:
acquiring a saturation masking map of the target map, wherein the saturation masking map comprises a masking region and a non-masking region, and the transparency of the non-masking region is greater than that of the masking region;
determining a saturation adjustable region corresponding to a non-mask region and a mask region with the transparency larger than zero in the saturation mask map in the target map;
and acquiring a saturation adjusting parameter, and adjusting the saturation of the saturation adjustable area according to the saturation adjusting parameter to obtain a target map after saturation processing.
In some embodiments, obtaining a saturation mask map of a target map comprises:
acquiring a third noise mapping and a transparency control parameter of the target mapping;
determining a masked region and a non-masked region in the third noise map based on a third noise UV coordinate of the third noise map;
and setting the transparency of the mask area and the non-mask area in the third noise mapping according to the transparency control parameter to obtain a saturation mask mapping.
In some embodiments, before obtaining an original map that needs to be subjected to duplicate elimination, the method for processing a map provided in the embodiments of the present invention further includes:
acquiring tiled pictures of at least two different materials;
and randomly and continuously tiling the tiled pictures of different materials to obtain the original pictures which need to be subjected to repeated elimination treatment.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
determining the material corresponding to each tiled map in the target map;
and carrying out random fluctuation treatment on each tiled map in the target map based on the material corresponding to the tiled map to obtain the fluctuated target map.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
obtaining scaling parameters required by an original map;
before each tile map in the original map is rotated based on the rotation angle control parameter and the UV coordinate to obtain a target map from which repetition is eliminated, the map processing method provided by the embodiment of the present invention further includes:
and carrying out scaling treatment on the UV coordinates of each tiled map in the original map based on the scaling parameters to obtain the scaled UV coordinates.
The scheme can obtain an original map needing repeated elimination, the original map is obtained by tiling at least one tiled map, the UV coordinate of each tiled map in the original map is determined, the rotation angle control parameter of each tiled map in the original map is obtained, each tiled map in the original map is rotated based on the rotation angle control parameter and the UV coordinate, and a target map with repeated elimination is obtained; in the embodiment of the invention, the tiling maps in the original mapping are rotated according to the corresponding rotation angle control parameters, so that the repeated feeling brought to the original mapping by the orderly arrangement of the tiling maps can be eliminated by the embodiment of the invention under the condition of only occupying a small amount of storage space and computing resources, the repeated target mapping is eliminated, and the picture rendering effect is improved.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 10, the computer device 1000 further includes: touch-sensitive display screen 1003, radio frequency circuit 1004, audio circuit 1005, input unit 1006 and power 1007. The processor 1001 is electrically connected to the touch display screen 1003, the radio frequency circuit 1004, the audio circuit 1005, the input unit 1006, and the power supply 1007, respectively. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 10 is not intended to be limiting of computer devices and may include more or fewer components than those shown, or some of the components may be combined, or a different arrangement of components.
The touch display screen 1003 can be used for displaying a graphical user interface and receiving an operation instruction generated by a user acting on the graphical user interface. The touch display screen 1003 may include a display panel and a touch panel. The display panel may be used, among other things, to display information entered by or provided to a user and various graphical user interfaces of the computer device, which may be made up of graphics, text, icons, video, and any combination thereof. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus pen, and the like), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1001, and can receive and execute commands sent by the processor 1001. The touch panel may overlay the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel may be transmitted to the processor 1001 to determine the type of the touch event, and then the processor 1001 may provide a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 1003 to implement input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display 1003 may also be used as a part of the input unit 1006 to implement an input function.
The radio frequency circuit 1004 may be used for transceiving radio frequency signals to establish wireless communication with a network device or other computer device through wireless communication, and for transceiving signals with the network device or other computer device.
Audio circuitry 1005 may be used to provide an audio interface between a user and a computer device through speakers and microphones. The audio circuit 1005 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts a collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 1005, and outputs the audio data to the processor 1001 for processing, for example, to another computer device via the radio frequency circuit 1004, or outputs the audio data to the memory 1002 for further processing. The audio circuitry 1005 may also include an earbud jack to provide communication of a peripheral headset with the computer device.
The input unit 1006 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 1007 is used to power the various components of the computer device 1000. Optionally, the power supply 1007 may be logically connected to the processor 1001 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system. The power supply 1007 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown in fig. 10, the computer device 1000 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
As can be seen from the above, the computer device provided in this embodiment may obtain an original map that needs to be subjected to the repeat elimination processing, where the original map is obtained by tiling at least one tile map, determine a UV coordinate of each tile map in the original map, obtain a rotation angle control parameter of each tile map in the original map, and rotate each tile map in the original map based on the rotation angle control parameter and the UV coordinate to obtain a target map subjected to the repeat elimination; in the embodiment of the invention, the tiling maps in the original mapping are rotated according to the corresponding rotation angle control parameters, so that the repeated feeling brought to the original mapping by the orderly arrangement of the tiling maps can be eliminated by the embodiment of the invention under the condition of only occupying a small amount of storage space and computing resources, the repeated target mapping is eliminated, and the picture rendering effect is improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute the steps in any of the map processing methods provided in the embodiments of the present application. For example, the computer program may perform the steps of:
acquiring an original map which needs to be subjected to repeated elimination processing, wherein the original map is obtained by tiling at least one tiled map;
determining UV coordinates of each tiled map in the original map;
acquiring a rotation angle control parameter of each tiled map in the original map;
and rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinate to obtain the target map with the duplication eliminated.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
acquiring a first noise mapping;
and based on the first noise UV information of the first noise map and the target UV information of the target map, fusing the texture in the first noise map into the target map to obtain the processed target map.
In some embodiments, rotating each tile map in the original map based on the rotation angle control parameter and the UV coordinates to obtain a target map with removed duplicates includes:
multiplying the UV coordinates of each tiled mapping with the corresponding rotation angle control parameters to obtain transformed UV coordinates of each tiled mapping;
and mapping the transformed UV coordinates of each tiled map in the original map into rotated UV coordinates according to the coordinate mapping relation corresponding to the map rotation processing, so as to obtain the target map with the duplication eliminated.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
obtaining a hue mask map of the target map, wherein the hue mask map comprises a mask area and a non-mask area, and the transparency of the non-mask area is greater than that of the mask area;
determining a hue adjustable region corresponding to a non-mask region and a mask region with the transparency larger than zero in the hue mask map in the target map;
and obtaining hue adjustment parameters, and performing hue adjustment on the hue adjustable area according to the hue adjustment parameters to obtain a target chartlet after hue processing.
In some embodiments, obtaining a hue mask map of a target map comprises:
acquiring a second noise mapping and a transparency control parameter of the target mapping;
determining a mask region and a non-mask region in the second noise map based on a second noise UV coordinate of the second noise map;
and setting the transparency of the mask area and the non-mask area in the second noise mapping according to the transparency control parameter to obtain the hue mask mapping.
In some embodiments, the method for processing a map provided in the embodiments of the present invention further includes:
acquiring a saturation masking map of the target map, wherein the saturation masking map comprises a masking region and a non-masking region, and the transparency of the non-masking region is greater than that of the masking region;
determining a saturation adjustable region corresponding to a non-mask region and a mask region with the transparency larger than zero in the saturation mask map in the target map;
and acquiring a saturation adjusting parameter, and adjusting the saturation of the saturation adjustable area according to the saturation adjusting parameter to obtain a target map after saturation processing.
In some embodiments, obtaining a saturation mask map of a target map comprises:
acquiring a third noise mapping and a transparency control parameter of the target mapping;
determining a mask area and a non-mask area in the third noise mapping based on a third noise UV coordinate of the third noise mapping;
and setting the transparency of the mask area and the non-mask area in the third noise mapping according to the transparency control parameter to obtain a saturation mask mapping.
In some embodiments, before obtaining an original map that needs to be subjected to duplicate elimination processing, the map processing method provided in the embodiments of the present invention further includes:
acquiring tiled pictures of at least two different materials;
and randomly and continuously tiling the tiled pictures of different materials to obtain the original pictures which need to be subjected to repeated elimination treatment.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
determining the material corresponding to each tiled map in the target map;
and carrying out random fluctuation treatment on each tiled map in the target map based on the material corresponding to the tiled map to obtain the fluctuated target map.
In some embodiments, the map processing method provided in the embodiments of the present invention further includes:
obtaining scaling parameters required by an original map;
before each tile map in the original map is rotated based on the rotation angle control parameter and the UV coordinate to obtain a target map from which repetition is eliminated, the map processing method provided by the embodiment of the present invention further includes:
and carrying out scaling treatment on the UV coordinates of each tiled map in the original map based on the scaling parameters to obtain the scaled UV coordinates.
The scheme can obtain an original chartlet needing repeated elimination processing, wherein the original chartlet is obtained by tiling at least one tile chartlet, determining the UV coordinates of each tile chartlet in the original chartlet, obtaining the rotation angle control parameter of each tile chartlet in the original chartlet, and rotating each tile chartlet in the original chartlet based on the rotation angle control parameter and the UV coordinates to obtain a target chartlet after the repetition is eliminated; in the embodiment of the invention, the tiling chartlets in the original chartlet are rotated according to the corresponding rotation angle control parameters, so that the embodiment of the invention can eliminate the repeated feeling brought to the original chartlets by orderly arranging the tiling chartlets under the condition of only occupying a small amount of storage space and computing resources, obtain the target chartlets with the repeated elimination, and improve the picture rendering effect.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any of the map processing methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the map processing methods provided in the embodiments of the present application can be achieved, and for details, the steps are not described again in the foregoing embodiments.
The method, the apparatus, the storage medium, and the computer device for processing a map provided by the embodiments of the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (13)
1. A map processing method is characterized by comprising the following steps:
acquiring an original map needing repeated elimination, wherein the original map is obtained by tiling at least one tiled map;
determining UV coordinates of each tiled map in the original map;
acquiring a rotation angle control parameter of each tiled map in the original map;
and rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinates to obtain a target map with the duplication eliminated.
2. The map processing method according to claim 1, wherein the method further comprises:
acquiring a first noise mapping;
and fusing the texture in the first noise mapping into the target mapping based on the first noise UV information of the first noise mapping and the target UV information of the target mapping to obtain the processed target mapping.
3. The method according to claim 1, wherein the rotating each of the tiled maps in the original map based on the rotation angle control parameter and the UV coordinates to obtain a target map with removed duplicates comprises:
multiplying the UV coordinates of each tiled mapping with the corresponding rotation angle control parameters to obtain transformed UV coordinates of each tiled mapping;
and mapping the transformed UV coordinates of each tiled map in the original map into rotated UV coordinates according to the coordinate mapping relation corresponding to the map rotation processing, so as to obtain the target map with the duplication eliminated.
4. The map processing method according to claim 1, wherein the method further comprises:
obtaining a hue mask map of the target map, wherein the hue mask map comprises a mask region and a non-mask region, and the transparency of the non-mask region is greater than that of the mask region;
determining a hue adjustable region corresponding to a non-mask region in the hue mask map and a mask region with the transparency larger than zero in the target map;
and obtaining hue adjustment parameters, and performing hue adjustment on the hue adjustable area according to the hue adjustment parameters to obtain a target chartlet after hue processing.
5. The method of claim 4, wherein the obtaining the hue mask map of the target map comprises:
acquiring a second noise mapping and a transparency control parameter of the target mapping;
determining a mask area and a non-mask area in the second noise mapping based on a second noise UV coordinate of the second noise mapping;
and setting the transparency of the mask area and the non-mask area in the second noise mapping according to the transparency control parameter to obtain the hue mask mapping.
6. The map processing method according to claim 1, wherein the method further comprises:
acquiring a saturation masking map of the target map, wherein the saturation masking map comprises a masking region and a non-masking region, and the transparency of the non-masking region is greater than that of the masking region;
determining a saturation adjustable region corresponding to a non-mask region in the saturation mask map and a mask region with the transparency larger than zero in the target map;
and acquiring a saturation adjusting parameter, and adjusting the saturation of the saturation adjustable area according to the saturation adjusting parameter to obtain a target map after saturation processing.
7. The map processing method of claim 6, wherein said obtaining a saturation mask map of the target map comprises:
acquiring a third noise mapping and a transparency control parameter of the target mapping;
determining a masked region and a non-masked region in the third noise map based on a third noise UV coordinate of the third noise map;
and setting the transparency of the mask area and the non-mask area in the third noise mapping according to the transparency control parameter to obtain a saturation mask mapping.
8. The method of claim 1, wherein before obtaining the original map that requires duplicate elimination, the method further comprises:
acquiring tiled pictures of at least two different materials;
and randomly and continuously tiling the tiled pictures of different materials to obtain the original pictures to be subjected to repeated elimination.
9. The map processing method according to claim 8, wherein the method further comprises:
determining the material corresponding to each tiled map in the target map;
and carrying out random fluctuation treatment on each tiled map in the target map based on the material corresponding to the tiled map to obtain the target map after fluctuation treatment.
10. The map processing method according to claim 1, wherein the method further comprises:
obtaining scaling parameters required by the original map;
before the step of rotating each of the tiled maps in the original map based on the rotation angle control parameter and the UV coordinate to obtain a target map from which repetition is eliminated, the method further includes:
and carrying out scaling treatment on the UV coordinates of each tiled map in the original map based on the scaling parameters to obtain scaled UV coordinates.
11. A map processing apparatus, characterized by comprising:
the device comprises an original map obtaining unit, a repeated elimination processing unit and a repeated elimination processing unit, wherein the original map obtaining unit is used for obtaining an original map needing repeated elimination processing, and the original map is obtained by tiling at least one tiled map;
the UV coordinate determination unit is used for determining the UV coordinates of each tiled map in the original map;
the parameter acquisition unit is used for acquiring a rotation angle control parameter of each tiled map in the original map;
and the map rotating unit is used for rotating each tiled map in the original map based on the rotation angle control parameter and the UV coordinate to obtain a target map with the duplication eliminated.
12. A computer device comprising a memory and a processor; the memory stores an application program, and the processor is configured to execute the application program in the memory to perform the steps of the map processing method according to any one of claims 1 to 10.
13. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the map processing method according to any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211238095.1A CN115564884A (en) | 2022-10-10 | 2022-10-10 | Map processing method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211238095.1A CN115564884A (en) | 2022-10-10 | 2022-10-10 | Map processing method and device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115564884A true CN115564884A (en) | 2023-01-03 |
Family
ID=84744241
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211238095.1A Pending CN115564884A (en) | 2022-10-10 | 2022-10-10 | Map processing method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115564884A (en) |
-
2022
- 2022-10-10 CN CN202211238095.1A patent/CN115564884A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113052947B (en) | Rendering method, rendering device, electronic equipment and storage medium | |
CN112053423A (en) | Model rendering method and device, storage medium and computer equipment | |
CN112750190B (en) | Three-dimensional thermodynamic diagram generation method, device, equipment and storage medium | |
CN113546411B (en) | Game model rendering method, device, terminal and storage medium | |
CN112370783A (en) | Virtual object rendering method and device, computer equipment and storage medium | |
CN112465945A (en) | Model generation method and device, storage medium and computer equipment | |
CN112634155B (en) | Image processing method, device, electronic equipment and storage medium | |
CN112116681A (en) | Image generation method and device, computer equipment and storage medium | |
CN117455753B (en) | Special effect template generation method, special effect generation device and storage medium | |
CN117274475A (en) | Halo effect rendering method and device, electronic equipment and readable storage medium | |
CN115222867A (en) | Overlap detection method, overlap detection device, electronic equipment and storage medium | |
CN115564884A (en) | Map processing method and device, computer equipment and storage medium | |
CN115409928A (en) | Water body effect rendering method and device, electronic equipment and storage medium | |
CN113350792A (en) | Contour processing method and device for virtual model, computer equipment and storage medium | |
CN117274432B (en) | Method, device, equipment and readable storage medium for generating image edge special effect | |
CN113362348B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN115712427A (en) | Rectangular control rendering method and device, electronic equipment and storage medium | |
CN117726722B (en) | Special effect generation method, device and equipment for video image and readable storage medium | |
CN114972701A (en) | Method and device for determining post-processing area, computer equipment and storage medium | |
CN115393495A (en) | Texture processing method and device for virtual model, computer equipment and storage medium | |
CN117876515A (en) | Virtual object model rendering method and device, computer equipment and storage medium | |
CN117593391A (en) | Image processing method, device, computer equipment and storage medium | |
CN114419237A (en) | Map processing method and device, computer equipment and storage medium | |
CN115761066A (en) | Animation effect generation method and device for mosaic particles, storage medium and equipment | |
CN118535113A (en) | Image element display method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |