CN109949693A - A kind of method for drawing map, calculates equipment and storage medium at device - Google Patents

A kind of method for drawing map, calculates equipment and storage medium at device Download PDF

Info

Publication number
CN109949693A
CN109949693A CN201910308355.XA CN201910308355A CN109949693A CN 109949693 A CN109949693 A CN 109949693A CN 201910308355 A CN201910308355 A CN 201910308355A CN 109949693 A CN109949693 A CN 109949693A
Authority
CN
China
Prior art keywords
detail
baking
map
information
terrain block
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
Application number
CN201910308355.XA
Other languages
Chinese (zh)
Other versions
CN109949693B (en
Inventor
谭贤亮
杨林
李晶晶
程佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Xishanju Network Technology Co ltd
Zhuhai Kingsoft Digital Network Technology Co Ltd
Original Assignee
Western Hills Residence Guangzhou Shi You Network Technology Co Ltd
Zhuhai Kingsoft Online Game Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Western Hills Residence Guangzhou Shi You Network Technology Co Ltd, Zhuhai Kingsoft Online Game Technology Co Ltd filed Critical Western Hills Residence Guangzhou Shi You Network Technology Co Ltd
Priority to CN201910308355.XA priority Critical patent/CN109949693B/en
Publication of CN109949693A publication Critical patent/CN109949693A/en
Application granted granted Critical
Publication of CN109949693B publication Critical patent/CN109949693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This specification provides a kind of method for drawing map, device, calculates equipment and storage medium, wherein the method for drawing map includes: the detail obtained to the target terrain block in map making;Determine that the map contextual data of the detail of target terrain block, the map contextual data include color data, normal data and material information data;Baking rendering is carried out based on detail of the map contextual data to the target terrain block, and the baking information of generation is stored;Mapping instruction is received, the corresponding baking information of detail for the target terrain block that baking is completed is obtained, is drawn to described to map making based on the baking information.The present invention is by will be to map making according to progress piecemeal at a distance between virtual camera, and the level of detail after piecemeal bake and generates corresponding baking information, when needing to carry out mapping, it can will bake information and be loaded directly into corresponding position to realize mapping.

Description

A kind of method for drawing map, calculates equipment and storage medium at device
Technical field
This specification is related to Internet technical field, in particular to a kind of method for drawing map, device calculate equipment and deposit Storage media.
Background technique
The method of extensive mapping is the research hotspot of field of Computer Graphics always, on a large scale figure field scape Being plotted in the fields such as cartoon making, film and game making has very extensive application.
Although the development of viewing hardware is very rapid in recent years, however, as involved in figure scene drawing on a large scale Model data magnitude is increasing, and as technology develops, rendering requirements are got higher, and cause material quantity more, and textures become larger, patch Figure quantity increases, and when carrying out mapping, the material being related to is sufficiently complex, and the quantity for the shader instruction for needing to use is past Toward the magnitude for reaching four figures, hardware performance when real-time rendering is caused to transfinite.
Summary of the invention
In view of this, this specification embodiment provides a kind of method for drawing map, device, calculates equipment and storage is situated between Matter, to solve technological deficiency existing in the prior art.
According to this specification embodiment in a first aspect, providing a kind of method for drawing map, comprising:
Obtain the detail to the target terrain block in map making;
Determine the map contextual data of the detail of the target terrain block, the map contextual data includes color Data, normal data and material information data;
Baking rendering is carried out based on detail of the map contextual data to the target terrain block, and will be generated Baking information stored;
Mapping instruction is received, the corresponding baking letter of detail for the target terrain block that baking is completed is obtained Breath, is drawn to described to map making based on the baking information.
Optionally, before detail of the acquisition to the target terrain block in map making, further includes:
It determines to map making;
It is divided into described more than at least two carefully to map making at a distance from virtual camera according to described to map making Ganglionic layer time;
Described obtain include: to the detail of the target terrain block in map making
By at least two detail between virtual camera at a distance from be greater than pre-determined distance threshold value more details Level is determined as the detail of target terrain block.
Optionally, baking rendering is carried out based on detail of the map contextual data to the target terrain block, And the baking information of generation is subjected to storage and includes:
It is treated in map making based on color data, normal data and the material information data in map contextual data The detail of target terrain block carries out baking rendering, and generates corresponding baked mapping;
Determine baking information corresponding with the detail of the target terrain block, the baking information includes to described Baked mapping that the detail of target terrain block is baked, target terrain block corresponding with every baked mapping The number of detail and corresponding textures position;
The baking information corresponding with the detail of the target terrain block is stored.
Optionally it is determined that after baking information corresponding with the detail of the target terrain block, it will described and institute State target terrain block the corresponding baking information of detail stored before, further includes:
Determine the precision of the detail of target terrain block;
According to the precision respectively in the baking information corresponding with the detail of the target terrain block Baked mapping is handled, and baked mapping corresponding with the precision is generated.
It optionally, include to map making in mapping instruction, the target terrain block of baking is completed in the acquisition The corresponding baking information of detail includes:
Obtain the parameter information to map making;
Baking corresponding with the detail to target terrain block in map making is obtained according to the parameter information Roast information.
Optionally, obtain corresponding with the detail to target terrain block in map making baking information it Afterwards, further includes:
To the Lighting information in map making, the Lighting information includes the color and brightness of light source and light source for detection;
It is drawn to described to map making according to the baking information and the Lighting information.
Optionally, based on the baking information to it is described to map making carry out draw include:
The detail of target terrain block corresponding with every baked mapping in the baking information is obtained wait draw Specified textures position in map;
Every baked mapping and Lighting information are loaded onto the specified textures position to map making to realize pair The drafting to map making predeterminable area.
According to the another aspect of this specification embodiment, a kind of map drawing device is provided, comprising:
First obtains module, is configured as obtaining the detail to the target terrain block in map making;
First determining module is configured to determine that the map contextual data of the detail of the target terrain block, institute Stating map contextual data includes color data, normal data and material information data;
Processing module is configured as carrying out based on detail of the map contextual data to the target terrain block Rendering is baked, and the baking information of generation is stored;
Drafting module is configured as receiving mapping instruction, obtains more details that the target terrain block of baking is completed The corresponding baking information of level, is drawn to described to map making based on the baking information.
Optionally, map drawing device further include:
Second determining module, is configured to determine that map making;
Map partitioning module is configured as described according to described to map making at a distance from virtual camera wait draw ground Figure is divided at least two details;
Second obtain module, be additionally configured to by least two detail between virtual camera at a distance from it is big It is determined as the detail of target terrain block in the detail of pre-determined distance threshold value.
Optionally, processing module includes:
Submodule is rendered, is configured as based on color data, normal data and the material information in map contextual data The detail that data treat the target terrain block in map making carries out baking rendering, and generates corresponding baked mapping;
Submodule is baked, is configured to determine that baking information corresponding with the detail of the target terrain block, institute Stating and baking information includes that the baked mapping baked to the detail of the target terrain block and every baking are pasted Scheme the detail of corresponding target terrain block number and corresponding textures position;
Sub-module stored, be configured as by the baking information corresponding with the detail of the target terrain block into Row storage.
Optionally, processing module further include:
It determines submodule, is configured to determine that the precision of the detail of target terrain block;
Submodule is handled, is configured as according to the precision respectively to described and target terrain block detail Baked mapping in corresponding baking information is handled, and baked mapping corresponding with the precision is generated.
Optionally, drafting module includes:
First acquisition submodule is configured as obtaining the parameter information to map making;
Second acquisition submodule, be configured as according to the parameter information obtain with it is described to target landform in map making The corresponding baking information of the detail of block.
Optionally, drafting module further include:
Detection sub-module, is configured as detecting the Lighting information in map making, the Lighting information include light source with And the color and brightness of light source;
Drawing modification submodule is configured as according to the baking information and the Lighting information to described to map making It is drawn.
Optionally, drafting module further include:
Third acquisition submodule is configured as obtaining target landform corresponding with every baked mapping in the baking information The detail of block is to the specified textures position in map making;
Rendering submodule, be configured as every baked mapping being loaded onto the specified textures position to map making with It realizes to the drafting to map making predeterminable area.
According to the another aspect of this specification embodiment, a kind of calculating equipment is provided, including memory, processor and deposit The computer instruction that can be run on a memory and on a processor is stored up, the processor is realized describedly when executing described instruction The step of drawing drawing method.
According to the another aspect of this specification embodiment, a kind of computer readable storage medium is provided, is stored with meter The step of calculation machine instruction, which realizes the method for drawing map when being executed by processor.
In this specification embodiment, by obtaining the detail to the target terrain block in map making;Determine institute The map contextual data of the detail of target terrain block is stated, the map contextual data includes color data, normal data And material information data;Baking wash with watercolours is carried out based on detail of the map contextual data to the target terrain block Dye, and the baking information of generation is stored;Mapping instruction is received, the more of the target terrain block that baking is completed are obtained The corresponding baking information of level of detail, is drawn to described to map making based on the baking information, the present invention pass through by To map making according to carrying out piecemeal at a distance between virtual camera, and the level of detail after piecemeal bake and is generated pair The baking information answered can will bake information and be loaded directly into corresponding position to realize that map is drawn when needing to carry out mapping System overcomes the problem of hardware performance transfinites when implementing map making in the prior art without real-time rendering.
Detailed description of the invention
Fig. 1 is the structural block diagram provided by the embodiments of the present application for calculating equipment;
Fig. 2 is the flow chart of method for drawing map provided by the embodiments of the present application;
Fig. 3 is the schematic diagram of method for drawing map provided by the embodiments of the present application;
Fig. 4 is the schematic diagram of method for drawing map provided by the embodiments of the present application;
Fig. 5 is the structural schematic diagram of map drawing device provided by the embodiments of the present application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where Under do similar popularization, therefore the application is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments, It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... " or " in response to determination ".
In this application, it provides a kind of method for drawing map, device, calculate equipment and storage medium, in following reality It applies in example and is described in detail one by one.
Fig. 1 shows the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100 Component includes but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130, number According to library 150 for saving data.
Calculating equipment 100 further includes access device 140, access device 140 enable calculate equipment 100 via one or Multiple networks 160 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network (WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, other unshowned portions in the above-mentioned component and Fig. 1 of equipment 100 are calculated Part can also be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 merely for the sake of Exemplary purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increases or replaces it His component.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 100 can also be mobile or state type Server.
Wherein, processor 120 can execute the step in drawing drawing method as shown in Figure 2.Fig. 2 shows according to this explanation The flow chart of the method for drawing map of one embodiment of book, including step 202 is to step 208.
Step 202: obtaining the detail to the target terrain block in map making.
In one embodiment of this specification, detail (LOD, the level to the target terrain block in map making are obtained Of detail) before, it can first determine to map making, then determine to the minimum distance between map making and virtual camera And maximum distance, and according to the minimum distance between map making and virtual camera and maximum distance by described wait draw ground Figure is divided into n detail, and wherein n is positive integer more than or equal to 2, and by n detail with virtual camera Between distance be greater than the LOD of pre-determined distance threshold value and be determined as the LOD of target terrain block.
In one embodiment of this specification, by taking n=10 as an example, it is assumed that be to the minimum distance between map making and virtual camera D1=20, maximum distance d2=40 generate 10 level of detail between minimum distance and maximum distance, and corresponding number is by close A1-a10 is followed successively by remote, it is assumed that pre-determined distance threshold value is d3=24, then can determine that the LOD of target terrain block is number a3-a10 8 level of detail, wherein each level of detail between virtual camera at a distance from smaller, the material effect on corresponding map surface It is abundanter, each level of detail between virtual camera at a distance from it is bigger, the material on corresponding map surface, Lighting information tail off, draw Face is more coarse.
In one embodiment of this specification, in the partition process of LOD, it can be increased or be merged details according to actual needs Level, and the distance of each level of detail can be equal, it can also be unequal, it is not limited here.
Step 204: determining the map contextual data of the detail of the target terrain block, the map contextual data Including color data, normal data and material information data.
Step 206: baking rendering is carried out based on detail of the map contextual data to the target terrain block, And the baking information of generation is stored.
In one embodiment of this specification, step 206 can be realized by step as shown in Figure 3, including step 302 is to step Rapid 306.
Step 302: treating drafting based on color data, normal data and the material information data in map contextual data The detail of target terrain block in map carries out baking rendering, and generates corresponding baked mapping.
In one embodiment of this specification, by taking map as an example, if being dried to the level of detail in the map Roasting rendering, then first read map contextual data in the map, including the composition data of game model, material number in map According to, the position data of color data, normal data and the model in level of detail, according to the map scene got Data carry out baking rendering to the LOD of target terrain block, and baking render process is carried out according to differently figure contextual data The process of calculating, rendering order is sent at least one rendering thread by main thread in 3D engine, wherein the main thread is used for The logic of application is handled, at least one described rendering thread obtains the rendering order, and orders according to the rendering and update institute State the picture of application.
Step 304: determining baking information corresponding with the detail of the target terrain block, the baking packet Include the baked mapping baked to the detail of the target terrain block, target corresponding with every baked mapping The number of the detail of terrain block and corresponding textures position.
In one embodiment of this specification, determine that baking information corresponding with the detail of the target terrain block is first The volume of the LOD of target terrain block corresponding with every baked mapping is determined according to the number of the detail of target terrain block Number, determine that every baked mapping is corresponding with the relative position of the virtual camera further according to target terrain block in map making Textures position, the relative position to target terrain block in map making and the virtual camera can contextual datas according to the map It obtains, by the baked mapping baked to the detail of the target terrain block, corresponding with every baked mapping Target terrain block detail number and corresponding textures position as described mostly thin with the target terrain block The corresponding baking information of ganglionic layer time.
In one embodiment of this explanation, after completing to bake, the precision of the LOD of target terrain block is determined;According to the precision Respectively to it is described it is corresponding with the LOD of the target terrain block bake information in baked mapping handle, generate with it is described The corresponding baked mapping of precision.
Step 306: the baking information corresponding with the detail of the target terrain block is stored.
In one embodiment of this specification, treat map making level of detail bake after the completion of, by corresponding baking Roast the baked mapping and every baking that contextual data bakes the LOD of the target terrain block according to the map in information The number of the LOD of the corresponding target terrain block of roasting textures and corresponding textures position are saved according to specified format, so that swimming According to the Baking Effect in the baking information realization map when play load, wherein the predetermined format includes JPG lattice Formula.
In one embodiment of this specification, when more and more remoter due to the modal distance virtual camera in map, on model one A little details are not easy to be visually noticeable, it is possible to according to map between virtual camera at a distance from map is divided into multiple details Level bakes rendering according to the level of detail progress piecemeal of generation, and will bake the corresponding with each level of detail of rendering generation It bakes information to be saved according to designated precision, can effectively promote the rendering performance of map.
Step 208: receiving mapping instruction, the detail for obtaining the target terrain block that baking is completed is corresponding Information is baked, is drawn to described to map making based on the baking information.
In one embodiment of this specification, step 208 can be realized by step as shown in Figure 4, including step 402 is to step Rapid 408.
Step 402: obtaining the parameter information to map making.
It include after receiving mapping instruction, being obtained to map making in one embodiment of this specification, in mapping instruction Take the parameter information to map making, wherein include the LOD to target terrain block in map making in the parameter information Corresponding material and precision, wherein the precision of LOD can by map making between virtual camera at a distance from and Terrain Elevation it is common It determines.
In one embodiment of this specification, obtain corresponding with the detail to target terrain block in map making After baking information, detect to the Lighting information in map making, the Lighting information include light source and light source color and Brightness.
Step 404: being obtained and the detail to target terrain block in map making according to the parameter information Corresponding baking information.
In one embodiment of this specification, the LOD with the target terrain block is obtained according to the parameter information to map making Corresponding baking information, wherein by map making between virtual camera at a distance from be greater than pre-determined distance threshold value region it is true It is set to target drawing area, the target drawing area is carried out dividing resulting level of detail is determined as target terrain block LOD, by map making between virtual camera at a distance from be less than pre-determined distance threshold value region be determined as real-time rendering region.
Step 406: obtaining the LOD for baking target terrain block corresponding with every baked mapping in information wait draw Specified textures position in map.
Step 408: every baked mapping and Lighting information are loaded onto the specified textures position to map making To realize to the drafting to map making predeterminable area.
In one embodiment of this specification, bake in information including contextual data according to the map to the target terrain block The number and corresponding patch of the LOD of baked mapping, target terrain block corresponding with every baked mapping that LOD is baked Figure position, Lighting information includes the color and brightness of light source and light source, according to every baked mapping in map making The baked mapping and Lighting information are loaded onto corresponding position and can be realized and treated the target of map making and draw by textures position The drafting in region processed, for the real-time rendering region to map making, since the picture precision in the region is high, details is rich Richness can choose and carry out real-time rendering in map loading procedure.
In one embodiment of this specification, according to the map contextual data in map making to the LOD of target terrain block into Row bakes, and the baking information of generation is saved, and when treating map making and being drawn, directly adds corresponding baking information The designated position to map making is downloaded to complete mapping process, thus real-time rendering need not be carried out, overcomes existing skill The problem of hardware performance existing for real-time rendering transfinites in art improves the body of user so that map load is more efficiently It tests.
Corresponding with above method embodiment, this specification additionally provides map drawing device embodiment, and Fig. 5 shows this The structural schematic diagram of the map drawing device of specification one embodiment.As shown in figure 5, the device includes: the first acquisition module 502, the first determining module 504, processing module 506 and drafting module 508.
First obtains module 502, is configured as obtaining the detail to the target terrain block in map making;
First determining module 504 is configured to determine that the map contextual data of the detail of the target terrain block, The map contextual data includes color data, normal data and material information data;
Processing module 506 is configured as the detail based on the map contextual data to the target terrain block Baking rendering is carried out, and the baking information of generation is stored;
Drafting module 508 is configured as receiving mapping instruction, obtains the mostly thin of the target terrain block that baking is completed The corresponding baking information of ganglionic layer time, is drawn to described to map making based on the baking information.
In bright one embodiment of book of this book, the map drawing device further include:
Second determining module, is configured to determine that map making;
Map partitioning module is configured as described according to described to map making at a distance from virtual camera wait draw ground Figure is divided at least two details;
Second obtain module, be additionally configured to by least two detail between virtual camera at a distance from it is big It is determined as the LOD of target terrain block in the detail of pre-determined distance threshold value.
In one embodiment of this specification, before obtaining the LOD to the target terrain block in map making, need to first it determine wait draw Then map processed is determined to the minimum distance and maximum distance between map making and virtual camera, and according to described wait draw ground Minimum distance and maximum distance between scheming virtual camera are divided into n LOD to map making for described, wherein n for greater than etc. In 2 positive integer, and by n LOD between virtual camera at a distance from be greater than pre-determined distance threshold value LOD be determined as target landform The LOD of block.
In one embodiment of this specification, in the partition process of LOD, it can be increased or be merged details according to actual needs Level, and the distance of each level of detail can be equal, it can also be unequal, it is not limited here.
In one embodiment of this specification, the processing module includes:
Submodule is rendered, is configured as based on color data, normal data and the material information in map contextual data The LOD that data treat the target terrain block in map making carries out baking rendering, and generates corresponding baked mapping;
Submodule is baked, is configured to determine that baking information corresponding with the detail of the target terrain block, institute Stating and baking information includes that the baked mapping baked to the detail of the target terrain block and every baking are pasted Scheme the detail of corresponding target terrain block number and corresponding textures position;
Sub-module stored is configured as storing the baking information corresponding with the LOD of the target terrain block.
In one embodiment of this specification, determine that baking information corresponding with the detail of the target terrain block is first The volume of the LOD of target terrain block corresponding with every baked mapping is determined according to the number of the detail of target terrain block Number, determine that every baked mapping is corresponding with the relative position of the virtual camera further according to target terrain block in map making Textures position, the relative position to target terrain block in map making and the virtual camera can contextual datas according to the map It obtains, by the baked mapping baked to the detail of the target terrain block, corresponding with every baked mapping Target terrain block detail number and corresponding textures position as described mostly thin with the target terrain block The corresponding baking information of ganglionic layer time.
In one embodiment of this specification, the processing module further include:
It determines submodule, is configured to determine that the precision of the LOD of target terrain block;
Submodule is handled, is configured as according to the precision respectively to described corresponding with the LOD of the target terrain block The baked mapping baked in information is handled, and baked mapping corresponding with the precision is generated.
In one embodiment of this specification, if carrying out baking rendering to the level of detail in map making, first read To map contextual data in map making, including material quality data, color data and normal data described in taking, according to what is got The LOD of the target terrain block of the map contextual data pair carries out baking rendering, and baking render process is substantially according to differently The process that figure contextual data is calculated, rendering order is sent at least one rendering thread by main thread in 3D engine, wherein The main thread is used to handle the logic of application, at least one described rendering thread obtains the rendering order, and according to described Rendering order updates the picture of the application.
In one embodiment of this specification, after completing to bake, the precision of the LOD of target terrain block is determined;According to the essence Degree is respectively handled the baked mapping in the baking information corresponding with the LOD of the target terrain block, generation and institute State the corresponding baked mapping of precision, and by the volume of the baked mapping, the LOD of target terrain block corresponding with every baked mapping Number and corresponding textures position saved according to specified format so that game load when according to the baking information realization game Baking Effect in map.
In one embodiment of this specification, the drafting module includes:
First acquisition submodule is configured as obtaining the parameter information to map making;
Second acquisition submodule, be configured as according to the parameter information obtain with it is described to target landform in map making The corresponding baking information of the LOD of block.
In one embodiment of this specification, drafting module further include:
Detection sub-module, is configured as detecting the Lighting information in map making, the Lighting information include light source with And the color and brightness of light source;
Drawing modification submodule is configured as according to the baking information and the Lighting information to described to map making It is drawn.
In one embodiment of this specification, the drafting module further include:
Third acquisition submodule is configured as obtaining target landform corresponding with every baked mapping in the baking information The LOD of block is to the specified textures position in map making;
Rendering submodule, be configured as every baked mapping being loaded onto the specified textures position to map making with It realizes to the drafting to map making predeterminable area.
It include after receiving mapping instruction, being obtained to map making in one embodiment of this specification, in mapping instruction Take the parameter information to map making, wherein include the LOD to target terrain block in map making in the parameter information Corresponding material and precision, wherein the precision of LOD can by map making between virtual camera at a distance from and Terrain Elevation it is common It determines.
In one embodiment of this specification, obtain corresponding with the detail to target terrain block in map making After baking information, detect to the Lighting information in map making, the Lighting information include light source and light source color and Brightness.
In one embodiment of this specification, obtained according to the parameter to map making corresponding with the LOD of the target terrain block Baking information, wherein by map making between virtual camera at a distance from be greater than pre-determined distance threshold value region be determined as Target drawing area divide the LOD that resulting level of detail is determined as target terrain block to the target drawing area, will To in map making between virtual camera at a distance from be less than pre-determined distance threshold value region be determined as real-time rendering region.
In one embodiment of this specification, bake in information including contextual data according to the map to the target terrain block The number and corresponding patch of the LOD of baked mapping, target terrain block corresponding with every baked mapping that LOD is baked Figure position adds the baked mapping and Lighting information according to every baked mapping to the textures position in map making Being loaded onto corresponding position can be realized the drafting for treating the target drawing area of map making, for described to the real-time of map making Drawing area, since the picture precision in the region is high, details is abundant, can choose and is drawn in real time in map loading procedure System.
In one embodiment of this specification, the LOD to each target terrain block in map making is baked and incited somebody to action in advance It bakes information to be stored by specified format, thus real-time rendering need not be carried out when drawing, overcome the prior art real-time The shortcomings that hardware performance transfinites when drafting improves the loading efficiency of map scene, is conducive to the game body for promoting user It tests.
A kind of calculating equipment is also provided in one embodiment of this specification, including memory, processor and is stored in memory Computer instruction that is upper and can running on a processor, the processor realize the mapping side when executing described instruction The step of method.
One embodiment of the application also provides a kind of computer readable storage medium, is stored with computer instruction, the instruction The step of method for drawing map as previously described is realized when being executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited The technical solution of storage media and the technical solution of above-mentioned method for drawing map belong to same design, the technical solution of storage medium The detail content being not described in detail may refer to the description of the technical solution of above-mentioned method for drawing map.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can With or may be advantageous.
The computer instruction includes computer program code, the computer program code can for source code form, Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the application is not limited by the described action sequence because According to the application, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Shen It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
The application preferred embodiment disclosed above is only intended to help to illustrate the application.There is no detailed for alternative embodiment All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification, It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain the application Principle and practical application, so that skilled artisan be enable to better understand and utilize the application.The application is only It is limited by claims and its full scope and equivalent.

Claims (16)

1. a kind of method for drawing map characterized by comprising
Obtain the detail to the target terrain block in map making;
Determine the map contextual data of the detail of the target terrain block, the map contextual data includes number of colours According to, normal data and material information data;
Baking rendering is carried out based on detail of the map contextual data to the target terrain block, and by the baking of generation Roasting information is stored;
Mapping instruction is received, the corresponding baking information of detail for the target terrain block that baking is completed, base are obtained It is drawn to described to map making in the baking information.
2. the method according to claim 1, wherein the acquisition is to the more of the target terrain block in map making Before level of detail, further includes:
It determines to map making;
More than at least two levels of detail are divided into map making by described at a distance from virtual camera to map making according to described It is secondary;
Described obtain include: to the detail of the target terrain block in map making
By at least two detail between virtual camera at a distance from be greater than pre-determined distance threshold value detail It is determined as the detail of target terrain block.
3. the method according to claim 1, wherein described be based on the map contextual data to the target The detail of shape block carries out baking rendering, and the baking information of generation is stored, comprising:
The target in map making is treated based on color data, normal data and the material information data in map contextual data The detail of terrain block carries out baking rendering, and generates corresponding baked mapping;
Determine baking information corresponding with the detail of the target terrain block, the baking information includes to the target Baked mapping that the detail of terrain block is baked, target terrain block corresponding with every baked mapping it is mostly thin The number of ganglionic layer time and corresponding textures position;
The baking information corresponding with the detail of the target terrain block is stored.
4. according to the method described in claim 3, it is characterized in that, the detail of the determination and the target terrain block After corresponding baking information, carry out the baking information corresponding with the detail of the target terrain block to store it Before, further includes:
Determine the precision of the detail of target terrain block;
According to the precision respectively to the baking baked in information corresponding with the detail of the target terrain block Textures are handled, and baked mapping corresponding with the precision is generated.
5. the method according to claim 1, wherein including to map making, institute in mapping instruction Stating the corresponding baking information of detail of target terrain block for obtaining and baking being completed includes:
Obtain the parameter information to map making;
Baking letter corresponding with the detail to target terrain block in map making is obtained according to the parameter information Breath.
6. according to the method described in claim 5, it is characterized in that, it is described acquisition with it is described to target terrain block in map making The corresponding baking information of detail after, further includes:
To the Lighting information in map making, the Lighting information includes the color and brightness of light source and light source for detection;
It is drawn to described to map making according to the baking information and the Lighting information.
7. the method according to claim 1, wherein described be based on the baking information to described to map making Draw and includes:
The detail of target terrain block corresponding with every baked mapping in the baking information is obtained to map making In specified textures position;
Every baked mapping and Lighting information are loaded onto the specified textures position to map making to realize to described Drafting to map making predeterminable area.
8. a kind of map drawing device characterized by comprising
First obtains module, is configured as obtaining the detail to the target terrain block in map making;
First determining module is configured to determine that the map contextual data of the detail of the target terrain block, describedly Figure field scape data include color data, normal data and material information data;
Processing module is configured as baking based on detail of the map contextual data to the target terrain block Rendering, and the baking information of generation is stored;
Drafting module is configured as receiving mapping instruction, obtains the detail that the target terrain block of baking is completed Corresponding baking information is drawn to described to map making based on the baking information.
9. device according to claim 8, which is characterized in that further include:
Second determining module, is configured to determine that map making;
Map partitioning module is configured as described to be drawn to map making at a distance from virtual camera according to described to map making It is divided at least two details;
Second obtains module, be additionally configured to by least two detail between virtual camera at a distance from be greater than it is pre- If the detail of distance threshold is determined as the detail of target terrain block.
10. device according to claim 8, which is characterized in that the processing module includes:
Submodule is rendered, is configured as based on color data, normal data and the material information data in map contextual data The detail for treating the target terrain block in map making carries out baking rendering, and generates corresponding baked mapping;
Submodule is baked, is configured to determine that baking information corresponding with the detail of the target terrain block, the baking Roasting information includes the baked mapping baked to the detail of the target terrain block and every baked mapping pair The number of the detail for the target terrain block answered and corresponding textures position;
Sub-module stored is configured as depositing the baking information corresponding with the detail of the target terrain block Storage.
11. device according to claim 10, which is characterized in that the processing module, further includes:
It determines submodule, is configured to determine that the precision of the detail of target terrain block;
Submodule is handled, is configured as according to the precision respectively to described corresponding with the detail of the target terrain block Baking information in baked mapping handled, generate corresponding with precision baked mapping.
12. device according to claim 8, which is characterized in that the drafting module includes:
First acquisition submodule is configured as obtaining the parameter information to map making;
Second acquisition submodule, be configured as according to the parameter information obtain with it is described to target terrain block in map making The corresponding baking information of detail.
13. device according to claim 12, which is characterized in that the drafting module further include:
Detection sub-module is configured as detecting the Lighting information in map making, and the Lighting information includes light source and light The color and brightness in source;
Drawing modification submodule is configured as being carried out to described to map making according to the baking information and the Lighting information It draws.
14. device according to claim 8, which is characterized in that the drafting module includes:
Third acquisition submodule is configured as obtaining target terrain block corresponding with every baked mapping in the baking information Detail is to the specified textures position in map making;
Rendering submodule is configured as every baked mapping and Lighting information being loaded onto the specified patch to map making Figure position is to realize to the drafting to map making predeterminable area.
15. a kind of calculating equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine instruction, which is characterized in that the processor realizes the step of claim 1-7 any one the method when executing described instruction Suddenly.
16. a kind of computer readable storage medium, is stored with computer instruction, which is characterized in that the instruction is held by processor The step of claim 1-7 any one the method is realized when row.
CN201910308355.XA 2019-04-17 2019-04-17 Map drawing method and device, computing equipment and storage medium Active CN109949693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910308355.XA CN109949693B (en) 2019-04-17 2019-04-17 Map drawing method and device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910308355.XA CN109949693B (en) 2019-04-17 2019-04-17 Map drawing method and device, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109949693A true CN109949693A (en) 2019-06-28
CN109949693B CN109949693B (en) 2021-12-10

Family

ID=67015428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910308355.XA Active CN109949693B (en) 2019-04-17 2019-04-17 Map drawing method and device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109949693B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111524231A (en) * 2020-05-20 2020-08-11 网易(杭州)网络有限公司 Virtual terrain processing method and device, electronic equipment and storage medium
CN112245926A (en) * 2020-11-16 2021-01-22 腾讯科技(深圳)有限公司 Virtual terrain rendering method, device, equipment and medium
CN112843735A (en) * 2020-12-31 2021-05-28 上海米哈游天命科技有限公司 Game picture shooting method, device, equipment and storage medium
CN112907741A (en) * 2021-02-05 2021-06-04 深圳市润谦科技有限公司 Terrain scene generation method and device, electronic equipment and storage medium
CN113808246A (en) * 2021-09-13 2021-12-17 深圳须弥云图空间科技有限公司 Method and device for generating map, computer equipment and computer readable storage medium
CN114677467A (en) * 2022-05-30 2022-06-28 腾讯科技(深圳)有限公司 Terrain image rendering method, device, equipment and computer readable storage medium
CN116824082A (en) * 2023-08-30 2023-09-29 腾讯科技(深圳)有限公司 Virtual terrain rendering method, device, equipment, storage medium and program product
CN113808246B (en) * 2021-09-13 2024-05-10 深圳须弥云图空间科技有限公司 Method and device for generating map, computer equipment and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504661A (en) * 2009-03-12 2009-08-12 北京英特图原信息技术有限责任公司 System and method for providing three-dimensional geographic information
CN101593361A (en) * 2009-06-25 2009-12-02 北京航空航天大学 A kind of large-scale terrain rendering system based on double-layer nested grid
CN102074049A (en) * 2011-03-01 2011-05-25 哈尔滨工程大学 Wide-range terrain scheduling simplifying method based on movement of viewpoint
CN102651141A (en) * 2012-03-30 2012-08-29 北京师范大学 Method for automatically superposing and rendering vector map and high-resolution digital elevation models in large scene
CN103077497A (en) * 2011-10-26 2013-05-01 中国移动通信集团公司 Method and device for zooming image in level-of-detail model
CN104157011A (en) * 2014-09-05 2014-11-19 电子科技大学 Modeling method for three-dimensional terrain
CN104766360A (en) * 2015-03-09 2015-07-08 腾讯科技(深圳)有限公司 Rendering method and device of three-dimensional space data
CN109102560A (en) * 2018-08-09 2018-12-28 腾讯科技(深圳)有限公司 Threedimensional model rendering method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504661A (en) * 2009-03-12 2009-08-12 北京英特图原信息技术有限责任公司 System and method for providing three-dimensional geographic information
CN101593361A (en) * 2009-06-25 2009-12-02 北京航空航天大学 A kind of large-scale terrain rendering system based on double-layer nested grid
CN102074049A (en) * 2011-03-01 2011-05-25 哈尔滨工程大学 Wide-range terrain scheduling simplifying method based on movement of viewpoint
CN103077497A (en) * 2011-10-26 2013-05-01 中国移动通信集团公司 Method and device for zooming image in level-of-detail model
CN102651141A (en) * 2012-03-30 2012-08-29 北京师范大学 Method for automatically superposing and rendering vector map and high-resolution digital elevation models in large scene
CN104157011A (en) * 2014-09-05 2014-11-19 电子科技大学 Modeling method for three-dimensional terrain
CN104766360A (en) * 2015-03-09 2015-07-08 腾讯科技(深圳)有限公司 Rendering method and device of three-dimensional space data
CN109102560A (en) * 2018-08-09 2018-12-28 腾讯科技(深圳)有限公司 Threedimensional model rendering method and device

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111524231A (en) * 2020-05-20 2020-08-11 网易(杭州)网络有限公司 Virtual terrain processing method and device, electronic equipment and storage medium
CN111524231B (en) * 2020-05-20 2024-01-26 网易(杭州)网络有限公司 Virtual terrain processing method and device, electronic equipment and storage medium
CN112245926A (en) * 2020-11-16 2021-01-22 腾讯科技(深圳)有限公司 Virtual terrain rendering method, device, equipment and medium
CN112843735B (en) * 2020-12-31 2022-12-02 上海米哈游天命科技有限公司 Game picture shooting method, device, equipment and storage medium
CN112843735A (en) * 2020-12-31 2021-05-28 上海米哈游天命科技有限公司 Game picture shooting method, device, equipment and storage medium
CN112907741A (en) * 2021-02-05 2021-06-04 深圳市润谦科技有限公司 Terrain scene generation method and device, electronic equipment and storage medium
CN112907741B (en) * 2021-02-05 2024-02-02 深圳市润谦科技有限公司 Terrain scene generation method and device, electronic equipment and storage medium
CN113808246A (en) * 2021-09-13 2021-12-17 深圳须弥云图空间科技有限公司 Method and device for generating map, computer equipment and computer readable storage medium
CN113808246B (en) * 2021-09-13 2024-05-10 深圳须弥云图空间科技有限公司 Method and device for generating map, computer equipment and computer readable storage medium
CN114677467A (en) * 2022-05-30 2022-06-28 腾讯科技(深圳)有限公司 Terrain image rendering method, device, equipment and computer readable storage medium
WO2023231537A1 (en) * 2022-05-30 2023-12-07 腾讯科技(深圳)有限公司 Topographic image rendering method and apparatus, device, computer readable storage medium and computer program product
CN116824082A (en) * 2023-08-30 2023-09-29 腾讯科技(深圳)有限公司 Virtual terrain rendering method, device, equipment, storage medium and program product
CN116824082B (en) * 2023-08-30 2024-02-23 腾讯科技(深圳)有限公司 Virtual terrain rendering method, device, equipment, storage medium and program product

Also Published As

Publication number Publication date
CN109949693B (en) 2021-12-10

Similar Documents

Publication Publication Date Title
CN109949693A (en) A kind of method for drawing map, calculates equipment and storage medium at device
CN109387204A (en) The synchronous positioning of the mobile robot of dynamic environment and patterning process in faced chamber
WO2020165557A1 (en) 3d face reconstruction system and method
CN108305228A (en) Image processing method, device, storage medium and processor
CN112241993B (en) Game image processing method and device and electronic equipment
CN110443877B (en) Model rendering method, device, terminal equipment and storage medium
US10846887B2 (en) Machine vision processing system
US8855411B2 (en) Opacity measurement using a global pixel set
CN108830923B (en) Image rendering method and device and storage medium
CN109934897A (en) A kind of swing effect simulation system, calculates equipment and storage medium at method
CN110570506B (en) Map resource management method, device, computing equipment and storage medium
CN110298907A (en) A kind of virtual role method of controlling operation and device calculate equipment and storage medium
CN113791914B (en) Object processing method, device, computer equipment, storage medium and product
CN110665232A (en) Rendering method, device and equipment of ground surface in game and storage medium
CN109816792A (en) Localization method and device in a kind of three-dimensional scenic
CN111784817A (en) Shadow display method and device, storage medium and electronic device
CN105957133B (en) A kind of method and apparatus for loading textures
CN109377552B (en) Image occlusion calculating method, device, calculating equipment and storage medium
CN110310359A (en) The transform method and device of object state in a kind of game
CN113786616B (en) Indirect illumination implementation method and device, storage medium and computing equipment
CN113160379B (en) Material rendering method and device, storage medium and electronic equipment
CN113209614A (en) Virtual character control method and device
CN110310354A (en) A kind of vertex recognition method and device in three-dimensional scenic
CN110009749A (en) A kind of virtual objects localization method, calculates equipment and storage medium at device
CN117298571A (en) Star data construction method and device

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
CB02 Change of applicant information

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant after: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Applicant after: Guangzhou Xishanju Network Technology Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Applicant before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Applicant before: GUANGZHOU SEASUN ENTERTAINMENT NETWORK TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Patentee after: Zhuhai Jinshan Digital Network Technology Co.,Ltd.

Patentee after: Guangzhou Xishanju Network Technology Co.,Ltd.

Address before: 519000 Room 102, 202, 302 and 402, No. 325, Qiandao Ring Road, Tangjiawan Town, high tech Zone, Zhuhai City, Guangdong Province, Room 102 and 202, No. 327 and Room 302, No. 329

Patentee before: ZHUHAI KINGSOFT ONLINE GAME TECHNOLOGY Co.,Ltd.

Patentee before: Guangzhou Xishanju Network Technology Co.,Ltd.

CP01 Change in the name or title of a patent holder