CN115311401A - Method and device for drawing model map and electronic equipment - Google Patents

Method and device for drawing model map and electronic equipment Download PDF

Info

Publication number
CN115311401A
CN115311401A CN202210677868.XA CN202210677868A CN115311401A CN 115311401 A CN115311401 A CN 115311401A CN 202210677868 A CN202210677868 A CN 202210677868A CN 115311401 A CN115311401 A CN 115311401A
Authority
CN
China
Prior art keywords
model
resources
game
scene
map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210677868.XA
Other languages
Chinese (zh)
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202210677868.XA priority Critical patent/CN115311401A/en
Publication of CN115311401A publication Critical patent/CN115311401A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Generation (AREA)

Abstract

The invention provides a method, a device and electronic equipment for drawing a model chartlet, which are used for acquiring scene resources of a target game scene generated by a game engine tool and material resources of an initial game model; determining shader resources in the map drawing tool according to the scene resources and the material resources; in the map rendering tool, a model map of the initial game model is rendered based on the scene resources and shader resources. In the mode, shader resources in the mapping drawing tool are set through scene resources and material resources in the game engine tool, so that when the model mapping of the initial game model is drawn, the mapping drawing tool can simulate the model rendering effect in the game engine tool, the problem that the model mapping is repeatedly modified due to inaccurate drawn model mapping and different model effects in different tools of the initial game model is solved, the efficiency of drawing the model mapping is improved, and the development efficiency of the game model is improved.

Description

Method and device for drawing model map and electronic equipment
Technical Field
The invention relates to the technical field of model rendering, in particular to a method and a device for drawing a model map and electronic equipment.
Background
In the cross-platform migration game, in order to enable old model resources to match the game effect of a new platform, a game scene generally needs to be modified, which results in that after a game model and a chartlet drawn in a chartlet making tool are made in three-dimensional making software and input to a game engine for rendering, the rendering effect of the game model and the rendering effect in the chartlet making tool are greatly different. In the related art, usually, a way of repeatedly modifying a map drawn by a map making tool is used, so that a rendering effect in a game scene of a game engine after the finally drawn map and a game model are input to the game engine for rendering is consistent with a rendering effect in the map making tool.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for drawing a model map, and an electronic device, so as to improve efficiency of drawing the model map and improve efficiency of developing a game model.
In a first aspect, an embodiment of the present invention provides a method for drawing a model map, where the method includes: scene resources of a target game scene generated by a game engine tool and material resources of an initial game model are obtained; determining shader resources in the map drawing tool according to the scene resources and the material resources; wherein, the shader resources are used for simulating the model rendering effect of the game engine tool; in the map rendering tool, a model map of the initial game model is rendered based on scene resources and shader resources.
Further, the scene resources comprise HDR maps of the target game scene; the method for acquiring the scene resources of the target game scene generated by the game engine tool comprises the following steps: setting a three-dimensional model at the illumination position of a target game scene, and endowing a preset target material to the three-dimensional model; adjusting self-luminous parameters of the target material; the target material simulates illumination information of a target game scene through self-luminescence parameters; acquiring an HDR map of a target game scene in a preset cube capturing mode; the HDR map comprises illumination information of target material simulation, and is used for providing illumination for a game scene in the map drawing tool.
Further, the illumination information includes illumination intensity and/or illumination color; the step of adjusting the self-luminescence parameters of the target material comprises the following steps: adjusting an intensity parameter in the self-luminous parameter of the target material according to the intensity attribute of illumination in the target game scene; and/or adjusting color parameters in the self-luminous parameters of the target material according to the color attributes of illumination in the target game scene.
Further, the step of determining shader resources in the map drawing tool according to the scene resources and the material resources includes: in a mapping tool, creating initial shader resources of an initial game model; and synchronizing the scene resources and the material resources to the initial shader resources to obtain the shader resources in the mapping drawing tool.
Further, the scene resources further include: a first execution code for tone mapping and a second execution code for color correction; synchronizing the scene resources and the material resources to the initial shader resources to obtain shader resources in the map drawing tool, wherein the step comprises the following steps of: writing the material resource into the initial shader resource to obtain a first shader resource in the mapping drawing tool; and writing the first execution code of the tone mapping and the second execution code of the color correction into the first shader resource to obtain the shader resource in the mapping drawing tool.
Further, the material resource includes a third execution code for highlight calculation; writing the material resource into the initial shader resource to obtain a first shader resource in the map drawing tool, wherein the step of writing the material resource into the initial shader resource comprises the following steps: and writing the third execution code of highlight calculation into the initial shader resource to obtain the first shader resource.
Further, the step of drawing a model map of the initial game model based on the scene resources and the shader resources includes: setting the HDR map in the scene resources as a model map of a target game scene model in a map drawing tool, endowing shader resources to an initial game model, and simulating the model effect of the initial game model; and drawing a model map of the initial game model based on the model effect of the initial game model.
Further, after the step of drawing the model map of the initial game model based on the scene resources and the shader resources, the method further comprises: rendering the initial game model based on the initial game model and the model map of the initial game model in a game engine tool to obtain the rendered initial game model; and the model rendering effect of the rendered initial game model in the game engine tool is the same as the model rendering effect of the initial game model in the mapping drawing tool based on the model mapping.
In a second aspect, an embodiment of the present invention provides an apparatus for drawing a model map, where the apparatus includes: the game engine tool is used for generating a target game scene according to the scene resources of the target game scene; the determining module is used for determining shader resources in the map drawing tool according to the scene resources and the material resources; the shader resources are used for simulating a model rendering effect of the game engine tool; and the drawing module is used for drawing the model map of the initial game model based on the scene resources and the shader resources in the map drawing tool.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the method for drawing a model map according to any one of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of rendering a model map of any one of the first aspects.
The embodiment of the invention has the following beneficial effects:
the invention provides a method and a device for drawing a model map and electronic equipment, which are used for acquiring scene resources of a target game scene generated by a game engine tool and material resources of an initial game model; determining shader resources in the map drawing tool according to the scene resources and the material resources; in the map rendering tool, a model map of the initial game model is rendered based on the scene resources and shader resources. In the mode, shader resources in the mapping drawing tool are set through scene resources and material resources in the game engine tool, so that when the model mapping of the initial game model is drawn, the mapping drawing tool can simulate the model rendering effect in the game engine tool, the problem that the model mapping is repeatedly modified due to inaccurate drawn model mapping and different model effects in different tools of the initial game model is solved, the efficiency of drawing the model mapping is improved, and the development efficiency of the game model is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a drawing method of a model map according to an embodiment of the present invention;
FIG. 2 is a drawing method of another model map according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a model rendering effect according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a device for drawing a model map according to an 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
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
In a cross-platform transplantation game, the problems of picture effects and performance differences of different platforms are often considered. Under the condition of ensuring the performance, the picture effects of different platforms are relatively consistent as much as possible. At present, in order to enable old model resources to match the game effect of a new platform, the game scene is required to be modified usually. In this case, after the new game model is created in the three-dimensional creation software, the map drawn by the map creation tool is created (the map is intended to allow the model to have a model effect, and a model without a map is a gray model without colors), and after the map of the game model is created, the game model and the map are input to the game engine and rendered, and then the rendering effect of the game model and the map by the map creation tool is greatly different due to scene changes (mainly, the difference in screen effect between the model in the map creation tool and the model in the game scene of the game engine).
Among the reasons for this difference are: different software, the software bottom layer structure is different (such as the calculation mode of illumination); the models are in different environments, the game scenes generated in a general game engine are illuminated by spotlights, and HDRI maps are used in a mapping tool for providing illumination; the material calculation of the model in different software is different.
In the related art, usually, a method of repeatedly modifying a map drawn by a map making tool is used, so that after a finally drawn map and a game model are input to a game engine for rendering, a rendering effect in a game scene of the game engine is consistent with a rendering effect in the map making tool.
In addition, the rendering effect of the model in the mapping tool can be set through previewing the scene by the model in the game engine, but the method can only be similar to the effect of previewing the scene by the model, the effect of the model in the game scene of the game engine and the effect drawn by the mapping tool cannot be synchronized, the mapping drawn by the mapping tool needs to be repeatedly modified, and the efficiency is low.
Based on this, the method and the device for drawing the model map and the electronic device provided by the embodiment of the invention can be applied to electronic devices such as computers and notebooks.
To facilitate understanding of the embodiment, a detailed description is first given of a method for drawing a model map according to the embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, scene resources of a target game scene generated by a game engine tool and material resources of an initial game model are obtained;
the game Engine tool may also be referred to as a game development Engine tool, for example, a fantasy 4 Engine (ue 4), and the target game scene generally refers to an environment in which a virtual character is located in a target game, and generally includes various virtual plants, buildings, sky, illumination, and the like. The scene resources generally include lighting resources, execution code for rendering a scene, and the like. The initial game model is usually modeled by a three-dimensional modeling tool, and the initial game model is usually a gray model without a model effect, and naturally, resources such as material are not provided. The texture resources are those generated in advance by the game engine tool for the initial game model, and are usually obtained from a texture system of the game engine tool, where the texture system of the game engine tool corresponds to a shader (shader) and can perform various calculations in the shader to generate different screen effects.
In actual implementation, in the game engine tool, information such as lighting information in a target game scene, rendering information for rendering the target game scene, mapping information, and correction may be obtained, so as to enable the initial game model to be in an environment similar to an actual game scene, and draw a model map. Meanwhile, the material resources of the initial game model are also required to be acquired, and the material resources usually comprise model material calculation, such as color information, light and shadow information, metal degree, roughness map, highlight and other information of the model map.
The specific resource obtaining mode may be direct obtaining or obtaining through a preset obtaining mode.
Step S104, determining shader resources in the map drawing tool according to the scene resources and the material resources; wherein, the shader resources are used for simulating the model rendering effect of the game engine tool;
the mapping tool is mainly used for making model mapping for the initial game model. For example, the Substance pointer software, SP for short, is a powerful 3d texture mapping software, provides a large number of brushes and materials, and can design a model mapping meeting requirements. The shader (shader) resources generally include information such as graphics card execution codes and instructions, and are mainly used for describing a process of rendering a model, and various calculations can be performed to generate different model effects. The method is mainly used for simulating the rendering effect of the model in the game engine tool in the mapping tool, such as the material of the model, the roughness of the surface of the model, the color of the surface of the model, the highlight of the surface of the model and the like. So that the model rendering effect of the initial game model in the charting tool is similar to or even consistent with the model rendering effect in the game engine tool.
Specifically, the scene resources may be directly set in the game scene in the mapping tool, so that the scene environment of the initial game model in the mapping tool, such as information such as lighting, is similar to or even consistent with the scene environment in the actual game scene (i.e., the target game scene generated by the game engine tool). Information such as scene calculation in the scene resource can also be set in a shader in the map drawing tool to obtain the shader resource, so that the scene environment, such as color and other information, of the initial game model in the map drawing tool is similar to or even consistent with the scene environment in the actual game scene (i.e., the target game scene generated by the game engine tool).
Meanwhile, the material resources can be set in a shader in the mapping drawing tool, and the shader resources are obtained. Specifically, various information in the resource may be directly written into a shader in the map drawing tool, or the target information in the material resource may be selected and written into the shader in the map drawing tool. Because the material resources are resources such as material calculation aiming at the initial game model in the game engine tool, the model rendering effect of the game engine tool can be simulated through the shader resources.
Step S106, in the map drawing tool, drawing the model map of the initial game model based on the scene resources and the shader resources.
Specifically, the lighting information and the like in the scene resource may be set in the game scene in the mapping tool, for example, a map is set for the scene model. Shader resources are assigned to the initial game model such that the initial game model has a model effect. And then drawing a model map for the initial game model in the game scene and on the basis of the model effect, wherein based on the model map, after the model map is rendered in a game engine tool by the initial game model, the displayed model effect is similar to or even consistent with the rendering effect in the map drawing tool. Meanwhile, the rendering effect in the actual game scene is consistent with the preset rendering effect.
The embodiment of the invention provides a method for drawing a model chartlet, which comprises the steps of obtaining scene resources of a target game scene generated by a game engine tool and material resources of an initial game model; determining shader resources in the map drawing tool according to the scene resources and the material resources; in the map rendering tool, a model map of the initial game model is rendered based on the scene resources and shader resources. In the mode, shader resources in the mapping drawing tool are set through scene resources and material resources in the game engine tool, so that when the model mapping of the initial game model is drawn, the mapping drawing tool can simulate the model rendering effect in the game engine tool, the problem that the model mapping is repeatedly modified due to inaccurate drawn model mapping and different model effects in different tools of the initial game model is solved, the efficiency of drawing the model mapping is improved, and meanwhile the development efficiency of the game model is improved
In the related technology for obtaining the HDR map of the game scene, only the model of the game scene can be obtained, information such as lamplight and post-processing cannot be captured, and the lamplight information needs to be forged by using the model in the later period. Based on the above, another method for drawing a model map is described below, where the scene resources include HDR (High-Dynamic Range) maps of target game scenes; among them, the HDR map may also be called an HDRI map, and in image software such as 3D, there is an environment map with a high dynamic range. It plays an important role in: as an environmental background (e.g., rendering a building model, blue sky cloudlet trees in the background, etc. can be used to make this map). The method is mainly used for rendering illumination in the game scene in the mapping tool as the environment background. In this embodiment, a step of acquiring scene resources of a target game scene generated by a game engine tool is mainly described, and as shown in fig. 2, the method specifically includes the following steps:
step S202, setting a three-dimensional model at the illumination position of a target game scene, and endowing a preset target material to the three-dimensional model;
the three-dimensional model can be a sphere model, the illumination position refers to the position of light in a target game scene, and the preset target material can be a parameter with a self-illumination function and is mainly used for enabling the three-dimensional model to have the illumination function. Specifically, a body model, such as a sphere model, is newly established in a target game scene in the game engine tool, the newly established model is copied to a lighting position of the target game scene, specifically, lighting can be clicked on a display interface of the target game scene, that is, a position parameter of the lighting can be displayed on the attribute bar, and then the position parameter can be clicked by right clicking, so that the three-dimensional model can be copied to the lighting position. Then, a target material, such as a material ball, is newly built, and the target material is endowed to the three-dimensional model.
Step S204, adjusting self-luminous parameters of the target material; the target material simulates illumination information of a target game scene through self-luminescence parameters;
the self-luminescence parameters generally include a color parameter and an intensity parameter of the lamp light. Specifically, the self-luminous parameters of the target material can be adjusted according to experience, and the self-luminous parameters of the target material can be adjusted according to the attribute information of light in the target game scene, such as color attribute, intensity attribute and the like, so that the illumination information of the target game scene can be simulated by the adjusted target material.
Step S206, acquiring an HDR map of a target game scene in a preset cube capturing mode; the HDR map comprises illumination information of target material simulation, and is used for providing illumination for a game scene in the map drawing tool.
The cube capturing manner specifically includes: adding a Scene capturing Cube of Scene Capture into a Scene of a Target game, creating a Cube Render Target in a Scene Capture Cube detail panel, adding the Cube Render Target to a texture Target in the Scene Capture Cube, capturing 360 images of the position of the Scene Capture Cube in the Scene of the Target game by the Cube Render Target at the moment, creating static texture in the Cube Render Target, and obtaining the HDR map of the Scene of the Target game. In the mode, the self-luminous model is established at the light position of the target game scene, and the self-luminous parameters are adjusted at the same time, so that the illumination of the target game scene can be simulated, and further the illumination information of the target game scene, namely HDR (high-resolution graphics) chartlet can be obtained, the effect synchronization of the game scene in different tools is improved, and the accuracy of model chartlet is further improved.
The illumination information comprises illumination intensity and/or illumination color; in the step S204, the step of adjusting the self-luminescence parameter of the target material is, in one possible implementation manner:
adjusting an intensity parameter in the self-luminous parameter of the target material according to the intensity attribute of illumination in the target game scene; and/or adjusting color parameters in the self-luminous parameters of the target material according to the color attributes of illumination in the target game scene.
Specifically, the interface of the target game scene displayed by the game engine tool includes a light attribute panel, and the color, such as Lightcolor, can be directly copied from the light attribute panel, and the color value is copied and then pasted to the color parameter of the self-luminous parameter of the target material. Similarly, the intensity value may be copied directly from the light attribute panel and then pasted into the intensity parameter of the self-illumination parameter of the target material. In addition, in the self-luminous parameters of the target material, the color parameters and the intensity parameters are provided with adjusting nodes, and the color parameters and the intensity parameters can be adjusted according to the exposed parameters of the nodes and the actual conditions. In the mode, the self-luminous parameters of the target materials can be adjusted according to the light attributes in the target game scene, so that the synchronization of the illumination effects of the game scene in different tools is further improved, and the accuracy of model mapping is further improved.
It is understood that the step of adjusting the self-luminescence parameters of the target material, one possible implementation: the intensity parameter in the self-luminescence parameter of the target material can be adjusted according to the intensity attribute of the illumination in the target game scene. Or adjusting the color parameter in the self-luminescence parameter of the target material according to the color attribute of illumination in the target game scene. The intensity parameter in the self-luminous parameter of the target material can be adjusted according to the intensity attribute of illumination in the target game scene; and adjusting color parameters in the self-luminescence parameters of the target material according to the color attributes of the illumination in the target game scene.
In addition, it should be noted that the light information cannot be perfectly synchronized, and only approximate simulation is possible, which depends more on the experience of art workers, but some auxiliary methods are available. Based on this, after the self-illumination parameters are adjusted, in order to further improve the synchronization of the illumination effect of the game scenes in different tools, a color calibration model (also called color calibrator model, which is a model commonly used in film and television, and is generally used for observing the color change in different lighting environments) is preset, and the material resources are synchronized.
In the color block part of the color calibration model, a color block map is sampled from the material of the game engine tool to be used as a basecolor, the metal degree input value is 0, and the roughness input value is 0.95. In the mapping tool, the color calibration model is given a default standard shader, sample color squares, a metal degree input of 0, and a roughness input of 0.95.
In the bead part of the color calibration model, in the material of the game engine tool, basecolor is given a color of float3 (0.8 ) in gray, the degree of metallization is given 1, and the roughness is given 0.1. In the mapping tool, the color calibration model is given a default standard shader, basecolor, a float3 (0.8 ) gray color, a 1 for the degree of metallization, and a 0.1 for the degree of coarseness.
The non-metallic ball part of the color calibration model, in the material of the game engine tool, basecolor is given a float3 (0.18 ) gray, the degree of metallization is given 0, and the roughness is given 0.85. In the mapping tool, the color calibration model is given a default standard shader, basecolor, a float3 (0.18 ) gray, a degree of metallization 0, and a roughness 0.85.
The steps can complete material synchronization of the color calibration model, then the model rendering effect of the obtained HDR chartlet in the game scene in the chartlet drawing tool is compared with the model rendering effect in the game engine tool, and the self-luminous parameters are adjusted according to the practicability of the comparison result. For example, if the rendered model effect difference is observed to be large, the self-luminescence parameters in the body model material in the game engine tool need to be readjusted, and the HDR map of the adjusted target game scene needs to be obtained again. This may be repeated until the color calibration model is close in effect in the game engine tool and in the charting tool.
In the above step of determining shader resources in the map drawing tool according to the scene resources and the material resources, a possible implementation manner is:
(1) In the charting tool, creating initial shader resources for an initial game model;
(2) And synchronizing the scene resources and the material resources to the initial shader resources to obtain the shader resources in the mapping drawing tool.
Specifically, first, an initial shader resource, which is a base of the initial game model, is created in the mapping tool, and the initial shader resource is a custom resource. The material calculation usually includes: samples of basecolor maps (providing color information), samples of Normal maps (providing shadow details), samples of metallization levels, roughness maps, and specula (highlight) values.
Specifically, the computing resources and the material resources in the scene resources other than the HDR map may be synchronized to the initial shader resources, or the computing resources and the material resources in the scene resources other than the HDR map may be synchronized to the initial shader resources, which are different from the initial shader resources. In the method, in the map drawing tool, a self-defined shader resource is firstly created, and then the scene resource and the material resource are synchronized, so that the operation flow is simplified, and the drawing and development efficiency is improved.
The scene resource further includes: a first execution code for tone mapping and a second execution code for color correction; the first execution code of tone mapping may be denoted tonemapping and the second execution code of color correction may be denoted colordirect.
In the foregoing step of synchronizing the scene resources and the material resources to the initial shader resources to obtain shader resources in the map drawing tool, a possible implementation manner is as follows:
(1) Writing the material resource into the initial shader resource to obtain a first shader resource in the mapping drawing tool;
the texture resource may be a different resource from the initial shader resource, or may be a target resource in the texture resource. Specifically, the material resources may be written into the initial shader resources entirely, or part of the material resources may be selectively written into the initial shader resources, or the specific information in the material resources may be written into the initial shader resources.
(2) And writing the first execution code of the tone mapping and the second execution code of the color correction into the first shader resource to obtain the shader resource in the mapping drawing tool.
The first execution code of tone mapping and the second execution code of color correction can be generally called as the post-processing of the game scene, and are mainly used for mapping the tone of the target game scene and correcting the mapped tone, so that the game scene in the mapping tool is more synchronous with the color environment of the actual game scene. In the above manner, the synchronization between the game scene and the actual game scene in the mapping tool is further improved and the rendering effect of the model in the mapping tool is improved by writing the initial shader resource material resource, the first execution code of tone mapping and the second execution code of color correction.
The step of writing the material resource into the initial shader resource to obtain the first shader resource in the tile drawing tool comprises: and writing the third execution code of the highlight calculation into the initial shader resource to obtain the first shader resource.
It should be noted that, in general, the texture resources are the same as the samples of the basecolor map (providing color information), the samples of the Normal map (providing shadow details), and the samples of the metallization and roughness maps in the initial shader resources. Wherein the reflection information is provided by means of a metallization and roughness map, the two maps being grey scale maps, only black, white and grey for recording values, black being 0, white being 1, grey being values between 0 and 1. They determine whether the texture of the model is smooth or rough, metallic or non-metallic. However, the third code for highlight calculation in the material resource, i.e. the Specular value, is different from that in the initial shader resource, so that the third code for highlight calculation in the material resource needs to be written into the initial shader resource.
Wherein the Specular value in the material resource is obtained by (1-roughness map) Specular value (the Specular value is regarded as 0.2 by default). But default in the initial shader resources is to sample a specularie _ tex (the highlight map is called specularie in the mapping tool) map to obtain specularie value. Therefore, it is necessary to write the SpecularLevel = (1-roughness) × 0.2, roughness is roughness map, and the inner 0.2 is SpecularValue in the material resource, into the initial shader resource.
In the above manner, the third execution code of highlight calculation in the material resource, i.e. the special value, is written into the initial shader resource, so that the material calculation difference between the game engine tool and the mapping tool is eliminated, the rendering effect of the initial game model in the mapping tool is improved, and the synchronization between the rendering effect and the rendering effect of the initial game model in the game scene of the game engine is improved.
In the above step of drawing a model map of an initial game model based on scene resources and shader resources, a possible implementation manner is as follows: setting the HDR map in the scene resources as a model map of a target game scene model in a map drawing tool, endowing shader resources to an initial game model, and simulating the model effect of the initial game model; and drawing a model map of the initial game model based on the model effect of the initial game model.
In actual implementation, the shader resources are assigned to the initial game model, and the rendering effect of the initial game model is changed. Meanwhile, a scene model (for example, a sphere model, which can be understood as a sky sphere) is created in the chartlet drawing tool, corresponding to the target game scene, and then the HDR chartlet is placed in the chartlet drawing tool and set as the HDR chartlet of the scene model, so that the scene model has illumination similar to that of the target game model, and thus the target game scene can be simulated in the chartlet drawing tool, and meanwhile, the model effect (such as highlight, roughness and the like of the model) of the initial game model in the game engine tool is simulated. In the model effect and the game scene, the model map of the initial game model is drawn, so that the drawn model map has higher accuracy.
In the mode, through the HDR mapping and the shader resources, the game scene and the model effect similar to those in the game engine tool can be simulated in the mapping drawing tool, in the model effect and the game scene, the model mapping of the drawn initial game model is more accurate, the problem of repeated modification caused by inaccurate model mapping is avoided, and the mapping drawing efficiency and the model making efficiency are improved.
After the step of drawing the model map of the initial game model based on the scene resources and the shader resources, the method further includes: rendering the initial game model based on the initial game model and a model map of the initial game model in a game engine tool to obtain a rendered initial game model; and the model rendering effect of the rendered initial game model in the game engine tool is the same as the model rendering effect of the initial game model in the mapping drawing tool based on the model mapping.
After the drawing of the model map is completed, in order to verify the rendering effect of the model map in the game scene of the game engine tool, the initial game model and the model map need to be input into the game engine tool, the model map is rendered to the initial game model, and the rendered initial game model is displayed in the target game scene, so as to observe whether the model rendering effect in the game engine tool and the model rendering effect in the map drawing tool have a difference.
In the embodiment, since the texture calculation of the game scene and the model which are the same as those of the game engine tool is set in the mapping tool, the model rendering effect of the initial game model in the game engine tool is the same as the model rendering effect of the initial game model in the mapping tool based on the model mapping. Fig. 3 (a) shows a model rendering effect of the initial game model in the mapping tool, and fig. 3 (b) shows a model rendering effect of the initial game model in the game engine tool. The background of (a) in fig. 3 is that after HDR mapping, a sphere model for HDR mapping, i.e. a sky sphere, provides illumination that is similar to or even identical to the illumination effect of the target game scene created in the game engine tool. The background in the game engine tool is built through a model. Since the scene resource and the material resource in the mapping tool are the same as those in the game engine tool, the same function of rendering the initial game model in the game engine tool as that in the mapping tool can be realized.
In the mode, the lighting information and the post-processing information of the actual game scene in the game engine tool and the material calculation of the initial game model are synchronized to the mapping drawing tool, so that the effect of the model in the mapping drawing tool is consistent with the effect of the model in the game scene in the game engine tool, the mapping drawing efficiency, the model making efficiency and the game development efficiency are improved, and the mapping drawing accuracy is also improved.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a device for drawing a model map, and as shown in fig. 4, the device includes:
an obtaining module 41, configured to obtain scene resources of a target game scene generated by a game engine tool, and material resources of an initial game model;
a determining module 42, configured to determine shader resources in the map drawing tool according to the scene resources and the material resources; wherein, the shader resources are used for simulating the model rendering effect of the game engine tool;
and a drawing module 43, configured to draw a model map of the initial game model based on the scene resources and the shader resources in the map drawing tool.
The embodiment of the invention provides a device for drawing a model chartlet, which is used for acquiring scene resources of a target game scene generated by a game engine tool and material resources of an initial game model; determining shader resources in the map drawing tool according to the scene resources and the material resources; in the map rendering tool, a model map of the initial game model is rendered based on the scene resources and shader resources. In the mode, shader resources in the mapping drawing tool are set through scene resources and material resources in the game engine tool, so that when the model mapping of the initial game model is drawn, the mapping drawing tool can simulate the model rendering effect in the game engine tool, the problem that the model mapping is repeatedly modified due to the fact that the drawn model mapping is inaccurate and the model effects in different tools of the initial game model are different is solved, the efficiency of drawing the model mapping is improved, and meanwhile the development efficiency of the game model is improved.
Further, the scene resource includes an HDR map of the target game scene; the acquisition module is further configured to: setting a three-dimensional model at the illumination position of a target game scene, and endowing a preset target material to the three-dimensional model; adjusting self-luminous parameters of the target material; the target material simulates illumination information of a target game scene through self-luminescence parameters; acquiring an HDR map of a target game scene in a preset cube capturing mode; the HDR chartlet comprises illumination information of target material simulation and is used for providing illumination for a game scene in the chartlet drawing tool.
Further, the illumination information includes illumination intensity and/or illumination color; the obtaining module is further configured to: adjusting an intensity parameter in self-luminous parameters of a target material according to the intensity attribute of illumination in a target game scene; and/or adjusting color parameters in the self-luminous parameters of the target material according to the color attributes of the illumination in the target game scene.
Further, the determining module is further configured to: in a mapping tool, creating initial shader resources of an initial game model; and synchronizing the scene resources and the material resources to the initial shader resources to obtain the shader resources in the mapping drawing tool.
Further, the scene resource further includes: a first execution code of tone mapping and a second execution code of color correction; the determining module is further configured to: writing the material resource into the initial shader resource to obtain a first shader resource in the mapping drawing tool; and writing the first execution code of the tone mapping and the second execution code of the color correction into the first shader resource to obtain the shader resource in the mapping drawing tool.
Further, the material resource includes a third execution code for highlight calculation, and the determining module is further configured to: and writing the third execution code of highlight calculation into the initial shader resource to obtain the first shader resource.
Further, the drawing module is further configured to: setting the HDR map in the scene resource as a model map of a target game scene model in a map drawing tool, endowing shader resources to the initial game model, and simulating the model effect of the initial game model; and drawing a model map of the initial game model based on the model effect of the initial game model.
Further, the apparatus further includes a rendering module configured to: rendering the initial game model based on the initial game model and the model map of the initial game model in a game engine tool to obtain the rendered initial game model; and the model rendering effect of the rendered initial game model in the game engine tool is the same as the model rendering effect of the initial game model in the mapping drawing tool based on the model mapping.
The device for drawing the model map provided by the embodiment of the invention has the same technical characteristics as the method for drawing the model map provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment also provides an electronic device, which includes a processor and a memory, where the memory stores computer-executable instructions capable of being executed by the processor, and the processor executes the computer-executable instructions to implement the method for drawing the model map. The electronic device may be a server or a terminal device.
Referring to fig. 5, the electronic device includes a processor 100 and a memory 101, where the memory 101 stores computer-executable instructions that can be executed by the processor 100, and the processor 100 executes the computer-executable instructions to implement the above-mentioned model map drawing method, and the method specifically includes the following steps:
scene resources of a target game scene generated by a game engine tool and material resources of an initial game model are obtained; determining shader resources in the map drawing tool according to the scene resources and the material resources; the shader resources are used for simulating a model rendering effect of the game engine tool; in the map rendering tool, a model map of the initial game model is rendered based on the scene resources and shader resources. In the mode, shader resources in the mapping drawing tool are set through scene resources and material resources in the game engine tool, so that when the model mapping of the initial game model is drawn, the mapping drawing tool can simulate the model rendering effect in the game engine tool, the problem that the model mapping is repeatedly modified due to inaccurate drawn model mapping and different model effects in different tools of the initial game model is solved, the efficiency of drawing the model mapping is improved, and the development efficiency of the game model is improved.
The scene resources comprise HDR maps of the target game scene; the step of obtaining scene resources of the target game scene generated by the game engine tool includes: setting a three-dimensional model at the illumination position of a target game scene, and endowing a preset target material to the three-dimensional model; adjusting self-luminous parameters of the target material; the target material simulates illumination information of a target game scene through self-luminescence parameters; acquiring an HDR map of a target game scene in a preset cube capturing mode; the HDR chartlet comprises illumination information of target material simulation and is used for providing illumination for a game scene in the chartlet drawing tool. In the method, the self-luminous model is established at the lamplight position of the target game scene, and the self-luminous parameters are adjusted at the same time, so that the illumination of the target game scene can be simulated, and further the illumination information of the target game scene, namely the HDR mapping, can be obtained, thereby improving the effect synchronization of the game scenes in different tools, and further improving the accuracy of the model mapping.
The illumination information comprises illumination intensity and/or illumination color; the step of adjusting the self-luminescence parameter of the target material comprises: adjusting an intensity parameter in the self-luminous parameter of the target material according to the intensity attribute of illumination in the target game scene; and/or adjusting color parameters in the self-luminous parameters of the target material according to the color attributes of illumination in the target game scene. In the mode, the self-luminous parameters of the target materials can be adjusted according to the light attributes in the target game scene, so that the synchronization of the illumination effects of the game scene in different tools is further improved, and the accuracy of model mapping is further improved.
The step of determining shader resources in the map drawing tool according to the scene resources and the material resources includes: in a mapping tool, creating initial shader resources of an initial game model; and synchronizing the scene resources and the material resources to the initial shader resources to obtain the shader resources in the mapping drawing tool. In the method, in the chartlet drawing tool, a self-defined shader resource is firstly created, and then the scene resource and the material resource are synchronized, so that the operation flow is simplified, and the chartlet drawing and model making efficiency is improved.
The scene resources further include: a first execution code for tone mapping and a second execution code for color correction; synchronizing the scene resources and the material resources to the initial shader resources to obtain shader resources in the map drawing tool, wherein the step comprises the following steps of: writing the material resource into the initial shader resource to obtain a first shader resource in the mapping drawing tool; and writing the first execution code of the tone mapping and the second execution code of the color correction into the first shader resource to obtain the shader resource in the mapping drawing tool. In the method, the synchronization of the game scene in the mapping drawing tool and the actual game scene is further improved and the rendering effect of the model in the mapping drawing tool is improved by writing the initial shader resource material resource, the first execution code of tone mapping and the second execution code of color correction.
Further, the step of writing the material resource into the initial shader resource to obtain the first shader resource in the map drawing tool, where the material resource includes a third execution code for highlight calculation, includes: and writing the third execution code of highlight calculation into the initial shader resource to obtain the first shader resource. In this way, the highlight calculation resource (the third execution code) in the material resource, i.e. the specific numerical value, is written into the initial shader resource, so that the material calculation difference between the game engine tool and the mapping tool is eliminated, the rendering effect of the initial game model in the mapping tool is improved, and the synchronization between the rendering effect and the rendering effect of the initial game model in the game scene of the game engine is improved.
Further, the step of drawing a model map of the initial game model based on the scene resources and the shader resources includes: setting the HDR map in the scene resource as a model map of a target game scene model in a map drawing tool, endowing shader resources to the initial game model, and simulating the model effect of the initial game model; and drawing a model map of the initial game model based on the model effect of the initial game model. In the mode, through HDR mapping and shader resources, a game scene and a model effect similar to those in a game engine tool can be simulated in the mapping drawing tool, in the model effect and the game scene, the model mapping of the drawn initial game model is more accurate, the problem of repeated modification caused by inaccurate model mapping is avoided, and the mapping drawing efficiency and the model making efficiency are improved.
Further, after the step of drawing the model map of the initial game model based on the scene resources and the shader resources, the method further comprises: rendering the initial game model based on the initial game model and the model map of the initial game model in a game engine tool to obtain the rendered initial game model; and the model rendering effect of the rendered initial game model in the game engine tool is the same as the model rendering effect of the initial game model in the mapping drawing tool based on the model mapping.
Further, the electronic device shown in fig. 5 further includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103 and the memory 101 are connected through the bus 102.
The Memory 101 may include a Random Access Memory (RAM) and a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like may be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 5, but this does not indicate only one bus or one type of bus.
Processor 100 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 100. The Processor 100 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The present embodiment also provides a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the method for drawing the model map, where the method specifically includes the following steps:
scene resources of a target game scene generated by a game engine tool and material resources of an initial game model are obtained; determining shader resources in the map drawing tool according to the scene resources and the material resources; the shader resources are used for simulating a model rendering effect of the game engine tool; in the map rendering tool, a model map of the initial game model is rendered based on scene resources and shader resources. In the mode, shader resources in the mapping drawing tool are set through scene resources and material resources in the game engine tool, so that when the model mapping of the initial game model is drawn, the mapping drawing tool can simulate the model rendering effect in the game engine tool, the problem that the model mapping is repeatedly modified due to inaccurate drawn model mapping and different model effects in different tools of the initial game model is solved, the efficiency of drawing the model mapping is improved, and the development efficiency of the game model is improved.
The scene resources comprise HDR maps of the target game scene; the step of obtaining scene resources of the target game scene generated by the game engine tool includes: setting a three-dimensional model at the illumination position of a target game scene, and endowing a preset target material to the three-dimensional model; adjusting self-luminous parameters of the target material; the target material simulates illumination information of a target game scene through self-luminescence parameters; acquiring an HDR map of a target game scene in a preset cube capturing mode; the HDR chartlet comprises illumination information of target material simulation and is used for providing illumination for a game scene in the chartlet drawing tool. In the method, the self-luminous model is established at the lamplight position of the target game scene, and the self-luminous parameters are adjusted at the same time, so that the illumination of the target game scene can be simulated, and further the illumination information of the target game scene, namely the HDR mapping, can be obtained, thereby improving the effect synchronization of the game scenes in different tools, and further improving the accuracy of the model mapping.
The illumination information comprises illumination intensity and/or illumination color; the step of adjusting the self-luminescence parameter of the target material comprises: adjusting an intensity parameter in the self-luminous parameter of the target material according to the intensity attribute of illumination in the target game scene; and/or adjusting color parameters in the self-luminous parameters of the target material according to the color attributes of illumination in the target game scene. In the mode, the self-luminous parameters of the target materials can be adjusted according to the light attributes in the target game scene, so that the synchronization of the illumination effects of the game scene in different tools is further improved, and the accuracy of model mapping is further improved.
Further, the step of determining shader resources in the map drawing tool according to the scene resources and the material resources includes: in a mapping tool, creating initial shader resources of an initial game model; and synchronizing the scene resources and the material resources to the initial shader resources to obtain the shader resources in the mapping drawing tool. In the method, in the charting tool, a custom shader resource is created firstly, and then the scene resource and the material resource are synchronized, so that the operation flow is simplified, and the drawing and development efficiency is improved.
Further, the scene resource further includes: a first execution code of tone mapping and a second execution code of color correction; synchronizing the scene resources and the material resources to the initial shader resources to obtain shader resources in the map drawing tool, wherein the step comprises the following steps of: writing the material resource into the initial shader resource to obtain a first shader resource in the map drawing tool; and writing the first execution code of the tone mapping and the second execution code of the color correction into the first shader resource to obtain the shader resource in the mapping drawing tool. In the method, the synchronization of the game scene in the mapping drawing tool and the actual game scene is further improved and the rendering effect of the model in the mapping drawing tool is improved by writing the initial shader resource material resource, the first execution code of tone mapping and the second execution code of color correction.
Further, the step of writing the material resource into the initial shader resource to obtain the first shader resource in the map drawing tool, where the material resource includes a third execution code for highlight calculation, includes: and writing the third execution code of highlight calculation into the initial shader resource to obtain the first shader resource. In this way, the highlight calculation resource (the third execution code) in the material resource, i.e. the specific numerical value, is written into the initial shader resource, so that the material calculation difference between the game engine tool and the mapping tool is eliminated, the rendering effect of the initial game model in the mapping tool is improved, and the synchronization between the rendering effect and the rendering effect of the initial game model in the game scene of the game engine is improved.
Further, the step of drawing a model map of the initial game model based on the scene resources and the shader resources includes: setting the HDR map in the scene resources as a model map of a target game scene model in a map drawing tool, endowing shader resources to an initial game model, and simulating the model effect of the initial game model; and drawing a model map of the initial game model based on the model effect of the initial game model. In the mode, through HDR mapping and shader resources, a game scene and a model effect similar to those in a game engine tool can be simulated in the mapping drawing tool, in the model effect and the game scene, the model mapping of the drawn initial game model is more accurate, the problem of repeated modification caused by inaccurate model mapping is avoided, and the mapping drawing efficiency and the model making efficiency are improved.
Further, after the step of drawing the model map of the initial game model based on the scene resources and the shader resources, the method further comprises: rendering the initial game model based on the initial game model and the model map of the initial game model in a game engine tool to obtain the rendered initial game model; and the model rendering effect of the rendered initial game model in the game engine tool is the same as the model rendering effect of the initial game model in the mapping drawing tool based on the model mapping.
The method, apparatus, electronic device, and computer program product for drawing a model map provided in the embodiments of the present invention include a computer-readable storage medium storing program codes, where instructions included in the program codes may be used to execute the methods described in the foregoing method embodiments, and specific implementations may refer to the method embodiments, which are not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the system and the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood in specific cases for those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the following embodiments are merely illustrative of the present invention, and not restrictive, and the scope of the present invention is not limited thereto: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some features, within the scope of the disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A method for drawing a model map, the method comprising:
scene resources of a target game scene generated by a game engine tool and material resources of an initial game model are obtained;
determining shader resources in a map drawing tool according to the scene resources and the material resources; wherein the shader resources are to simulate model rendering effects of the game engine tool;
in the map rendering tool, a model map of the initial game model is rendered based on the scene resources and the shader resources.
2. The method of claim 1, wherein the scene resources comprise HDR maps of the target game scene;
the method for acquiring the scene resources of the target game scene generated by the game engine tool comprises the following steps:
setting a three-dimensional model at the illumination position of the target game scene, and endowing a preset target material to the three-dimensional model;
adjusting self-luminous parameters of the target material; the target material simulates illumination information of the target game scene through the self-luminous parameters;
acquiring an HDR map of the target game scene in a preset cube capturing mode; wherein the HDR map includes illumination information for the target material simulation for providing illumination for a game scene in the map rendering tool.
3. The method according to claim 2, wherein the illumination information comprises illumination intensity and/or illumination color;
adjusting the self-luminescence parameters of the target material, comprising:
adjusting an intensity parameter in the self-luminous parameters of the target material according to the intensity attribute of illumination in the target game scene; and/or the presence of a gas in the gas,
and adjusting the color parameter in the self-luminous parameter of the target material according to the color attribute of illumination in the target game scene.
4. The method of claim 1, wherein the step of determining shader resources in the charting tool based on the scene resources and the material resources comprises:
creating, in the charting tool, initial shader resources of the initial game model;
and synchronizing the scene resources and the material resources to the initial shader resources to obtain shader resources in the map drawing tool.
5. The method of claim 4, wherein the scene resource further comprises: a first execution code of tone mapping and a second execution code of color correction;
synchronizing the scene resources and the material resources to the initial shader resources to obtain shader resources in the map drawing tool, wherein the step of synchronizing the scene resources and the material resources to the initial shader resources comprises the following steps:
writing the material resource into the initial shader resource to obtain a first shader resource in the map drawing tool;
and writing the first execution code of the tone mapping and the second execution code of the color correction into the first shader resource to obtain a shader resource in the mapping drawing tool.
6. The method of claim 5, wherein the material resource comprises a third execution code for highlight calculations;
writing the material resource into the initial shader resource to obtain a first shader resource in the map drawing tool, including:
and writing a third execution code of the highlight calculation into the initial shader resource to obtain the first shader resource.
7. The method of claim 1, wherein the step of rendering a model map of the initial game model based on the scene resources and the shader resources comprises:
setting the HDR map in the scene resource as a model map of a target game scene model in the map drawing tool, endowing the shader resource to the initial game model, and simulating the model effect of the initial game model;
and drawing a model map of the initial game model based on the model effect of the initial game model.
8. The method of claim 1, wherein after the step of drawing a model map of the initial game model based on the scene resources and the shader resources, the method further comprises:
in the game engine tool, rendering the initial game model based on the initial game model and the model map of the initial game model to obtain the rendered initial game model; wherein a model rendering effect of the rendered initial game model in the game engine tool is the same as a model rendering effect of the initial game model in the map drawing tool based on the model map.
9. An apparatus for rendering a model map, the apparatus comprising:
the acquisition module is used for acquiring scene resources of a target game scene generated by the game engine tool and material resources of the initial game model;
the determining module is used for determining shader resources in the mapping tool according to the scene resources and the material resources; wherein the shader resources are to simulate model rendering effects of the game engine tool;
and the drawing module is used for drawing the model map of the initial game model in the map drawing tool based on the scene resources and the shader resources.
10. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of rendering a model map of any of claims 1-8.
11. A computer-readable storage medium having stored thereon computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method of rendering a model map of any of claims 1-8.
CN202210677868.XA 2022-06-15 2022-06-15 Method and device for drawing model map and electronic equipment Pending CN115311401A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210677868.XA CN115311401A (en) 2022-06-15 2022-06-15 Method and device for drawing model map and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210677868.XA CN115311401A (en) 2022-06-15 2022-06-15 Method and device for drawing model map and electronic equipment

Publications (1)

Publication Number Publication Date
CN115311401A true CN115311401A (en) 2022-11-08

Family

ID=83854499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210677868.XA Pending CN115311401A (en) 2022-06-15 2022-06-15 Method and device for drawing model map and electronic equipment

Country Status (1)

Country Link
CN (1) CN115311401A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117934692A (en) * 2023-12-29 2024-04-26 山东舜网传媒股份有限公司 SC-FEGAN depth model-based 3D scene self-adaptive mapping method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117934692A (en) * 2023-12-29 2024-04-26 山东舜网传媒股份有限公司 SC-FEGAN depth model-based 3D scene self-adaptive mapping method

Similar Documents

Publication Publication Date Title
CN109427088B (en) Rendering method for simulating illumination and terminal
US20230053462A1 (en) Image rendering method and apparatus, device, medium, and computer program product
CN112169324A (en) Rendering method, device and equipment of game scene
CN114663324A (en) Fusion display method of BIM (building information modeling) model and GIS (geographic information system) information and related components
CN112419460B (en) Method, apparatus, computer device and storage medium for baking model map
CN109801342B (en) Method and device for dynamically identifying mapping fit degree in running process on mobile equipment
CN114119853A (en) Image rendering method, device, equipment and medium
CN115311401A (en) Method and device for drawing model map and electronic equipment
CN112907451A (en) Image processing method, image processing device, computer equipment and storage medium
CN115908716A (en) Virtual scene light rendering method and device, storage medium and electronic equipment
CN115512025A (en) Method and device for detecting model rendering performance, electronic device and storage medium
CN113034688A (en) Three-dimensional map model generation method and device
CN117237514A (en) Image processing method and image processing apparatus
CN110378948B (en) 3D model reconstruction method and device and electronic equipment
CN108280887B (en) Shadow map determination method and device
US20240338882A1 (en) Rendering a visual representation of a luminaire by re-using light values
CN111080760A (en) Oblique photography measurement data optimization method and system
CN115908673A (en) Three-dimensional model display method and device, electronic equipment and storage medium
CN108447112A (en) Analogy method, device and the VR equipment of role's light environment
CN108846897B (en) Three-dimensional model surface material simulation method and device, storage medium and electronic equipment
CN108320320B (en) Information display method, device and equipment
US20240312117A1 (en) System and method for real-time ray tracing in a 3d environment
CN114399572A (en) Dynamic shadow generation method and device, electronic equipment and storage medium
CN116474363A (en) Scene model rendering method and device and electronic equipment
CN114782606A (en) Voxel model texture map unfolding method and device, electronic device and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination