A virtual object rendering method, device, electronic equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2026-05-18
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]然而,在实际应用过程中,由于仅依赖单一贴图的UV滚动,导致渲染得到的虚拟对象缺乏细节,重复感强,无法呈现自然的动态变化效果
[0010]采用本申请实施例的方案,可以通过获取目标虚拟对象对应的UV空间的UV坐标;基于UV坐标以及当前时刻的扰动参数,生成第一噪声图;对UV坐标进行变换,得到至少一个变换后UV坐标;基于变换后UV坐标以及扰动参数,生成至少一个第二噪声图;根据第一噪声图和至少一个第二噪声图,生成目标噪声图;基于目标噪声图,对目标虚拟对象进行渲染。如此,通过结合UV坐标以及当前时刻的扰动参数,生成在当前时刻用于模拟虚拟对象的多个噪声图,以基于多个噪声图融合得到的目标噪声图进行虚拟对象渲染,以增加渲染的随机性,避免对虚拟对象渲染时出现规律性重复的问题。此外,利用生成的多个噪声图,还可以增加虚拟对象渲染时的细节。
Smart Images

Figure CN122530404A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rendering processing technology, and in particular to a virtual object rendering method, apparatus, electronic device and storage medium. Background Technology
[0002] Related technologies typically employ a single texture combined with UV coordinate scrolling to simulate the dynamic changes of virtual objects, such as simulating the dynamic flow of clouds.
[0003] However, in practical applications, relying solely on UV scrolling of a single texture results in rendered virtual objects lacking detail, exhibiting a strong sense of repetition, and failing to present natural dynamic changes. Summary of the Invention
[0004] This application provides a virtual object rendering method, apparatus, electronic device, and storage medium. By combining UV coordinates and perturbation parameters at the current moment, multiple noise maps are generated to simulate virtual objects at the current moment. Virtual objects are rendered based on a target noise map obtained by fusing multiple noise maps, thereby increasing the randomness of rendering and avoiding the problem of regular repetition when rendering virtual objects.
[0005] In a first aspect, embodiments of this application provide a virtual object rendering method, the method comprising: Obtain the UV coordinates of the target virtual object in UV space; Based on the UV coordinates and the disturbance parameters at the current moment, a first noise map is generated; The UV coordinates are transformed to obtain at least one transformed UV coordinate; Based on the transformed UV coordinates and the perturbation parameters, at least one second noise map is generated; A target noise map is generated based on the first noise map and at least one second noise map; The target virtual object is rendered based on the target noise map.
[0006] Secondly, embodiments of this application provide a virtual object rendering apparatus, the apparatus comprising: The coordinate acquisition module is used to obtain the UV coordinates of the target virtual object in the UV space. The first generation module is used to generate a first noise map based on the UV coordinates and the disturbance parameters at the current time. A transformation module is used to transform the UV coordinates to obtain at least one transformed UV coordinate; The second generation module is used to generate at least one second noise map based on the transformed UV coordinates and the perturbation parameters. The third generation module is used to generate a target noise map based on the first noise map and at least one second noise map; The rendering module is used to render the target virtual object based on the target noise map.
[0007] Thirdly, embodiments of this application also provide an electronic device, which includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any virtual object rendering method.
[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium including a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform steps of any virtual object rendering method.
[0009] Fifthly, embodiments of this application also provide a computer program product, including a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps of any of the virtual object rendering methods provided in embodiments of this application.
[0010] The solution adopted in this application embodiment can be achieved by obtaining the UV coordinates of the UV space corresponding to the target virtual object; generating a first noise map based on the UV coordinates and the perturbation parameters at the current time; transforming the UV coordinates to obtain at least one transformed UV coordinate; generating at least one second noise map based on the transformed UV coordinates and the perturbation parameters; generating a target noise map based on the first noise map and at least one second noise map; and rendering the target virtual object based on the target noise map. In this way, by combining the UV coordinates and the perturbation parameters at the current time, multiple noise maps are generated for simulating the virtual object at the current time. The virtual object is then rendered based on the target noise map obtained by fusing the multiple noise maps, increasing the randomness of the rendering and avoiding the problem of regular repetition during virtual object rendering. Furthermore, the generated multiple noise maps can also increase the detail during virtual object rendering. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1This is a schematic diagram of an implementation environment scenario for the virtual object rendering method provided in this application embodiment; Figure 2 This is a schematic flowchart of one embodiment of the virtual object rendering method provided in this application. Figure 3a This is a schematic diagram illustrating the rendering effect of the prior art provided in the embodiments of this application; Figure 3b This is a schematic diagram of the cloud texture of a static cloud provided in an embodiment of this application; Figure 3c This is a schematic diagram of the area masking of the first object region provided in an embodiment of this application; Figure 3d This is a schematic diagram illustrating the rendering effect of the virtual object rendering method provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the virtual object rendering device provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0014] This application provides a virtual object rendering method, apparatus, electronic device, and computer-readable storage medium. The virtual object rendering apparatus can be integrated into an electronic device, which may be a server or a terminal, etc.
[0015] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can include, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein.
[0016] Please see Figure 1 Taking the integration of virtual object rendering devices into electronic devices as an example, Figure 1 This is a schematic diagram illustrating an implementation scenario of the virtual object rendering method provided in this application. The electronic device can be a terminal device. The method involves: acquiring the UV coordinates of the UV space corresponding to the target virtual object; generating a first noise map based on the UV coordinates and the current perturbation parameters; transforming the UV coordinates to obtain at least one transformed UV coordinate; generating at least one second noise map based on the transformed UV coordinates and the perturbation parameters; generating a target noise map based on the first noise map and at least one second noise map; and rendering the target virtual object based on the target noise map. Thus, by combining the UV coordinates and the current perturbation parameters, multiple noise maps are generated for simulating the virtual object at the current moment. The virtual object is then rendered based on the target noise map obtained by fusing these multiple noise maps, increasing the randomness of the rendering and avoiding repetitive patterns during virtual object rendering. Furthermore, the generated multiple noise maps can also enhance the detail during virtual object rendering.
[0017] It should be noted that, Figure 1 The illustrated scenario of the virtual object rendering method is merely an example. The implementation environment scenario of the virtual object rendering method described in this application is for the purpose of more clearly illustrating the technical solution of this application and does not constitute a limitation on the technical solution provided in this application. Those skilled in the art will understand that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided in this application is also applicable to similar technical problems.
[0018] The solutions provided in this application are specifically illustrated through the following embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.
[0019] This embodiment will be described from the perspective of a virtual object rendering device, which can be integrated into an electronic device, which can be a terminal and / or a server, and this application does not limit it.
[0020] Please see Figure 2 , Figure 2 This application provides a virtual object rendering method, the specific process of which can be described by the following steps 101 to 106: Step 101: Obtain the UV coordinates of the UV space corresponding to the target virtual object.
[0021] In this context, the target virtual object refers to a virtual object used to simulate certain elements within a virtual space. The virtual space is a three-dimensional coordinate system used to represent and manipulate three-dimensional objects. This virtual object can be, for example, clouds, fog, or smoke, and its specific nature can be adjusted according to the actual situation. For instance, the target virtual object might be clouds in the virtual space. Or, for another example, smoke in the virtual space. Subsequent embodiments will use clouds as an example for explanation.
[0022] UV space refers to the two-dimensional texture coordinate space associated with the target virtual object, used to determine the UV coordinates. The UV space can refer to any preset UV space, or it can refer to a specific UV space set for the target virtual object, and its specifics can be adjusted according to the actual situation.
[0023] Step 102: Generate the first noise map based on the UV coordinates and the perturbation parameters at the current time.
[0024] The perturbation parameter refers to a parameter that provides a random quantity for the rendering of the target virtual object. The perturbation parameter can be a time parameter, causing the rendering of the target virtual object to change dynamically over time. In this scenario, the perturbation parameter at the current moment is the timestamp of the current moment. The perturbation parameter can also be a random parameter, causing the rendering of the target virtual object to change dynamically and randomly. In this scenario, the perturbation parameter at the current moment is the random value of the current moment. The specific content of the perturbation parameter can be adjusted according to the actual situation.
[0025] The first noise map refers to the base noise map used to simulate the target virtual object.
[0026] Specifically, by using a preset noise generation function, a first noise map is generated based on the UV coordinates and the perturbation parameters at the current moment to simulate the target virtual object.
[0027] The preset noise generation function refers to the function used to generate noise maps of the simulated target virtual object. The preset noise generation function can be Fractal Brownian Motion (FBM). The FBM algorithm generates multiple noise maps of the simulated target virtual object at the current moment based on the corresponding UV coordinates and the perturbation parameters at the current time. The preset noise generation function can also be other functions, such as functions that generate noise based on frequency or features. The specific preset noise generation function can be adjusted according to the actual situation. Subsequent embodiments will use the FBM algorithm as an example to illustrate the preset noise generation function.
[0028] In some embodiments, the process of "generating a first noise map based on UV coordinates and the perturbation parameters at the current time" may include: determining the UV coordinate offset based on the perturbation parameters at the current time; and generating a first noise map based on the UV coordinate offset and the UV coordinates.
[0029] The UV coordinate offset refers to the offset relative to the UV coordinates determined based on the perturbation parameters at the current moment. There are several ways to determine the UV coordinate offset, and the specific method can be adjusted according to the actual situation. For example, when the perturbation parameter is a time parameter, the rate of change of the UV coordinates of the target virtual object can be obtained. The UV coordinate offset is determined based on the product of the UV coordinate change rate and the time parameter. As another example, when the perturbation parameter is a random parameter, a random UV coordinate offset can be generated based on the random parameter.
[0030] In this embodiment, when the preset noise generation function is the fractal Brownian motion algorithm, the process of "generating a first noise map based on the UV coordinate offset and UV coordinates" can be as follows: the UV coordinate offset and UV coordinates are passed as parameters p into the simplexNoise(half2 p) function to output the first noise map used to simulate the target virtual object at the current moment.
[0031] Step 103: Transform the UV coordinates to obtain at least one transformed UV coordinate.
[0032] The transformed UV coordinates refer to the UV coordinates after transformation processing. There are various transformation methods, which can be adjusted according to the actual situation and are not limited here. For example, the transformed UV coordinates can be obtained by rotating the UV coordinates by a certain angle (such as 36 degrees, 45 degrees, etc.). Another example is to translate the UV coordinates by a preset amount and then rotate them by a certain angle (such as 36 degrees, 45 degrees, etc.) to obtain the transformed UV coordinates.
[0033] It should be noted that the number of UV coordinates after transformation is the same as the number of the second noise map generated subsequently.
[0034] If only one second noise map is generated, the step "transform the UV coordinates to obtain at least one transformed UV coordinate" may include: performing a transformation on the UV coordinates to obtain a transformed UV coordinate. Thus, a second noise map is generated based on this transformed UV coordinate.
[0035] When there are multiple generated second noise maps, the step "transform the UV coordinates to obtain at least one transformed UV coordinate" can include: performing a first transformation on the UV coordinates to obtain first transformed UV coordinates; performing a second transformation on the UV coordinates to obtain second transformed UV coordinates. Thus, one second noise map is generated based on the first transformed UV coordinates, and another second noise map is generated based on the second transformed UV coordinates.
[0036] It should be noted that the first and second transformations described above are merely illustrative of the specific implementation of UV coordinate transformation, and not a limitation on the number of transformations. In the actual noise map generation process, the number of UV coordinate transformations is equal to the number of second noise maps to be generated. In other words, if N second noise maps need to be generated, N UV coordinate transformations are performed to obtain N transformed UV coordinates, and corresponding second noise maps are generated based on each transformed UV coordinate. Therefore, the first and second transformations listed in the embodiments of this application should not be construed as only allowing two transformations; the number of transformations can be adaptively adjusted according to the actual required number of second noise maps.
[0037] Furthermore, the first transformation and the second transformation can be of the same type or different types. In one embodiment, the first transformation and the second transformation employ different transformation rules or transformation parameters. For example, the first transformation can be a translation transformation, and the second transformation can be a rotation transformation or a scaling transformation, thereby giving the multiple second noise maps generated based on the UV coordinates after different transformations differentiated texture features. In another embodiment, the first transformation and the second transformation can employ the same processing procedure, but their transformation parameters are different. For example, both can employ rotation transformations, but with different rotation angles, to obtain different noise distribution effects while maintaining consistency in transformation logic.
[0038] In another implementation, the process of performing the first and second transformations on the UV coordinates can be understood as either performing independent transformations (i.e., parallel transformations) on different branches of the original UV coordinates, or as performing a cascaded transformation on the transformation results. Specifically, in the parallel transformation path, both the first and second transformations directly act on the original UV coordinates, obtaining the UV coordinates after the first transformation and the UV coordinates after the second transformation, respectively, with each transformed UV coordinate independent of the others. In the cascaded transformation path, the second transformation further transforms the UV coordinates after the first transformation, obtaining the UV coordinates after the second transformation; that is, the input of the later transformation is the output of the previous transformation, thus forming a layer-by-layer recursive transformation of the UV coordinates. Those skilled in the art should understand that the above-mentioned parallel transformations and cascaded transformations can be used individually or in combination according to the actual noise generation requirements, and no restrictions are imposed here.
[0039] Step 104: Generate at least one second noise map based on the transformed UV coordinates and perturbation parameters.
[0040] The second noise map refers to the noise map generated based on the base noise map, which is used to simulate the target virtual object.
[0041] A second noise map is generated by transforming the UV coordinates obtained from the UV coordinates of the first noise map. This disrupts the UV coordinates of the generated noise map, increases the randomness of rendering, and avoids the problem of regular repetition when rendering virtual objects.
[0042] In some embodiments, the step of "generating at least one second noise map based on the transformed UV coordinates and the perturbation parameters" may include: determining the UV coordinate offset based on the perturbation parameters at the current time; and generating a second noise map corresponding to the transformed UV coordinates based on the UV coordinate offset and the transformed UV coordinates.
[0043] It should be noted that the number of second noise maps can be one or more, and the specific number can be set according to actual performance requirements. For example, if performance does not allow for a certain number, the number of second noise maps can be set to two. If performance allows, the number of second noise maps can be greater than two to enrich the detailed representation of the target virtual object.
[0044] When there is only one second noise map, the step "generate at least one second noise map based on the transformed UV coordinates and perturbation parameters" can include: generating a second noise map based on the transformed UV coordinates and perturbation parameters. Specifically, the UV coordinate offset is determined according to the perturbation parameters at the current time; and a second noise map for simulating the target virtual object at the current time is generated based on the UV coordinate offset and the transformed UV coordinates.
[0045] When there are multiple second noise maps, the step "generating at least one second noise map based on the transformed UV coordinates and perturbation parameters" can include: generating a second noise map based on the first transformed UV coordinates and perturbation parameters, wherein the first transformed UV coordinates are obtained by performing a first transformation on the UV coordinates; if the number of generated second noise maps is insufficient, generating another second noise map based on the second transformed UV coordinates and perturbation parameters, until the number of generated second noise maps reaches the required level, wherein the second transformed UV coordinates are obtained by performing a second transformation on the UV coordinates. Specifically, the UV coordinate offset is determined based on the perturbation parameters at the current time; a second noise map is generated based on the UV coordinate offset and the first transformed UV coordinates; another second noise map is generated based on the UV coordinate offset and the second transformed UV coordinates.
[0046] When the transformation of UV coordinates is a successive recursive cascade transformation based on the transformation result, the process of generating multiple second noise maps can be as follows: Based on the transformed UV coordinates and perturbation parameters, generate a second noise map for simulating the target virtual object at the current moment; if the number of generated second noise maps is insufficient, transform the transformed UV coordinates to obtain new transformed UV coordinates; based on the new transformed UV coordinates and perturbation parameters, generate another second noise map for simulating the target virtual object at the current moment, until the number of generated second noise maps reaches the target.
[0047] Step 105: Generate a target noise map based on the first noise map and at least one second noise map.
[0048] The target noise map refers to the noise map used to simulate the target virtual object at the current moment and to control the rendering of the target virtual object.
[0049] There are multiple processes for generating the target noise map, and the specific process can be adjusted according to the actual situation. No restrictions are imposed here.
[0050] In some embodiments, the step "generating a target noise map based on a first noise map and at least one second noise map" may include: performing a superposition process on the first noise map and at least one second noise map to generate a target noise map.
[0051] In some embodiments, a weighted superposition method can be used to generate the target noise map. Specifically, the first noise map and each of the second noise maps can be configured with corresponding weights. These weights can be pre-configured fixed weights or dynamically adjusted weights according to actual application requirements. Based on this, when generating the target noise map, the first noise map and at least one second noise map can be weighted and superimposed according to the weights corresponding to each noise map, thereby fusing them to obtain the target noise map.
[0052] In other embodiments, the noise maps may be scaled before being superimposed. Different noise maps can be configured with different scaling ratios, which can be a pre-configured fixed scaling ratio or a scaling ratio adaptively adjusted according to the actual application. Based on this, the process of generating the target noise map may include: scaling a first noise map and at least one second noise map according to the scaling coefficients corresponding to each noise map; and then superimposing the scaled first noise map and the scaled second noise map to generate the target noise map.
[0053] It should be noted that the scaling factors corresponding to different noise maps can be the same or different. Preferably, the scaling factor corresponding to the first noise map is greater than the scaling factor corresponding to the second noise map. In this way, by configuring progressively decreasing scaling factors, an amplitude reduction effect can be achieved, thereby effectively disrupting the details of the high-frequency components, resulting in a more rich texture hierarchy and detailed representation of the final rendered target virtual object.
[0054] Furthermore, in the above-described process of superimposing the first noise map and at least one second noise map, the noise maps can be superimposed sequentially according to their generation order to generate the target noise map. That is, the noise maps generated earlier participate in the superposition first, and the noise maps generated later participate in the superposition later, to ensure that the logic of noise fusion is consistent with the generation sequence. In some embodiments, the step of "generating a target noise map based on the first noise map and at least one second noise map" may include: fusing the first noise map and at least one second noise map to generate a target noise map used to simulate the target virtual object at the current moment.
[0055] Step 106: Render the target virtual object based on the target noise map.
[0056] The target virtual object may include a first object region, which is used to indicate the area in the target virtual object that has dynamic changing effects.
[0057] Optionally, the first object region may refer to the entire region of the target virtual object. The step "Rendering the target virtual object based on the target noise map" may include: rendering the first object region of the target virtual object based on the target noise map.
[0058] Optionally, the first object region can be a local region of the target virtual object. The step "Rendering the target virtual object based on the target noise map" can include: obtaining a region mask for the first object region; and rendering the first object region based on the target noise map and the region mask.
[0059] There are several ways to obtain the region mask for the first object region, which can be adjusted according to the actual situation and is not limited here. For example, the step "obtain the region mask for the first object region" may include: obtaining the target texture used to render the target virtual object; generating a region mask for the first object region based on the channel information of the first channel in the target texture. Here, the first channel refers to the channel in the target texture used to assist in generating the region mask for the first object region. Another example is that the step "obtain the region mask for the first object region" may include: pre-configuring the region mask for the first object region of the target virtual object; and obtaining the region mask for the first object region in response to a rendering event for the first object region of the target virtual object.
[0060] In some embodiments, the target virtual object may include a second object region, which is used to indicate a region in the target virtual object that has a stable effect or a stable change effect.
[0061] In this embodiment, the virtual object rendering method further includes: determining the sampled UV coordinates of the target virtual object on the target texture based on the UV coordinates and the perturbation parameters at the current time; and rendering the second object region based on the channel information of the second channel in the target texture and the sampled UV coordinates.
[0062] The second channel refers to the channel in the target texture used to assist in rendering the second object region.
[0063] In some embodiments, the method may further include obtaining the base color of the space where the target virtual object is located.
[0064] In this embodiment, the step "rendering the first object region of the target virtual object based on the target noise map and region mask" includes rendering the first object region of the target virtual object based on the base color, the first color of the first object region, the target noise map, and the region mask. The step "rendering the second object region of the target virtual object based on the channel information of the second channel in the target texture and the sampled UV coordinates" includes rendering the second object region of the target virtual object based on the base color, the second color of the second object region, the channel information of the second channel in the target texture, and the sampled UV coordinates.
[0065] The solution adopted in this application embodiment can be achieved by obtaining the UV coordinates of the UV space corresponding to the target virtual object; generating a first noise map based on the UV coordinates and the perturbation parameters at the current time; transforming the UV coordinates to obtain at least one transformed UV coordinate; generating at least one second noise map based on the transformed UV coordinates and the perturbation parameters; generating a target noise map based on the first noise map and at least one second noise map; and rendering the target virtual object based on the target noise map. In this way, by combining the UV coordinates and the perturbation parameters at the current time, multiple noise maps are generated for simulating the virtual object at the current time. The virtual object is then rendered based on the target noise map obtained by fusing the multiple noise maps, increasing the randomness of the rendering and avoiding the problem of regular repetition during virtual object rendering. Furthermore, the generated multiple noise maps can also increase the detail during virtual object rendering.
[0066] To facilitate understanding of the above solution, the following explanation uses the requirement of achieving a high-performance planet effect as an example. The planet's surface is covered with clouds, which are the target virtual objects mentioned in the embodiments of this application. The planet effect requires the clouds to exhibit a clear sense of flow overall, while possessing rich dynamic details in specific areas; specifically, dynamic clouds (i.e., the first object region) are mainly distributed at the planet's poles, with fewer dynamic clouds in other areas. Furthermore, it is necessary to support adjustable control over the coverage area of the dynamic clouds.
[0067] Research has revealed that existing technologies typically employ a single texture map combined with UV coordinate scrolling to simulate the dynamic flow of clouds on a planet's surface. The principle behind UV coordinate scrolling is that the UV coordinates change over time, causing a shift in the sampling position. However, in practical applications, relying solely on UV scrolling of a single texture map results in rendered virtual objects with insufficient detail, a strong sense of repetition, and an inability to reproduce natural dynamic changes.
[0068] like Figure 3a As shown, the entire texture map only continuously shifts to the left, making the image appear rather static. Because texture images are usually small in size, the texture content completes a cycle in a short time, with identical cloud textures appearing repeatedly. This repetition is easily noticeable to the observer, making the overall visual effect appear monotonous and stiff.
[0069] Therefore, traditional planetary cloud rendering solutions mainly have the following problems: 1. Visual monotony: The use of a single texture combined with UV scrolling results in clouds lacking natural and rich dynamic details; 2. Obvious repetition: Fixed textures create a strong sense of repetition when displayed over large areas, making it difficult to create realistic cloud effects; 3. Difficulty in distribution control: It is impossible to achieve the aggregation or sparse distribution of clouds in specific areas (such as polar regions); 4. Insufficient detail: It lacks the ability to represent multiple layers from macroscopic flow to microscopic texture.
[0070] To address at least some of the aforementioned problems, this application proposes a hybrid cloud structure scheme employing "multi-layer static scrolling textures + procedural noise dynamic generation." This scheme offers advantages such as rich visual effects, controllable performance overhead, and strong art editability, enabling the generation of cloud effects that exhibit both natural dynamic changes and conform to specific distribution patterns while ensuring operational efficiency.
[0071] In terms of visual effects, this solution employs multi-layer blending technology to extract the RGB channels of the static cloud texture image and simulate the rolling of the basic cloud layer through UV flow. Simultaneously, it utilizes simplex noise combined with FBM (fractal Brownian motion) to generate dynamic noise, thereby achieving a dynamic cloud representation with rich detail and strong sense of layering.
[0072] In terms of art editability, this solution introduces a dynamic cloud grayscale image as a grayscale mask and multiplies it with procedural noise to precisely control the coverage of dynamic clouds on the planet's surface. For example, it can achieve a more dense cloud layer at the poles and a relatively sparse distribution in the equatorial region, thereby meeting different art styles and design needs.
[0073] In terms of performance, this solution uses simplex noise in two-dimensional space to replace complex three-dimensional volumetric cloud simulation. While maintaining the dynamic expressiveness and hierarchical details of the cloud layer, it significantly reduces the amount of computation and operating overhead, making it suitable for performance-sensitive real-time rendering scenarios.
[0074] In summary, this solution effectively solves the problems of insufficient dynamic details and difficulty in finely controlling cloud distribution in planetary cloud rendering. It achieves dynamic aggregation and change effects of clouds in specific areas such as the poles, significantly improving the realism and artistic expression of the image, and providing artists with intuitive and easy-to-use parameter adjustment and texture control methods.
[0075] Specifically, the target virtual object can be rendered using the following code: / / Static cloud layer: Based on RGB channel separation of pre-made texture; half4cloud=cloudTex.Sample(ssbc, cloudUV); color.rgb += cloud.r × statcloudcol; / / R channel: static cloud base layer; / / Dynamic cloud layer: combined with programmed noise and G-channel masking; halfcloudNoise=generatecloudNoise(input.uv,FrameTime,cloudScale,cloudspeed); color.rgb+=cloud.g×cloudNoise×dycloudcol; / / G channel mask × program noise.
[0076] The pre-made texture map serves as the target texture. SSBC is the texture sampling method, representing bilinear filtering / truncation sampling. Statcloudcol is adjustable by the material user and is used as the color of static clouds (UV rolling clouds).
[0077] Specifically, the base color (color.rgb) of the space where the target virtual object is located is obtained by calculating the diffuse reflection and edge lighting effects on the planet's surface. Then, the cloud texture (i.e., the target texture) is sampled: a UV-scrolling cloud (statcloudcol) is overlaid on the base color (color.rgb), where the r channel of the cloud texture (e.g., ...) is used. Figure 3b As shown, the cloud texture is used, with `statcloudcol` as the color of the static cloud (i.e., the second object region). Next, the noise cloud is calculated using the `generatecloudnoise` function; a dynamic cloud `cloudNoise` is overlaid on the base color `color.rgb`, utilizing the `g` channel of the cloud texture (e.g., ...). Figure 3c As shown, the region mask is used as the dynamic cloud (i.e., the first object region), with dycloudcol as the color of the dynamic cloud. Based on the above, the rendered result is as follows: Figure 3d The planet effect shown is illustrated here. The static clouds are driven by UV scrolling, which moves the cloud map horizontally. The r-channel of the cloud map serves as the static cloud layer, and the cloud color is achieved by multiplying by the statcloudcol color.
[0078] This invention uses fractal Brownian motion (FBM) technology to generate dynamic cloud layers, simulating the fractal characteristics of natural clouds through three noise layers with different frequencies and amplitudes. In the specific implementation, the texture coordinates (UV) of each layer are rotated by a certain angle from the previous layer (the angle can be arbitrarily chosen; the key is to perform a rotation to disrupt the pattern) to avoid repetitive patterns and enhance overall randomness. Each layer uses a different amplitude, and the transparency decreases layer by layer from top to bottom. The specific steps are as follows: Step 1: Generate the basic noise layer (fine detail layer, contribution ratio, for example, 0.6); Simplex noise is used to generate the basic cloud morphology. This layer contributes the most to the final result, accounting for 0.6. This layer mainly determines the overall outline and distribution of the cloud, which is equivalent to first outlining the shape of the cloud to determine the cloud area and the clear sky area, providing the dominant structure for the overall cloud shape.
[0079] Step 2: Construct the second layer (medium detail layer, contribution ratio, for example, 0.3); Based on the first layer, the UV coordinates are rotated by a certain angle (the angle can be freely set, for example, 36°), and then a second layer of noise is superimposed. The contribution ratio of this layer is 0.3, which is half that of the first layer, and it is mainly used to supplement the details of the medium scale.
[0080] By rotating the UVs, the texture alignment between the two layers can be effectively disrupted: without rotation, the two noise textures will overlap significantly, producing obvious repetitive patterns; after rotation, the two textures are misaligned and superimposed, similar to two semi-transparent grid papers stacked at different angles, making the cloud texture more complex and natural.
[0081] Step 3: Construct the third layer (coarse detail layer, contribution ratio 0.15); Building upon the second layer, the UVs are rotated further, and the contribution of this layer is reduced to 0.15 before a third layer of noise is superimposed. This layer contributes the least and is mainly used to add coarser, sparser texture details, essentially adding filamentous or fibrous textures to the clouds. Although not very noticeable from a distance, it significantly enhances the realism and texture of the clouds.
[0082] Step 4: Three-layer stacking synthesis (FBM synthesis); The results from the three layers are weighted and summed as follows: first layer × 0.6 + second layer × 0.3 + third layer × 0.15.
[0083] In this way, the overall outline determined by the first layer is preserved, while multi-scale detail variations are superimposed, effectively avoiding the repetitive and harsh feeling caused by noise in a single direction or at a single frequency.
[0084] Using simplex noise as the basic noise source, a three-layer FBM structure is used to enrich cloud details. By halving the amplitude layer by layer in each layer using amp*=0.5, the texture layers and detail richness are gradually increased while maintaining the overall structural stability.
[0085] In this way, a stable basic cloud shape is provided by a static layer, while a dynamic layer overlays details that change in real time, and the distribution area of the dynamic cloud is precisely controlled by the G channel of the cloud map (limited to the two poles).
[0086] This application also provides a virtual object rendering device, which can be integrated into a terminal device.
[0087] For example, such as Figure 4 As shown, the virtual object rendering device may include: The coordinate acquisition module 301 is used to acquire the UV coordinates of the UV space corresponding to the target virtual object; The first generation module 302 is used to generate a first noise map based on the UV coordinates and the disturbance parameters at the current time. Transformation module 303 is used to transform the UV coordinates to obtain at least one transformed UV coordinate; The second generation module 304 is used to generate at least one second noise map based on the transformed UV coordinates and the perturbation parameters. The third generation module 305 is used to generate a target noise map based on the first noise map and at least one second noise map; Rendering module 306 is used to render the target virtual object based on the target noise map.
[0088] In some embodiments, the first generation module 302 generates a first noise map based on the UV coordinates and the disturbance parameters at the current time, including: The offset determination unit is used to determine the UV coordinate offset based on the disturbance parameters at the current moment. The first generation unit is used to generate a first noise map based on the UV coordinate offset and UV coordinates; The second generation module 304, based on the transformed UV coordinates and perturbation parameters, generates at least one second noise map, including: The second generation unit is used to generate a second noise map corresponding to the transformed UV coordinates based on the UV coordinate offset and the transformed UV coordinates.
[0089] In some embodiments, when the number of second noise maps includes multiple maps, the second generation module 304 generates at least one second noise map based on the transformed UV coordinates and perturbation parameters, including: The third generation unit is used to generate a second noise map based on the first transformed UV coordinates and the perturbation parameters, wherein the first transformed UV coordinates are obtained by performing a first transformation on the UV coordinates; The fourth generation unit is used to generate another second noise map based on the UV coordinates after the second transformation and the perturbation parameters when the number of generated second noise maps is insufficient, until the number of generated second noise maps reaches the target. The UV coordinates after the second transformation are obtained by performing a second transformation on the UV coordinates.
[0090] In some embodiments, the step of obtaining the second transformed UV coordinates includes: The transformation unit is used to transform the UV coordinates after the first transformation to obtain the UV coordinates after the second transformation.
[0091] In some embodiments, the third generation module 305 generates a target noise map based on the first noise map and at least one second noise map, including: The first superposition unit is used to perform weighted superposition processing on the first noise map and at least one second noise map according to the weights corresponding to each noise map, so as to generate the target noise map.
[0092] In some embodiments, the third generation module 305 generates a target noise map based on the first noise map and at least one second noise map, including: The scaling unit is used to scale the first noise map and at least one second noise map according to the scaling factor corresponding to each noise map. The second overlay unit is used to overlay the scaled first noise map and the scaled second noise map to generate the target noise map.
[0093] In some embodiments, the target virtual object includes a first object region, and the virtual object rendering apparatus further includes: The mask acquisition unit is used to acquire the region mask for the first object region.
[0094] Based on this, the rendering module 306 renders the target virtual object based on the target noise map, including: The first rendering unit is used to render the first object region based on the target noise map and the region mask.
[0095] In some embodiments, the mask acquisition unit acquires a region mask for the first object region, including: The texture acquisition sub-unit is used to acquire the target texture for rendering the target virtual object; The mask acquisition subunit is used to generate a region mask for the first object region based on the channel information of the first channel in the target texture.
[0096] In some embodiments, the target virtual object further includes a second object region, and the virtual object rendering apparatus further includes: The sampling UV coordinate determination unit is used to determine the sampling UV coordinates of the target virtual object on the target texture based on the UV coordinates and the perturbation parameters at the current time. The second rendering unit is used to render the second object region based on the channel information of the second channel in the target texture and the sampled UV coordinates.
[0097] The scheme of this application embodiment can be implemented by: a coordinate acquisition module 301 acquiring the UV coordinates of the target virtual object in the UV space; a first generation module 302 generating a first noise map based on the UV coordinates and the perturbation parameters at the current time; a transformation module 303 transforming the UV coordinates to obtain at least one transformed UV coordinate; a second generation module 304 generating at least one second noise map based on the transformed UV coordinates and the perturbation parameters; a third generation module 305 generating a target noise map based on the first noise map and at least one second noise map; and a rendering module 306 rendering the target virtual object based on the target noise map. Thus, by combining the UV coordinates and the perturbation parameters at the current time, multiple noise maps are generated to simulate the virtual object at the current time. The virtual object is then rendered based on the target noise map obtained by fusing the multiple noise maps, increasing the randomness of the rendering and avoiding the problem of repetitive patterns during virtual object rendering. Furthermore, the generated multiple noise maps can also enhance the detail during virtual object rendering.
[0098] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Alternatively, the electronic device can be a server.
[0099] like Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 400 includes a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 and the memory 402 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0100] The processor 401 is the control center of the electronic device 400. It connects various parts of the electronic device 400 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 402, and by calling data stored in the memory 402, it executes various functions and processes data of the electronic device 400, thereby providing overall monitoring of the electronic device 400. The processor 401 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of this application.
[0101] In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 runs the applications stored in the memory 402 to realize various functions, such as: Obtain the UV coordinates of the target virtual object in UV space; A first noise map is generated based on the UV coordinates and the perturbation parameters at the current moment; Transform the UV coordinates to obtain at least one transformed UV coordinate; Based on the transformed UV coordinates and perturbation parameters, at least one second noise map is generated. Generate a target noise map based on the first noise map and at least one second noise map; The target virtual object is rendered based on the target noise map.
[0102] The electronic device provided in this application embodiment can obtain the UV coordinates of the UV space corresponding to the target virtual object; generate a first noise map based on the UV coordinates and the perturbation parameters at the current time; transform the UV coordinates to obtain at least one transformed UV coordinate; generate at least one second noise map based on the transformed UV coordinates and the perturbation parameters; generate a target noise map based on the first noise map and at least one second noise map; and render the target virtual object based on the target noise map. Thus, by combining the UV coordinates and the perturbation parameters at the current time, multiple noise maps are generated for simulating the virtual object at the current time. The virtual object is then rendered based on the target noise map obtained by fusing the multiple noise maps, increasing the randomness of the rendering and avoiding the problem of regular repetition during virtual object rendering. Furthermore, the generated multiple noise maps can also increase the detail during virtual object rendering.
[0103] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0104] Optional, such as Figure 5As shown, the electronic device 400 also includes: a touch display screen 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch display screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0105] The touch display screen 403 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 403 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 401. It can also receive and execute commands from the processor 401. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 401 to determine the type of touch event. Subsequently, the processor 401 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 403 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 403 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 403 can also be used as part of the input unit 406 to achieve input functions.
[0106] The radio frequency circuit 404 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.
[0107] Audio circuit 405 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 405 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 405, converted back into audio data, and then processed by processor 401 before being transmitted via radio frequency circuit 404 to, for example, another electronic device, or output to memory 402 for further processing. Audio circuit 405 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.
[0108] The input unit 406 can be used to receive the object model input by the user, such as the number of skeletal points input by the user.
[0109] Power supply 407 is used to supply power to various components of electronic device 400. Optionally, power supply 407 can be logically connected to processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 407 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0110] although Figure 5 As not shown in the diagram, the electronic device 400 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0111] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0112] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0113] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute any of the virtual object rendering methods provided in embodiments of this application. The computer program can execute the following steps of the virtual object rendering method: Obtain the UV coordinates of the target virtual object in UV space; A first noise map is generated based on the UV coordinates and the perturbation parameters at the current moment; Transform the UV coordinates to obtain at least one transformed UV coordinate; Based on the transformed UV coordinates and perturbation parameters, at least one second noise map is generated. Generate a target noise map based on the first noise map and at least one second noise map; The target virtual object is rendered based on the target noise map.
[0114] Using the computer-readable storage medium provided in the embodiments of this application, the following steps can be taken: First, obtain the UV coordinates of the UV space corresponding to the target virtual object; second, generate a first noise map based on the UV coordinates and the perturbation parameters at the current time; third, transform the UV coordinates to obtain at least one transformed UV coordinate; fourth, generate at least one second noise map based on the transformed UV coordinates and the perturbation parameters; fifth, generate a target noise map based on the first noise map and at least one second noise map; and finally, render the target virtual object based on the target noise map. Thus, by combining the UV coordinates and the perturbation parameters at the current time, multiple noise maps are generated for simulating the virtual object at the current time. The virtual object is then rendered based on the target noise map obtained by fusing these multiple noise maps, increasing the randomness of the rendering and avoiding the problem of repetitive patterns during virtual object rendering. Furthermore, the generated multiple noise maps can also enhance the detail during virtual object rendering.
[0115] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0116] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0117] Since the computer program stored in the computer-readable storage medium can execute any of the virtual object rendering methods provided in the embodiments of this application, the beneficial effects that any of the virtual object rendering methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0118] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.
[0119] In the above embodiments of the virtual object rendering apparatus, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the virtual object rendering apparatus, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to the description of the virtual object rendering method in the above embodiments, and will not be repeated here.
[0120] The foregoing has provided a detailed description of a virtual object rendering method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for rendering virtual objects, characterized in that, The method includes: Obtain the UV coordinates of the target virtual object in UV space; Based on the UV coordinates and the disturbance parameters at the current moment, a first noise map is generated; The UV coordinates are transformed to obtain at least one transformed UV coordinate; Based on the transformed UV coordinates and the perturbation parameters, at least one second noise map is generated; A target noise map is generated based on the first noise map and at least one second noise map; The target virtual object is rendered based on the target noise map.
2. The virtual object rendering method according to claim 1, characterized in that, The step of generating a first noise map based on the UV coordinates and the perturbation parameters at the current time includes: Determine the UV coordinate offset based on the disturbance parameters at the current moment; A first noise map is generated based on the UV coordinate offset and the UV coordinates; The step of generating at least one second noise map based on the transformed UV coordinates and the perturbation parameters includes: Based on the UV coordinate offset and the transformed UV coordinates, a second noise map corresponding to the transformed UV coordinates is generated.
3. The virtual object rendering method according to claim 1, characterized in that, When there are multiple second noise maps, generating at least one second noise map based on the transformed UV coordinates and the perturbation parameters includes: A second noise map is generated based on the first transformed UV coordinates and the perturbation parameters, wherein the first transformed UV coordinates are obtained by performing a first transformation on the UV coordinates; If the number of generated second noise maps is insufficient, another second noise map is generated based on the second transformed UV coordinates and the perturbation parameters until the number of generated second noise maps reaches the target. The second transformed UV coordinates are obtained by performing a second transformation on the UV coordinates.
4. The virtual object rendering method according to claim 3, characterized in that, The steps to obtain the UV coordinates after the second transformation include: The first transformed UV coordinates are transformed to obtain the second transformed UV coordinates.
5. The virtual object rendering method according to claim 1, characterized in that, The step of generating a target noise map based on the first noise map and at least one second noise map includes: Based on the weights corresponding to each noise map, the first noise map and at least one second noise map are weighted and superimposed to generate a target noise map.
6. The virtual object rendering method according to claim 1, characterized in that, The step of generating a target noise map based on the first noise map and at least one second noise map includes: Based on the scaling factor corresponding to each noise map, the first noise map and at least one of the second noise maps are scaled respectively. The scaled first noise map and the scaled second noise map are superimposed to generate the target noise map.
7. The virtual object rendering method according to any one of claims 1 to 6, characterized in that, The target virtual object includes a first object region, and the method further includes: Obtain the region mask for the first object region; The rendering of the target virtual object based on the target noise map includes: The first object region is rendered based on the target noise map and the region mask.
8. The virtual object rendering method according to claim 7, characterized in that, The step of obtaining a region mask for the first object region includes: Obtain the target texture for rendering the target virtual object; Based on the channel information of the first channel in the target texture, a region mask is generated for the first object region.
9. The virtual object rendering method according to claim 8, characterized in that, The target virtual object further includes a second object region, and the method further includes: Based on the UV coordinates and the perturbation parameters at the current moment, determine the sampled UV coordinates of the target virtual object on the target texture; The second object region is rendered based on the channel information of the second channel in the target texture and the sampled UV coordinates.
10. A virtual object rendering apparatus, characterized in that, The device includes: The coordinate acquisition module is used to obtain the UV coordinates of the target virtual object in the UV space. The first generation module is used to generate a first noise map based on the UV coordinates and the disturbance parameters at the current time. A transformation module is used to transform the UV coordinates to obtain at least one transformed UV coordinate; The second generation module is used to generate at least one second noise map based on the transformed UV coordinates and the perturbation parameters. The third generation module is used to generate a target noise map based on the first noise map and at least one second noise map; The rendering module is used to render the target virtual object based on the target noise map.
11. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the virtual object rendering method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, It includes a computer program that, when run on an electronic device, causes the electronic device to perform the steps of the virtual object rendering method according to any one of claims 1 to 9.