CN108154543A - Determine the method, apparatus and storage medium of game textures size - Google Patents
Determine the method, apparatus and storage medium of game textures size Download PDFInfo
- Publication number
- CN108154543A CN108154543A CN201810035375.XA CN201810035375A CN108154543A CN 108154543 A CN108154543 A CN 108154543A CN 201810035375 A CN201810035375 A CN 201810035375A CN 108154543 A CN108154543 A CN 108154543A
- Authority
- CN
- China
- Prior art keywords
- model
- tested
- map
- texture
- color
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000000694 effects Effects 0.000 claims abstract description 124
- 238000013507 mapping Methods 0.000 claims abstract description 29
- 239000003086 colorant Substances 0.000 claims description 27
- 230000003068 static effect Effects 0.000 claims description 23
- 238000004590 computer program Methods 0.000 claims description 3
- 238000012360 testing method Methods 0.000 abstract description 29
- 238000010586 diagram Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 239000000463 material Substances 0.000 description 3
- 238000002360 preparation method Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000007781 pre-processing Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002860 competitive effect Effects 0.000 description 1
- 230000007123 defense Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 208000015041 syndromic microphthalmia 10 Diseases 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
- Processing Or Creating Images (AREA)
- Pinball Game Machines (AREA)
Abstract
The present invention provides a kind of method, apparatus and storage medium of determining game textures size, and this method includes:Obtain debugging texture mapping;The color map of model to be tested is replaced with into debugging texture mapping;The all angles of model to be tested in the scene are traversed, the corresponding grain effect atlas of model to be tested is obtained according to debugging texture mapping;According to grain effect atlas, the corresponding game textures size of model to be tested is determined.The present invention can greatly save testing time and manpower.
Description
Technical Field
The invention relates to the technical field of games, in particular to a method, a device and a storage medium for determining the size of a game map.
Background
With the popularization of mobile devices, players increasingly demand image quality and model definition of online games. In the network game, the models mostly exist in the form of game maps, and the bigger the size of the game map is, the higher the definition of the network game seen by the player at the mobile device end is, but the problems of resource waste and overlarge memory occupation are correspondingly brought. Therefore, it is important to find the proper size of the game map for each model.
To achieve the above objective, in the process of making a game map, a game map with the largest size as possible is first made, and then the game map is reduced by one level (for example, the size of the game map is reduced from 1024 × 1024 to 512 × 512), and whether the definition of the game map with the lower level presented on each resolution device is acceptable is manually tested. If so, attempts to lower the level continue until the game map of the current level is rendered less legible. At this time, the game map size of the level immediately above the current level is used as the game map size corresponding to the model.
However, the prior art solution for determining the size of the game map requires a lot of time and labor.
Disclosure of Invention
The invention provides a method, a device and a storage medium for determining the size of a game map, which are used for determining the size of the game map in a time-saving and labor-saving manner.
In a first aspect, the present invention provides a method of determining a size of a game map, the method comprising: acquiring a debugging texture map; replacing the color map of the model to be tested with a debugging texture map; traversing each angle of the model to be tested in the scene, and obtaining a texture effect atlas corresponding to the model to be tested according to the debugging texture mapping; and determining the game mapping size corresponding to the model to be tested according to the texture effect atlas.
In a second aspect, the present invention provides an apparatus for determining a size of a game map, the apparatus comprising: the acquisition module is used for acquiring a debugging texture map; the replacing module is used for replacing the color map of the model to be tested with the debugging texture map; the traversing module is used for traversing each angle of the model to be tested in the scene and obtaining a texture effect atlas corresponding to the model to be tested according to the debugging texture mapping; and the determining module is used for determining the game mapping size corresponding to the model to be tested according to the texture effect atlas.
In a third aspect, the present invention provides an electronic device comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method as described in the first aspect via execution of the executable instructions.
In a fourth aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect.
The invention provides a method, a device and a storage medium for determining the size of a game map, which at least have the following beneficial effects:
the method has the advantages that the texture effect atlas corresponding to the model to be tested is obtained according to the debugging texture atlas by traversing all angles of the model to be tested in a scene, the texture effect atlas is obtained automatically, the size of the game atlas corresponding to the model to be tested is determined according to the texture effect atlas, compared with the prior art that the definition of the model to be tested using the game atlas of a certain size is checked by manpower angle by angle, the testing time and manpower can be greatly saved, and the game atlas making efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart of a method for determining a size of a game map according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for determining a size of a game map according to another embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for determining a size of a game map according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an apparatus for determining a size of a game map according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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 terms "first," "second," and the like in the description, in the claims, and in the above-described figures of the embodiments of the invention are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, some terms related to the present invention will be described.
Mipmap (Mipmap), one of the most widely used texture mapping techniques at present, is used to achieve the stereoscopic effect in two-dimensional alternatives to three-dimensional images. The map is processed into a file consisting of a series of pre-computed and optimized pictures, such a map may store a mipmap hierarchy.
mipmaps are combined with texture mapping techniques to represent a single texture in multiple images at different resolutions, depending on the distance from the viewer: the largest size image is placed at a prominent position in front, while the relatively smaller image is backed to the background area. Each of the different size levels is defined as a mipmap level. mipmaps help to avoid unwanted jagged edges (called jagged patterns) from appearing in the image, which may result from using a bit map image at different resolutions.
For example: when the object moves close to a viewer, the equipment can stick a finer material pattern with higher definition on the surface of the object, so that the object presents higher-layer and more real effects; when the object is far away from the viewer, the equipment can be pasted with a material pattern which is simple and has lower definition, and the overall efficiency of graphic processing is further improved.
In determining the size of the game map corresponding to the model, the prior art is a way to manually try out repeatedly whether the definition of the game map at different levels presented on each resolution device is acceptable. This prior art requires a lot of time and labor. In view of the above, the invention provides a method for determining the size of a game map, which is characterized in that a texture effect atlas corresponding to a model to be tested is obtained by debugging the texture map and traversing all angles in a scene, so that the texture effect atlas is automatically obtained, the size of the game map is determined according to the texture effect atlas, the testing time and the labor force can be greatly saved, and the game map making efficiency is improved.
FIG. 1 is a flowchart of a method for determining a size of a game map according to an embodiment of the present invention. The execution main body of the method can be a background server of the game software/client, or a terminal installed by the game software/client, but is not limited to this. Examples of the terminal include a desktop computer, a notebook, a Personal Digital Assistant (PDA), a smart phone, a tablet computer, and a game machine. In this embodiment, a terminal is used as an execution main body for description, and the execution manner of the server is similar, which is not described herein again.
Specifically, the tester may download game software to be installed to the terminal, and play the game by operating the virtual object on the terminal. It is understood that the game software herein includes, but is not limited to, a test version of game software, and may also be a released version of a game.
As shown in fig. 1, the method of the present embodiment includes:
s101, obtaining a debugging texture map.
The debugging texture map can be preset by a user according to actual conditions, and the debugging texture map can be composed of a plurality of maps representing different resolution sizes. The debugging texture map can be set and obtained through various image processing tools, which is not described in detail in this embodiment.
Taking the mipmap debugging texture map as an example, the debugging texture map comprises a mipmap level, which is determined according to the device resolution.
With the same game resolution, the higher the device resolution, the higher the mipmap level required, i.e., the higher the size requirement of the game map. Therefore, when the mipmap level of the game map required by the model is tested on a high-resolution device, the width and the height of the mipmap level can be used as the size of the game map corresponding to the final model.
It will be appreciated that the debug texture map is a map in dds format. The debugging texture map can be generated by using Visual Studio software or PhotoShop software, and the generation process of the debugging texture map is described by taking the Visual Studio software as an example.
An dds file is newly created in Visual Studio software, and a debugging texture map is gradually generated. The mipmap levels, the size of the representation of each mipmap level, the color of the representation of each mipmap level, and the like may be customized. Wherein different mipmap levels represent different sizes, and the representative colors of the mipmap levels are different.
For example, red represents level 1 of the mipmap hierarchy, indicating a size of 1024 × 1024; green represents the 2 nd level of the mipmap hierarchy, representing a size of 512 x 512; blue represents level 3 of the mipmap hierarchy, representing a size of 256 × 256; … …, respectively; the cyan color represents the 11 th level of the mipmap hierarchy and represents a size of 1 × 1, as shown in table 1.
TABLE 1
mipmap hierarchy | Width and height | Representative color |
1 | 1024 | Red colour |
2 | 512 | Green colour |
3 | 256 | Blue color |
…… | …… | …… |
11 | 1 | Bluish green |
After each mipmap level has set the corresponding representative color and size (i.e., width and height), generating mipmap, i.e., a dds-formatted debug texture map for testing may be generated, herein named, for example, Mip _ test _ env. Dds can be opened using Photoshop software.
In the subsequent use process, when the mipmap level and the corresponding dimension are not changed, the mipmap level and the corresponding dimension are directly obtained from the storage position of the debugging texture map, and the debugging texture map does not need to be regenerated every time.
S102, replacing the color map of the model to be tested with a debugging texture map.
In particular, the model may correspond to multiple maps, such as a color map, a normal map, and a highlight map. For the model to be tested, the debug texture map is used to replace its color map in preparation for the subsequent execution of S103.
When implemented, this step may be handled by the scripting layer. Still taking mip _ test _ env.dds generated in S101 as an example, put mip _ test _ env.dds under a path where a color map resource of a model to be tested is located. And calling a mapping replacing interface set _ texture at a function interface of the loading model, wherein the interface receives two input parameters, the first parameter is a color mapping of the model to be tested, and the second parameter is a debugging texture mapping. Corresponding to the game client code, the map replacing interface is, for example: model, all _ materials, set _ texture ("Tex 0", "mip _ test _ env.dds").
S103, traversing each angle of the model to be tested in the scene, and obtaining a texture effect atlas corresponding to the model to be tested according to the debugging texture mapping.
And in the scene, automatically traversing each angle of the model to be tested in the scene by using the debugging texture mapping to obtain a texture effect atlas corresponding to the model to be tested, namely a set of texture effect atlases corresponding to the model to be tested at each angle in the scene.
The model to be tested comprises a dynamic test model and a static test model. Illustratively, dynamic test models include hero, big and small dragon, super soldier, monster, and the like; the static test model comprises a defense tower, stones, a grass, a fence and the like. For the dynamic test model and the static test model, the specific implementation of this step is different, and reference may be made to the subsequent embodiments, which are not described herein again.
And S104, determining the game mapping size corresponding to the model to be tested according to the texture effect atlas.
Because the texture effect atlas contains texture effect maps of the model to be tested at all angles in the scene, and the texture effect maps are obtained according to the debugging texture maps, and the debugging texture maps comprise mipmap levels, the size of the game map corresponding to the model to be tested can be determined according to the color presented by the texture effect maps.
Illustratively, if a texture effect map has a main portion occupied by red (level 1 of the mipmap hierarchy, 1024 × 1024), the size of the game map is determined to be 1024 × 1024.
Alternatively, for the same game, at a device resolution of 1280 × 720, green (level 2 of mipmap level, 512 × 512) in the texture effect map occupies the major part; at a device resolution of 2048 × 1536, where red (level 1 of the mipmap level, 1024 × 1024) occupies the major part of the texture effect map, the game map size is determined to be 1024 × 1024.
In the embodiment, the texture effect atlas corresponding to the model to be tested is obtained according to the debugging texture atlas by traversing each angle of the model to be tested in the scene, so that the texture effect atlas is automatically obtained, and then the size of the game atlas corresponding to the model to be tested is determined according to the texture effect atlas.
In the above embodiments, the debug texture map is composed of a plurality of maps of different colors, where each color represents a level of resolution. Optionally, S104, determining, according to the texture effect atlas, a game map size corresponding to the model to be tested, which may specifically be: acquiring the color ratio of each texture effect image in the texture effect image set; and determining the size of the game map corresponding to the model to be tested according to the color ratio of each texture effect map. The color proportion of each texture effect image in the texture effect image set can be obtained through a one-key processing tool.
In one implementation, the determining, according to the color ratios of the texture effect maps, a size of the game map corresponding to the model to be tested may include: obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph; and for each color, when the average color proportion corresponding to the current color is larger than the preset value corresponding to the current color, determining the size corresponding to the current color as the game chartlet size corresponding to the model to be tested.
In the implementation mode, from the color perspective, firstly, the color average proportion corresponding to each color is determined, then, the color average proportion is compared with the size of the corresponding preset value, and when the color average proportion is larger than the preset value corresponding to the current color, the size corresponding to the current color is determined to be the game chartlet size corresponding to the model to be tested.
Optionally, when the average color ratios corresponding to the plurality of colors are greater than the preset values corresponding to the colors, determining the size corresponding to the color as the game map size corresponding to the model to be tested may include: and determining the maximum size in the sizes corresponding to each color in the plurality of colors as the game chartlet size corresponding to the model to be tested.
For example, still taking the mipmap level information of mip _ test _ env.dds as an example, when the average color ratios corresponding to red are all greater than the preset value corresponding to red, and the average color ratios corresponding to green are all greater than the preset value corresponding to green, since the size corresponding to red is 1024 × 1024 and the size corresponding to green is 512 × 512, 1024 × 1024 is determined as the game map size corresponding to the model to be tested.
In another implementation, the determining the size of the game map corresponding to the model to be tested according to the color ratios of the texture effect maps may include: obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph; and according to the sequence of sizes from large to small, when the average proportion of the colors corresponding to the current size is larger than the preset value corresponding to the colors, determining that the current size is the game chartlet size corresponding to the model to be tested.
In the implementation mode, from the aspect of size, according to the sequence of size from large to small, the average color proportion corresponding to the current size is compared with the preset value corresponding to the color, when the average color proportion corresponding to the current size is larger than the preset value corresponding to the color, the current size is determined to be the game chartlet size corresponding to the model to be tested, and other sizes smaller than the current size are not considered.
It should be noted that, in the texture effect map set corresponding to the model to be tested, the color ratios calculated according to each texture effect map may be different, and therefore, the average color ratio corresponding to each color is calculated. For example, the average color ratio corresponding to red is that if 100 texture effect maps exist in the texture effect map set, the average color ratio corresponding to red is obtained by dividing the sum of the ratios of red in each texture effect map by 100; in addition, the sum of preset values corresponding to all colors related to the texture effect atlas is 1.
In conclusion, the game mapping size corresponding to the model to be tested is determined according to the color proportion of each texture effect graph, and quantifiable objective data is used for replacing pure subjective judgment, so that the reliability of the determined game mapping size can be obviously improved, further, the resource waste caused by the large game mapping size is avoided, and the memory occupation brought by the game mapping corresponding to the model to be tested is reduced.
Further, for the static model to be tested, S103, traversing each angle of the model to be tested in the scene, and obtaining a texture effect atlas corresponding to the model to be tested according to the debug texture map may include: and controlling the virtual camera to move to traverse the scene, obtaining texture effect graphs of the static model to be tested at all angles, and obtaining a texture effect graph set corresponding to the static model to be tested.
A virtual camera, i.e. a virtual device that captures an image displayed in the screen of the device. The moving step length of the virtual camera is a first preset value, and the obtaining frequency of the texture effect graph is a second preset value. Illustratively, the set scene is a square area of 500 × 500, the first preset value is 40, and the second preset value is 0.1 second. It should be noted that, the sizes of the first preset value and the second preset value mentioned herein are set according to actual requirements, as long as the texture effect graph of the model to be tested at multiple angles as far as possible can be captured, and the invention is not limited to the specific values thereof.
Because the distance between the static test model and the virtual camera is always changed, the texture effect atlas corresponding to the static test model comprises texture effect maps of the virtual camera and the static test model at different distances and at multiple angles.
FIG. 2 is a flowchart of a method for determining a size of a game map according to another embodiment of the present invention. As shown in fig. 2, on the basis of the process shown in fig. 1, S103 traverses each angle of the model to be tested in the scene, and obtains a texture effect atlas corresponding to the model to be tested according to the debug texture map, before that, the method for determining the size of the game map may further include the following steps to set the test scene:
s201, setting the background color of the scene to be black or white.
The purpose of this step is to facilitate the acquisition of the subsequent texture effect map (screen capture of the device screen area), and to facilitate the rapid and accurate extraction of the color ratios of the colors in the texture effect map from the black background or the white background.
The black pixel value is 0, the white pixel value is 255, and the pixel values of other colors are all between 0 and 255. Therefore, the background color of the scene is set to black or white. The color proportion is the proportion of the pixel number of a certain color to all the pixel numbers of the current texture effect map.
In addition, considering that the probability that the representative color corresponding to the mipmap level in the debug texture map uses black is almost zero, the background color of the scene can be set to black.
S202, removing the graphical user interface.
Wherein, any one or more of an operation control, a skill release control and a skill description interface are arranged on the graphical user interface.
Since the graphical user interface is overlaid on the model to be tested as seen on the device screen, the graphical user interface needs to be removed when setting up the test scenario.
And S203, determining a coordinate area of the scene corresponding to the virtual camera.
This step is to acquire input parameters of the screen capture interface, and is to prepare for S103.
And providing a test scene for determining the game map size corresponding to the static test model through the steps.
The above steps are executed before S103, and are performed in the order of S101 and S102. The invention is not limited.
Optionally, S201, setting the background color of the scene to be black or white, before, may further include: all static model objects within the scene are acquired and stored. The static model objects are the subsequent static test models. For example, this step may be specifically obtained by calling an engine (e.g., a Neox engine) interface to all model objects in the scene, and stored in the dictionary.
For the dynamic model to be tested, S103, traversing each angle of the model to be tested in the scene, and obtaining a texture effect atlas corresponding to the model to be tested according to the debug texture map may include: and obtaining texture effect graphs of the dynamic model to be tested at all angles, and obtaining a texture effect graph set corresponding to the dynamic model to be tested.
Specifically, for a dynamic model to be tested, such as hero, the screen of the terminal always follows hero, so that the distance between hero and the screen is constant, and at this time, a tester can control the hero to convert the angle through the rocker control so as to obtain texture effect maps of hero at different angles, and obtain a texture effect map set corresponding to hero.
Illustratively, the mipmap level of the debug texture map is 10, level 1 is 512 × 512, representing a red color; level 2 is 256 × 256, representing a color green; level 3 is 128 × 128, representing a color of blue; grade 4 is 64 × 64, representing a purple color; … … are provided. The device resolutions are 1280 × 720 and 2048 × 1536, respectively. Based on the debugging texture map and the equipment resolution, the Yingxiong boxing king in the MOBA game (multiplayer online tactical competitive game) is tested.
The test result shows that: on a device with a device resolution of 1280 × 720, the texture effect map is mostly green (256 × 256), blue (128 × 128), purple (64 × 64), and even a considerable part of the texture effect map is purple; on a device with a resolution of 2048 × 1536, the texture effect map is mainly composed of red (512 × 512) and green (256 × 256). Since the red area of the boxing king has a certain ratio, the corresponding game map size is determined to be 512 × 512.
And finally, comparing the determined game mapping size with the game mapping size actually used in the current game, and feeding back the corresponding game mapping size of the model to be tested which needs to be optimized and adjusted to the corresponding program and the corresponding art.
The following is an embodiment of the apparatus of the present invention, which can be used to implement the above-mentioned embodiment of the method of the present invention, and the implementation principle and technical effects are similar.
Fig. 3 is a schematic structural diagram of an apparatus for determining a size of a game map according to an embodiment of the present invention. As shown in fig. 3, the apparatus 30 for determining the size of a game map of the present embodiment may include: an acquisition module 31, a replacement module 32, a traversal module 33, and a determination module 34. Wherein,
the obtaining module 31 is configured to obtain a debug texture map.
The replacing module 32 is used for replacing the color map of the model to be tested with the debugging texture map.
The traversing module 33 is configured to traverse each angle of the model to be tested in the scene, and obtain a texture effect atlas corresponding to the model to be tested according to the debugging texture map.
The determining module 34 is configured to determine, according to the texture effect atlas, a game map size corresponding to the model to be tested.
The device of this embodiment acquires the texture effect atlas that the model that awaits measuring corresponds according to debugging texture atlas through traversing each angle of the model that awaits measuring in the scene to the automatic texture effect atlas that acquires, and then confirms the game map size that the model that awaits measuring corresponds according to this texture effect atlas, compares prior art and looks over the mode of the definition when the model that awaits measuring uses the game map of certain size through artifical angle by angle, can save test time and manpower greatly, promotes game map preparation efficiency.
Optionally, the determining module 34 may be specifically configured to: acquiring the color ratio of each texture effect image in the texture effect image set; and determining the size of the game map corresponding to the model to be tested according to the color ratio of each texture effect map.
Further, in one implementation, the debug texture map is comprised of a plurality of maps of different colors, wherein each color represents a level of resolution. The determining module 34 is configured to, when determining the size of the game map corresponding to the model to be tested according to the color ratio of each texture effect map, specifically: obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph; and for each color, when the average color proportion corresponding to the current color is larger than the preset value corresponding to the current color, determining the size corresponding to the current color as the game chartlet size corresponding to the model to be tested.
On the above basis, when the average color ratios corresponding to a plurality of colors are all greater than the preset values corresponding to the colors, the determining module 34 is configured to: and determining the maximum size in the sizes corresponding to each color in the plurality of colors as the game chartlet size corresponding to the model to be tested.
In another implementation manner, the determining module 34 is configured to, when determining the size of the game map corresponding to the model to be tested according to the color ratio of each texture effect map, specifically: obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph; and according to the sequence of sizes from large to small, when the average proportion of the colors corresponding to the current size is larger than the preset value corresponding to the colors, determining that the current size is the game chartlet size corresponding to the model to be tested.
Optionally, the model to be tested comprises a static model to be tested. At this time, the traversal module 33 is specifically configured to: and controlling the virtual camera to move to traverse the scene, obtaining texture effect graphs of the static model to be tested at all angles, and obtaining a texture effect graph set corresponding to the static model to be tested. The moving step length of the virtual camera is a first preset value, and the obtaining frequency of the texture effect graph is a second preset value.
Optionally, the model to be tested comprises a dynamic model to be tested. At this time, the traversal module 33 is specifically configured to: and obtaining texture effect graphs of the dynamic model to be tested at all angles, and obtaining a texture effect graph set corresponding to the dynamic model to be tested.
Fig. 4 is a schematic structural diagram of an apparatus for determining a size of a game map according to another embodiment of the present invention. As shown in fig. 4, the apparatus 40 for determining the size of a game map based on the structure shown in fig. 3 further includes: a pre-processing module 41.
The preprocessing module 41 is configured to set a background color of the scene to be black or white before the traversing module 33 traverses each angle of the model to be tested in the scene and obtains the texture effect atlas corresponding to the model to be tested according to the debugging texture map; removing the graphical user interface; and determining a coordinate area of a scene corresponding to the virtual camera to provide a test scene for determining the game map size corresponding to the static test model. The graphical user interface is provided with any one or more of an operation control, a skill release control, a skill description interface and the like.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 5, the electronic device 110 of the present embodiment includes: a memory 111 and a processor 112. The memory 111 and the processor 112 may be connected by a bus.
A memory 111 for storing program instructions.
A processor 112 for implementing the following steps when the program instructions are executed:
acquiring a debugging texture map;
replacing the color map of the model to be tested with a debugging texture map;
traversing each angle of the model to be tested in the scene, and obtaining a texture effect atlas corresponding to the model to be tested according to the debugging texture mapping;
and determining the game mapping size corresponding to the model to be tested according to the texture effect atlas.
Optionally, the debug texture map is composed of a plurality of maps of different colors, wherein each color represents a level of resolution. The processor 112 is configured to, when determining the game map size corresponding to the model to be tested according to the texture effect atlas, specifically: acquiring the color ratio of each texture effect image in the texture effect image set; and determining the size of the game map corresponding to the model to be tested according to the color ratio of each texture effect map.
Optionally, the processor 112 is configured to, when determining the size of the game map corresponding to the model to be tested according to the color ratio of each texture effect map, specifically: obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph; and for each color, when the average color proportion corresponding to the current color is larger than the preset value corresponding to the current color, determining the size corresponding to the current color as the game chartlet size corresponding to the model to be tested.
Optionally, the processor 112 is configured to, for each color, when the average color proportion corresponding to the color is greater than the preset value corresponding to the color, determine that the size corresponding to the color is the game map size corresponding to the model to be tested, specifically: and when the average color ratios corresponding to the plurality of colors are larger than the preset values corresponding to the colors, determining the maximum size in the sizes corresponding to each color in the plurality of colors as the game chartlet size corresponding to the model to be tested.
Optionally, the processor 112 is configured to, when determining the size of the game map corresponding to the model to be tested according to the color ratio of each texture effect map, specifically: obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph; and according to the sequence of sizes from large to small, when the average proportion of the colors corresponding to the current size is larger than the preset value corresponding to the colors, determining that the current size is the game chartlet size corresponding to the model to be tested.
Optionally, the model to be tested comprises a dynamic model to be tested. In this case, the processor 112 is configured to traverse each angle of the model to be tested in the scene, and when obtaining the texture effect atlas corresponding to the model to be tested according to the debug texture map, specifically configured to: and obtaining texture effect graphs of the dynamic model to be tested at all angles, and obtaining a texture effect graph set corresponding to the dynamic model to be tested.
Optionally, the model to be tested comprises a static model to be tested. At this time, the processor 112 is configured to traverse each angle of the model to be tested in the scene, and when obtaining the texture effect atlas corresponding to the model to be tested according to the debug texture map, specifically configured to: and controlling the virtual camera to move to traverse the scene, obtaining texture effect graphs of the static model to be tested at all angles, and obtaining a texture effect graph set corresponding to the static model to be tested. The moving step length of the virtual camera is a first preset value, and the obtaining frequency of the texture effect graph is a second preset value.
Optionally, the processor 112 is configured to traverse each angle of the model to be tested in the scene, and before obtaining the texture effect atlas corresponding to the model to be tested according to the debug texture map, further configured to: setting the background color of the scene as black or white; removing a graphical user interface, wherein any one or more of an operation control, a skill release control, a skill description interface and the like are arranged on the graphical user interface; and determining a coordinate area of the scene corresponding to the virtual camera.
The device of this embodiment acquires the texture effect atlas that the model that awaits measuring corresponds according to debugging texture atlas through traversing each angle of the model that awaits measuring in the scene to the automatic texture effect atlas that acquires, and then confirms the game map size that the model that awaits measuring corresponds according to this texture effect atlas, compares prior art and looks over the mode of the definition when the model that awaits measuring uses the game map of certain size through artifical angle by angle, can save test time and manpower greatly, promotes game map preparation efficiency.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media capable of storing program codes, such as Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk, or optical disk.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (11)
1. A method of determining a game map size, the method comprising:
acquiring a debugging texture map;
replacing the color map of the model to be tested with the debugging texture map;
traversing each angle of the model to be tested in the scene, and obtaining a texture effect atlas corresponding to the model to be tested according to the debugging texture mapping;
and determining the game mapping size corresponding to the model to be tested according to the texture effect atlas.
2. The method of claim 1, wherein the commissioning texture map is comprised of a plurality of maps of different colors, wherein each color represents a resolution level, and wherein determining the game map size for the model to be tested based on the texture effect map set comprises:
acquiring the color ratio of each texture effect image in the texture effect image set;
and determining the game mapping size corresponding to the model to be tested according to the color ratio of each texture effect graph.
3. The method of claim 2, wherein determining the game map size corresponding to the model to be tested according to the color ratio of each texture effect map comprises:
obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph;
and for each color, when the average color proportion corresponding to the current color is larger than a preset value corresponding to the current color, determining the size corresponding to the current color as the game chartlet size corresponding to the model to be tested.
4. The method of claim 3, wherein when the average color ratios corresponding to a plurality of colors are greater than the preset value corresponding to the color, the determining the size corresponding to the color as the game map size corresponding to the model to be tested comprises:
and determining the maximum size in the sizes corresponding to each color in the plurality of colors as the game chartlet size corresponding to the model to be tested.
5. The method of claim 2, wherein determining the game map size corresponding to the model to be tested according to the color ratio of each texture effect map comprises:
obtaining the average color ratio corresponding to each color according to the color ratio of each texture effect graph;
and according to the sequence of sizes from large to small, when the average proportion of colors corresponding to the current size is larger than a preset value corresponding to the colors, determining the current size as the size of the game map corresponding to the model to be tested.
6. The method according to any one of claims 1 to 5, wherein the model to be tested comprises a static model to be tested, the traversing the model to be tested from each angle in the scene to obtain the texture effect atlas corresponding to the model to be tested according to the debugging texture map comprises:
controlling a virtual camera to move to traverse a scene, obtaining texture effect graphs of the static model to be tested at all angles, and obtaining a texture effect graph set corresponding to the static model to be tested;
the moving step length of the virtual camera is a first preset value, and the obtaining frequency of the texture effect graph is a second preset value.
7. The method of claim 6, wherein before traversing the angles of the model to be tested in the scene and obtaining the texture effect atlas corresponding to the model to be tested according to the debugging texture map, the method further comprises:
setting the background color of the scene to be black or white;
removing a graphical user interface, wherein any one or more of an operation control, a skill release control and a skill description interface are arranged on the graphical user interface;
and determining a coordinate area of the virtual camera corresponding to the scene.
8. The method according to any one of claims 1 to 5, wherein the model to be tested comprises a dynamic model to be tested, and the traversing the model to be tested from various angles in a scene to obtain a texture effect atlas corresponding to the model to be tested according to the debugging texture map comprises:
and obtaining texture effect graphs of the dynamic model to be tested at all angles, and obtaining a texture effect graph set corresponding to the dynamic model to be tested.
9. An apparatus for determining dimensions of a game map, the apparatus comprising:
the acquisition module is used for acquiring a debugging texture map;
the replacing module is used for replacing the color map of the model to be tested with the debugging texture map;
the traversing module is used for traversing each angle of the model to be tested in a scene and obtaining a texture effect atlas corresponding to the model to be tested according to the debugging texture mapping;
and the determining module is used for determining the game mapping size corresponding to the model to be tested according to the texture effect atlas.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-8 via execution of the executable instructions.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810035375.XA CN108154543B (en) | 2018-01-15 | 2018-01-15 | Method, device and storage medium for determining size of game map |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810035375.XA CN108154543B (en) | 2018-01-15 | 2018-01-15 | Method, device and storage medium for determining size of game map |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108154543A true CN108154543A (en) | 2018-06-12 |
CN108154543B CN108154543B (en) | 2021-12-14 |
Family
ID=62461303
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810035375.XA Active CN108154543B (en) | 2018-01-15 | 2018-01-15 | Method, device and storage medium for determining size of game map |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108154543B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109801342A (en) * | 2018-12-06 | 2019-05-24 | 珠海西山居移动游戏科技有限公司 | The method and device of textures appropriate degree when being run in dynamic marks mobile device |
CN111127619A (en) * | 2019-12-20 | 2020-05-08 | 珠海金山网络游戏科技有限公司 | Optimization method and device based on Unity hand-trip scene map and readable medium |
CN111803952A (en) * | 2019-11-21 | 2020-10-23 | 厦门雅基软件有限公司 | Topographic map editing method and device, electronic equipment and computer readable medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101320480A (en) * | 2008-07-04 | 2008-12-10 | 浙江大学 | Real-time dynamic water surface analogy method based on GPU |
CN101795410A (en) * | 2010-03-04 | 2010-08-04 | 上海亚图软件有限公司 | Texture compression and synthesis method with fine granularity and high compression rate |
CN103035024A (en) * | 2012-12-11 | 2013-04-10 | 南京我乐我居数码科技有限公司 | Entity material quality replacement method based on three-dimensional virtual platform |
CN103500462A (en) * | 2013-10-14 | 2014-01-08 | 合肥完美世界网络技术有限公司 | Method and system for providing image of virtual game scene |
US20160086309A1 (en) * | 2014-09-22 | 2016-03-24 | Realtek Semiconductor Corp. | Image signal processing method and image signal processor |
CN106683189A (en) * | 2016-11-29 | 2017-05-17 | 浙江科澜信息技术有限公司 | Method of rendering text in three-dimensional scene |
CN106815131A (en) * | 2016-12-27 | 2017-06-09 | 珠海金山网络游戏科技有限公司 | A kind of game resource inspection method and system based on Unity engines |
-
2018
- 2018-01-15 CN CN201810035375.XA patent/CN108154543B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101320480A (en) * | 2008-07-04 | 2008-12-10 | 浙江大学 | Real-time dynamic water surface analogy method based on GPU |
CN101795410A (en) * | 2010-03-04 | 2010-08-04 | 上海亚图软件有限公司 | Texture compression and synthesis method with fine granularity and high compression rate |
CN103035024A (en) * | 2012-12-11 | 2013-04-10 | 南京我乐我居数码科技有限公司 | Entity material quality replacement method based on three-dimensional virtual platform |
CN103500462A (en) * | 2013-10-14 | 2014-01-08 | 合肥完美世界网络技术有限公司 | Method and system for providing image of virtual game scene |
US20160086309A1 (en) * | 2014-09-22 | 2016-03-24 | Realtek Semiconductor Corp. | Image signal processing method and image signal processor |
CN106683189A (en) * | 2016-11-29 | 2017-05-17 | 浙江科澜信息技术有限公司 | Method of rendering text in three-dimensional scene |
CN106815131A (en) * | 2016-12-27 | 2017-06-09 | 珠海金山网络游戏科技有限公司 | A kind of game resource inspection method and system based on Unity engines |
Non-Patent Citations (3)
Title |
---|
KUMAR, S等: ""Color video compression using color mapping into textured grayscale video frames"", 《PATTERN ANALYSIS AND APPLICATIONS》 * |
刘航 等: ""基于Creator/Vega的虚拟场景设计与实现"", 《计算机仿真》 * |
聂明主编: "《游戏开发导论》", 30 April 2009 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109801342A (en) * | 2018-12-06 | 2019-05-24 | 珠海西山居移动游戏科技有限公司 | The method and device of textures appropriate degree when being run in dynamic marks mobile device |
CN109801342B (en) * | 2018-12-06 | 2023-05-02 | 珠海西山居数字科技有限公司 | Method and device for dynamically identifying mapping fit degree in running process on mobile equipment |
CN111803952A (en) * | 2019-11-21 | 2020-10-23 | 厦门雅基软件有限公司 | Topographic map editing method and device, electronic equipment and computer readable medium |
CN111127619A (en) * | 2019-12-20 | 2020-05-08 | 珠海金山网络游戏科技有限公司 | Optimization method and device based on Unity hand-trip scene map and readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN108154543B (en) | 2021-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108154543B (en) | Method, device and storage medium for determining size of game map | |
CN103177475B (en) | A kind of streetscape map exhibiting method and system | |
CN107638690B (en) | Method, device, server and medium for realizing augmented reality | |
CN111111172B (en) | Surface processing method and device for game scene, processor and electronic device | |
US11288774B2 (en) | Image processing method and apparatus, storage medium, and electronic apparatus | |
JP2019091393A (en) | Point group kind estimating apparatus using red three-dimensional map image, and point group kind estimating program using red three-dimensional map image | |
CN112274934B (en) | Model rendering method, device, equipment and storage medium | |
CN109801342B (en) | Method and device for dynamically identifying mapping fit degree in running process on mobile equipment | |
CN105957133B (en) | A kind of method and apparatus for loading textures | |
CN109499067B (en) | Terrain texture drawing method and device, electronic equipment and storage medium | |
CN113144613B (en) | Model-based method for generating volume cloud | |
JP5295044B2 (en) | Method and program for extracting mask image and method and program for constructing voxel data | |
US10372571B2 (en) | Method and apparatus for testing compatibility of 3D engine | |
CN114565709A (en) | Data storage management method, object rendering method and device | |
CN109920038B (en) | Method for generating terrain mixed map material | |
CN109658360B (en) | Image processing method and device, electronic equipment and computer storage medium | |
CN111369612A (en) | Three-dimensional point cloud image generation method and equipment | |
CN115006842A (en) | Scene map generation method and device, storage medium and computer equipment | |
JP2011043879A (en) | Method and program for extracting mask image, and method and program for constructing voxel data | |
CN115457206A (en) | Three-dimensional model generation method, device, equipment and storage medium | |
CN116167925A (en) | Image restoration method, device, electronic equipment and computer readable storage medium | |
CN114255312A (en) | Processing method and device of vegetation image and electronic equipment | |
CN111063001A (en) | Picture synthesis method and device, electronic equipment and storage medium | |
CN111462343A (en) | Data processing method and device, electronic equipment and storage medium | |
Spalla | Texture Atlas Creation Approaches Within Maya: A Comparative Study |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |