Information display method and device, electronic equipment and storage medium
By detecting the target subject to be displayed in the game scene, determining the attribute information of its sub-subjects, and adjusting the display attributes, the problem of fixed display effects of game models is solved, and the sense of hierarchy is realized and the workload is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI MIHAYOULIYUE TECH CO LTD
- Filing Date
- 2021-07-14
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the display effect of game models is too rigid, making it difficult to reflect a sense of depth. Furthermore, in order to achieve the model effects required for different scenarios, models need to be created repeatedly, which increases the workload of developers.
By detecting the target subject to be displayed, the target attribute information of each sub-sub ...
It improves the user experience, reduces the workload of repeatedly creating models to achieve the desired effects for different scenarios, and enhances the realism of game scenes.
Smart Images

Figure CN115607961B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an information display method, apparatus, electronic device and storage medium. Background Technology
[0002] Currently, as users face increasing life pressures, they often relieve stress through mobile games, meaning they install game applications developed by various companies on their devices.
[0003] Before experiencing the game on a mobile device, the corresponding game resources need to be loaded, which are the objects in each scene or level of the game, such as the objects corresponding to the content displayed in each level or scene.
[0004] In practical applications, when developers create corresponding object models for in-game resources, they typically use software to color each model so that the game loads these colored models during runtime. However, the effects displayed by these colored models are fixed, and in situations with complex ambient lighting or objects, the models struggle to convey a sense of depth, failing to provide users with a more realistic and natural sensory experience. Furthermore, in some scenes, the models corresponding to multiple subjects may differ only in display effects and some details, yet developers must create models for each subject individually according to the scene's requirements, thus imposing a significant workload on them. Summary of the Invention
[0005] This invention provides an information display method, apparatus, electronic device, and storage medium to make the various parts on the target subject to be displayed show a sense of hierarchy when displayed, thereby improving the user experience.
[0006] In a first aspect, embodiments of the present invention provide an information display method, the method comprising:
[0007] If the target subject to be displayed is detected in the current scene, the target attribute information of each sub-sub ...
[0008] Based on the display attribute information and the target attribute information, the corresponding sub-subject to be displayed is displayed.
[0009] Secondly, embodiments of the present invention also provide an information display device, the device comprising:
[0010] The attribute information determination module is used to determine the target attribute information of each sub-sub ...
[0011] The sub-sub ...
[0012] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:
[0013] One or more processors;
[0014] Storage device for storing one or more programs.
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the information display method as described in any embodiment of the present invention.
[0016] Fourthly, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the information display method as described in any of the embodiments of the present invention.
[0017] The technical solution of this invention, when detecting that the current scene includes a target subject to be displayed, can determine the target attribute information of each sub-sub-subject to be displayed, and determine the display attribute information of the sub-sub-subject to be distinguished and displayed. Based on the above information, the sub-sub-subject to be displayed is displayed, thereby realizing the decoupling of the target subject to be displayed, so that each part of the target subject to be displayed shows a sense of hierarchy when displayed, improving the user experience; at the same time, in the process of scene construction, the tedious process of creating multiple models for subjects that only differ in real-world information or some details is avoided. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of exemplary embodiments of the present invention, the accompanying drawings used in describing the embodiments are briefly introduced below. Obviously, the accompanying drawings described are only a portion of the drawings of the embodiments to be described in this invention, and not all of the drawings. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0019] Figure 1 This is a flowchart illustrating an information display method provided in Embodiment 1 of the present invention;
[0020] Figure 2 This is a flowchart illustrating an information display method provided in Embodiment 2 of the present invention;
[0021] Figure 3 This is a structural block diagram of an information display device provided in Embodiment 3 of the present invention;
[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation
[0023] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0024] Example 1
[0025] Figure 1 This is a flowchart illustrating an information display method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where a computer displays objects within a loaded scene, and is particularly suitable for displaying multiple identical or different object models within a 3D game scene. The method can be executed by an information display device, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device, such as a mobile terminal, a PC, or a server.
[0026] To clearly explain the technical solution of this embodiment, we can take a game running on a terminal as an example to first introduce the application scenario of this embodiment. First, users can install the app corresponding to the game on a terminal, such as a PC or a mobile terminal. With the widespread use of mobile terminals, this is more applicable to mobile games. During game operation, corresponding resources need to be loaded in real time. For example, when running a 3D game, specific game scenes and objects need to be loaded according to the current game screen. The scene can be the scene corresponding to certain levels or dungeons, and the objects can be trees, rocks, or clouds within the scene. Therefore, developers need to construct scene and object models during game development.
[0027] During game development, developers can use various software to create and color object models. For example, they can edit a 3D model in a CAD editor and then color it by clicking the object color option in the view. On one hand, the effects displayed by these colored object models are too rigid and lack a sense of depth. For instance, tree models in games are colored with a specific color and display a fixed effect in any scene. However, in real-world scenes, tree leaves overlap and intertwine. When the original color of a leaf is green, leaves under sunlight can appear brighter, while shaded leaves appear darker. Users would like trees in game scenes to display with a more realistic effect.
[0028] On the other hand, during game execution, the same object may need to be displayed with different effects in different scenes. For example, in scene 1, the left side of a tree might need to be a bright color, while the right side, being obscured, might need to be a darker color. In scene 2, the right side of the tree might need to be a darker color, while the left side might need to be a bright color. Developers hope to effectively avoid the workload of creating different display effect models according to scene requirements. Therefore, this embodiment is implemented in a scenario where the above-mentioned requirements exist.
[0029] like Figure 1 As shown, the method specifically includes the following steps:
[0030] S110. If the target subject to be displayed is detected in the current scene, determine the target attribute information of each subject to be displayed and the display attribute information of the subject to be distinguished.
[0031] The current scene can be a pre-built 2D or 3D game scene, such as a 3D scene built using the Unity engine to present a specific game level. Furthermore, the current scene can be triggered based on certain conditions; for example, when a level entry command is received, the corresponding resources are loaded on the terminal to present the current scene. Based on commands input from external devices, game characters within the scene can perform various operations such as moving and attacking.
[0032] In this embodiment, the target subject to be displayed can be one or more object models, which can be dynamic or static, such as 3D models created by game developers using software. After creation, the object models are tagged and stored in a corresponding model library for the game to use during scene loading. Therefore, during game execution, the current scene can be detected, and the detected object models within that scene can be used as the target subject to be displayed.
[0033] It should be noted that, whether in the same scene or different scenes, certain object models can be called multiple times. At the same time, these object models can be displayed with different effects according to the needs of the scene. Therefore, in practical applications, the detected object models that meet the above conditions (i.e., need to be called multiple times and displayed with different effects) can also be used as the target to be displayed.
[0034] In this embodiment, the target subject to be displayed is composed of at least one sub-sub ...
[0035] Correspondingly, for each sub-subject to be displayed, corresponding target attribute information can be determined. This information is used to characterize the attributes possessed by the sub-subject itself, including various parameters that determine the display effect of the sub-subject, such as the length, width, height, texture, position information, and material information of the sub-subject. Those skilled in the art should understand that different target attribute information can allow the sub-subject to be displayed to be presented with various shapes, materials, or colors at different positions of the target sub-subject. Simultaneously, after associating the target attribute information with the corresponding sub-subject, the association result is stored in the database in the form of a mapping table. Therefore, in this embodiment, after detecting the target sub-subject and determining the sub-subject, the target attribute information corresponding to the sub-subject can be determined by looking up a table. It should be noted that when the sub-subject needs to be displayed multiple times in one scene with different display effects, or displayed separately in multiple scenes with different display effects, multiple target attribute information corresponding to the sub-subject can also be set based on scene requirements.
[0036] In practical applications, to make objects appear more layered during display, it is necessary to further divide and process the sub-subjects to be displayed. Therefore, the sub-subjects to be displayed also include sub-subjects to be distinguished and non-distinguished sub-subjects. The sub-subjects to be distinguished and non-distinguished sub-subjects will be explained separately below.
[0037] The sub-subject to be distinguished is not only a model that belongs to the sub-subject in terms of model structure and is associated with the sub-subject in terms of model position, but also has associated display attribute information. Specifically, when the target attribute information of the sub-subject to be distinguished is determined, various parameters that determine the display effect of the sub-subject to be distinguished can be adjusted based on the target attribute information, thereby obtaining adjusted parameter information. This adjusted parameter information can be used as the display attribute information corresponding to the sub-subject to be distinguished, such as the color information corresponding to the branches on a tree.
[0038] Correspondingly, for non-distinguished sub-sub ...
[0039] During the creation of sub-sub ...
[0040] Optionally, the attribute information of each sub-sub ...
[0041] On one hand, each sub-subject to be displayed can have one or more vertices. Vertex information, including various parameters that determine the display effect of the sub-subject, such as the vertex color that determines the sub-subject's color, can be stored in the vertices of the sub-subject to be displayed. On the other hand, each sub-subject to be displayed can be a face composed of at least three vertices, and this face can be a two-dimensional texture image. In practical applications, this texture image can be stored in the UV texture space during the construction of the scene and objects. When UVs are used as two-dimensional texture coordinate points residing on the vertices of a polygon mesh, a two-dimensional texture coordinate system is defined; this coordinate system is the UV texture space. Within this space, U and V are used to define the coordinate axes, which determine how to place a texture image on the surface of a three-dimensional model. That is, UVs provide a connection between the model surface and the texture image, responsible for determining which vertex on the model surface a pixel of the texture image should be placed on, thus allowing the entire texture to be overlaid onto the model. Various parameters that determine the display effect of the sub-subjects can also be stored in the UV attributes of the model.
[0042] Therefore, the attribute information of the sub-sub ...
[0043] For example, for a tree that is the target subject to be displayed in a scene, the sub-subject to be displayed can be a branch model on the tree. Further, for a model with multiple leaves on a branch, the leaf model marked as 1 is designated as the sub-subject to be distinguished, and the leaf model marked as 2 is designated as the non-distinguished sub-subject. Based on this, when the tree model is detected in the current scene, the color of the branch can be determined to be green using vertex information. Simultaneously, the display attribute information of the leaf model marked as 1 can be determined using parameters in the UV coordinates, such as the position of the leaf on the branch and the color information that needs adjustment.
[0044] S120. Based on the display attribute information and the target attribute information, display the corresponding sub-sub-subject to be displayed.
[0045] In this embodiment, after determining the target attribute information of the sub-sub-subject to be displayed and the display attribute information of the sub-sub-subject to be distinguished, the target display information of the sub-sub-subject to be displayed and the sub-sub-subject to be distinguished can be determined based on the above information. The target display information can be the color information ultimately called by the sub-sub-subject to be displayed. It should be noted that both the target attribute information of the sub-sub-subject to be displayed and the display attribute information of the sub-sub-subject to be distinguished can be directly used as the target display information corresponding to the model, or they can be used as the target display information corresponding to the model after processing. Whether to further adjust the display attribute information and the target attribute information depends on the actual needs of the scene, and this embodiment does not make specific limitations here. After determining the target display information of the sub-sub-subject to be displayed, it can be displayed on the target client corresponding to the user.
[0046] For example, once the pine tree is identified as the target subject to be displayed, and the trunk and branches as the sub-subjects to be displayed, the target attribute information of the trunk and branches can be determined. That is, the color of the trunk is determined to be dark brown, and the color of the branches is determined to be green. These two colors are then used as the target display information for the branches. Furthermore, the leaves in this scene need to highlight a sense of layering during the display process. After identifying the leaves on the branches that need to be displayed differently (i.e., the leaves that need to show a sense of layering), based on the target attribute information corresponding to the branches, various parameters that determine the display effect of the leaves can be adjusted to obtain the display attribute information corresponding to these leaves (i.e., the adjusted parameters). The color of the leaves that need to show a sense of layering is determined to be gray. Conversely, for leaves that do not need to be displayed differently (i.e., the leaves that do not need to show a sense of layering), the color set when creating the model can be followed, or the color in the target attribute information corresponding to the branches can be followed, without making any adjustments to the parameters that determine their own display effect. Based on the above display attribute information and target attribute information, the colors that need to be selected for branches, leaves and trunks containing multiple leaves can be determined, and the models of branches, leaves and trunks can be colored and displayed on the target client corresponding to the user.
[0047] The technical solution of this embodiment, when detecting that the current scene includes the target subject to be displayed, can determine the target attribute information of each sub-sub ...
[0048] Example 2
[0049] Figure 2 This is a flowchart illustrating an information display method provided in Embodiment 2 of the present invention. Based on the aforementioned embodiments, the method fuses the determined display color information of the sub-sub-body to be distinguished based on occlusion color information and occlusion values. This not only allows for the display of the target object in diverse ways through combinations of inserts and textures, further decoupling the sub-sub-body, but also makes the sub-sub-body appear occluded. Simultaneously, it reduces the workload during scene construction for scenarios requiring different occlusion effects for the sub-sub-body to be distinguished. Furthermore, the determined display color information is further adjusted based on the height information of the sub-sub-body to be displayed, refining the final effect and improving the user's sensory experience. Specific implementation details can be found in the technical solution of this embodiment. Technical terms identical or corresponding to those in the above embodiments will not be repeated here.
[0050] like Figure 2 As shown, the method specifically includes the following steps:
[0051] S210. If the target subject to be displayed is detected in the current scene, determine the occlusion value of each sub-sub ...
[0052] In this context, each sub-sub-subject to be displayed can be in the form of an interpolated piece, such as a tree branch model or a tree trunk model. The sub-subjects to be distinguished can be various textures associated with the interpolated pieces, such as textures of pine leaves and maple leaves. In practical applications, depending on the needs of different scenarios, various types of sub-subjects to be distinguished can be associated with corresponding sub-subjects to be displayed, thereby identifying multiple subjects to be displayed. For example, associating various types of leaf textures with corresponding tree branch interpolated pieces can identify multiple types of trees.
[0053] In this embodiment, the occlusion value is determined based on the occlusion information between the sub-sub-subjects to be distinguished. The occlusion information can describe the occlusion status of objects in the current scene. For example, if a tree needs to be loaded in the current scene, and some of its leaves are partially occluded, there are different occlusion situations for each occluded leaf. Some leaves may be occluded by multiple leaves, while others may be occluded by only one leaf. The information describing the occlusion status of the leaf texture in the current scene is the occlusion information. In this embodiment, to facilitate information processing, the occlusion information needs to be represented digitally. Therefore, the occlusion value needs to be determined based on the occlusion information between the sub-sub-subjects to be distinguished. The occlusion value characterizes the occlusion status of the sub-subjects to be distinguished in the current scene. A larger occlusion value indicates a more severe occlusion of the sub-subject, requiring a color much darker than the original color. Conversely, a smaller occlusion value indicates a milder occlusion, requiring a color slightly darker than the original color. For example, in the current scene, if the leaves on the branches are heavily obscured, they may appear black, while if the leaves are only slightly or partially obscured, they may appear light green.
[0054] In this embodiment, the target attribute information includes pre-stored grayscale display information. Grayscale display information can be the grayscale values of one or more pixels corresponding to the sub-subject to be displayed, typically ranging from 0 to 255. It can be understood that a grayscale value is the "grayscale level" obtained by a pixel between black and white. Setting grayscale values for multiple pixels associated with the sub-subject to be displayed can be used to characterize the influence of environmental factors on the color presented by the sub-subject. Since grayscale information can be used to adjust the brightness and saturation of colors, when the external color RGB value is fused with the grayscale display information in grayscale form, the resulting new color RGB value can be used as the final color information called by the sub-subject to be displayed. It can be understood that the target display information is a new RGB value obtained by adjusting the grayscale value based on other color RGB values, used to characterize the color finally displayed by the model.
[0055] It should be noted that, similar to target attribute information, grayscale display information can be stored in the vertex information corresponding to the sub-subbody to be displayed, such as vertex color and / or UV.
[0056] S220. Display the corresponding sub-sub-body to be distinguished according to the occlusion value in the display attribute information, and display the corresponding sub-sub-body to be displayed according to the grayscale display information in the target attribute information.
[0057] The target attribute information includes at least one display color information, which can be color information pre-stored in the LUT texture. The LUT texture is a color lookup table (LUT) pre-built during the construction of the scene and main body model. A LUT can be considered a function; after the color information of each pixel is repositioned by the LUT, a new color value is obtained. In this embodiment, either a 1D LUT or a 3D LUT can be used. A 1D LUT is a one-dimensional check table; each color will have a specific value after being output by the 1D LUT, but changing the input value of a certain color will only affect the output value of that color; the RGB data are independent of each other. A 3D LUT is a three-dimensional check table; a change in one input color will affect all three colors, meaning that a change in any one color will change the other colors. In practical applications, one or more colors can be pre-set as inputs in the LUT texture, and the corresponding one or more output colors can be used as display color information. For example, when a tree branch in the current scene is determined as the sub-subject to be displayed, the display color information corresponding to that tree branch can be retrieved from the corresponding LUT texture.
[0058] In this embodiment, the display attribute information also includes occlusion color information. The occlusion color information can be the pre-stored color information corresponding to the leaf patch. It can be understood that the occlusion color information is similar to the display color information of the sub-subbody to be displayed, and will not be described in detail here.
[0059] It should be noted that both the display color information of the sub-sub-body to be displayed and the occlusion color information of the sub-sub-body to be distinguished can be a single color or multiple colors. This embodiment of the present disclosure does not impose any specific limitations on them.
[0060] After determining at least one display color information and grayscale value of the sub-sub ...
[0061] Optionally, based on at least one display color information and grayscale value, each sub-sub ...
[0062] Here, the above steps will be explained in two stages:
[0063] In the first stage, during the process of displaying each sub-subject based on at least one display color information and grayscale value, the example of adjusting the display color information of the tree branch based on the grayscale values stored in the three vertices is used for illustration. For the first vertex of a branch, adjusting the displayed color information of the branch based on its grayscale value can create a top-dominant effect in the target color of the branch. For example, to make the display of a branch with one or more leaves more realistic, the leaves displayed from top to bottom of the branch will have different colors, with the leaves at the top of the branch being lighter and the leaves at the bottom being darker. Therefore, when the first vertex is processed at the top of the branch, its grayscale value is the highest, and vice versa. After combining the leaf texture with the branch interpolation, starting from the first vertex, the grayscale values of other points on the branch are determined according to their distance from the first vertex. The greater the distance, the lower the grayscale value. Then, the color information of each pixel in the branch and leaves is adjusted according to the grayscale value of the first vertex, so that the color of the branch is displayed from top to bottom in a light-to-dark effect. For the second vertex, adjusting the color of the sub-object based on its grayscale value can create a color gradient effect from far to near in the sub-object. For example, when When the branches are large, due to the attenuation of ambient light, the parts of the branches closer to the ambient light source are lighter in color, while the parts farther away are darker. Therefore, using the same adjustment method as the first vertex, the color information of each pixel in the branches and leaves can be adjusted based on the grayscale value of the second vertex to present the effect of ambient light attenuation. For the third vertex, its adjustment of sub-objects can be triggered based on specific instructions, so that the sub-objects present the corresponding color gradient effect according to specific instructions. For example, in a 3D game scene, when a game character in the scene casts a certain skill, the grayscale value of the third vertex is triggered based on the instruction corresponding to the skill to adjust the color of the branches and leaves. The adjustment method can be that, regardless of which vertex the third vertex is located on, the RGB values of each pixel in the branches and leaves are uniformly adjusted based on its grayscale value. When the grayscale value of the third vertex is large, the branches and leaves will ultimately present a lighter color as a whole, and vice versa.
[0064] The second stage, in the process of fusing the determined display color information of the sub-subjects to be differentiated based on the occlusion color information and occlusion value, will be illustrated using the process of determining the target color of the leaf texture on a tree branch as an example. In the current environment, one or more leaves on a tree branch are occluded; these leaves can be considered as sub-subjects to be differentiated. After processing in the first stage, the display color information of these leaf textures can be determined. At this point, the determined display color information needs to be adjusted based on the occlusion color information and occlusion value. Specifically, the occlusion color information and occlusion value of the leaf texture are first determined. For example, if the determined color information of the leaf texture is light green, the occlusion color information is gray, and the occlusion value is 90 (the occlusion value is preset between 0 and 100, where 0 represents the lowest occlusion value and 100 represents the highest occlusion value; at the same time, a mapping table representing the correspondence between the occlusion value and the adjustment ratio of the occlusion color information is pre-stored in the database), it indicates that the leaf is severely occluded in the current scene and needs to be displayed with a darker color. Therefore, based on the occlusion value, the adjustment ratio of the occlusion color information of the leaf texture can be determined by looking up the table. That is, a color close to black is selected proportionally on the color level corresponding to gray. Then, the determined color is blended with the already determined display color information of light green of the leaf texture to determine the final color to be used by the leaf texture. This can be understood as determining the RGB value of the final color to be used.
[0065] It should be noted that the above steps are described in two stages only to clearly illustrate the process of displaying each sub-subject to be displayed based on at least one display color information and grayscale value, and fusing the determined display color information of the sub-subjects to be distinguished according to the occlusion color information and occlusion value. Those skilled in the art should understand that in actual applications, the above two stages can be performed simultaneously, and there is no limitation on the order of execution.
[0066] In this embodiment, the sub-subject to be displayed is based on at least one display information and grayscale value. When the sub-subject to be distinguished is obscured, the determined display color information needs to be fused according to the obscuration color information and the obscuration value. Based on the above steps, it can be determined that during the scene construction process, the staff only needs to create the model corresponding to the sub-subject to be displayed (such as a tree branch insert) and the model corresponding to the sub-subject to be distinguished or not to be distinguished (such as a leaf texture). This allows the above models to be directly called during the loading of the scene and objects within the scene, and the target display information of the model (such as the colors of different parts of a tree) can be determined through the above steps, thereby combining the target sub-subject to be displayed without having to create corresponding object models one by one according to the requirements of the scene.
[0067] By fusing the determined display color information of the sub-subject to be distinguished based on occlusion color information and occlusion values, not only can the target object be displayed in diverse ways through the combination of inlays and textures, achieving further decoupling of the sub-subject to be displayed, but it can also make the sub-subject to be distinguished appear occluded. Furthermore, it reduces the workload during scene construction for situations where different scenes require different occlusion effects to display the sub-subject to be distinguished.
[0068] In this embodiment, after determining the display color information of each sub-subject to be displayed based on at least one display color information and grayscale value, the determined colors can be further adjusted in order to make the final appearance of the object more realistic.
[0069] Optionally, based on grayscale values, at least one display color information, and the height information of each sub-sub ...
[0070] Specifically, after detecting the target subject to be displayed in the current scene and determining the display color information of the sub-sub ...
[0071] In this embodiment, the height of the target subject to be displayed is set to 1 unit length. The height information of the sub-sub ...
[0072] In the process of determining the adjusted display color information, optionally, the display color information of the sub-sub ...
[0073] During scene construction, a three-dimensional spatial coordinate system can be pre-built within the scene. Based on this, the height information of each sub-subject to be displayed can be directly stored as spatial coordinate information. Correspondingly, each point on the target subject to be displayed can also be located using spatial coordinates. For example, the target subject to be displayed in the current scene is the model corresponding to the pine tree trunk, and the sub-subjects to be displayed are the branch models at different heights on the pine tree trunk. By determining the spatial coordinate information of each branch model in the current scene, the position where each branch is associated with the trunk can be determined. Furthermore, the color at that position on the trunk is selected and merged with the already determined display color information of the branch to further adjust the already determined display color information of the branch. It can be understood that when the trunk presents a display effect of changing from light green to dark green from top to bottom, the branches at each position on the trunk will also be presented with the color of the corresponding height.
[0074] For example, the trunk model of a pine tree is determined as the target subject to be displayed, and the color of the trunk is presented in a gradient effect from top to bottom (i.e., different colors correspond to different heights of the pine tree). Branches are associated with the trunk at three positions: top, middle, and bottom. In other words, there are three sub-sub-subjects to be displayed that are associated with the target subject. Specifically, in a 3D spatial coordinate system constructed based on the scene, the bottom of the trunk is taken as the zero point, and the coordinate axis from the bottom to the top of the trunk is taken as the Z-axis. The height of the trunk is taken as the reference height, i.e., 1 unit length. The step size of the color gradient is set to 0.01. 100 colors are selected sequentially from the color levels corresponding to green, and these colors are corresponding to the 100 heights of the trunk model divided from top to bottom according to the step size. When the height information of the three branches is 0.3, 0.6, and 0.9 respectively, it indicates that the three branch inserts are located at positions with values of 0.3, 0.6, and 0.9 on the Z-axis, respectively. Therefore, based on the color information of different heights of the tree trunk and the height information of the three branches, it can be determined that the target color of the branch with a value of 0.3 on the Z-axis is dark green, the target color of the branch with a value of 0.6 on the Z-axis is standard green, and the target color of the branch with a value of 0.9 on the Z-axis is light green.
[0075] Furthermore, based on the color associated with the tree trunk, the colors of each branch, determined by grayscale values and at least one display color information, can be further adjusted to match the color of the associated tree trunk, resulting in a more natural display effect. Specifically, the RGB value corresponding to the tree trunk color determined based on height information can be retrieved and mixed or superimposed with the RGB value corresponding to the color determined by grayscale values and at least one display color information to obtain a new color corresponding to that value, thus adjusting the determined display color information.
[0076] It is understandable that, based on the determined height information, after adjusting the determined display information of the sub-sub-body to be displayed, the resulting adjusted display color information can be used as the final color called by the model during the display process for the non-distinguished sub-sub-body. For the sub-sub-body to be distinguished, this information can be combined with the occlusion value and occlusion color information for fusion.
[0077] Continuing with the example above, the display color information of the branch insert is determined based on the grayscale value and at least one display color information. After adjusting the determined display color information of the branch insert in conjunction with the height information of each sub-subject to be displayed, the display color information of one or more leaf textures associated with the branch is also determined. Further, based on the display color information of the leaf textures, a fusion process can be performed by combining the occlusion value and occlusion color of the leaves in the current scene. For example, if the display color information of the leaf texture is determined to be light green, the occlusion value of the leaf texture is 90, and the occlusion color information is gray, it indicates that the leaf is severely occluded in the current scene and needs to be displayed as a darker color. Based on the fusion process of the above three parameters, the fused occlusion display information of the leaf texture can be determined to be dark green. The fused occlusion display information can be understood as the color ultimately retrieved by the leaf texture during the display process.
[0078] It should be noted that the display color information of each sub-sub ...
[0079] The technical solution of this embodiment fuses the determined display color information of the sub-subject to be distinguished based on occlusion color information and occlusion value. This not only allows for diverse display of the target object through combinations of interpolations and textures, further decoupling the sub-subject, but also enables the sub-subject to be distinguished to appear occluded. Simultaneously, it reduces the workload during scene construction for scenarios requiring different occlusion effects for the sub-subject. Furthermore, by adjusting the determined display color information based on the height information of the sub-subject, the final effect of the object is further refined, improving the user's sensory experience.
[0080] Example 3
[0081] Figure 3This is a structural block diagram of an information display device provided in Embodiment 3 of the present invention. It can execute the information display method provided in any embodiment of the present invention, and possesses the corresponding functional modules and beneficial effects of the method. For example... Figure 3 As shown, the device specifically includes: an attribute information determination module 310 and a sub-subject display module 320 to be displayed.
[0082] The attribute information determination module 310 is used to determine the target attribute information of each sub-sub ...
[0083] The sub-sub ...
[0084] Based on the above technical solutions, the information display device also includes an attribute information determination module.
[0085] The attribute information determination module is used to determine the attribute information of each sub-sub ...
[0086] Optionally, the attribute information determination module is further configured to determine the occlusion value of each sub-sub ...
[0087] Optionally, the display module 320 for the sub-sub-body to be displayed is further configured to display the corresponding sub-sub-body to be distinguished according to the occlusion value in the display attribute information, and to display the corresponding sub-sub-body to be displayed according to the grayscale display information in the target attribute information.
[0088] Optionally, the display module 320 for the sub-sub-subject to be displayed is further configured to display each sub-sub-subject in the target subject to be displayed based on the occlusion color information, the occlusion value, the at least one display color information, and the grayscale value.
[0089] Optionally, the display module 320 for the sub-sub ...
[0090] Based on the above technical solutions, the display module 320 for the sub-subject to be displayed includes a color information determination unit and a sub-subject display unit to be distinguished.
[0091] The color information determination unit is used to determine the determined color information of each sub-sub ...
[0092] The sub-sub-body display unit to be distinguished is used to fuse the determined color information according to the occlusion value and occlusion color information of each sub-sub-body to be distinguished, to obtain fused occlusion display information, and to display the sub-sub-body to be distinguished based on the fused occlusion display information.
[0093] The technical solution provided in this embodiment, when detecting that the current scene includes the target subject to be displayed, can determine the target attribute information of each sub-sub ...
[0094] The information display device provided in the embodiments of the present invention can execute the information display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0095] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of the present invention.
[0096] Example 4
[0097] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A block diagram is shown of an exemplary electronic device 40 suitable for implementing embodiments of the present invention. Figure 4 The electronic device 40 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0098] like Figure 4 As shown, electronic device 40 is represented in the form of a general-purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, system memory 402, and bus 403 connecting different system components (including system memory 402 and processing unit 401).
[0099] Bus 403 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0100] Electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0101] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0102] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402. Such program modules 407 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 407 typically perform the functions and / or methods described in the embodiments of the present invention.
[0103] Electronic device 40 can also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), and with one or more devices that enable a user to interact with the electronic device 40, and / or with any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 411. Furthermore, electronic device 40 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 412. As shown, network adapter 412 communicates with other modules of electronic device 40 via bus 403. It should be understood that, although... Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0104] The processing unit 401 executes various functional applications and data processing by running programs stored in the system memory 402, such as implementing the information display method provided in the embodiments of the present invention.
[0105] Example 5
[0106] Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which are used to execute an information display method when executed by a computer processor.
[0107] The method includes:
[0108] If the target subject to be displayed is detected in the current scene, the target attribute information of each sub-sub ...
[0109] Based on the display attribute information and the target attribute information, the corresponding sub-subject to be displayed is displayed.
[0110] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0111] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable project code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.
[0112] The project code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0113] Computer project code for performing the operations of embodiments of the present invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The project code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0114] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. An information display method, characterized in that, include: If the target subject to be displayed is detected in the current scene, the target attribute information of each sub-sub ... Based on the display attribute information and the target attribute information, the corresponding sub-sub-subject to be displayed is displayed; The target attribute information includes pre-stored grayscale display information and at least one display color information; the grayscale display information is the grayscale value of one or more pixels corresponding to the sub-subject to be displayed; the display attribute information includes occlusion value and occlusion color information; The step of displaying the corresponding sub-subject to be displayed based on the display attribute information and the target attribute information includes: The corresponding sub-sub ... The step of displaying the corresponding sub-sub-body to be distinguished according to the occlusion value in the display attribute information, and displaying the corresponding sub-sub-body to be displayed according to the grayscale display information in the target attribute information, includes: Based on the occlusion color information, the occlusion value, the at least one display color information, and the grayscale value, each sub-sub-subject to be displayed in the target subject to be displayed is displayed.
2. The method according to claim 1, characterized in that, Also includes: Determine the attribute information of each sub-sub ...
3. The method according to claim 2, characterized in that, The determination of attribute information for each sub-subject to be displayed within the target subject to be displayed includes: Determine the occlusion value of each sub-sub ...
4. The method according to claim 1, characterized in that, The step of displaying each sub-subject in the target subject to be displayed based on the occlusion color information, the occlusion value, the at least one display color information, and the grayscale value includes: Based on the at least one display color information and the grayscale value, each sub-sub ...
5. The method according to claim 4, characterized in that, The step of displaying each sub-sub-subject in the target subject to be displayed based on the at least one display color information and the grayscale value, and fusing the determined display color information of the sub-sub-subjects to be distinguished in the target subject to be displayed according to the occlusion color information and the occlusion value to occlude the display, includes: Based on the grayscale value, the at least one display color information, and the height information of each sub-sub-subject to be displayed, the determined display color information of each sub-sub-subject to be displayed in the target subject to be displayed is determined; Based on the occlusion value and occlusion color information of each sub-sub ...
6. An information display device, characterized in that, include: The attribute information determination module is used to determine the target attribute information of each sub-sub ... The sub-sub-body display module is used to display the corresponding sub-sub-body based on the display attribute information and the target attribute information; The target attribute information includes pre-stored grayscale display information and at least one display color information; the grayscale display information is the grayscale value of one or more pixels corresponding to the sub-subject to be displayed; the display attribute information includes occlusion value and occlusion color information; The sub-sub-body display module to be displayed is also used for: The corresponding sub-sub ... The sub-sub-body display module to be displayed is also used for: Based on the occlusion color information, the occlusion value, the at least one display color information, and the grayscale value, each sub-sub-subject to be displayed in the target subject to be displayed is displayed.
7. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the information display method as described in any one of claims 1-5.
8. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the information display method as described in any one of claims 1-5.