Method, device, electronic device and storage medium for determining transparency

By using physical ray parameter information and collision point information to calculate the transparency of the target detection point in game development technology, the problems of poor transparent display effect and poor user experience caused by fixed transparency display value are solved, and the transparent display effect is achieved in which the transparent display effect is consistent with the actual situation.

CN114627233BActive Publication Date: 2025-04-25SHANGHAI MIHOYO TIANMING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011445986.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-08
Publication Date
2025-04-25
Estimated Expiration
2040-12-08

AI Technical Summary

Technical Problem

In the prior art, a fixed transparency display value is usually used when determining the translucent effect, resulting in a deviation from the actual situation, resulting in poor transparent display effect and poor user experience.

Method used

By emitting physical rays to each target detection point on the first sub-model based on the physical ray parameter information corresponding to the current visual angle, the physical rays are determined to pass through the collision point information of the first sub-model and the second sub-model, the distance values ​​between the target detection points and the second sub-model, and the transparency information of each target detection point is determined based on these distance values.

Benefits of technology

The transparent display effect is consistent with the actual situation, improves the user experience, and solves the problem of poor transparent display effect caused by fixed transparency display value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114627233B_ABST
    Figure CN114627233B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, electronic device and storage medium for determining transparency, the method comprising: emitting physical rays to each target detection point on the first sub-model according to pre-set physical ray parameter information corresponding to the current visual angle, and determining the collision point information of each physical ray passing through the first sub-model and the second sub-model; the first sub-model is a model that wraps a part of the second sub-model; for each target detection point, according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model, determining the distance value between the first sub-model and the second sub-model corresponding to the current target detection point; based on the distance value corresponding to each target detection point, determining the transparency information of each target detection point when displaying the first sub-model and the second sub-model. The technical solution of this embodiment realizes that the transparent display effect is consistent with the actual, thereby improving the technical effect of user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of game development technology, and in particular to a method, device, electronic device and storage medium for determining transparency. Background Art

[0002] In animation design, a semi-transparent effect is usually set between the inner layer model and the outer layer model, for example, the semi-transparent display of the skin model and the clothing model. Correspondingly, the semi-transparent display mainly relies on the effect displayed after the light reflected by the inner layer object passes through the outer layer object after a certain distance and enters the human eye. Among them, each model is composed of points. The farther the distance between the point on the inner layer object and the corresponding point on the outer layer object, the weaker the semi-transparent effect, and vice versa.

[0003] At present, the semi-transparent effect is usually determined by setting the transparency display value of the outer model, which is usually fixed, and all points on the outer model are transparently displayed according to the set transparency display value. This method has a certain deviation between the transparent display and the actual situation, resulting in poor transparent display effect and poor user experience. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for determining transparency, so as to achieve a transparent display effect consistent with reality, thereby improving the technical effect of user experience.

[0005] In a first aspect, an embodiment of the present invention provides a method for determining transparency, including:

[0006] According to the preset physical ray parameter information corresponding to the current visual angle, physical rays are emitted to each target detection point on the first sub-model, and the collision point information of each physical ray passing through the first sub-model and the second sub-model is determined; the first sub-model is a model that wraps a part of the second sub-model;

[0007] For each target detection point, determine the distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model;

[0008] Based on the distance value corresponding to each target detection point, transparency information of each target detection point when displaying the first sub-model and the second sub-model is determined.

[0009] In a second aspect, an embodiment of the present invention further provides a device for determining transparency, including:

[0010] A collision point information determination module, configured to emit physical rays to each target detection point on the first sub-model according to pre-set physical ray parameter information corresponding to the current visual angle, and determine the collision point information of each physical ray passing through the first sub-model and the second sub-model; the first sub-model is a model that wraps a part of the second sub-model;

[0011] a distance value determination module, configured to determine, for each target detection point, a distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model;

[0012] The transparency information determination module is used to determine the transparency information of each target detection point when displaying the first sub-model and the second sub-model based on the distance value corresponding to each target detection point.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining transparency as described in any one of the embodiments of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to perform the method for determining transparency as described in any one of the embodiments of the present invention.

[0018] The technical solution of the embodiment of the present invention, by emitting physical rays to each target detection point on the first sub-model according to the physical ray parameter information corresponding to the current visual angle, determining the corresponding distance value according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model, and further determining the transparency information of each target detection point, solves the technical problem that when the first sub-model is transparently displayed with a fixed transparency display value, the transparent display deviates from the actual situation, resulting in poor transparent display effect and poor user experience, and realizes adjusting the transparency parameters according to the actual situation to make the transparent display effect consistent with the actual theoretical effect, thereby improving the technical effect of user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flowchart of a method for determining transparency provided in Embodiment 1 of the present invention;

[0021] Figure 2 A schematic flow chart of a method for determining transparency provided in Embodiment 2 of the present invention;

[0022] Figure 3 A schematic diagram of the structure of a device for determining transparency provided in Embodiment 3 of the present invention;

[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0025] Embodiment 1

[0026] Figure 1 A flow chart of a method for determining transparency provided in Embodiment 1 of the present invention is provided. This embodiment is applicable to the case of determining transparency information for the distance between collision points on a first sub-model and a second sub-model. The method can be executed by a device for determining transparency, which can be implemented in the form of software and / or hardware.

[0027] In order to more clearly introduce the technical solution of this embodiment, the application scenario is briefly introduced first. The ray tracing technology can track the path of the ray, and then simulate the interaction between the ray and the virtual object hit by the ray in the computer-generated world. The technical solution of this embodiment can determine that the simulated ray hits the first sub-model and the second sub-model in sequence according to the ray tracing acceleration device, and then adjust the transparency information of the first sub-model and the second sub-model.

[0028] like Figure 1 The present embodiment specifically includes the following steps:

[0029] S110, emitting physical rays to each target detection point on the first sub-model according to pre-set physical ray parameter information corresponding to the current visual angle, and determining collision point information of each physical ray passing through the first sub-model and the second sub-model.

[0030] Among them, the first sub-model and the second sub-model are relative. If the application scenario is a skin model and a clothing model, the model corresponding to the clothing can be used as the first sub-model, and the model corresponding to the skin can be used as the second sub-model. The current visual angle can be the relative angle of the current position of the shooting device, and the target detection point can be a detection point pre-set on the first sub-model; it can also be that the pre-set on the first sub-model is divided into multiple blocks, and the center point of each block can be used as the target detection point; it can also be a detection point set by the developer according to actual needs; of course, it can also be that the first sub-model is composed of multiple points, and each point can be used as a target detection point. The physical ray parameter information can be the relative angle between the shooting device and each target detection point, that is, the emission angle of the physical ray. The physical ray can be a ray emitted by the engine. In this embodiment, it can be a ray emitted by the game engine. When the physical ray collides with the first sub-model and the second sub-model, two collision points can be determined, and the position information of the above two collision points can be used as collision point information.

[0031] Specifically, according to the current visual angle, the relative angle information between the current visual angle and each target detection point on the first sub-model is determined, and the above relative angle information is used as the parameter information of each physical ray. According to the parameter information of each physical ray, the engine emits a corresponding physical ray, which can collide with the target detection point on the first sub-model and can pass through the first sub-model to collide with the second sub-model. The collision point of the physical ray corresponding to the target detection point on the first sub-model should be the target detection point, and the collision point where the above physical ray collides with the second sub-model through the first sub-model is used as the second collision point. The position information of the target detection point and the second collision point can be used as the collision point information, and the position information can be spatial position information or relative position information between the target detection point and the second collision point.

[0032] S120 . For each target detection point, determine the distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model.

[0033] The distance value is the distance between the collision points after the physical ray penetrates the first sub-model and the second sub-model.

[0034] Specifically, according to the collision point information, i.e., the position information, of the target detection point and the second collision point, the distance value between the target detection point and the second collision point can be further determined. The specific distance value acquisition method can be acquired according to a preset algorithm or calculated by a distance formula between two points. Since there are multiple target detection points on the first sub-model, the distance value between the first sub-model and the second sub-model corresponding to each target detection point can be acquired according to the above method.

[0035] S130 . Determine transparency information of each target detection point when displaying the first sub-model and the second sub-model based on the distance value corresponding to each target detection point.

[0036] The transparency information refers to the degree of transparency during display, which can be expressed as a percentage, for example, the transparency is 80%.

[0037] Specifically, according to the distance value corresponding to the target detection point, the transparency information can be determined based on the correspondence between the pre-stored distance value and the transparency, or it can be calculated based on a pre-set transparency calculation model, and the distance value is input into the transparency calculation model. After calculation, the transparency information corresponding to the distance value can be obtained.

[0038] In this embodiment, the reason and benefit of using the above method to determine the transparency information is that when the first sub-model and the second sub-model are displayed transparently, when observing each target detection point on the first sub-model based on the camera in the display device, there is a certain difference in shooting angle between each target detection point and the camera, that is, when the position of the camera is different, the relative shooting angle between each target detection point and the camera is different. Correspondingly, when the physical ray corresponding to each target detection point intersects with the second sub-model under the relative shooting angle, the distance information between each target detection point and the corresponding intersection point is also different, thereby causing the transparency information to be different. In order to display the first sub-model and the second sub-model according to actual needs, the relative shooting angle between the camera and each target detection point can be determined in real time or at intervals, and the physical engine can be made to emit physical rays based on the relative shooting angle to determine the distance information corresponding to each target detection point based on the emitted physical rays, and then determine the transparency information based on the distance information.

[0039] The technical solution of this embodiment, by emitting physical rays to each target detection point on the first sub-model according to the physical ray parameter information corresponding to the current visual angle, determining the corresponding distance value according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model, and further determining the transparency information of each target detection point, solves the technical problem of poor transparent display effect and poor user experience caused by the deviation between the transparent display and the actual situation when the first sub-model is transparently displayed with a fixed transparency display value, and realizes adjusting the transparency parameters according to the actual situation to make the transparent display effect consistent with the actual theoretical effect, thereby improving the technical effect of user experience.

[0040] Embodiment 2

[0041] Figure 2 This is a flow chart of a method for determining transparency provided by Embodiment 2 of the present invention. Based on the above embodiments, physical ray parameter information can be pre-stored, and the distance value can be calculated by sequentially acquiring spatial coordinate information between the first sub-model and the second sub-model according to the physical ray. The explanations of the terms that are the same or corresponding to the above embodiments are not repeated here.

[0042] See also Figure 2 The method for determining transparency provided in this embodiment includes:

[0043] S210. Determine physical ray parameter information corresponding to each visual angle according to each target detection point on the first sub-model, and store the physical ray parameter information in a target storage space to obtain corresponding physical ray parameter information from the target storage space.

[0044] It should be noted that, based on different positions of the shooting device, optionally, shooting angles, or different placement positions of the shooting device in the display device, the relative angles corresponding to different shooting device positions for the same target detection point, that is, the visual angles may be different, and accordingly, the visual angles corresponding to other target detection points may also be different. Therefore, the corresponding physical rays can be emitted according to the visual angle corresponding to each target detection point, so as to determine the distance value between each target detection point and the corresponding collision point on the second sub-model based on the emitted physical rays, thereby determining the corresponding transparency information based on the distance value, and finally displaying each target detection point on the first sub-model according to the transparency information, so as to achieve the effect of transparent display of the first sub-model and the second sub-model.

[0045] Specifically, the angle information corresponding to a certain visual angle and each target detection point on the first submodel can be determined, and the angle information is used as the physical ray parameter information corresponding to the visual angle, and the physical ray parameter information is stored in the subspace of the visual angle in the target storage space, or it can be stored in the target storage space and stored corresponding to the visual angle. In the above manner, the physical ray parameter information corresponding to each visual angle can be obtained, and the parameter information can be stored in the target storage space, so that the corresponding physical ray parameter information can be obtained according to the current visual angle.

[0046] S220. When a control that triggers transparent information or transparent display is detected, physical ray parameter information corresponding to the current visual angle is retrieved from the target storage space to emit physical rays to each target detection point on the first sub-model based on the retrieved physical ray parameter information.

[0047] Among them, the control for determining transparency information or transparent display is a control corresponding to the trigger for determining transparency information. When the control is triggered, the method for determining transparency can be called to obtain transparency information, thereby realizing transparent display.

[0048] Specifically, when a control that triggers transparent information or transparent display is detected, the current visual angle can be obtained, and the physical ray parameter information corresponding to the current visual angle can be retrieved from the target storage space. If the physical ray parameter information in the target storage space is stored in subspaces of different visual angles, then the retrieval method can be to obtain each physical ray parameter information in the subspace corresponding to the current visual angle. If the physical parameter information in the target storage space corresponds to each visual angle, then each physical ray parameter information can be obtained based on the current visual angle and the pre-stored correspondence, so that the engine can send the corresponding physical ray to the first sub-model.

[0049] Exemplarily, if the current visual angle is A, and 1000 pieces of physical ray parameter information are stored in the subspace corresponding to the visual angle A in the storage space, then the 1000 pieces of physical ray parameter information are used as the physical ray parameter information corresponding to the current visual angle. If the current visual angle is A, it can be determined according to the pre-stored correspondence that the storage space includes physical ray parameter information a1, a2, a3 corresponding to the visual angle A, then the physical ray parameter information a1, a2, a3 are used as the physical ray parameter information corresponding to the current visual angle.

[0050] S230 . For each physical ray, determine target detection point information and second collision point information corresponding to when the current physical ray collides with the first sub-model and the second sub-model in sequence.

[0051] Among them, the current physical ray can collide with the first sub-model and the second sub-model in turn. Since the current physical ray is determined according to the current visual angle and the target detection point, the collision point between the physical ray and the first sub-model should be the target detection point. The current physical ray will collide with the second sub-model through the first sub-model, and the collision point between the current physical ray and the second sub-model is used as the second collision point. The target detection point information and the second collision point information are information used to describe the position, and may include spatial coordinate information.

[0052] Specifically, when physical rays are emitted to each target detection point on the first sub-model according to the physical ray parameter information, the target detection point information and the second collision point information when each physical ray collides with the first sub-model and the second sub-model can be determined respectively. It can be spatial coordinate information, for example: the target detection point information corresponding to the physical ray A is (am1, am2, am3), and the second collision point information is (ap1, ap2, ap3); it can also be the relative spatial coordinate information between the target detection point information and the second collision point information, for example: taking the target detection point as the origin, the information of the second collision point is (a1, a2, a3).

[0053] S240. For each target detection point, determine the distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to the spatial coordinate information corresponding to the current target detection point and the spatial coordinate information of the second collision point on the second sub-model corresponding to the current target detection point.

[0054] Specifically, according to the spatial coordinate information corresponding to the current target detection point and the spatial coordinate information of the second collision point corresponding to the current target detection point on the second sub-model, the distance value between the target detection point and the second collision point can be calculated by the distance formula between two points in space, and the distance value is used as the distance value between the first sub-model and the second sub-model corresponding to the current target detection point. For example: the target detection point information corresponding to the physical ray A is (am1, am2, am3), and the second collision point information is (ap1, ap2, ap3), then the distance value between the first sub-model and the second sub-model corresponding to the current target detection point can be determined as Furthermore, the distance value between the first sub-model and the second sub-model corresponding to each target detection point can be determined.

[0055] S250: Determine transparency information of each target detection point when displaying the first sub-model and the second sub-model based on the distance value corresponding to each target detection point.

[0056] Among them, the correspondence between the distance value corresponding to each target detection point and its corresponding transparency information can be pre-stored. For example, the transparency information decreases by 10% every time the value increases by 10nm. The distance information is recorded as dist, 0nm<dist≤10nm, the transparency information is 100%, 10nm<dist≤20nm, the transparency information is 90%, 20nm<dist≤30nm, the transparency information is 80%, etc.

[0057] It should be noted that the transparency information may include transparency information of the first sub-model and transparency information of the second sub-model.

[0058] Optionally, the transparency information of each target detection point may be determined according to a predetermined transparency parameter corresponding to each distance value and a distance value corresponding to each target detection point.

[0059] Specifically, according to the distance value corresponding to each target detection point, the transparency information corresponding to the distance information can be determined from the pre-stored correspondence between each distance value and the transparency information, which may include the transparency information of the first sub-model and the transparency information of the second sub-model, so as to be used in subsequent transparent display.

[0060] Optionally, the transparency parameter corresponding to each distance value may be determined according to the distance value corresponding to each target detection point and a preset transparency determination method and used as the transparency information corresponding to the corresponding target detection point.

[0061] In order to make the transparency information more continuous and accurate, a transparency determination method can be preset, which can be a preset formula or a pre-trained model, etc. According to the distance value corresponding to the target detection point and the preset method, the transparency parameter corresponding to each distance value can be obtained, and the transparency parameter can be used as the transparency information corresponding to the target detection point for subsequent transparent display.

[0062] S260: Display each target detection point at the current visual angle transparently according to corresponding transparency information.

[0063] Specifically, after determining the transparency information of each target detection point at the current visual angle, in order to make the visual experience of the first sub-model and the second sub-model better, each target detection point on the first sub-model can be displayed according to the corresponding transparency information to obtain a transparent display effect.

[0064] The technical solution of this embodiment, by emitting physical rays to each target detection point on the first sub-model according to the physical ray parameter information corresponding to the current visual angle, determining the corresponding distance value according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model, and further determining the transparency information of each target detection point, solves the technical problem of poor transparent display effect and poor user experience caused by the deviation between the transparent display and the actual situation when the first sub-model is transparently displayed with a fixed transparency display value, and realizes adjusting the transparency parameters according to the actual situation to make the transparent display effect consistent with the actual theoretical effect, thereby improving the technical effect of user experience.

[0065] Embodiment 3

[0066] Figure 3 This is a schematic diagram of the structure of a device for determining transparency provided in Embodiment 3 of the present invention. The device includes: a collision point information determination module 310 , a distance value determination module 320 and a transparency information determination module 330 .

[0067] Among them, the collision point information determination module 310 is used to emit physical rays to each target detection point on the first sub-model according to the pre-set physical ray parameter information corresponding to the current visual angle, and determine the collision point information of each physical ray passing through the first sub-model and the second sub-model; the first sub-model is a model that wraps a part of the second sub-model; the distance value determination module 320 is used to determine, for each target detection point, the distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model; the transparency information determination module 330 is used to determine the transparency information of each target detection point when displaying the first sub-model and the second sub-model based on the distance value corresponding to each target detection point.

[0068] Optionally, the device also includes: a parameter information storage module, used to determine the physical ray parameter information corresponding to each visual angle according to each target detection point on the first sub-model, and store the physical ray parameter information in a target storage space to obtain the corresponding physical ray parameter information from the target storage space.

[0069] Optionally, the collision point information determination module 310 is also used to retrieve physical ray parameter information corresponding to the current visual angle from the target storage space when a control that triggers the determination of transparent information or transparent display is detected, so as to emit physical rays to each target detection point on the first sub-model based on the retrieved physical ray parameter information.

[0070] Optionally, the collision point information determination module 310 is also used to determine, for each physical ray, the target detection point information and the second collision point information corresponding to when the current physical ray collides with the first sub-model and the second sub-model in sequence; the target detection point information and the second collision point information include spatial coordinate information.

[0071] Optionally, the distance value determination module 320 is also used to determine, for each target detection point, the distance value between the first sub-model corresponding to the current target detection point and the second sub-model based on the spatial coordinate information corresponding to the current target detection point and the spatial coordinate information of the second collision point corresponding to the current target detection point on the second sub-model.

[0072] Optionally, the transparency information determination module 330 is also used to determine the transparency information of each target detection point based on a predetermined transparency parameter corresponding to each distance value and the distance value corresponding to each target detection point; or, based on the distance value corresponding to each target detection point and a pre-set transparency determination method, determine the transparency parameter corresponding to each distance value and use it as the transparency information corresponding to the corresponding target detection point.

[0073] Optionally, the device further includes: a transparent display module, configured to transparently display each target detection point at the current visual angle according to corresponding transparency information.

[0074] The technical solution of this embodiment, by emitting physical rays to each target detection point on the first sub-model according to the physical ray parameter information corresponding to the current visual angle, determining the corresponding distance value according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model, and further determining the transparency information of each target detection point, solves the technical problem of poor transparent display effect and poor user experience caused by the deviation between the transparent display and the actual situation when the first sub-model is transparently displayed with a fixed transparency display value, and realizes adjusting the transparency parameters according to the actual situation to make the transparent display effect consistent with the actual theoretical effect, thereby improving the technical effect of user experience.

[0075] The device for determining transparency provided by the embodiment of the present invention can execute the method for determining transparency provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0076] 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-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0077] Embodiment 4

[0078] 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 of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Figure 4 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0079] like Figure 4 As shown, the electronic device 40 is in the form of a general computing device. The components of the electronic device 40 may include but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401).

[0080] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0081] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.

[0082] 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 called a "hard drive"). Although Figure 4 Not shown in the figure, 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, a 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 medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0083] 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 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.

[0084] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboards, pointing devices, displays 410, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 40, and / or may communicate with any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with the 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.

[0085] The processing unit 401 executes various functional applications and data processing by running the programs stored in the system memory 402, such as implementing the method for determining transparency provided by the embodiment of the present invention.

[0086] Embodiment 5

[0087] Embodiment 5 of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform a method for determining transparency when executed by a computer processor.

[0088] The method includes:

[0089] According to the preset physical ray parameter information corresponding to the current visual angle, physical rays are emitted to each target detection point on the first sub-model, and the collision point information of each physical ray passing through the first sub-model and the second sub-model is determined; the first sub-model is a model that wraps a part of the second sub-model;

[0090] For each target detection point, determine the distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model;

[0091] Based on the distance value corresponding to each target detection point, transparency information of each target detection point when displaying the first sub-model and the second sub-model is determined.

[0092] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0093] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0094] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0095] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0096] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for determining transparency, characterized in that include: Determine physical ray parameter information corresponding to each visual angle according to each target detection point on the first sub-model, and store the physical ray parameter information in a target storage space, so as to obtain corresponding physical ray parameter information from the target storage space; wherein the physical ray parameter information includes angle information corresponding to each visual angle and each target detection point on the first sub-model; According to the preset physical ray parameter information corresponding to the current visual angle, physical rays are emitted to each target detection point on the first sub-model, and the collision point information of each physical ray passing through the first sub-model and the second sub-model is determined; the first sub-model is a model that wraps a part of the second sub-model; For each target detection point, determine the distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to the collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model; Based on the distance value corresponding to each target detection point, transparency information of each target detection point when displaying the first sub-model and the second sub-model is determined.

2. The method according to claim 1, characterized in that The emitting physical rays to each target detection point on the first sub-model according to the preset physical ray parameter information corresponding to the current visual angle includes: When a control that triggers transparent information or transparent display is detected, physical ray parameter information corresponding to the current visual angle is retrieved from the target storage space to emit physical rays to each target detection point on the first sub-model based on the retrieved physical ray parameter information.

3. The method according to claim 1, characterized in that: The determining of the collision point information of each physical ray passing through the first sub-model and the second sub-model includes: For each physical ray, determining target detection point information and second collision point information corresponding to when the current physical ray collides with the first sub-model and the second sub-model in sequence; The target detection point information and the second collision point information include space coordinate information.

4. The method according to claim 3, characterized in that The determining, for each target detection point, a distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model, comprises: For each target detection point, the distance value between the first sub-model corresponding to the current target detection point and the second sub-model is determined based on the spatial coordinate information corresponding to the current target detection point and the spatial coordinate information of the second collision point on the second sub-model corresponding to the current target detection point.

5. The method according to claim 1, characterized in that The determining, based on the distance value corresponding to each target detection point, transparency information of each target detection point when displaying the first sub-model and the second sub-model includes: Determine transparency information of each target detection point according to predetermined transparency parameters corresponding to each distance value and distance values ​​corresponding to each target detection point; or, According to the distance value corresponding to each target detection point and a preset transparency determination method, a transparency parameter corresponding to each distance value is determined and used as transparency information corresponding to the corresponding target detection point.

6. The method according to claim 5, characterized in that Also includes: Each target detection point under the current visual angle is transparently displayed according to the corresponding transparency information.

7. A device for determining transparency, characterized in that include: A collision point information determination module, configured to emit physical rays to each target detection point on the first sub-model according to pre-set physical ray parameter information corresponding to the current visual angle, and determine the collision point information of each physical ray passing through the first sub-model and the second sub-model; the first sub-model is a model that wraps a part of the second sub-model; a distance value determination module, configured to determine, for each target detection point, a distance value between the first sub-model and the second sub-model corresponding to the current target detection point according to collision point information of the physical ray corresponding to the current target detection point on the first sub-model and the second sub-model; a transparency information determination module, configured to determine the transparency information of each target detection point when displaying the first sub-model and the second sub-model based on the distance value corresponding to each target detection point; The device also includes: a parameter information storage module, which is used to determine the physical ray parameter information corresponding to each visual angle according to each target detection point on the first sub-model, and store the physical ray parameter information in a target storage space to obtain the corresponding physical ray parameter information from the target storage space; wherein the physical ray parameter information includes angle information corresponding to each visual angle and each target detection point on the first sub-model.

8. An electronic device, comprising: one or more processors; a 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 method for determining transparency as described in any one of claims 1 to 6.

9. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the method for determining transparency as claimed in any one of claims 1 to 6 when executed by a computer processor.

Citation Information

Patent Citations

  • Virtual sea surface rendering method and system

    CN106652007A

  • Method, device and equipment for generating water depth map for mobile game

    CN111243075A