Snowfield mark rendering method and device, electronic equipment and storage medium
By obtaining and converting the depth map of the target object as a texture, and rendering it with the preset snow material information, the problem of poor realism in the virtual snow mark in the existing technology is solved, and a high-reality snow mark rendering effect is achieved.
Patent Information
- Application Number
- CN202411666754.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-05-02
AI Technical Summary
The prior art has poor realism when rendering virtual snow imprints, especially in close-up conditions, and it is difficult to maintain a realistic effect.
By obtaining the depth map of the target object, it indicates the distance between its contact surface and the scene surface, and converting it into the scene's surface texture, it is rendered with the preset snow material information to generate snow rendering results with snow marks.
It improves the realism of the virtual snow imprint, can maintain a realistic effect under close-up conditions, and enhances the interactivity of the scene.
Smart Images

Figure CN119919552A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of rendering technology, and in particular to a method, device, electronic device and storage medium for rendering snow marks. Background Art
[0002] When people or objects stay or pass through the snow, they will leave marks, such as footprints, indentations, etc. The rendering of snow marks is an important manifestation of scene interactivity. Existing technologies usually simulate snow marks through the trajectory of characters, but they cannot withstand the test of close-up and have the technical problem of poor realism. Summary of the invention
[0003] In view of this, an object of the present disclosure is to provide a method, device, electronic device and storage medium for rendering snow marks to improve the realism of virtual snow marks.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for rendering snow marks, the method comprising: in response to a snow mark rendering instruction for a target object, obtaining a first depth map corresponding to the target object; wherein the first depth map is used to indicate the distance between a contact surface of the target object and the surface of the scene, and the contact surface is a contact surface between the target object and the snow on the surface; converting the first depth map into a surface texture of the scene to obtain a first texture map; rendering snow and snow marks on the surface of the scene according to the first texture map and preset snow material information to obtain a snow mark rendering result.
[0005] In a second aspect, an embodiment of the present disclosure provides a device for rendering snow marks, the device comprising: a depth acquisition module, for responding to a snow mark rendering instruction for a target object, to acquire a first depth map corresponding to the target object; wherein the first depth map is used to indicate the distance between a contact surface of the target object and the surface of the scene, and the contact surface is the contact surface between the target object and the snow on the surface; a texture acquisition module, for converting the first depth map into a surface texture of the scene to obtain a first texture map; and a mark rendering module, for rendering snow and snow marks on the surface of the scene according to the first texture map and preset snow material information to obtain a snow mark rendering result.
[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned method for rendering snow marks.
[0007] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for rendering snow marks.
[0008] The embodiments of the present disclosure bring the following beneficial effects:
[0009] The above-mentioned rendering method, device, electronic device and storage medium of snow marks use a depth map to carry the distance between the contact surface of the target object and the surface of the scene, and then convert the depth map into the surface texture of the scene, which is merged with the preset snow material of the scene for rendering to obtain a snow rendering result with snow marks, which has a realistic effect.
[0010] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0011] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 It is a flow chart of an embodiment of a method for rendering snow marks in an embodiment of the present disclosure;
[0014] Figure 2 A schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0015] Figure 3 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0016] Figure 4 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0017] Figure 5 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0018] Figure 6is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0019] Figure 7 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0020] Figure 8 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0021] Fig. 9 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0022] Fig.10 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0023] Fig.11 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0024] Fig.12 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0025] Fig.13 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0026] Fig.14 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0027] Fig.15 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0028] Fig.16 is another schematic diagram of a method for rendering snow marks in an embodiment of the present disclosure;
[0029] Fig.17 A schematic diagram of a snow mark rendering device provided by an embodiment of the present disclosure;
[0030] Fig.18 A schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0032] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] For ease of understanding, the specific process of the embodiment of the present disclosure is described below. Figure 1 , an embodiment of the method for rendering snow marks in the embodiment of the present disclosure includes:
[0034] Step S10, in response to a snow mark rendering instruction for a target object, obtaining a first depth map corresponding to the target object; wherein the first depth map is used to indicate the distance between a contact surface of the target object and the surface of the scene, and the contact surface is a contact surface between the target object and the snow on the surface;
[0035] It should be noted that the target object can be any virtual object, such as a person, animal or virtual character. When the target object passes through the snow area of the scene, snow marks will be generated, such as footprints of creatures, indentations of objects, etc. The contact surface of the target object refers to the surface where the target object contacts the snow on the ground surface. For example, the contact surface when a person walks is the foot / shoe sole. The ground surface refers to the ground of the scene, which is a layer of terrain under the snow layer. After the snow melts, the ground surface is exposed, and the snow marks also show the ground surface.
[0036] It can be understood that the first depth map represents the distance between the contact surface of the target object and the ground surface, and is a depth representation of the ground surface toward the contact surface. Therefore, the first depth map is the depth information from the perspective of the direct contact surface, and can be collected by pre-setting a camera facing this angle. No specific limitation is made here.
[0037] By way of example and not limitation, Figure 2 FIG. 1 is a schematic diagram of a scene from a contact surface perspective toward a target object. The first depth map of the scene may be as follows: Figure 3 As shown, Figure 3 In the figure, the closer the color is to black, the closer the distance between the contact surface of the target object and the ground surface is. Black can represent a distance of 0 or a preset distance. White represents no contact with the ground surface. There is no specific limitation here.
[0038] It should be noted that the scene may include one or more target objects that can generate snow marks. For each target object, a snow rendering result with a snow mark effect, i.e., a snow mark rendering result, can be obtained through steps S10-S30 of the embodiment of the present disclosure.
[0039] In this embodiment, the first depth map includes the shape of the contact surface of the target object, such as Figure 3 The footprint shape shown is masked by the first depth map on the surface of the scene and then covered with snow, so that the surface of the scene can have a snow mark of the same shape as the contact surface, with high authenticity.
[0040] Step S20: convert the first depth map into a surface texture of the scene to obtain a first texture map;
[0041] It can be understood that since the first depth map already contains the shape of the contact surface of the target object, converting the first depth map into the surface texture of the scene for rendering the scene surface can enable the scene surface to obtain the corresponding shape of the contact surface. On the surface of a snowy scene, the shape of the contact surface can be presented as a snow mark, thereby obtaining a snow mark rendering result.
[0042] In one embodiment, since the target perspective of the scene is different from the acquisition perspective of the first depth map, the first depth map can be mapped to the surface texture of the scene according to the perspective relationship between the two, that is, mapped to the UV coordinates of the scene surface, to obtain the first texture map, so that the first texture map can be directly used for surface rendering of the scene.
[0043] In one embodiment, the first depth map can be converted into a mask map of the scene surface as the first texture map of the scene surface, wherein the mask area of the mask map is used to indicate the rendering area of the snow mark, and the non-mask area is used to indicate the rendering area of the snow, so that through subsequent rendering, the rendering result of the snow mark can be obtained.
[0044] In one embodiment, the first depth map can also be converted into a displacement map of the scene surface as a first texture map of the scene surface, wherein the values in the displacement map can be used to change the geometric shape of the model. By storing the first depth map as a displacement map, the height of the scene surface model can be dynamically changed to produce depressions of snow marks or bulges of snow on the scene surface. The specific details are not limited here.
[0045] Step S30: Rendering the snow and snow marks on the surface of the scene according to the first texture map and preset snow material information to obtain a snow mark rendering result.
[0046] In this embodiment, the material information of the snow can be preset. After obtaining the first texture map, the first texture map is used as one of the material information of the snow, and the snow and snow mark are rendered on the surface of the scene, thereby obtaining the snow mark rendering result. It should be noted that the snow mark rendering result includes the snow mark effect generated by the contact surface of the target object and the snow effect other than the snow mark.
[0047] For intuitive understanding, Figure 4 The following is a schematic diagram of the snow mark rendering result. Figure 4 It can be seen that the soles of the target object's feet have the effect of snow marks and depressions, while other areas have the effect of snow accumulation, and the details are realistic.
[0048] In one embodiment, the preset snow material information may include material parameters of the snowmelt effect, which are used to indicate the rendering of the snowmelt effect, so as to obtain a rendering result with the snow melting mark effect, wherein the material parameters of the snowmelt effect may include key frame animation parameters of the snowmelt animation, and the snowmelt animation is generated by the key frame animation parameters of the snowmelt animation. The snowmelt animation is superimposed on the snow mark rendering result to obtain a rendering result with the snow melting mark effect.
[0049] The method for rendering snow marks provided in the above-mentioned embodiment uses a depth map to carry the distance between the contact surface of the target object and the surface of the scene, and then converts the depth map into the surface texture of the scene, which is merged and rendered with the preset snow material of the scene to obtain a snow rendering result with snow marks, which has a realistic effect.
[0050] Next, the method for obtaining the first depth map is described in detail.
[0051] In one embodiment, when obtaining a first depth map corresponding to a target object, first depth information of the target object under a target perspective and second depth information of a scene where the target object is located are obtained; based on the first depth information and the second depth information, a distance between a current contact surface of the target object and a ground surface of the scene is determined to obtain a first depth map of the target object in the scene;
[0052] It can be understood that the depth map is used to indicate the distance from the camera to each visible surface point in the scene. Therefore, when the camera's viewing angle changes, the geometric relationship between the camera and the objects in the scene will also change. Different viewing angles may also lead to different object occlusion relationships.
[0053] In this implementation, the first depth map is used to indicate the distance between the contact surface of the target object and the surface of the scene. Therefore, the viewing angle of the first depth map is orthogonal to the contact surface of the target object, that is, the viewing angle of the contact surface of the target object. For example, assuming that the contact surface of the target object is the sole of a person's foot, then the viewing angle of the first depth map is the viewing angle of the sole of the person's foot.
[0054] Normally, the perspective of the first depth map will not be the perspective that the scene wants to present (i.e., the current perspective or target perspective of the scene), that is, the target perspective of the scene is usually different from the perspective of the first depth map. For example, in a virtual game, the perspective of the character's feet is usually not presented to the player unless the player adjusts it himself. Therefore, no matter what perspective the scene is currently in, the first depth map facing the contact surface perspective can be obtained to capture the shape of the target object in contact with the ground surface, thereby generating a snow mark.
[0055] In this embodiment, under the target perspective of the scene, the first depth information of the target object and the second depth information of the scene where the target object is located are obtained, and the second depth map under the contact surface perspective can be obtained based on the first depth information and the second depth information. As an example and not a limitation, Figure 5 FIG. 1 is a schematic diagram of first depth information of a target object. Figure 6 The second depth information of the scene where the target object is located is shown. Figure 5 and Figure 6 , you can get Figure 7 The first depth map shown is used to indicate the distance between the contact surface of the target object and the ground surface.
[0056] It is understandable that in the rendering pipeline, in addition to rendering the final output image, some intermediate results (such as depth values, normals, etc.) can also be rendered to the frame buffer for richer image processing in the post-processing stage of the rendering pipeline. Based on this, in one embodiment, the first depth information of the target object under the target perspective and the second depth information of the scene where the target object is located can be obtained from the frame buffer.
[0057] Specifically, you can create a scene texture (SceneTexture) node in the scene's material ball, turn on the scene depth (SceneDepth) property in the SceneTexture node, and then set the material domain (MaterialDomain) of the material ball to post-processing (Post Processing). In addition, set the scene's post-processing tool (such as Post ProcessVolume) to unbounded (Unbound), and then in the rendering pipeline, the second depth information of the scene under the target perspective can be output to the frame buffer.
[0058] Furthermore, a custom depth pass of the target object may be enabled in the Post Process Volume, so that the first depth information of the target object under the target perspective may be output to the frame buffer in the rendering pipeline.
[0059] In one embodiment, when the distance between the current contact surface of the target object and the surface of the scene is determined based on the first depth information and the second depth information to obtain a first depth map corresponding to the target object, the third depth information is obtained based on the difference between the first depth information and the second depth information; wherein the third depth information is used to indicate the distance between the current contact surface of the target object and the surface of the scene; the third depth information is sampled by a camera facing the contact surface to obtain a first depth map of the target object; wherein the first depth map includes the shape of the contact surface.
[0060] In this embodiment, the height of the target object from the ground surface is obtained by subtracting the second depth information of the scene from the first depth information of the target object, that is, the third depth information, and then the shape of the contact surface can be observed by observing the third depth information from a perspective toward the contact surface, that is, the first depth map of the target object is obtained. The perspective toward the contact surface refers to the perspective of looking directly at the contact surface, which is the perspective of the orthogonal camera of the contact surface.
[0061] By way of example and not limitation, Figure 8 The diagram is a schematic diagram of the third depth information. Figure 5 The first depth information shown is subtracted Figure 6 The third depth information obtained after the second depth information shown is obtained by the camera facing the contact surface. Figure 8 Take a sample and you can get Figure 7 The first depth map of the target object shown is not specifically limited here.
[0062] In one implementation, a scene image capture component (such as SceneCapture2D) may be created in advance in the scene to capture a specific portion of the scene and store the captured image as a texture, which is essentially a virtual camera.
[0063] Specifically, by adjusting the coordinate position and vertical direction (Y-axis) orientation of the scene image capture component and setting the projection type (projection type) of the scene image capture component to an orthographic type, a camera that can be used to sample the third depth information and obtain the first depth map can be obtained. In addition, the first depth map will not produce perspective, and the collected pixels will not change from larger to smaller when closer.
[0064] By way of example and not limitation, Fig. 9 As shown, the red arrow points to a camera facing the contact surface of the target object. The small picture in the lower right corner shows the scene from the target's perspective. It can be seen that the camera can observe the soles of the characters in the scene, which is the contact surface, for subsequent snow mark rendering.
[0065] It is understandable that since the first depth map is sampled from the back of the scene's surface, it does not match the scene's surface texture and cannot be directly used to render the scene's surface. Therefore, the first depth map needs to be converted into the scene's surface texture so that the obtained first texture map can be used to render the snow and snow marks on the scene's surface. Next, the scene's surface texture conversion method is specifically described.
[0066] In one embodiment, when converting the first depth map into the surface texture of the scene to obtain the first texture map, the texture coordinates of the first depth map and the surface texture of the scene are matched according to the world coordinates of the scene position of the target object to obtain the second depth map; the second depth map is converted into a displacement map to obtain the first texture map.
[0067] In this implementation, based on the world coordinates of the target object's position in the scene, all pixels of the first depth map can be matched to the texture coordinates of the scene's surface, thereby obtaining a second depth map that matches the texture coordinates of the scene's surface. The depth information in the second depth map is then converted into standard data required for a displacement map to obtain the first texture map.
[0068] Specifically, when the texture coordinates of the first depth map and the surface texture of the scene are matched, the first depth map and the surface texture can be mirror-aligned according to the mapping relationship between the viewing angle of the first depth map and the target viewing angle of the scene, and then the mirror-aligned first depth map is reversed to obtain the second depth map. Furthermore, the mapping relationship between the viewing angle of the first depth map and the target viewing angle of the scene can be determined according to the camera parameters of the sampling camera between the first depth map and the scene, and the details are not repeated here.
[0069] In one embodiment, when the texture coordinates of the first depth map and the surface texture of the scene are matched according to the world coordinates of the scene position where the target object is located to obtain the second depth map, the shooting range information of the preset camera is obtained; wherein the preset camera is a sampling camera of the first depth map; based on the shooting range information and the world coordinates of each pixel point in the first depth map, the reverse texture coordinates of each pixel point relative to the surface texture of the scene are calculated; the reverse texture coordinates are inverted to obtain a second depth map that matches the coordinates of the surface texture.
[0070] It can be understood that the virtual camera has a certain shooting range, and the shooting range information can be represented by the shooting width of the camera. For example, assuming that the shooting range information of the preset camera is 512, indicating the shooting width of the preset camera, then the shooting range of the preset camera is a square area with (-256, -256)(256, -256)(-256, 256)(256, 256) as the four vertices. The larger the shooting width, the larger the visible range of the virtual camera. No specific limitation is made here.
[0071] In this implementation, after obtaining the shooting range information of the sampling camera of the first depth map, the world coordinates of each pixel point in the first depth map can be converted into the reverse texture coordinates of the surface texture by a preset conversion formula. It should be noted that since the world coordinates of the pixel point here are on the front of the surface, the texture coordinates obtained by conversion are still reverse texture coordinates, and further inversion is required to obtain a second depth map that matches the coordinates of the surface texture.
[0072] Specifically, assuming that the shooting range information of the preset camera is OrthoWidth, and the world coordinates of any pixel point in the first depth map are (x, y), then the reverse texture coordinates (u, v) of the pixel point are:
[0073] u=y / OrthoWidth+0.5;
[0074] v = 0.5 – x / OrthoWidth;
[0075] By inversion, the coordinates (u1, v1) of the pixel in the second depth map are:
[0076] u1=y / OrthoWidth+0.5;
[0077] v1=x / OrthoWidth+0.5;
[0078] Through the above matching process, the second depth map obtained can be used for texture rendering of the scene surface. The shape of the contact surface in the second depth map can completely match the target object in the scene. By rendering the contact surface as a snow mark, a realistic rendering effect can be obtained.
[0079] It should be noted that when converting the second depth map into a displacement map, the depth information in the second depth map can be converted into height difference information in the displacement map, wherein the height difference information in the displacement map can be used to indicate the concave height of the snow mark or the convex height of the snow accumulation, which is not limited here.
[0080] In one embodiment, when converting the second depth map into a displacement map to obtain a first texture map, the depth information in the second depth map is converted into height information of the model surface to obtain the first texture map; wherein the first texture map is used to indicate the displacement map of the scene surface, and the height information is used to indicate the height of the depression of the snow mark.
[0081] It is understandable that the values in the displacement map can be used to change the geometric shape of the model. By storing the first depth map as a displacement map, the height of the scene surface model can be dynamically changed to create depressions of snow marks or bulges of snow on the scene surface.
[0082] In this embodiment, the depth information in the second depth map is converted into a displacement map in a data format that conforms to the height information of the model surface, thereby obtaining a first texture map. The height information in the first texture map is used to indicate the height of the depression of the snow mark, that is, Figure 4 The height that the sole of the foot sinks relative to the snow surface is not specifically limited here.
[0083] It should be noted that the preset snow material information can achieve rich and realistic snow accumulation, snow marks, snow melting and other effects. The following is a specific description of the rendering method of snow marks.
[0084] In one embodiment, when the snow and snow marks are rendered on the surface of the scene according to the first texture map and preset snow material information to obtain the snow mark rendering result, the first texture map is superimposed with the target texture map generated by the historical movement trajectory of the target object to obtain the trajectory texture map; according to the trajectory texture map and the preset snow material information, the snow melting effect and snow marks are rendered on the surface of the scene to obtain a rendering result with the snow melting mark effect.
[0085] It should be noted that the first texture map records the distance between the contact surface and the ground surface in the current state of the target object. If rendered at frame rate, the first texture map is the data of the current frame. In order to enable the historical movement trajectory formed by the target object in the historical frame to also render the snow mark, this embodiment superimposes the first texture map with the first texture map of the historical frame (that is, the target texture map generated by the historical movement trajectory of the target object) to obtain a trajectory texture map containing the current and historical trajectories, wherein the trajectory texture map contains the distance between the contact surface and the ground surface of the target object in the current frame and the historical frame, and accordingly, the trajectory texture map also contains a trajectory with the shape of the contact surface, which is used to indicate the rendering of the snow mark.
[0086] By way of example and not limitation, Fig.10The figure shows a schematic diagram of a track texture map. The track texture map is generated by the target object of the figure in the above schematic diagram moving in the scene. The first texture map of each frame is superimposed on the track texture map to obtain Fig.10 A texture map containing footprint tracks is shown. Fig.11 The following is the rendering result of snow marks with moving tracks, Fig.11 It can be seen that there are tracks of people moving on the snow on the surface of the scene, the rock layer / surface layer of the track is exposed, and the area outside the track is covered with snow, forming a snow mark effect with moving tracks, which is very realistic.
[0087] In one embodiment, the snow material information includes: snow layer material parameters, surface layer material parameters, and snowmelt effect material parameters; when rendering the snow melting effect and snow mark on the surface of the scene according to the track texture map and preset snow material information, and obtaining a rendering result with a snow melting mark effect, linear interpolation is performed on the snow layer material parameters, the surface layer material parameters and the track texture map to obtain static snow and snow mark effects; snowmelt effect is generated for the static snow and snow mark effects through the snowmelt effect material parameters to obtain a rendering result with a snow melting mark effect.
[0088] It is understandable that the snow material usually has two layers, one is the material of the snow layer, and the other is the material of the surface layer. The snow layer is above the surface layer, forming a snow effect on the surface. By displaying the surface layer with a contact surface shape, the presentation effect of snow marks can be obtained. Therefore, setting the snow layer material parameters and the surface layer material parameters in the snow material information can be used to perform double-layer material rendering on the surface of the scene to obtain a realistic snow mark effect.
[0089] Specifically, in this implementation, linear interpolation (lerp) is performed on the snow layer material parameters, the surface layer material parameters and the track texture map in turn to obtain static snow and snow mark effects, that is, the snow mark rendering result that does not include the snow melting animation effect. The snow mark rendering result can already meet the realism requirements of most scenes.
[0090] In one embodiment, the snow layer material parameters may include snow texture map, snow coverage range, snow thickness, edge feathering degree, etc., and the surface layer material parameters may include surface layer texture map, surface layer roughness, surface layer normal map, etc. When linearly interpolating the snow layer material parameters, the surface layer material parameters and the track texture map, it means linearly interpolating each parameter and the track texture map respectively to make the transition between the two textures or materials of the snow and the surface smoother and more realistic.
[0091] Furthermore, in order to make the effects of snow and snow marks more realistic, a snow mark rendering result with a dynamic snow melting effect can be obtained through the preset snow material information. In this embodiment, the static snow and snow mark effects are rendered with snow melting effects through the snow melting effect material parameters, thereby obtaining a rendering result with a snow melting mark effect.
[0092] In one embodiment, the snowmelt effect material parameters may be material parameters used to indicate the generation of snowmelt keyframe animations. By generating snowmelt keyframe animations using the material parameters generated by the snowmelt keyframe animations and then superimposing them on static snow and snow mark effects, a rendering result with a snowmelt mark effect may be obtained.
[0093] In one embodiment, the snowmelt effect material parameters include: a mask texture of the snowmelt water and a water droplet key frame animation parameter; when the snowmelt effect material parameters are used to generate the snowmelt effect for the static snow and snow mark effect to obtain a rendering result with the snow melting mark effect, the mask texture is used as the roughness and normal of the texture, and linearly interpolated with the static snow and snow mark effect to obtain a first rendering result; according to the water droplet key frame animation parameters, the water droplet key frame animation is added to the first rendering result to obtain a rendering result with the snow melting mark effect.
[0094] In this embodiment, the snowmelt effect material parameters include a mask texture of snowmelt water, wherein the mask texture changes over time and presents a change like water flowing downwards, such as Fig.12 As shown, the white bars in the left and right figures are on a downward trend, corresponding to the mask textures at different times. For example, the mask texture on the left may be the mask texture of the 3rd frame, and the mask texture on the right may be the mask texture of the 4th frame. The specific details are not limited here.
[0095] The following is a detailed description of the generation method of the mask texture of the snowmelt water. In one embodiment, by rounding the u direction value of the uv coordinate upward, a texture pattern with vertical rectangular blocks can be obtained, such as Fig.13 As shown, Fig.13 The texture pattern shown in the figure can be disturbed to make the vertical rectangular blocks have different brightness, which is used to simulate the depth of raindrops flowing on the surface of the object. Fig.14 Texture pattern shown.
[0096] Next, we use the time-varying variable to Fig.14 The rectangular blocks in the texture pattern shown in the figure move downward periodically to obtain a dynamic rectangular block texture pattern. Finally, the texture pattern with a raindrop shape is superimposed with the dynamic rectangular block texture pattern to obtain a dynamic mask texture of melting snow and flowing water. Any captured frame can be as follows Fig.12 As shown, no specific limitation is made here.
[0097] In this embodiment, the mask texture of the snowmelt and flowing water can be used as the roughness and normal map of the surface layer, and linearly interpolated with the static snow and snow mark effects to obtain the first rendering result. As an example but not a limitation, the first rendering result presented in the form of a material ball can be as follows: Fig.15 As shown, Fig.15 It is a rendering effect with raised lines on the surface. The raised lines can be used to express the effect of water droplets sliding down the surface. Combined with the slow melting of the snow layer, a realistic snow melting mark effect can be achieved.
[0098] In this embodiment, a water drop key frame animation can be generated according to the water drop key frame animation parameters and added to the first rendering result, so that the snow melting mark effect also includes the effect of water droplets falling, which is closer to reality. As an example but not a limitation, Fig.16 The following is a rendering result with a snow melting mark effect in the form of a material ball. Fig.16 It can be seen that the snow on the upper layer melts and then slides down from the surface, and then drips in the shape of water drops, which is close to the real snow melting effect and has good authenticity.
[0099] Specifically, the water drop keyframe animation can be generated through the parameters of the particle system. Specifically, first create particles, set the emission direction of the particles to the direction of gravity, representing the direction of the water drop in the water drop keyframe animation parameters, set the scale of the particles to fixed, representing the size of the water drop in the water drop keyframe animation parameters, set the shape of the particles to a long strip, representing the shape of the water drop in the water drop keyframe animation parameters, and then set the number of particles, representing the number of water drop in the water drop keyframe animation parameters.
[0100] Through the particle system, you can get a simulated falling particle motion animation, that is, a water drop animation, and then create a key frame for the water drop animation to get a water drop key frame animation, add it to the first rendering result, and get a rendering result with a snow melting mark effect.
[0101] Corresponding to the above method embodiment, see Fig.17A schematic diagram of a snow mark rendering device is shown, the device comprising: a depth acquisition module 1701, for responding to a snow mark rendering instruction for a target object, and acquiring a first depth map corresponding to the target object; wherein the first depth map is used to indicate the distance between the contact surface of the target object and the surface of the scene, and the contact surface is the contact surface between the target object and the snow on the surface; a texture acquisition module 1702, for converting the first depth map into the surface texture of the scene, and obtaining a first texture map; a mark rendering module 1703, for rendering the snow and snow marks on the surface of the scene according to the first texture map and preset snow material information, and obtaining a snow mark rendering result.
[0102] The above-mentioned rendering device of snow marks uses a depth map to carry the distance between the contact surface of the target object and the surface of the scene, and then converts the depth map into the surface texture of the scene, which is merged with the preset snow material of the scene for rendering to obtain a snow rendering result with snow marks, which has a realistic effect.
[0103] Optionally, the depth acquisition module 1701 includes: a first acquisition unit, configured to respond to a snow mark rendering instruction for a target object, to acquire first depth information of the target object under a target perspective and second depth information of a scene where the target object is located; a first determination unit, configured to determine the distance between a current contact surface of the target object and the surface of the scene according to the first depth information and the second depth information, and obtain a first depth map corresponding to the target object;
[0104] Optionally, the above-mentioned first determination unit is specifically used to: obtain third depth information based on the difference between the first depth information and the second depth information; wherein the third depth information is used to indicate the distance between the current contact surface of the target object and the surface of the scene; and obtain a first depth map of the target object by sampling the third depth information through a camera facing the contact surface; wherein the first depth map includes the shape of the contact surface.
[0105] Optionally, the texture acquisition module 1702 includes: a matching unit, used to match the texture coordinates of the first depth map with the surface texture of the scene according to the world coordinates of the scene position of the target object to obtain a second depth map; and a conversion unit, used to convert the second depth map into a displacement map to obtain a first texture map.
[0106] Optionally, the above-mentioned matching unit is specifically used to: obtain shooting range information of a preset camera; wherein the preset camera is a sampling camera of the first depth map; calculate the reverse texture coordinates of each pixel point relative to the surface texture of the scene according to the shooting range information and the world coordinates of each pixel point in the first depth map; invert the reverse texture coordinates to obtain a second depth map that matches the coordinates of the surface texture.
[0107] Optionally, the above-mentioned conversion unit is specifically used to: convert the depth information in the second depth map into height information of the model surface to obtain a first texture map; wherein the first texture map is used to indicate the displacement map of the scene surface, and the height information is used to indicate the depression height of the snow mark.
[0108] Optionally, the above-mentioned mark rendering module 1703 includes: an overlay sub-module, which is used to overlay the first texture map with the target texture map generated by the historical movement trajectory of the target object to obtain a trajectory texture map; a rendering sub-module, which is used to render the snow melting effect and snow mark on the surface of the scene according to the trajectory texture map and preset snow material information, to obtain a rendering result with a snow melting mark effect.
[0109] Optionally, the snow material information includes: snow layer material parameters, surface layer material parameters, and snowmelt effect material parameters; the above-mentioned rendering sub-module includes: an interpolation unit, used to perform linear interpolation on the snow layer material parameters, surface layer material parameters and track texture map to obtain static snow and snow mark effects; a generation unit, used to generate snowmelt effects for static snow and snow mark effects through snowmelt effect material parameters to obtain a rendering result with snow melting mark effect.
[0110] Optionally, the snowmelt effect material parameters include: a mask texture of the melting snow and water flow and water drop key frame animation parameters; the above-mentioned generation unit is specifically used to: use the mask texture as the roughness and normal of the texture, and perform linear interpolation with the static snow and snow mark effects to obtain a first rendering result; according to the water drop key frame animation parameters, add the water drop key frame animation to the first rendering result to obtain a rendering result with the snow melting mark effect.
[0111] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above-mentioned snow mark rendering method. The electronic device can be a server or a terminal device.
[0112] See also Fig.18 As shown, the electronic device includes a processor 100 and a memory 101, wherein the memory 101 stores machine executable instructions that can be executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the above-mentioned method for rendering snow marks.
[0113] Further, Fig.18 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .
[0114] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.18 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0115] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware, for example:
[0116] In response to a snow mark rendering instruction for a target object, a first depth map corresponding to the target object is obtained; wherein the first depth map is used to indicate the distance between a contact surface of the target object and the surface of the scene, and the contact surface is the contact surface between the target object and the snow on the surface; the first depth map is converted into a surface texture of the scene to obtain a first texture map; according to the first texture map and preset snow material information, the surface of the scene is rendered with snow and snow marks to obtain a snow mark rendering result.
[0117] In this method, the distance between the contact surface of the target object and the surface of the scene is carried by the depth map, and the depth map is then converted into the surface texture of the scene, which is merged and rendered with the preset snow material of the scene to obtain a snow rendering result with snow imprints, which has a realistic effect.
[0118] Optionally, in response to a snow mark rendering instruction for a target object, the step of obtaining a first depth map corresponding to the target object includes: in response to the snow mark rendering instruction for the target object, obtaining first depth information of the target object and second depth information of a scene where the target object is located under a target perspective; determining the distance between a current contact surface of the target object and a ground surface of the scene based on the first depth information and the second depth information, and obtaining a first depth map of the target object in the scene;
[0119] Optionally, the step of determining the distance between the current contact surface of the target object and the surface of the scene based on the first depth information and the second depth information to obtain a first depth map of the target object in the scene includes: obtaining third depth information based on the difference between the first depth information and the second depth information; wherein the third depth information is used to indicate the distance between the current contact surface of the target object and the surface of the scene; and obtaining a first depth map of the target object by sampling the third depth information with a camera facing the contact surface; wherein the first depth map includes the shape of the contact surface.
[0120] Optionally, the step of converting the first depth map into the surface texture of the scene to obtain a first texture map includes: matching the texture coordinates of the first depth map with the surface texture of the scene according to the world coordinates of the scene position of the target object to obtain a second depth map; and converting the second depth map into a displacement map to obtain a first texture map.
[0121] Optionally, the step of matching the texture coordinates of the first depth map with the surface texture of the scene according to the world coordinates of the scene position of the target object to obtain the second depth map includes: obtaining the shooting range information of a preset camera; wherein the preset camera is a sampling camera of the first depth map; calculating the reverse texture coordinates of each pixel relative to the surface texture of the scene according to the shooting range information and the world coordinates of each pixel in the first depth map; and inverting the reverse texture coordinates to obtain a second depth map that matches the coordinates of the surface texture.
[0122] Optionally, the step of converting the second depth map into a displacement map to obtain a first texture map includes: converting the depth information in the second depth map into height information of the model surface to obtain a first texture map; wherein the first texture map is used to indicate the displacement map of the scene surface, and the height information is used to indicate the height of the depression of the snow mark.
[0123] Optionally, according to the first texture map and preset snow material information, the step of rendering snow and snow marks on the surface of the scene to obtain the snow mark rendering result includes: superimposing the first texture map with the target texture map generated by the historical movement trajectory of the target object to obtain a trajectory texture map; according to the trajectory texture map and the preset snow material information, rendering the snow melting effect and snow marks on the surface of the scene to obtain a rendering result with the snow melting mark effect.
[0124] Optionally, the snow material information includes: snow layer material parameters, surface layer material parameters, and snowmelt effect material parameters; according to the track texture map and preset snow material information, the snow melting effect and snow mark are rendered on the surface of the scene to obtain a rendering result with a snow melting mark effect, comprising: linearly interpolating the snow layer material parameters, the surface layer material parameters and the track texture map to obtain static snow and snow mark effects; generating a snowmelt effect for the static snow and snow mark effects through the snowmelt effect material parameters to obtain a rendering result with a snow melting mark effect.
[0125] Optionally, the snowmelt effect material parameters include: a mask texture of the melting snow and water flow and key frame animation parameters of water droplets; the step of generating the snowmelt effect for the static snow and snow mark effects through the snowmelt effect material parameters to obtain a rendering result with the snow melting mark effect includes: using the mask texture as the roughness and normal of the texture, and linearly interpolating the static snow and snow mark effects to obtain a first rendering result; according to the water droplet key frame animation parameters, adding the water droplet key frame animation to the first rendering result to obtain a rendering result with the snow melting mark effect.
[0126] This embodiment further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned method for rendering snow marks, for example:
[0127] In response to a snow mark rendering instruction for a target object, a first depth map corresponding to the target object is obtained; wherein the first depth map is used to indicate the distance between a contact surface of the target object and the surface of the scene, and the contact surface is the contact surface between the target object and the snow on the surface; the first depth map is converted into a surface texture of the scene to obtain a first texture map; according to the first texture map and preset snow material information, the surface of the scene is rendered with snow and snow marks to obtain a snow mark rendering result.
[0128] In this method, the distance between the contact surface of the target object and the surface of the scene is carried by the depth map, and the depth map is then converted into the surface texture of the scene, which is merged and rendered with the preset snow material of the scene to obtain a snow rendering result with snow imprints, which has a realistic effect.
[0129] Optionally, in response to a snow mark rendering instruction for a target object, the step of obtaining a first depth map corresponding to the target object includes: in response to the snow mark rendering instruction for the target object, obtaining first depth information of the target object and second depth information of a scene where the target object is located under a target perspective; determining the distance between a current contact surface of the target object and a ground surface of the scene based on the first depth information and the second depth information, and obtaining a first depth map of the target object in the scene;
[0130] Optionally, the step of determining the distance between the current contact surface of the target object and the surface of the scene based on the first depth information and the second depth information to obtain a first depth map of the target object in the scene includes: obtaining third depth information based on the difference between the first depth information and the second depth information; wherein the third depth information is used to indicate the distance between the current contact surface of the target object and the surface of the scene; and obtaining a first depth map of the target object by sampling the third depth information with a camera facing the contact surface; wherein the first depth map includes the shape of the contact surface.
[0131] Optionally, the step of converting the first depth map into the surface texture of the scene to obtain a first texture map includes: matching the texture coordinates of the first depth map with the surface texture of the scene according to the world coordinates of the scene position of the target object to obtain a second depth map; and converting the second depth map into a displacement map to obtain a first texture map.
[0132] Optionally, the step of matching the texture coordinates of the first depth map with the surface texture of the scene according to the world coordinates of the scene position of the target object to obtain the second depth map includes: obtaining the shooting range information of a preset camera; wherein the preset camera is a sampling camera of the first depth map; calculating the reverse texture coordinates of each pixel relative to the surface texture of the scene according to the shooting range information and the world coordinates of each pixel in the first depth map; and inverting the reverse texture coordinates to obtain a second depth map that matches the coordinates of the surface texture.
[0133] Optionally, the step of converting the second depth map into a displacement map to obtain a first texture map includes: converting the depth information in the second depth map into height information of the model surface to obtain a first texture map; wherein the first texture map is used to indicate the displacement map of the scene surface, and the height information is used to indicate the height of the depression of the snow mark.
[0134] Optionally, according to the first texture map and preset snow material information, the step of rendering snow and snow marks on the surface of the scene to obtain the snow mark rendering result includes: superimposing the first texture map with the target texture map generated by the historical movement trajectory of the target object to obtain a trajectory texture map; according to the trajectory texture map and the preset snow material information, rendering the snow melting effect and snow marks on the surface of the scene to obtain a rendering result with the snow melting mark effect.
[0135] Optionally, the snow material information includes: snow layer material parameters, surface layer material parameters, and snowmelt effect material parameters; according to the track texture map and preset snow material information, the snow melting effect and snow mark are rendered on the surface of the scene to obtain a rendering result with a snow melting mark effect, comprising: linearly interpolating the snow layer material parameters, the surface layer material parameters and the track texture map to obtain static snow and snow mark effects; generating a snowmelt effect for the static snow and snow mark effects through the snowmelt effect material parameters to obtain a rendering result with a snow melting mark effect.
[0136] Optionally, the snowmelt effect material parameters include: a mask texture of the melting snow and water flow and key frame animation parameters of water droplets; the step of generating the snowmelt effect for the static snow and snow mark effects through the snowmelt effect material parameters to obtain a rendering result with the snow melting mark effect includes: using the mask texture as the roughness and normal of the texture, and linearly interpolating the static snow and snow mark effects to obtain a first rendering result; according to the water droplet key frame animation parameters, adding the water droplet key frame animation to the first rendering result to obtain a rendering result with the snow melting mark effect.
[0137] The computer program product of the method, device, electronic device and storage medium for rendering snow marks provided in the embodiments of the present disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0138] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0139] In addition, in the description of the embodiments of the present disclosure, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.
[0140] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0141] In the description of the present disclosure, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present disclosure. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0142] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, those skilled in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for rendering snow marks, characterized in that: The method comprises: In response to a snow mark rendering instruction for a target object, a first depth map corresponding to the target object is obtained; wherein the first depth map is used to indicate the distance between a contact surface of the target object and a ground surface of a scene, and the contact surface is a contact surface between the target object and the snow on the ground surface; Converting the first depth map into a surface texture of the scene to obtain a first texture map; According to the first texture map and preset snow material information, the snow and snow mark are rendered on the surface of the scene to obtain a snow mark rendering result.
2. The method according to claim 1, characterized in that The step of obtaining a first depth map corresponding to the target object in response to a snow mark rendering instruction for the target object includes: In response to a snow mark rendering instruction for a target object, obtaining first depth information of the target object and second depth information of a scene where the target object is located under a target viewing angle; The distance between the current contact surface of the target object and the ground surface of the scene is determined according to the first depth information and the second depth information, and a first depth map corresponding to the target object is obtained.
3. The method according to claim 2, characterized in that The step of determining the distance between the current contact surface of the target object and the ground surface of the scene according to the first depth information and the second depth information, and obtaining a first depth map corresponding to the target object includes: Obtaining third depth information according to a difference between the first depth information and the second depth information; wherein the third depth information is used to indicate the distance between the current contact surface of the target object and the ground surface of the scene; The third depth information is sampled by a camera facing the contact surface to obtain a first depth map of the target object; wherein the first depth map includes the shape of the contact surface.
4. The method according to claim 1, characterized in that: The step of converting the first depth map into a surface texture of the scene to obtain a first texture map comprises: According to the world coordinates of the scene position where the target object is located, matching the first depth map with the surface texture of the scene to obtain a second depth map; The second depth map is converted into a displacement map to obtain a first texture map.
5. The method according to claim 4, characterized in that The step of performing texture coordinate matching between the first depth map and the surface texture of the scene according to the world coordinates of the scene position where the target object is located to obtain the second depth map comprises: Acquire shooting range information of a preset camera; wherein the preset camera is a sampling camera of the first depth map; Calculating, according to the shooting range information and the world coordinates of each pixel point in the first depth map, a reverse texture coordinate of each pixel point relative to the surface texture of the scene; The reverse texture coordinates are inverted to obtain a second depth map that matches the coordinates of the surface texture.
6. The method according to claim 4, characterized in that The step of converting the second depth map into a displacement map to obtain a first texture map comprises: The depth information in the second depth map is converted into height information of the model surface to obtain a first texture map; wherein the first texture map is used to indicate a displacement map of the scene surface, and the height information is used to indicate the height of the depression of the snow mark.
7. The method according to claim 1, characterized in that The step of rendering the snow and snow marks on the surface of the scene according to the first texture map and the preset snow material information to obtain the snow mark rendering result includes: Superimposing the first texture map with a target texture map generated by a historical movement trajectory of the target object to obtain a trajectory texture map; According to the track texture map and preset snow material information, the snow melting effect and snow mark are rendered on the surface of the scene to obtain a rendering result with the snow melting mark effect.
8. The method according to claim 7, characterized in that The snow material information includes: snow layer material parameters, surface layer material parameters, and snow melting effect material parameters; The step of rendering the snow melting effect and snow imprint on the surface of the scene according to the track texture map and the preset snow material information to obtain a rendering result with the snow melting imprint effect includes: Linearly interpolating the snow layer material parameters, the ground surface layer material parameters and the track texture map to obtain a static snow and snow mark effect; The snowmelt effect material parameters are used to generate the snowmelt effect for the static snow and snow mark effect, so as to obtain a rendering result with the snow melting mark effect.
9. The method according to claim 8, characterized in that The snowmelt effect material parameters include: mask texture of snowmelt water and water drop key frame animation parameters; The step of generating a snow melting effect for the static snow and snow mark effect by using the snow melting effect material parameter to obtain a rendering result with a snow melting mark effect comprises: Using the mask texture as the roughness and normal of the texture, and performing linear interpolation with the static snow and snow mark effects, to obtain a first rendering result; According to the water drop key frame animation parameters, the water drop key frame animation is added to the first rendering result to obtain a rendering result with a snow melting mark effect.
10. A device for rendering snow marks, characterized in that: The device comprises: A depth acquisition module, configured to acquire a first depth map corresponding to the target object in response to a snow mark rendering instruction for the target object; wherein the first depth map is used to indicate the distance between a contact surface of the target object and the ground surface of the scene, the contact surface being a contact surface between the target object and the snow on the ground surface; A texture acquisition module, used for converting the first depth map into a surface texture of the scene to obtain a first texture map; The mark rendering module is used to render the snow and snow marks on the surface of the scene according to the first texture map and preset snow material information to obtain the snow mark rendering result.
11. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the method for rendering snow marks according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the method for rendering snow marks according to any one of claims 1 to 9.