Method and device for displaying objects in virtual scenes

By obtaining the orientation information of the virtual character in the fluid area and reading the pixel map data in the environment channel map, determining the action adjustment parameters to display the virtual action, solving the problem of the virtual character animation model being fixed and realizing dynamic adjustment and high-simulation display.

CN116351046BActive Publication Date: 2025-04-15SHANGHAI MIHA YOUHAIYUANCHENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111624890.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-04-15
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In the prior art, the virtual character animation model is a pre-set fixed model, which causes the actions of the virtual character to be dynamically adjusted with the change of the scene.

Method used

By obtaining the orientation information of the target object in the fluid area, reading the pixel map data in the environment channel map, determining the action adjustment parameters based on these data, and then displaying the virtual action of the target object.

Benefits of technology

It realizes dynamic adjustment of virtual character actions, can adaptively adjust with the changes in the scene, and improves the mimicry of object display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116351046B_ABST
    Figure CN116351046B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of virtual reality, and specifically discloses a method and device for displaying an object in a virtual scene, the method comprising: obtaining the position information of a target object in a fluid region; reading an environment channel map set for the fluid region, and determining pixel map data of a target pixel corresponding to the position information stored in the environment channel map; determining an action adjustment parameter according to the pixel map data of the target pixel, and displaying the virtual action of the target object according to the action adjustment parameter. This method enables the virtual action of the target object to be adaptively adjusted as the scene changes, improves the realism of the object display, and avoids the defect that the character animation model of the same virtual character is fixed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of virtual reality, and in particular to a method and device for displaying objects in a virtual scene. Background Art

[0002] With the development of virtual reality technology, the types and number of virtual objects that can be displayed in virtual scenes are increasing. For example, in a game virtual scene, virtual objects corresponding to game users can be displayed, and virtual objects corresponding to virtual characters such as monsters and supermen can also be displayed.

[0003] In the related art, in order to facilitate the display of each virtual character, a corresponding character animation model is pre-set for each virtual character, and the action information of the virtual character is displayed through the preset character animation model.

[0004] However, the inventors discovered during the process of implementing the present invention that the existing method has at least the following defects: the character animation model of the same virtual character is a pre-set fixed model, which results in the virtual character's actions being unable to change dynamically with scene changes. Summary of the invention

[0005] In view of the above problems, the present invention is proposed to provide a method and device for displaying objects in a virtual scene that overcome the above problems or at least partially solve the above problems.

[0006] According to one aspect of the present invention, a method for displaying objects in a virtual scene is provided, comprising:

[0007] Obtaining the position information of the target object in the fluid area;

[0008] Reading an environment channel map set for the fluid region, and determining pixel map data of a target pixel corresponding to the orientation information stored in the environment channel map;

[0009] An action adjustment parameter is determined according to the pixel map data of the target pixel, and a virtual action of the target object is displayed according to the action adjustment parameter.

[0010] Optionally, before obtaining the position information of the target object in the fluid region, the method further includes: performing a pre-baking operation on the fluid region to obtain the environment channel map;

[0011] Furthermore, the reading of the environment channel map drawn for the fluid area includes: reading the environment channel map set for the fluid area through a graphics processor.

[0012] Optionally, performing a pre-baking operation on the fluid region to obtain the environment channel map includes:

[0013] The fluid region is divided into a plurality of pixels, pixel map data of each pixel is generated respectively, and the pixel map data of each pixel is stored through the environment channel map.

[0014] Optionally, the pixel map data of the pixel includes at least one of: collision attribute data corresponding to the first channel, pixel state data corresponding to the second channel, and action impact data corresponding to the third channel.

[0015] Optionally, the collision attribute data includes: collision data or non-collision data; and the action adjustment parameter includes: collision response adjustment parameter or non-collision response adjustment parameter;

[0016] The pixel state data includes: fluid state data or solid state data; and the action adjustment parameter includes: fluid type adjustment parameter or solid type adjustment parameter;

[0017] The action impact data include: distance impact data related to the distance value from the horizontal plane, element impact data related to the associated elements in the water, and water quality impact data related to water quality properties; and the action adjustment parameters include: distance adjustment parameters, element adjustment parameters, and water quality adjustment parameters.

[0018] Optionally, the generating pixel map data of each pixel separately includes:

[0019] For each pixel, first original pixel data of the pixel and second original pixel data of an associated pixel associated with the pixel are acquired respectively;

[0020] A preset operation is performed on the first original pixel data and the second original pixel data, and pixel map data of the pixel is generated according to the operation result.

[0021] Optionally, the first original pixel data of the pixel includes: first original pixel data corresponding to an original data channel; the second original pixel data of the associated pixel associated with the pixel includes: second original pixel data corresponding to the original data channel;

[0022] The pixel map data of the pixel generated according to the calculation result includes: the corrected pixel data corresponding to the corrected data channel.

[0023] Optionally, the virtual action of the target object includes: an interactive action generated by an interactive operation triggered by the target object;

[0024] The displaying of the virtual action of the target object according to the action adjustment parameter comprises:

[0025] In the case where the interactive operation triggered by the target object is detected, the action adjustment parameter is acquired, and the interactive action generated by the interactive operation triggered by the target object is displayed according to the action adjustment parameter.

[0026] Optionally, the virtual action of the target object includes: an object visual action presented by a visual model of the target object;

[0027] The displaying of the virtual action of the target object according to the action adjustment parameter comprises:

[0028] The action adjustment parameters are transmitted to the visual model of the target object, so that the visual model of the target object displays the object visual action according to the action adjustment parameters.

[0029] According to another aspect of the present invention, there is provided a device for displaying objects in a virtual scene, comprising:

[0030] An acquisition module, adapted to acquire position information of a target object in a fluid region;

[0031] A determination module, adapted to read an environment channel map set for the fluid region, and determine pixel map data of a target pixel corresponding to the orientation information stored in the environment channel map;

[0032] The display module is adapted to determine the action adjustment parameters according to the pixel map data of the target pixel, and display the virtual action of the target object according to the action adjustment parameters.

[0033] Optionally, the acquisition module is further adapted to: perform a pre-baking operation on the fluid region to obtain the environment channel map;

[0034] Furthermore, the determination module is specifically adapted to: read an environment channel map set for the fluid area through a graphics processor.

[0035] Optionally, the acquisition module is specifically adapted to:

[0036] The fluid region is divided into a plurality of pixels, pixel map data of each pixel is generated respectively, and the pixel map data of each pixel is stored through the environment channel map.

[0037] Optionally, the pixel map data of the pixel includes at least one of: collision attribute data corresponding to the first channel, pixel state data corresponding to the second channel, and action impact data corresponding to the third channel.

[0038] Optionally, the collision attribute data includes: collision data or non-collision data; and the action adjustment parameter includes: collision response adjustment parameter or non-collision response adjustment parameter;

[0039] The pixel state data includes: fluid state data or solid state data; and the action adjustment parameter includes: fluid type adjustment parameter or solid type adjustment parameter;

[0040] The action impact data include: distance impact data related to the distance value from the horizontal plane, element impact data related to the associated elements in the water, and water quality impact data related to water quality properties; and the action adjustment parameters include: distance adjustment parameters, element adjustment parameters, and water quality adjustment parameters.

[0041] Optionally, the acquisition module is specifically adapted to:

[0042] For each pixel, first original pixel data of the pixel and second original pixel data of an associated pixel associated with the pixel are acquired respectively;

[0043] A preset operation is performed on the first original pixel data and the second original pixel data, and pixel map data of the pixel is generated according to the operation result.

[0044] Optionally, the first original pixel data of the pixel includes: first original pixel data corresponding to an original data channel; the second original pixel data of the associated pixel associated with the pixel includes: second original pixel data corresponding to the original data channel;

[0045] The acquisition module is specifically adapted to: corrected pixel data corresponding to the corrected data channel.

[0046] Optionally, the virtual action of the target object includes: an interactive action generated by an interactive operation triggered by the target object;

[0047] The display module is specifically suitable for:

[0048] In the case where the interactive operation triggered by the target object is detected, the action adjustment parameter is acquired, and the interactive action generated by the interactive operation triggered by the target object is displayed according to the action adjustment parameter.

[0049] Optionally, the virtual action of the target object includes: an object visual action presented by a visual model of the target object;

[0050] The display module is specifically suitable for:

[0051] The action adjustment parameters are transmitted to the visual model of the target object, so that the visual model of the target object displays the object visual action according to the action adjustment parameters.

[0052] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;

[0053] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the object display method in the virtual scene as described above.

[0054] According to another aspect of an embodiment of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to execute operations corresponding to the method for displaying objects in a virtual scene as described above.

[0055] In the object display method and device in the virtual scene provided by the present invention, first, the position information of the target object in the fluid area is obtained, and then the pixel map data of the target pixel corresponding to the position information stored in the environment channel map set for the fluid area is determined; finally, the action adjustment parameter is determined according to the pixel map data of the target pixel, and the virtual action of the target object is displayed according to the action adjustment parameter. It can be seen that this method can obtain the action adjustment parameter corresponding to the pixel map data of the target pixel according to the position of the target object in the fluid area and the environment channel map set for the fluid area, so as to adjust the virtual action of the target object according to the action adjustment parameter, so that the virtual action of the target object can be adaptively adjusted as the scene changes, thereby improving the realism of the object display and avoiding the defect that the character animation model of the same virtual character is fixed.

[0056] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0058] Figure 1 A flowchart of a method for displaying objects in a virtual scene provided by an embodiment of the present invention is shown;

[0059] Figure 2 A flowchart of a method for displaying objects in a virtual scene provided by another embodiment of the present invention is shown;

[0060] Figure 3 A structural diagram of an object display device in a virtual scene provided by another embodiment of the present invention is shown;

[0061] Figure 4 A schematic structural diagram of an electronic device provided by yet another embodiment of the present invention is shown. DETAILED DESCRIPTION

[0062] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0063] Figure 1 FIG. 1 is a flow chart showing a method for displaying objects in a virtual scene provided by an embodiment of the present invention. Figure 1 As shown, the method includes:

[0064] Step S110: obtaining the position information of the target object in the fluid area.

[0065] The target object refers to a virtual object in a virtual scene that needs to be displayed dynamically as the scene changes. In a specific implementation, a preset designated object or a virtual object entering a designated area can be determined as a target object. For example, a virtual object corresponding to a game user can be set as a target object; for another example, a virtual object entering a designated fluid area or an underwater area containing aquatic plants can also be determined as a target object. The present invention does not limit the method for determining the target object.

[0066] The fluid region refers to a region composed of liquid elements that can flow, wherein the liquid elements may be freshwater elements, saltwater elements, etc. When it is detected that a target object enters the fluid region, the object coordinate data of the target object is obtained, and then the orientation information of the target object in the fluid region is determined according to the object coordinate data. The orientation information includes various information that can represent the direction and position of the target object, such as the distance value from the horizontal plane, the distance value from the bottom of the water, the distance value from the river bank, etc.

[0067] Step S120: reading the environment channel map set for the fluid area, and determining the pixel map data of the target pixel corresponding to the orientation information stored in the environment channel map.

[0068] In this embodiment, an environment channel map is pre-set for the fluid region, and the environment channel map is used to store various data related to the environment information of the fluid region in a map form. The environment channel map is used to store pixel map data of each pixel. Each pixel corresponds to a specified area in the fluid region. Accordingly, according to the orientation information obtained in the previous step, the pixel map data of the target pixel corresponding to the orientation information is obtained from the environment channel map.

[0069] Step S130: determining the action adjustment parameters according to the pixel map data of the target pixel, and displaying the virtual action of the target object according to the action adjustment parameters.

[0070] Among them, the pixel map data of the target pixel is used to represent the environmental attributes of the location area represented by the target pixel. Since the environmental attributes can affect the virtual action of the target object, there is a certain correspondence between the pixel map data and the action adjustment parameters. Based on this correspondence, the action adjustment parameters corresponding to the pixel map data can be determined, so that the virtual action of the target object can be displayed according to the action adjustment parameters.

[0071] Among them, the action adjustment parameters are used to adjust the action type, action scale, action frequency and other information of the target object, so that the virtual action of the target object can change dynamically with the scene changes.

[0072] It can be seen that this method can obtain the action adjustment parameters corresponding to the pixel map data of the target pixel according to the position of the target object in the fluid area and the environment channel map set for the fluid area, so as to adjust the virtual action of the target object according to the action adjustment parameters, so that the virtual action of the target object can be adaptively adjusted as the scene changes, thereby improving the realism of the object display and avoiding the defect of the fixed character animation model of the same virtual character.

[0073] Figure 2 FIG. 2 is a flow chart showing a method for displaying objects in a virtual scene provided by another embodiment of the present invention. Figure 2 As shown, the method includes:

[0074] Step S210: pre-set the environment channel map of the fluid area.

[0075] In 3D technology, the material and other attribute data of an object can be controlled by mapping. Among them, multiple mapping channels can be set, and each channel is used to store attribute data of different dimensions. Common dimensions include: fixed pattern of the object, highlight information of the object, transparency information of the object, bump information of the object, etc. In short, multiple channels in the map can efficiently store attribute data of multiple dimensions. With the help of the mapping storage method, the data volume of the 3D model can be greatly reduced, and the data access efficiency can be greatly improved.

[0076] In this embodiment, an environment channel map is pre-set for the fluid area, and the environment channel map refers to: a map for storing environmental attribute information in a multi-channel manner. In specific implementation, a pre-baking operation is performed on the fluid area to obtain the environment channel map. First, the fluid area is divided into a plurality of pixels, and pixel map data of each pixel is generated respectively; then, the pixel map data of each pixel is stored through the environment channel map. Among them, the fluid area can be a two-dimensional area corresponding to the riverbed profile, or it can be a three-dimensional area corresponding to the entire river area. The present invention does not limit the area range and area form of the fluid area. Among them, the fluid area is divided into a plurality of sub-areas, and each sub-area is described by a pixel. Among them, the pixel size of each pixel in the fluid area can be flexibly set according to actual conditions.

[0077] It can be seen that each pixel in the environment channel map corresponds to a sub-region in the fluid region, and the pixel map data stored therein is used to describe the region attribute of the sub-region. The region attribute can be a multi-dimensional attribute, so the pixel map data includes: multiple groups of data corresponding to each channel, each channel is used to store one dimension of region attribute data.

[0078] For example, in one implementation, the pixel map data of a pixel includes at least one of the following: collision attribute data corresponding to the first channel, pixel state data corresponding to the second channel, and action impact data corresponding to the third channel. Among them, the collision attribute data stored in the first channel includes: collision data or non-collision data, which is used to describe the collision situation of the sub-area. For example, if the sub-area is a riverbed area, the collision attribute data is collision data to indicate that the virtual object will be collided here; if the sub-area is a river area, the collision attribute data is non-collision data to indicate that the virtual object will not be collided here. The pixel state data stored in the second channel includes: fluid state data or solid state data, which is used to indicate that the corresponding sub-area is a fluid or a solid. In addition, the pixel state data in the second channel may also include: information such as the biological state and water quality state contained in the fluid, which is not limited by the present invention. The action impact data stored in the third channel includes various types of data that can affect the action of the virtual object, for example, including at least one of the following: distance-type impact data related to the distance value from the horizontal plane, element-type impact data related to associated elements in the water, and water quality-type impact data related to water quality attributes.

[0079] Optionally, in one implementation, in order to increase the speed of subsequent calculations and reduce the complexity of calculations, the pixel map data stored in the environment channel map is pre-calculated. Through the pre-calculation process, intermediate data can be acquired in advance and the result data can be calculated, so that the result data can be directly stored in the environment channel map to reduce the time consumption of subsequent calculations.

[0080] In order to facilitate the use of pre-calculation to improve the subsequent processing efficiency, when the pixel map data of each pixel is generated respectively, it is realized in the following manner: first, for each pixel, the first original pixel data of the pixel and the second original pixel data of the associated pixel associated with the pixel are obtained; then, a preset operation is performed on the first original pixel data and the second original pixel data, and the pixel map data of the pixel is generated according to the operation result. The first original pixel data refers to: the original pixel map data stored in the current pixel; the second original pixel data refers to: the original pixel map data stored in the associated pixel that has an associated relationship with the current pixel. It can be seen that the pixel map data in the current pixel can be determined in combination with other associated pixels. In specific implementation, an additional channel can be added to store the pixel map data obtained after pre-calculation. Correspondingly, the first original pixel data of the pixel includes: the first original pixel data corresponding to the original data channel; the second original pixel data of the associated pixel associated with the pixel includes: the second original pixel data corresponding to the original data channel; then the pixel map data of the pixel generated according to the operation result includes: the corrected pixel data corresponding to the corrected data channel. Among them, the channel used to store the original data on which the pre-calculation depends is called the original data channel, and the original data channel can be the first channel, the second channel or the third channel mentioned above; the channel used to store the corrected data obtained by pre-calculation is called the corrected data channel, which can be the added fourth channel, etc. For example, it is assumed that the first pixel, the second pixel, and the third pixel correspond to the top pixel of the fluid, the middle pixel of the fluid, and the bottom pixel of the fluid in sequence. Among them, the pixel map data of each pixel includes: collision attribute data corresponding to the first channel, pixel state data corresponding to the second channel, and action influence data corresponding to the third channel. Since the action influence data corresponding to the third channel may be further affected by adjacent pixels, for example, the action influence data of the pixel located below will be affected by the pixel located above. Accordingly, in this example, the third channel is used as the original data channel, and the fourth channel is added as the corrected data channel. Correspondingly, the original pixel data of the third pixel includes: action influence data 1 corresponding to the third channel in the third pixel, action influence data 2 corresponding to the third channel in the first associated pixel (i.e., the second pixel), and action influence data 3 corresponding to the third channel in the second associated pixel (i.e., the first pixel). By performing a weighted operation on the motion influence data 1, the motion influence data 2, and the motion influence data 3, motion influence correction data is obtained, and the motion influence correction data is stored in the fourth channel of the third pixel.

[0081] The above description is only for example. In actual situations, the data channels and specific data that the pre-calculation depends on can be flexibly determined, as long as the subsequent calculation efficiency can be improved. The present invention is not limited to this. Alternatively, in other implementations, the original data that the pre-calculation depends on can also be stored separately in the original data table, and the original pixel data of each pixel is stored separately through the original data table. Correspondingly, the pixel map data of each pixel stored in the environment channel map is pre-calculated based on the original pixel data of the associated pixels associated with the current pixel in the original data table. In short, the present invention does not limit the specific storage method, as long as the purpose of reducing the subsequent amount of calculation can be achieved through pre-calculation.

[0082] Step S220: Acquire the position information of the target object in the fluid area.

[0083] Among them, the target object refers to: a virtual object in a virtual scene that needs to dynamically adjust the display method as the scene changes. In specific implementation, a preset designated object or a virtual object entering a designated area can be determined as the target object. For example, a virtual object corresponding to a game user can be set as a target object; as another example, a virtual object entering a fluid setting area can also be determined as a target object. The present invention does not limit the method for determining the target object. Among them, the fluid setting area can be the entire fluid area, or it can be a local fluid area, for example, an area containing water monsters or complex water conditions. Accordingly, when it is detected that the target object enters the fluid area, the orientation information of the target object in the fluid area is obtained, which can be specifically achieved by a ray detection method or a collision box detection method.

[0084] Step S230: reading the environment channel map set for the fluid area, and determining the pixel map data of the target pixel corresponding to the orientation information stored in the environment channel map.

[0085] Among them, the environment channel map set for the fluid area is read by the graphics processor. Since the graphics processor has multiple processing channels, it can efficiently read the data of each channel in the environment channel map in a multi-channel parallel processing manner, significantly improving the data reading rate. In specific implementation, the target pixel matching the orientation information is first determined according to the orientation information, and then the pixel map data stored in the target pixel is obtained. Since the pixel map data contains data of multiple channels, it is necessary to read the pixel map data of each channel separately.

[0086] Step S240: determining the action adjustment parameters according to the pixel map data of the target pixel, and displaying the virtual action of the target object according to the action adjustment parameters.

[0087] Among them, the action adjustment parameters may include multiple types, for example, including: speed adjustment parameters, amplitude adjustment parameters, and / or type adjustment parameters; accordingly, when displaying the virtual action of the target object according to the action adjustment parameters, the action speed, action amplitude, and / or action type can be determined according to the speed adjustment parameters, amplitude adjustment parameters, and / or type adjustment parameters, and then a virtual action matching the action speed, action amplitude, and / or action type is displayed.

[0088] Specifically, the action adjustment parameters can be determined according to the type of pixel map data:

[0089] When the collision attribute data includes collision data or non-collision data, the action adjustment parameters include: collision response adjustment parameters or non-collision response adjustment parameters. The collision response adjustment parameters are used to control the virtual action of the target object to present a collision response state, such as damage, rebound and other collision states.

[0090] When the pixel state data includes fluid state data or solid state data, the action adjustment parameter includes: a fluid adjustment parameter or a solid adjustment parameter, wherein the fluid adjustment parameter is used to control the virtual action of the target object to appear as a floating state in the fluid.

[0091] When the action influence data includes: distance influence data related to the distance value from the horizontal plane, element influence data related to the associated elements in the water, and water quality influence data related to the water quality attribute, the action adjustment parameters include: distance adjustment parameters, element adjustment parameters, and water quality adjustment parameters. Among them, the distance adjustment parameters are used to reflect the size of the underwater pressure. When the distance value from the horizontal plane is larger, the underwater pressure is larger, and correspondingly, the action frequency of the virtual action of the target object is lower (the movement is laborious due to the increase in resistance). The element adjustment parameters are used to reflect the impact of the associated elements in the water (including biological elements or non-biological elements) on the target object; the water quality adjustment parameters are used to reflect the impact of water quality (including the content of impurities in the water, the degree of pollution, etc.) on the target object.

[0092] In summary, there is a preset mapping relationship between the pixel map data and the action adjustment parameters. Based on the mapping relationship, the action adjustment parameters currently adapted to the target object can be determined, thereby flexibly adjusting the virtual action of the target object.

[0093] In this embodiment, the virtual actions of the target object include various types of actions, for example, at least the following two types of virtual actions:

[0094] The first type of virtual action is an interactive action generated by an interactive operation triggered by a target object. Accordingly, when an interactive operation triggered by a target object is detected, an action adjustment parameter is obtained, and the interactive action generated by the interactive operation triggered by the target object is displayed according to the action adjustment parameter.

[0095] The second type of virtual action is: an object visual action presented by a visual model of the target object; accordingly, the action adjustment parameters are transmitted to the visual model of the target object so that the visual model of the target object displays the object visual action according to the action adjustment parameters.

[0096] In summary, this method can obtain the action adjustment parameters corresponding to the pixel map data of the target pixel according to the position of the target object in the fluid area and the environment channel map set for the fluid area, so as to adjust the virtual action of the target object according to the action adjustment parameters, so that the virtual action of the target object can be adaptively adjusted as the scene changes, thereby improving the realism of the object display and avoiding the defect that the character animation model of the same virtual character is fixed. In addition, the map storage method has the technical advantages of fast reading speed and low processing delay, which helps to improve the smoothness of the display interface and avoid the problem of interface jamming. In addition, the pre-calculated data can be further stored in the environment channel map, thereby further reducing the amount of calculation in the subsequent processing process and improving the display speed. In addition, this method stores the water depth, water quality, impact value and other information of the entire river area in advance, and the animation can be directly affected by the position in the future. Since the structure of the entire river is stored in advance, the collision can be directly calculated without using collision box detection, which improves the efficiency of collision detection.

[0097] In addition, in a specific example, a channel map is baked for the water area in advance, and the action adjustment parameters are determined mainly based on the depth information of the current target object. For example, the Alpha value of the water area itself is used for judgment. The larger the Alpha value, the deeper the depth value (i.e., the greater the distance of the target object from the horizontal plane). In addition, the action impact data corresponding to the third channel mentioned above can be determined by the depth value. In addition, in addition to being determined based on the depth value, the action impact data can also be further determined based on water quality information, wherein the water quality information is composed of material information and environmental information. Among them, the material information is the element information in the water. Correspondingly, the action impact data (i.e., the depth impact value) = depth value * water quality information; wherein, the water quality information = element information in the water * environmental related information. It can be seen that in this specific example, the action impact data is mainly determined based on the depth value (i.e., the distance value from the horizontal plane), the element information in the water, and the environmental related information. Among them, the element information in the water includes: ice element, sea monster element, etc. The environmental related information is determined based on the flow rate, temperature and other information of the water.

[0098] In addition, the pixel map data in this example specifically includes: collision attribute data corresponding to the R channel (such as riverbed edge information and collision data), pixel state data corresponding to the G channel (such as 1 indicates that the pixel state is water, 2 indicates that the pixel state is non-water), and action impact data corresponding to the B channel (i.e., depth impact value, which can range from 100 to 199). In addition, in addition to storage through the RGB channel, it can also be stored through the UVW channel, or pixel map data of different dimensions can be stored through less than three channels or more than three channels.

[0099] Embodiment 3

[0100] Figure 3 A schematic diagram of the structure of an object display device in a virtual scene provided by Embodiment 3 of the present invention is shown, comprising:

[0101] An acquisition module 41, adapted to acquire position information of a target object in a fluid region;

[0102] A determination module 42 is adapted to read an environment channel map set for the fluid region, and determine pixel map data of a target pixel corresponding to the orientation information stored in the environment channel map;

[0103] The display module 43 is adapted to determine the action adjustment parameter according to the pixel map data of the target pixel, and display the virtual action of the target object according to the action adjustment parameter.

[0104] Optionally, the acquisition module is further adapted to: perform a pre-baking operation on the fluid region to obtain the environment channel map;

[0105] Furthermore, the determination module is specifically adapted to: read an environment channel map set for the fluid area through a graphics processor.

[0106] Optionally, the acquisition module is specifically adapted to:

[0107] The fluid region is divided into a plurality of pixels, pixel map data of each pixel is generated respectively, and the pixel map data of each pixel is stored through the environment channel map.

[0108] Optionally, the pixel map data of the pixel includes at least one of: collision attribute data corresponding to the first channel, pixel state data corresponding to the second channel, and action impact data corresponding to the third channel.

[0109] Optionally, the collision attribute data includes: collision data or non-collision data; and the action adjustment parameter includes: collision response adjustment parameter or non-collision response adjustment parameter;

[0110] The pixel state data includes: fluid state data or solid state data; and the action adjustment parameter includes: fluid type adjustment parameter or solid type adjustment parameter;

[0111] The action impact data include: distance impact data related to the distance value from the horizontal plane, element impact data related to the associated elements in the water, and water quality impact data related to water quality properties; and the action adjustment parameters include: distance adjustment parameters, element adjustment parameters, and water quality adjustment parameters.

[0112] Optionally, the acquisition module is specifically adapted to:

[0113] For each pixel, first original pixel data of the pixel and second original pixel data of an associated pixel associated with the pixel are acquired respectively;

[0114] A preset operation is performed on the first original pixel data and the second original pixel data, and pixel map data of the pixel is generated according to the operation result.

[0115] Optionally, the first original pixel data of the pixel includes: first original pixel data corresponding to an original data channel; the second original pixel data of the associated pixel associated with the pixel includes: second original pixel data corresponding to the original data channel;

[0116] The acquisition module is specifically adapted to: corrected pixel data corresponding to the corrected data channel.

[0117] Optionally, the virtual action of the target object includes: an interactive action generated by an interactive operation triggered by the target object;

[0118] The display module is specifically suitable for:

[0119] In the case where the interactive operation triggered by the target object is detected, the action adjustment parameter is acquired, and the interactive action generated by the interactive operation triggered by the target object is displayed according to the action adjustment parameter.

[0120] Optionally, the virtual action of the target object includes: an object visual action presented by a visual model of the target object;

[0121] The display module is specifically suitable for:

[0122] The action adjustment parameters are transmitted to the visual model of the target object, so that the visual model of the target object displays the object visual action according to the action adjustment parameters.

[0123] The specific structure and working principle of each of the above modules can be referred to the description of the corresponding part of the method embodiment, which will not be repeated here.

[0124] Another embodiment of the present application provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the object display method in the virtual scene in any of the above method embodiments. The executable instruction can be specifically used to enable the processor to execute the corresponding operations in the above method embodiments.

[0125] Figure 4 A schematic structural diagram of an electronic device according to another embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0126] like Figure 4 As shown, the electronic device may include: a processor (processor) 502 , a communication interface (Communications Interface) 506 , a memory (memory) 504 , and a communication bus 508 .

[0127] in:

[0128] The processor 502 , the communication interface 506 , and the memory 504 communicate with each other via a communication bus 508 .

[0129] The communication interface 506 is used to communicate with other devices such as clients or other servers.

[0130] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above-mentioned embodiment of the method for displaying objects in the virtual scene.

[0131] Specifically, the program 510 may include program codes, which include computer operation instructions.

[0132] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0133] The memory 504 is used to store the program 510. The memory 504 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0134] The program 510 may be specifically used to enable the processor 502 to execute the corresponding operations in the above method embodiment.

[0135] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general-purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for the purpose of disclosing the best mode of the present invention.

[0136] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0137] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0138] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0139] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, any one of the claimed embodiments may be used in any combination.

[0140] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to an embodiment of the present invention. The present invention may also be implemented as a device or device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may have the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0141] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A method for displaying an object in a virtual scene, comprising: Acquire the position information of the target object in the fluid region; wherein the fluid region refers to: a region composed of liquid elements capable of flowing; Reading an environment channel map set for the fluid region, and determining pixel map data of a target pixel corresponding to the orientation information stored in the environment channel map; Determining an action adjustment parameter according to the pixel map data of the target pixel, and displaying a virtual action of the target object according to the action adjustment parameter; Wherein, the pixel map data includes at least one of the following: collision attribute data corresponding to the first channel, pixel state data corresponding to the second channel, and action impact data corresponding to the third channel; the action impact data includes at least one of the following: distance-type impact data related to the distance value from the horizontal plane, element-type impact data related to associated elements in the water, and water quality-type impact data related to water quality attributes.

2. The method according to claim 1, wherein: Before obtaining the position information of the target object in the fluid region, the method further includes: performing a pre-baking operation on the fluid region to obtain the environment channel map; Furthermore, the reading of the environment channel map set for the fluid region includes: reading the environment channel map set for the fluid region through a graphics processor.

3. The method according to claim 2, wherein: The pre-baking operation is performed on the fluid area to obtain the environment channel map, comprising: The fluid region is divided into a plurality of pixels, pixel map data of each pixel is generated respectively, and the pixel map data of each pixel is stored through the environment channel map.

4. The method according to claim 3, wherein: The collision attribute data includes: collision data or non-collision data; and the action adjustment parameters include: collision response adjustment parameters or non-collision response adjustment parameters; The pixel state data includes: fluid state data or solid state data; and the action adjustment parameter includes: fluid type adjustment parameter or solid type adjustment parameter; The action adjustment parameters also include at least one of the following: a distance adjustment parameter, an element adjustment parameter, and a water quality adjustment parameter.

5. The method according to claim 4, wherein: The generating of pixel map data of each pixel comprises: For each pixel, first original pixel data of the pixel and second original pixel data of an associated pixel associated with the pixel are acquired respectively; A preset operation is performed on the first original pixel data and the second original pixel data, and pixel map data of the pixel is generated according to the operation result.

6. The method according to claim 5, wherein: The first original pixel data of the pixel includes: first original pixel data corresponding to the original data channel; the second original pixel data of the associated pixel associated with the pixel includes: second original pixel data corresponding to the original data channel; The pixel map data of the pixel generated according to the calculation result includes: the corrected pixel data corresponding to the corrected data channel.

7. The method according to any one of claims 1 to 6, wherein: The virtual action of the target object includes: an interactive action generated by an interactive operation triggered by the target object; The displaying of the virtual action of the target object according to the action adjustment parameter comprises: In the case where the interactive operation triggered by the target object is detected, the action adjustment parameter is obtained, and the interactive action generated by the interactive operation triggered by the target object is displayed according to the action adjustment parameter.

8. The method according to any one of claims 1 to 6, wherein: The virtual action of the target object includes: an object visual action presented by a visual model of the target object; The displaying of the virtual action of the target object according to the action adjustment parameter comprises: The action adjustment parameters are transmitted to the visual model of the target object, so that the visual model of the target object displays the object visual action according to the action adjustment parameters.

9. A device for displaying objects in a virtual scene, comprising: An acquisition module, adapted to acquire position information of a target object in a fluid region; wherein the fluid region refers to a region composed of liquid elements capable of flowing; A determination module, adapted to read an environment channel map set for the fluid region, and determine pixel map data of a target pixel corresponding to the orientation information stored in the environment channel map; A display module, adapted to determine an action adjustment parameter according to pixel map data of the target pixel, and display a virtual action of the target object according to the action adjustment parameter; Wherein, the pixel map data includes at least one of the following: collision attribute data corresponding to the first channel, pixel state data corresponding to the second channel, and action impact data corresponding to the third channel; the action impact data includes at least one of the following: distance-type impact data related to the distance value from the horizontal plane, element-type impact data related to associated elements in the water, and water quality-type impact data related to water quality attributes.

10. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the object display method in a virtual scene according to any one of claims 1-8.

11. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute operations corresponding to the method for displaying an object in a virtual scene according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image rendering method, device and equipment and storage medium

    CN109598777A

  • Landform generation method and device, computer equipment and storage medium

    CN111784789A