WO2022121655A1 - Transparency determining method and apparatus, electronic device, and storage medium - Google Patents

Transparency determining method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022121655A1
WO2022121655A1 PCT/CN2021/131501 CN2021131501W WO2022121655A1 WO 2022121655 A1 WO2022121655 A1 WO 2022121655A1 CN 2021131501 W CN2021131501 W CN 2021131501W WO 2022121655 A1 WO2022121655 A1 WO 2022121655A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
sub
target detection
detection point
information
Prior art date
Application number
PCT/CN2021/131501
Other languages
French (fr)
Chinese (zh)
Inventor
冯乐乐
Original Assignee
上海米哈游天命科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202011445986.5A external-priority patent/CN114627233A/en
Priority claimed from CN202011444074.6A external-priority patent/CN114627232A/en
Application filed by 上海米哈游天命科技有限公司 filed Critical 上海米哈游天命科技有限公司
Publication of WO2022121655A1 publication Critical patent/WO2022121655A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects

Abstract

Disclosed in embodiments of the present application are a transparency determining method and apparatus, an electronic device, and a storage medium. The method comprises: determining distance information between corresponding points on a first sub-model and a second sub-model, the first sub-model being a model wrapping a local part of the second sub-model; and determining a transparency parameter of the first sub-model and the second sub-model according to the distance information.

Description

确定透明度的方法、装置、电子设备及存储介质Method, apparatus, electronic device and storage medium for determining transparency
本申请要求在2020年12月08日提交中国专利局、申请号为202011445986.5和202011444074.6的中国专利申请的优先权,该两件申请的全部内容通过引用结合在本申请中。This application claims the priority of Chinese patent applications with application numbers 202011445986.5 and 202011444074.6 filed with the China Patent Office on December 08, 2020, the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请实施例涉及游戏开发技术领域,例如涉及一种确定透明度的方法、装置、电子设备及存储介质。The embodiments of the present application relate to the technical field of game development, for example, to a method, apparatus, electronic device, and storage medium for determining transparency.
背景技术Background technique
在动画设计中,通常会设置内层模型与外层模型之间的半透明效果,例如,皮肤模型和衣服模型的半透明显示。相应的,半透明显示主要是依赖内层物体所反射的光经过一定距离后穿透外层物体并入射到人眼后所显示的效果。其中,每个模型是由一个个点构成的,当内层物体上的点与外层物体上与其相对应的点的距离越远,半透明效果比较弱,反之半透明效果就相对比较强。In animation design, the translucent effect between the inner model and the outer model is usually set, for example, the translucent display of the skin model and the clothes model. Correspondingly, the translucent display mainly depends on the effect displayed after the light reflected by the inner layer object penetrates the outer layer object after a certain distance and is incident on the human eye. Among them, each model is composed of points. When the distance between the point on the inner layer object and the corresponding point on the outer layer object is farther, the translucent effect is weaker, and vice versa, the translucent effect is relatively strong.
目前,确定半透明效果,通常是设定外层模型的透明度显示值,该透明度显示值通常是固定不变的,外层模型上的所有点依据设定的透明度显示值来实现透明显示。此种方式存在透明显示与实际情况存在一定的偏差,从而导致透明显示效果不佳以及用户体验较差的技术问题。At present, to determine the translucent effect, the transparency display value of the outer layer model is usually set, and the transparency display value is usually fixed, and all points on the outer layer model are transparently displayed according to the set transparency display value. In this way, there is a certain deviation between the transparent display and the actual situation, which leads to technical problems such as poor transparent display effect and poor user experience.
发明内容SUMMARY OF THE INVENTION
本申请提供一种确定透明度的方法、装置、电子设备及存储介质,以实现透明显示效果与实际相符,并提高用户体验。The present application provides a method, apparatus, electronic device, and storage medium for determining transparency, so as to achieve a transparent display effect consistent with reality and improve user experience.
第一方面,本申请实施例提供了一种确定透明度的方法,该方法包括:In a first aspect, an embodiment of the present application provides a method for determining transparency, the method comprising:
确定第一子模型和第二子模型上对应点之间的距离信息;所述第一子模型为包裹所述第二子模型局部的模型;Determine the distance information between the corresponding points on 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;
根据所述距离信息,确定所述第一子模型和所述第二子模型上透明度参数。According to the distance information, a transparency parameter on the first sub-model and the second sub-model is determined.
第二方面,本申请实施例还提供了一种确定透明度的装置,该装置包括:In a second aspect, an embodiment of the present application also provides a device for determining transparency, the device comprising:
距离信息确定模块,设置为确定第一子模型和第二子模型上对应点之间的距离信息;所述第一子模型为包裹所述第二子模型局部的模型;a distance information determination module, configured to determine the distance information between the corresponding points on 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 transparency parameter determination module is configured to determine the transparency parameters on the first sub-model and the second sub-model according to the distance information.
第三方面,本申请实施例还提供了一种电子设备,所述电子设备包括:In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:
一个或多个处理器;one or more processors;
存储装置,设置为存储一个或多个程序;storage means arranged to store 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 according to any one of the embodiments of the present application.
第四方面,本申请实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时设置为执行如本申请实施例任一项所述的确定透明度的方法。In a fourth aspect, an embodiment of the present application further provides a storage medium containing computer-executable instructions, the computer-executable instructions, when executed by a computer processor, are configured to perform the determination according to any one of the embodiments of the present application method of transparency.
附图说明Description of drawings
图1为本申请一实施例所提供的一种确定透明度的方法的流程示意图;1 is a schematic flowchart of a method for determining transparency according to an embodiment of the present application;
图2为本申请另一实施例所提供的一种确定透明度的方法的流程示意图;2 is a schematic flowchart of a method for determining transparency provided by another embodiment of the present application;
图3为本申请另一实施例所提供的一种确定透明度的方法的流程示意图;3 is a schematic flowchart of a method for determining transparency provided by another embodiment of the present application;
图4为本申请另一实施例所提供的一种确定透明度的方法的流程示意图;4 is a schematic flowchart of a method for determining transparency provided by another embodiment of the present application;
图5为本申请另一实施例所提供的一种确定透明度的方法的流程示意图;5 is a schematic flowchart of a method for determining transparency provided by another embodiment of the present application;
图6为本申请一实施例所提供的一种确定透明度的装置的结构示意图;6 is a schematic structural diagram of a device for determining transparency according to an embodiment of the present application;
图7为本申请另一实施例所提供的一种确定透明度的装置的结构示意图;7 is a schematic structural diagram of a device for determining transparency provided by another embodiment of the present application;
图8为本申请另一实施例所提供的一种确定透明度的装置的结构示意图;8 is a schematic structural diagram of a device for determining transparency provided by another embodiment of the present application;
图9为本申请一实施例所提供的一种电子设备的结构示意图。FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。The present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application.
图1为本申请一实施例所提供的一种确定透明度的方法的流程示意图,本实施例可适用于针对第一子模型和第二子模型上对应点的距离信息确定透明度参数的情况,该方法可以由确定透明度的装置来执行,该装置可以通过软件和/或硬件的形式实现。FIG. 1 is a schematic flowchart of a method for determining transparency provided by an embodiment of the present application. This embodiment is applicable to the case where the transparency parameter is determined according to the distance information of the corresponding points on the first sub-model and the second sub-model, the The method may be performed by means for determining transparency, which may be implemented in software and/or hardware.
为了更清楚的介绍本实施例的技术方案,先简单介绍应用场景。通过光线 追踪技术可以跟踪光线的路径,然后模拟光线与该光线击中的虚拟物体在计算机生成的世界中的交互。本实施例的技术方案可以根据光线追踪加速装置确定模拟光线依次击中第一子模型和第二子模型,进而调整第一子模型和第二子模型的透明度信息。In order to introduce the technical solution of this embodiment more clearly, an application scenario is briefly introduced first. Ray tracing technology traces the path of a ray and then simulates the interaction of the ray with the virtual objects that it hits in a computer-generated world. The technical solution of this embodiment may determine that the simulated light rays hit the first sub-model and the second sub-model in sequence according to the ray-tracing acceleration device, so as to adjust the transparency information of the first sub-model and the second sub-model.
如图1所述,本实施例包括如下步骤:As shown in Figure 1, this embodiment includes the following steps:
S110、确定第一子模型和第二子模型上对应点之间的距离信息。S110. Determine distance information between corresponding points on 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 first sub-model is relative to the second sub-model, and the application scenarios are the skin model and the clothing model. The model corresponding to the clothes can be used as the first sub-model, and the model corresponding to the skin can be used as the second sub-model. The point may refer to the corresponding collision point when the physical ray passes through the first sub-model and the second sub-model. The distance information may be the distance value between the collision point after the physical ray penetrates the first sub-model and the second sub-model, or may be the distance value corresponding to the target detection point on the first sub-model.
示例性的,当光线追踪加速装置模拟出的物理光线依次击中第一子模型和第二子模型,可以确定物理光线在第一子模型上形成的碰撞点的位置信息以及物理光线在第二子模型上形成的碰撞点的位置信息。根据上述两个点的位置信息可以通过两点间的距离公式,计算得到距离信息。若光线追踪加速装置模拟出的物理光线具有自动确定距离的功能,则可以直接获取第一子模型和第二子模型上对应点之间的距离信息。Exemplarily, when the physical ray simulated by the ray tracing acceleration device hits the first sub-model and the second sub-model in sequence, the position information of the collision point formed by the physical ray on the first sub-model and the location information of the physical ray on the second sub-model can be determined. The position information of the collision point formed on the submodel. According to the position information of the above two points, the distance information can be obtained by calculating the distance formula between the two points. If the physical ray simulated by the ray tracing acceleration device has the function of automatically determining the distance, the distance information between the corresponding points on the first sub-model and the second sub-model can be directly obtained.
S120、根据距离信息,确定第一子模型和第二子模型上透明度参数。S120. Determine transparency parameters on the first sub-model and the second sub-model according to the distance information.
其中,透明度参数可以是透明度信息,可以理解为显示模型时的透明程度,可以使用百分比来表示。Among them, the transparency parameter can be transparency information, which can be understood as the degree of transparency when displaying the model, which can be expressed by percentage.
示例性的,在确定距离信息之后,可以根据距离信息与透明度参数的转换关系,分别确定出第一子模型的透明度参数和第二子模型的透明度参数。需要说明的是,转换关系可以基于实际情况设定,在本实施例中不作具体限定。Exemplarily, after the distance information is determined, the transparency parameter of the first sub-model and the transparency parameter of the second sub-model may be determined respectively according to the conversion relationship between the distance information and the transparency parameter. It should be noted that, the conversion relationship may be set based on the actual situation, which is not specifically limited in this embodiment.
本申请实施例的技术方案,通过确定第一子模型和第二子模型上对应点之间的距离信息,进一步,根据距离信息,确定第一子模型和所述第二子模型上透明度参数,这样可以解决以固定透明度显示值对第一子模型进行透明显示时透明显示与实际情况存在偏差而导致的透明显示效果不佳,用户体验较差的问题,根据实际情况调整透明度参数,以使透明显示效果与实际理论效果相符,从而提高用户体验。In the technical solution of the embodiment of the present application, the distance information between the corresponding points on the first sub-model and the second sub-model is determined, and further, according to the distance information, the transparency parameter on the first sub-model and the second sub-model is determined, This can solve the 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. Adjust the transparency parameter according to the actual situation to make the transparent display more transparent. The display effect is consistent with the actual theoretical effect, thereby improving the user experience.
图2为本申请另一实施例所提供的一种确定透明度的方法的流程示意图,本实施例可适用于针对第一子模型和第二子模型上的碰撞点距离确定透明度信 息的情况,该方法可以由确定透明度的装置来执行,该装置可以通过软件和/或硬件的形式实现。2 is a schematic flowchart of a method for determining transparency according to another embodiment of the present application. The method may be performed by means for determining transparency, which may be implemented in software and/or hardware.
如图2所述,本实施例包括如下步骤:As shown in Figure 2, this embodiment includes the following steps:
S210、根据预先设置的与当前视觉角度相对应的物理射线参数信息,向第一子模型上的每个目标检测点发射物理射线,并确定每条物理射线透过第一子模型和第二子模型的碰撞点信息。S210. According to preset physical ray parameter information corresponding to the current visual angle, emit physical rays to each target detection point on the first sub-model, and determine that each physical ray passes through the first sub-model and the second sub-model The collision point information of the model.
其中,当前视觉角度可以是拍摄装置当前位置的相对角度,目标检测点可以是第一子模型上预先设置的检测点;也可以是将第一子模型上的预先设置的点划分为多个块,可以将每个块的中心点作为目标检测点;也可以是开发人员根据实际需求设置的检测点;当然,也可以是,第一子模型是由多个点构成的,可以将每个点作为目标检测点。物理射线参数信息可以是拍摄装置与每个目标检测点的相对角度,即物理射线的发射角度。物理射线可以是引擎发射的射线,在本实施例中,可以是游戏引擎发射的射线。物理射线与第一子模型和第二子模型发生碰撞时可以确定两个碰撞点,上述两个碰撞点的位置信息就可以作为碰撞点信息。Wherein, the current visual angle may be the relative angle of the current position of the photographing device, and the target detection point may be the detection point preset on the first sub-model; or the preset point on the first sub-model may be divided into multiple blocks , the center point of each block can be used as the target detection point; it can also be the detection point set by developers 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 as the target detection point. The physical ray parameter information may be the relative angle between the photographing device and each target detection point, that is, the emission angle of the physical ray. The physical rays may be rays emitted by an engine, and in this embodiment, may be rays emitted by a game engine. When the physical ray collides with the first sub-model and the second sub-model, two collision points may be determined, and the position information of the above two collision points may be used as collision point information.
根据当前视觉角度,确定当前视觉角度与第一子模型上的每个目标检测点之间的相对角度信息,并将上述相对角度信息作为每条物理射线参数信息。根据每条物理射线参数信息,引擎发出相对应的物理射线,该物理射线能够在第一子模型上的目标检测点上发生碰撞,并能够透过第一子模型在第二子模型上发生碰撞。目标检测点所对应的物理射线在第一子模型上的碰撞点应当是目标检测点,将上述物理射线透过第一子模型碰撞到第二子模型的碰撞点作为第二碰撞点,可以将目标检测点与第二碰撞点的位置信息作为碰撞点信息,位置信息可以是空间位置信息,也可以是目标检测点与第二碰撞点之间的相对位置信息。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-mentioned 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 on the target detection point on the first sub-model, and can collide on the second sub-model through the first 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. The collision point of the above-mentioned physical ray passing through the first sub-model and colliding with the second sub-model is used as the second collision point. The position information of the target detection point and the second collision point is used as the collision point information, and the position information may be spatial position information or relative position information between the target detection point and the second collision point.
S220、针对每个目标检测点,根据与当前目标检测点所对应的物理射线在第一子模型和第二子模型上的碰撞点信息,确定当前目标检测点所对应的第一子模型与第二子模型之间的距离信息。S220, for each target detection point, according to the collision point information of the physical rays corresponding to the current target detection point on the first sub-model and the second sub-model, determine the first sub-model and the first sub-model corresponding to the current target detection point Distance information between the two submodels.
其中,距离值信息是包括物理射线穿透第一子模型和第二子模型后的碰撞点之间的距离值。The distance value information includes the distance value between the collision points after the physical ray penetrates the first sub-model and the second sub-model.
根据目标检测点与第二碰撞点的碰撞点信息,即位置信息,可以进一步确定目标检测点与第二碰撞点之间的距离值,距离值获取方法可以是根据预设的算法获取的,也可以是通过两点间的距离公式计算获取的。由于第一子模型上存在多个目标检测点,可以根据上述方式获取每个目标检测点所对应的第一子 模型与第二子模型之间的距离信息。According to the collision point information between the target detection point and the second collision point, that is, the position information, the distance value between the target detection point and the second collision point can be further determined. It can be obtained by calculating the distance between two points. Since there are multiple target detection points on the first sub-model, the distance information between the first sub-model and the second sub-model corresponding to each target detection point can be obtained according to the above method.
S230、基于每个目标检测点所对应的距离信息,确定显示第一子模型和第二子模型时每个目标检测点的透明度信息。S230. Based on the distance information corresponding to each target detection point, determine the transparency information of each target detection point when the first sub-model and the second sub-model are displayed.
其中,透明度信息是显示时的透明程度,可以使用百分比来表示,例如:透明度为80%等。The transparency information is the degree of transparency when displayed, which can be expressed as a percentage, for example, the transparency is 80%.
根据目标检测点所对应的距离信息,可以根据该距离信息在预先存储的距离信息与透明度之间的对应关系中确定透明度信息,也可以是根据预先设置的透明度计算模型来计算,将该距离信息输入至透明度计算模型中,经过计算可以获取与该距离信息对应的透明度信息。According to the distance information corresponding to the target detection point, the transparency information can be determined in the pre-stored correspondence between distance information and transparency according to the distance information, or it can be calculated according to a preset transparency calculation model, and the distance information can be calculated according to the distance information. Input into the transparency calculation model, and after calculation, the transparency information corresponding to the distance information can be obtained.
在本实施例中,采用上述方式确定透明度信息的原因和好处在于:在将第一子模型和第二子模型透明显示时,基于显示装置中的拍摄装置观察第一子模型上的每个目标检测点时,每个目标检测点与拍摄装置存在一定的拍摄角度差异,即拍摄装置所处的位置不同时,不同目标检测点与拍摄装置之间的相对拍摄角度不同,相应的,在相对拍摄角度下与每个目标检测点对应的物理射线与第二子模相交时,每个目标检测点与相应交点之间的距离信息也不相同,从而引起透明度信息也不相同。为了根据实际需求显示第一子模型和第二子模型,可以实时或者间隔性的确定拍摄装置与每个目标检测点之间的相对拍摄角度,并基于该相对拍摄角度使物理引擎发射物理射线,以基于发射的物理射线确定与每个目标检测点所对应的距离信息,进而基于距离信息确定透明度信息。In this embodiment, the reason and advantage of using the above method to determine the transparency information is: when the first sub-model and the second sub-model are transparently displayed, each target on the first sub-model is observed based on the photographing device in the display device. When detecting points, there is a certain shooting angle difference between each target detection point and the shooting device, that is, when the position of the shooting device is different, the relative shooting angle between different target detection points and the shooting device is different. When the physical ray corresponding to each target detection point at an angle intersects the second sub-mode, the distance information between each target detection point and the corresponding intersection point is also different, resulting in different transparency information. In order to display the first sub-model and the second sub-model according to actual requirements, the relative shooting angle between the shooting device and each target detection point can be determined in real time or at intervals, and the physics engine can emit physical rays based on the relative shooting angle. The distance information corresponding to each target detection point is determined based on the emitted physical rays, and then the transparency information is determined based on the distance information.
本申请实施例的技术方案,通过根据与当前视觉角度相对应的物理射线参数信息向第一子模型上的每个目标检测点发射物理射线,根据与当前目标检测点所对应的物理射线在第一子模型和第二子模型上的碰撞点信息,确定相对应的距离信息,进一步确定每个目标检测点的透明度信息,这样可以解决以固定透明度显示值对第一子模型进行透明显示时透明显示与实际情况存在偏差而导致的透明显示效果不佳,用户体验较差的问题,根据实际情况调整透明度参数,以使透明显示效果与实际理论效果相符,从而提高用户体验。According to the technical solution of the embodiment of the present application, physical rays are emitted to each target detection point on the first sub-model according to the physical ray parameter information corresponding to the current visual angle, and according to the physical rays corresponding to the current target detection point, the The collision point information on the first sub-model and the second sub-model determines the corresponding distance information, and further determines the transparency information of each target detection point. This can solve the problem of transparency when the first sub-model is transparently displayed with a fixed transparency display value. If there is a deviation between the display and the actual situation, the transparent display effect is not good and the user experience is poor. Adjust the transparency parameters according to the actual situation to make the transparent display effect consistent with the actual theoretical effect, thereby improving the user experience.
图3为本申请另一实施例所提供的一种确定透明度的方法的流程示意图,在上述实施例的基础上,可以预先存储物理射线参数信息,并根据物理射线依次获取与第一子模型和第二子模型之间的空间坐标信息来计算距离信息。3 is a schematic flowchart of a method for determining transparency provided by another embodiment of the present application. On the basis of the above embodiment, physical ray parameter information may be stored in advance, and the first sub-model and the first sub-model and the The space coordinate information between the second sub-models is used to calculate the distance information.
参见图3,本申请实施例提供的确定透明度的方法包括:Referring to FIG. 3, the method for determining transparency provided by the embodiment of the present application includes:
S310、根据第一子模型上的每个目标检测点,确定每个视觉角度所对应的物理射线参数信息,并将物理射线参数信息存储至目标存储空间,以从目标存 储空间中获取相应的物理射线参数信息。S310. 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 the target storage space, so as to obtain the corresponding physical ray parameter information from the target storage space Ray parameter information.
需要说明的是,基于拍摄装置的不同位置,例如,拍摄角度,或者,拍摄装置在显示装置中摆放位置不同,针对同一目标检测点拍摄装置位置不同时所对应的相对角度,即视觉角度可能存在差异,相应的,其他目标检测点所对应的视觉角度也存在一定差异。因此,可以根据与每个目标检测点所对应的视觉角度发射相应的物理射线,以便基于发射的物理射线确定每个目标检测点与第二子模型上相应碰撞点之间的距离信息,从而基于距离信息来确定相应的透明度信息,最终按照透明度信息来显示第一子模型上的每个目标检测点,达到第一子模型和第二子模型透明显示的效果。It should be noted that, based on the different positions of the photographing device, for example, the shooting angle, or the different positions of the photographing device in the display device, the relative angle corresponding to the different positions of the photographing device for the same target detection point, that is, the visual angle may be There are differences, and correspondingly, there are also certain differences in the visual angles corresponding to other target detection points. 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 information between each target detection point and the corresponding collision point on the second sub-model based on the emitted physical rays, so as to determine the distance information between each target detection point and the corresponding collision point on the second sub-model based on the emitted physical rays. The distance information is used to determine the corresponding transparency information, and finally each target detection point on the first sub-model is displayed according to the transparency information, so as to achieve the effect of transparent display of the first sub-model and the second sub-model.
可以确定某个视觉角度与第一子模型上每个目标检测点所对应的角度信息,将这些角度信息作为与该视觉角度相对应的物理射线参数信息,并将上述物理射线参数信息存储至目标存储空间中该视觉角度的子空间下,也可以是存储在目标存储空间中并与该视觉角度对应存储。通过上述方式,可以获取与每个视觉角度相对应的物理射线参数信息,并将这些参数信息存储至目标存储空间中,以便于根据当前视觉角度能够获取相对应的物理射线参数信息。It is possible to determine the angle information corresponding to a certain visual angle and each target detection point on the first sub-model, use these angle information as the physical ray parameter information corresponding to the visual angle, and store the above-mentioned physical ray parameter information to the target. The subspace of the visual angle in the storage space may also be stored in the target storage space and stored corresponding to the visual angle. In the above manner, physical ray parameter information corresponding to each visual angle can be acquired, and the parameter information can be stored in the target storage space, so that the corresponding physical ray parameter information can be acquired according to the current visual angle.
S320、当检测到触发确定透明信息或透明显示的控件时,从目标存储空间中调取与当前视觉角度相对应的物理射线参数信息,以基于调取的物理射线参数信息向第一子模型上的每个目标检测点发射物理射线。S320. When a control that triggers determination of transparent information or transparent display is detected, retrieve the physical ray parameter information corresponding to the current visual angle from the target storage space, and send the information to the first sub-model based on the retrieved physical ray parameter information. Each target detection point of , emits physical rays.
其中,确定透明信息或透明显示的控件是与触发确定透明度信息相对应的控件,当触发该控件时,可以调取确定透明度的方法来获取透明度信息,进而实现透明显示。Wherein, the control for determining the transparency information or the transparent display is the control corresponding to the triggering determination of the transparency information. When the control is triggered, the method for determining the transparency can be invoked to obtain the transparency information, thereby realizing the transparent display.
当检测到触发确定透明信息或透明显示的控件时,可以获取当前视觉角度,并从该目标存储空间中调取当前视觉角度相对应的物理射线参数信息。在目标存储空间中的物理射线参数信息是按不同视觉角度的子空间存储的情况下,调取方法可以是在与当前视觉角度相对应的子空间下获取每个物理射线参数信息。在目标存储空间中的物理参数信息与每个视觉角度存在对应关系的情况下,可以根据当前视觉角度以及预先存储的对应关系来获取每个物理射线参数信息,以便于引擎能够向第一子模型发出相对应的物理射线。When a control that triggers the determination of 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. In the case where the physical ray parameter information in the target storage space is stored in subspaces of different visual angles, the retrieval method may be to acquire each physical ray parameter information in the subspace corresponding to the current visual angle. In the case that the physical parameter information in the target storage space has a corresponding relationship with each visual angle, each physical ray parameter information can be obtained according to the current visual angle and the pre-stored corresponding relationship, so that the engine can report to the first sub-model The corresponding physical rays are emitted.
示例性的,当前视觉角度为A,存储空间中视觉角度A所对应的子空间中存储了1000个物理射线参数信息,可以将上述1000个物理射线参数信息作为与当前视觉角度相对应的物理射线参数信息。当前视觉角度为A,根据预先存储的对应关系可以确定存储空间中包括物理射线参数信息a1,a2,a3与视觉角度A相对应,可以将物理射线参数信息a1,a2,a3作为与当前视觉角度相对应的物理射线参数信息。Exemplarily, 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, and the above 1000 pieces of physical ray parameter information can be used as the physical rays corresponding to the current visual angle. Parameter information. The current visual angle is A. According to the pre-stored correspondence, it can be determined that the physical ray parameter information a1, a2, and a3 in the storage space correspond to the visual angle A, and the physical ray parameter information a1, a2, and a3 can be used as the current visual angle. Corresponding physical ray parameter information.
S330、针对每条物理射线,确定当前物理射线依次与第一子模型和第二子模型碰撞时所对应的目标检测点信息和第二碰撞点信息。S330. For each physical ray, determine 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.
其中,当前物理射线可以依次与第一子模型和第二子模型发生碰撞,由于当前物理射线是根据当前视觉角度以及目标检测点确定的,因此该物理射线与第一子模型的碰撞点应当是目标检测点。当前物理射线透过第一子模型会与第二子模型发生碰撞,将当前物理射线与第二子模型的碰撞点作为第二碰撞点。目标检测点信息和第二碰撞点信息是用于描述位置的信息,可以包括空间坐标信息。Among them, the current physical ray can collide with the first sub-model and the second sub-model in sequence. 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 target detection point. The current physical ray passing through the first sub-model will collide with the second sub-model, and the collision point between the current physical ray and the second sub-model is taken 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.
根据物理射线参数信息向第一子模型上的每个目标检测点发射物理射线,可以分别确定每条物理射线与第一子模型和第二子模型碰撞时的目标检测点信息和第二碰撞点信息,可以是空间坐标信息,例如:物理射线A所对应的目标检测点信息为(am1,am2,am3),第二碰撞点信息为(ap1,ap2,ap3),也可以是目标检测点信息和第二碰撞点信息之间的相对空间坐标信息,例如:以目标检测点为原点,第二碰撞点的信息为(a1,a2,a3)。According to the physical ray parameter information, physical rays are emitted to each target detection point on the first sub-model, and the target detection point information and the second collision point when each physical ray collides with the first sub-model and the second sub-model can be determined respectively. information, which can be spatial coordinate information, for example: the target detection point information corresponding to physical ray A is (am1, am2, am3), the second collision point information is (ap1, ap2, ap3), or the target detection point information The relative spatial coordinate information between the information of the second collision point and the second collision point information, for example, with the target detection point as the origin, the information of the second collision point is (a1, a2, a3).
S340、针对每个目标检测点,根据与当前目标检测点所对应的空间坐标信息,和第二子模型上与当前目标检测点所对应的第二碰撞点的空间坐标信息,确定当前目标检测点所对应的第一子模型和第二子模型之间的距离信息。S340. For each target detection point, determine 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 corresponding to the current target detection point on the second sub-model Distance information between the corresponding first sub-model and the second sub-model.
根据与当前目标检测点所对应的空间坐标信息,和第二子模型上与当前目标检测点所对应的第二碰撞点的空间坐标信息,可以通过空间中两点间距离公式计算得出目标检测点与第二碰撞点之间的距离值,并将该距离值作为当前目标检测点所对应的第一子模型和第二子模型之间的距离信息。例如:物理射线A所对应的目标检测点信息为(am1,am2,am3),第二碰撞点信息为(ap1,ap2,ap3),则可以确定当前目标检测点所对应的第一子模型和第二子模型之间的距离值为
Figure PCTCN2021131501-appb-000001
进一步的,根据每个目标检测点都可以确定与其对应的第一子模型和第二子模型之间的距离信息。
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 target detection can be calculated by the distance formula between two points in space The distance value between the point and the second collision point, and the distance value is used as the distance information between the first sub-model and the second sub-model corresponding to the current target detection point. For example, if the target detection point information corresponding to physical ray A is (am1, am2, am3), and the second collision point information is (ap1, ap2, ap3), the first sub-model and The distance between the second submodels is
Figure PCTCN2021131501-appb-000001
Further, according to each target detection point, the distance information between the corresponding first sub-model and the second sub-model can be determined.
S350、基于每个目标检测点所对应的距离信息,确定显示第一子模型和第二子模型时每个目标检测点的透明度信息。S350. Based on the distance information corresponding to each target detection point, determine the transparency information of each target detection point when the first sub-model and the second sub-model are displayed.
其中,可以预先存储每个目标检测点所对应的距离信息与其相对应的透明度信息之间的对应关系,例如,每增加10nm透明度信息降低百分之十,将距离信息记为dist,0nm<dist≤10nm,透明度信息为100%,10nm<dist≤20nm,透明度信息为90%,20nm<dist≤30nm,透明度信息为80%等。The correspondence between the distance information corresponding to each target detection point and its corresponding transparency information can be pre-stored. For example, when the transparency information increases by 10 nm, the transparency information decreases by 10%, and the distance information is recorded as dist, and 0 nm<dist ≤10nm, the transparency information is 100%, 10nm<dist≤20nm, the transparency information is 90%, 20nm<dist≤30nm, the transparency information is 80%, etc.
需要说明的是,透明度信息可以包括第一子模型的透明度信息以及第二子模型的透明度信息。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.
例如,可以根据预先确定的与每个距离信息所对应的透明度参数,以及与每个目标检测点所对应的距离信息,确定每个目标检测点的透明度信息。For example, the transparency information of each target detection point may be determined according to a predetermined transparency parameter corresponding to each distance information and the distance information corresponding to each target detection point.
根据每个目标检测点所对应的距离信息,可以在预先存储的每个距离信息与透明度信息的对应关系中,确定与距离信息相对应的透明度信息,可以包括第一子模型的透明度信息以及第二子模型的透明度信息,以便后续透明显示时使用。According to the distance information corresponding to each target detection point, the transparency information corresponding to the distance information may be determined in the pre-stored correspondence between each distance information and the transparency information, which may include the transparency information of the first sub-model and the first sub-model. The transparency information of the two sub-models is used for subsequent transparent display.
例如,可以根据与每个目标检测点所对应的距离信息以及预先设置的透明度确定方法,确定每个距离信息所对应的透明度参数并作为与相应目标检测点对应的透明度信息。For example, according to the distance information corresponding to each target detection point and a preset transparency determination method, the transparency parameter corresponding to each distance information can be determined as the transparency information corresponding to the corresponding target detection point.
为了使透明度信息更加具有连续性和准确性,可以预先设置透明度确定方法,该方法可以是预先设置的公式,也可以是预先训练的模型等。根据目标检测点所对应的距离信息以及预先设置的方法,可以得到与每个距离信息相对应的透明度参数,并可以将该透明度参数作为与目标检测点所对应的透明度信息,以便后续透明显示时使用。In order to make the transparency information more continuous and accurate, a transparency determination method may be preset, and the method may be a preset formula or a pre-trained model or the like. According to the distance information corresponding to the target detection point and the preset method, the transparency parameter corresponding to each distance information can be obtained, and the transparency parameter can be used as the transparency information corresponding to the target detection point, so that when the subsequent transparent display is performed, the transparency parameter can be obtained. use.
S360、将当前视觉角度下的每个目标检测点依据相应的透明度信息进行透明显示。S360, transparently display each target detection point under the current visual angle according to the corresponding transparency information.
在确定当前视觉角度下每个目标检测点的透明度信息之后,为了使第一子模型和第二子模型的视觉体验效果更好,可以将第一子模型上的每个目标检测点按照与其相对应的透明度信息进行显示,以得到透明显示的效果。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 set according to its corresponding The corresponding transparency information is displayed to obtain the effect of transparent display.
本申请实施例的技术方案,通过根据与当前视觉角度相对应的物理射线参数信息向第一子模型上的每个目标检测点发射物理射线,根据与当前目标检测点所对应的物理射线在第一子模型和第二子模型上的碰撞点信息,确定相对应的距离信息,进一步确定每个目标检测点的透明度信息,这样可以解决了以固定透明度显示值对第一子模型进行透明显示时透明显示与实际情况存在偏差而导致的透明显示效果不佳,用户体验较差的问题,根据实际情况调整透明度参数,以使透明显示效果与实际理论效果相符,从而提高用户体验。According to the technical solution of the embodiment of the present application, physical rays are emitted to each target detection point on the first sub-model according to the physical ray parameter information corresponding to the current visual angle, and according to the physical rays corresponding to the current target detection point, the The collision point information on the first sub-model and the second sub-model determines the corresponding distance information, and further determines the transparency information of each target detection point, which can solve the problem when the first sub-model is transparently displayed with a fixed transparency display value. If there is a deviation between the transparent display and the actual situation, the transparent display effect is not good and the user experience is poor. Adjust the transparency parameters according to the actual situation so that the transparent display effect is consistent with the actual theoretical effect, thereby improving the user experience.
图4为本申请另一实施例所提供的一种确定透明度的方法的流程示意图,本实施例可适用于根据距离信息确定透明度信息并显示的情况,该方法可以由确定透明度的装置来执行,该装置可以通过软件和/或硬件的形式实现,该硬件可以是电子设备,例如,电子设备可以是移动终端等。4 is a schematic flowchart of a method for determining transparency provided by another embodiment of the present application. This embodiment is applicable to the case where transparency information is determined and displayed according to distance information, and the method can be performed by a device for determining transparency, The apparatus may be implemented in the form of software and/or hardware, and the hardware may be an electronic device, for example, the electronic device may be a mobile terminal or the like.
如图4所述,本实施例包括如下步骤:As shown in Figure 4, this embodiment includes the following steps:
S410、确定当前角度下第一子模型上每个目标检测点所对应的第一子模型 与第二子模型之间的距离信息。S410. Determine the distance information between the first sub-model and the second sub-model corresponding to each target detection point on the first sub-model under the current angle.
其中,第一子模型与第二子模型是相对而言的,应用场景为皮肤模型和衣服模型时,可以将衣服所对应的模型作为第一子模型,皮肤所对应的模型作为第二子模型。目标检测点可以是第一子模型上预先设置的检测点;也可以是将第一子模型上的预先设置的点划分为多个块,可以将每个块的中心点作为目标检测点;也可以是开发人员根据实际需求设置的检测点;当然,也可以是,第一子模型是由多个点构成的,可以将每个点作为目标检测点。当前角度可以是显示装置中的拍摄装置的相对角度,也可以理解为,在用户观看显示屏时,显示屏与用户瞳孔之间的角度。在当前角度下,拍摄装置与第一子模型上的每个目标检测点的之间的相对拍摄角度存在差异,针对每个目标检测点,可以确定每个目标检测点与拍摄装置之间的相对拍摄角度,以确定在该相对拍摄角度下该目标检测点所对应的第一子模型与第二子模型之间的距离信息。对于其它目标检测点,均可以采用上述方式来确定与每个目标检测点所对应的距离信息。The first sub-model is relative to the second sub-model. When the application scenario is a skin model and a clothing model, the model corresponding to the clothes can be used as the first sub-model, and the model corresponding to the skin can be used as the second sub-model . The target detection point may be a preset detection point on the first sub-model; it may also be that the preset point on the first sub-model is divided into a plurality of blocks, and the center point of each block may be used as the target detection point; or It can 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 current angle may be the relative angle of the photographing device in the display device, and may also be understood as the angle between the display screen and the pupil of the user when the user watches the display screen. At the current angle, there is a difference in the relative shooting angle between the shooting device and each target detection point on the first sub-model. For each target detection point, the relative shooting angle between each target detection point and the shooting device can be determined. The shooting angle is used to determine the distance information between the first sub-model and the second sub-model corresponding to the target detection point at the relative shooting angle. For other target detection points, the above method can be used to determine the distance information corresponding to each target detection point.
可以使用引擎在当前角度发出的物理射线击中第一子模型上的目标检测点,并透过第一子模型击中第二子模型。将该物理射线在第一子模型和第二子模型上的两个击中点间的距离信息作为目标检测点所对应的第一子模型与第二子模型之间的距离信息。也可以是以第一子模型上的一个目标检测点作为球心,向空间中的每个方向发射物理射线,确定每条物理射线与第二子模型的交点与目标检测点之间距离信息,并可以确定目标检测点的球面分布的距离函数。基于预先设置的球谐函数对每个距离函数进行处理,得到目标检测点的投影系数值并存储。在检测到需要透明显示时,可以调取预先存储的与每个目标检测点所对应的投影系数值。针对每个目标检测点所对应的投影系数值,基于预先设置的球谐函数对投影系数值进行重建处理,得到当前目标检测点的重建函数。在得到重建函数之后,可以将与当前目标检测点所对应的目标拍摄角度输入至重建函数中,得到当前目标检测点所对应的第一子模型与第二子模型之间的距离信息。A physical ray emitted by the engine at the current angle can be used to hit the target detection point on the first sub-model, and to hit the second sub-model through the first sub-model. The distance information between the two hitting points of the physical ray on the first sub-model and the second sub-model is used as the distance information between the first sub-model and the second sub-model corresponding to the target detection point. It is also possible to use a target detection point on the first sub-model as the center of the sphere to emit physical rays in every direction in the space to determine the distance information between the intersection of each physical ray and the second sub-model and the target detection point, And can determine the distance function of the spherical distribution of target detection points. Each distance function is processed based on the preset spherical harmonic function, and the projection coefficient value of the target detection point is obtained and stored. When it is detected that transparent display is required, the pre-stored projection coefficient value corresponding to each target detection point can be retrieved. For the projection coefficient value corresponding to each target detection point, reconstruction processing is performed on the projection coefficient value based on the preset spherical harmonic function, and the reconstruction function of the current target detection point is obtained. After the reconstruction function is obtained, the target shooting angle corresponding to the current target detection point can be input into the reconstruction function to obtain the distance information between the first sub-model and the second sub-model corresponding to the current target detection point.
S420、获取第一子模型的第一属性信息以及第二子模型的第二属性信息,并根据第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在当前角度下的融合参数。S420: Acquire the first attribute information of the first sub-model and the second attribute information of the second sub-model, and determine each target detection point according to the first attribute information, the second attribute information and the distance information of each target detection point Fusion parameters at the current angle.
其中,第一属性信息是第一子模型显示时的参数信息,第二属性信息是第二子模型显示时的参数信息,可以包括颜色信息,粗糙度,高光度等。融合参数是用于透明显示第一子模型的参数信息,包括颜色融合参数、粗糙度融合参数以及高光度融合参数。The first attribute information is parameter information when the first sub-model is displayed, and the second attribute information is parameter information when the second sub-model is displayed, which may include color information, roughness, specularity, and the like. The fusion parameters are parameter information used to transparently display the first sub-model, including color fusion parameters, roughness fusion parameters, and specular fusion parameters.
为了对第一子模型和第二子模型的透明度参数信息,即融合参数进行调节, 以提高视觉效果,可以分别计算得到颜色融合参数、粗糙度融合参数以及高光度融合参数。In order to adjust the transparency parameter information of the first sub-model and the second sub-model, that is, the fusion parameter, to improve the visual effect, the color fusion parameter, the roughness fusion parameter and the highlight fusion parameter can be calculated separately.
由于不同距离信息所对应的颜色信息不同,因此可以根据第一子模型和第二子模型的颜色信息以及每个目标检测点的距离信息,确定每个目标检测点在当前角度下的颜色融合参数。由于不同距离信息所对应的粗糙度不同,因此可以根据第一子模型和第二子模型的粗糙度以及每个目标检测点的距离信息,确定每个目标检测点在当前角度下的粗糙度融合参数。由于不同距离信息所对应的高光度不同,因此可以根据第一子模型和第二子模型的高光度以及每个目标检测点的距离信息,确定每个目标检测点在当前角度下的高光度融合参数。其中,每个融合参数的确定方法可以是使用插值法确定,也可以根据物理射线在模型表面散射的效果确定。Since the color information corresponding to different distance information is different, the color fusion parameter of each target detection point at the current angle can be determined according to the color information of the first sub-model and the second sub-model and the distance information of each target detection point . Since the roughness corresponding to different distance information is different, the roughness fusion of each target detection point at the current angle can be determined according to the roughness of the first sub-model and the second sub-model and the distance information of each target detection point parameter. Since the specularities corresponding to different distance information are different, the specular fusion of each target detection point at the current angle can be determined according to the specularities of the first sub-model and the second sub-model and the distance information of each target detection point parameter. The method for determining each fusion parameter may be determined by interpolation, or may be determined according to the scattering effect of physical rays on the surface of the model.
S430、根据与每个目标检测点相对应的距离信息以及融合参数,显示第一子模型。S430. Display the first sub-model according to the distance information and fusion parameters corresponding to each target detection point.
在确定当前角度下每个目标检测点的融合参数之后,为了使第一子模型和第二子模型透明显示的视觉体验效果更好,可以将第一子模型上的每个目标检测点按照与其相对应的融合参数进行显示,以使第一子模型能够透明显示。After determining the fusion parameters of each target detection point at the current angle, in order to make the visual experience effect of the transparent display of the first sub-model and the second sub-model better, each target detection point on the first sub-model may be The corresponding fusion parameters are displayed, so that the first sub-model can be displayed transparently.
本申请实施例的技术方案,通过确定当前角度下第一子模型与第二子模型之间的距离信息,并且根据第一属性信息,第二属性信息以及距离信息确定融合参数,进一步根据距离信息和融合参数显示第一子模型,这样可以解决以固定透明度显示值对第一子模型进行透明显示时透明显示与实际情况存在偏差而导致的透明显示效果不佳,用户体验较差的问题,根据实际情况调整透明度参数,以使透明显示效果与实际理论效果相符,从而提高用户体验。In the technical solution of the embodiment of the present application, the distance information between the first sub-model and the second sub-model under the current angle is determined, and the fusion parameter is determined according to the first attribute information, the second attribute information and the distance information, and further according to the distance information and the fusion parameter to display the first sub-model, which can solve the 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. Adjust the transparency parameter according to the actual situation, so that the transparent display effect is consistent with the actual theoretical effect, so as to improve the user experience.
在上述申请实施例的基础上,针对当前角度下第一子模型与第二子模型之间的距离信息的确定可以使用以下两种方式:On the basis of the above application embodiments, the following two methods can be used for determining the distance information between the first sub-model and the second sub-model at the current angle:
第一种方式可以是:使用引擎在当前角度发出的物理射线击中第一子模型上的目标检测点,并且物理射线可以依次与第一子模型和第二子模型发生碰撞。由于当前物理射线是根据当前视觉角度以及目标检测点确定的,因此该物理射线与第一子模型的碰撞点应当是目标检测点。当前物理射线透过第一子模型会与第二子模型发生碰撞,将当前物理射线与第二子模型的碰撞点作为第二碰撞点。目标检测点信息和第二碰撞点信息是用于描述位置的信息,可以包括空间坐标信息。可以分别确定每条物理射线与第一子模型和第二子模型碰撞时的目标检测点信息和第二碰撞点信息,可以是空间坐标信息,例如:物理射线A所对应的目标检测点信息为(am1,am2,am3),第二碰撞点信息为(ap1,ap2,ap3)。进而,可以确定当前目标检测点所对应的第一子模型和第二子模型之间的距离 信息为
Figure PCTCN2021131501-appb-000002
进一步的,根据每一个目标检测点都可以确定与其对应的第一子模型和第二子模型之间的距离信息。
The first way may be: using the physical ray emitted by the engine at the current angle to hit the target detection point on the first sub-model, and the physical ray may collide with the first sub-model and the second sub-model in sequence. 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 passing through the first sub-model will collide with the second sub-model, and the collision point between the current physical ray and the second sub-model is taken 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. 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, which 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). Furthermore, the distance information between the first sub-model and the second sub-model corresponding to the current target detection point can be determined as:
Figure PCTCN2021131501-appb-000002
Further, according to each target detection point, the distance information between the corresponding first sub-model and the second sub-model can be determined.
第二种方式可以是:针对每个目标检测点,以第一子模型上的某个目标检测点作为球心,向空间中的每个方向发射物理射线,确定每条物理射线与第二子模型的交点与目标检测点之间距离信息。在得到当前目标检测点在空间中每个方向上的距离信息后,可以根据距离信息确定当前目标检测点的球面分布的距离函数。调用预先设置的球谐函数对距离函数进行处理,得到目标检测点的投影系数值,并将投影系数值存储至预设的存储位置。存储位置可以是引擎中。在需要透明显示时,针对每个目标检测点,可以从存储位置调取预先存储的投影系数值,并基于球谐函数对投影系数值进行重建处理,得到重建函数,该重建函数可以是模拟当前目标检测点向空间中每个方向发射物理射线时,物理射线与第二子模型碰撞时的碰撞点与当前目标检测点的距离信息,将当前目标检测点与拍摄装置的相对拍摄角度输入至重建函数中,可以得到第一子模型和第二子模型之间的距离信息。The second way can be: for each target detection point, take a target detection point on the first sub-model as the center of the sphere, emit physical rays in every direction in the space, and determine the relationship between each physical ray and the second sub-model. The distance information between the intersection of the model and the target detection point. After obtaining the distance information of the current target detection point in each direction in space, the distance function of the spherical distribution of the current target detection point can be determined according to the distance information. Call the preset spherical harmonic function to process the distance function, obtain the projection coefficient value of the target detection point, and store the projection coefficient value in the preset storage location. The storage location can be in-engine. When transparent display is required, for each target detection point, the pre-stored projection coefficient value can be retrieved from the storage location, and the projection coefficient value can be reconstructed based on the spherical harmonic function to obtain a reconstruction function, which can be a simulation of the current When the target detection point emits physical rays in each direction in the space, the distance information between the collision point and the current target detection point when the physical ray collides with the second sub-model, and the relative shooting angle between the current target detection point and the shooting device is input to the reconstruction In the function, the distance information between the first sub-model and the second sub-model can be obtained.
图5为本申请另一实施例所提供的一种确定透明度的方法的流程示意图,在上述实施例的基础上,针对每个目标检测点在当前角度下的融合参数的确定方法可以参见本实施例技术方案。FIG. 5 is a schematic flowchart of a method for determining transparency provided by another embodiment of the present application. On the basis of the above embodiment, for the method for determining the fusion parameters of each target detection point at the current angle, reference may be made to this embodiment. example technical solution.
参见图5,本申请实施例提供的确定透明度的方法包括:Referring to FIG. 5 , the method for determining transparency provided by the embodiment of the present application includes:
S510、确定当前角度下第一子模型上每个目标检测点所对应的第一子模型与第二子模型之间的距离信息。S510. Determine the distance information between the first sub-model and the second sub-model corresponding to each target detection point on the first sub-model at the current angle.
为了确定该距离信息,可以使用引擎在当前角度发出的物理射线击中第一子模型上的目标检测点,并穿透第一子模型再击中第二子模型。将该物理射线在第一子模型和第二子模型上的两个击中点间的距离信息作为目标检测点所对应的第一子模型与第二子模型之间的距离信息。In order to determine the distance information, the physical ray emitted by the engine at the current angle can be used to hit the target detection point on the first sub-model, penetrate the first sub-model, and then hit the second sub-model. The distance information between the two hitting points of the physical ray on the first sub-model and the second sub-model is used as the distance information between the first sub-model and the second sub-model corresponding to the target detection point.
例如,可以通过如下步骤获取准确的距离信息:For example, accurate distance information can be obtained by the following steps:
确定第一子模型上每个目标检测点与拍摄装置的相对拍摄角度。The relative shooting angle of each target detection point on the first sub-model and the shooting device is determined.
需要说明的是,基于拍摄装置的不同位置,或者,拍摄装置在显示装置中摆放位置不同,针对同一目标检测点拍摄装置位置不同时所对应的相对角度,即拍摄角度可能存在差异,相应的,其他目标检测点所对应的拍摄角度也存在一定差异。因此,可以根据与每个目标检测点所对应的拍摄角度发射相应的物理射线,以便基于发射的物理射线确定每个目标检测点与第二子模型上相应碰撞点之间的距离信息,从而基于距离信息来确定相应的融合参数,最终按照融 合参数来显示第一子模型上的每个目标检测点,达到透明显示的效果。It should be noted that, based on the different positions of the photographing devices, or the different positions of the photographing devices in the display device, the relative angles corresponding to the different positions of the photographing devices for the same target detection point, that is, the shooting angles may be different, and the corresponding , the shooting angles corresponding to other target detection points also have certain differences. Therefore, the corresponding physical rays can be emitted according to the shooting angle corresponding to each target detection point, so as to determine the distance information between each target detection point and the corresponding collision point on the second sub-model based on the emitted physical rays, so as to determine the distance information between each target detection point and the corresponding collision point on the second sub-model based on the emitted physical rays. The distance information is used to determine the corresponding fusion parameters, and finally each target detection point on the first sub-model is displayed according to the fusion parameters to achieve the effect of transparent display.
拍摄装置与每个目标检测点所对应的相对拍摄角度存在差异,根据拍摄装置与第一子模型上每个目标检测点的相对位置关系,可以分别确定拍摄装置与每个目标检测点的相对角度,并可以将该角度作为相对拍摄角度。以拍摄装置为物理射线的发射中心,基于每个目标检测点与拍摄装置的相对拍摄角度向第一子模型上每个目标检测点发射物理射线。There is a difference in the relative shooting angle corresponding to the shooting device and each target detection point. According to the relative positional relationship between the shooting device and each target detection point on the first sub-model, the relative angle of the shooting device and each target detection point can be determined respectively. , and the angle can be used as the relative shooting angle. Taking the shooting device as the emission center of the physical rays, the physical rays are emitted to each target detection point on the first sub-model based on the relative shooting angle between each target detection point and the shooting device.
其中,物理射线可以用来模拟视觉射线。Among them, physical rays can be used to simulate visual rays.
将每个目标检测点与拍摄装置的相对拍摄角度作为物理射线参数信息,引擎可以以拍摄装置为物理射线的发射中心向每个目标检测点发出物理射线。每个目标检测点存在与其相对应的物理射线。Taking the relative shooting angle between each target detection point and the shooting device as the physical ray parameter information, the engine can send the physical ray to each target detection point with the shooting device as the emission center of the physical ray. Each target detection point has a corresponding physical ray.
针对与每个目标检测点所对应的物理射线,确定当前物理射线透过第一子模型和第二子模型时,当前目标检测点所对应的第一子模型与第二子模型之间的当前距离信息,并将当前距离信息作为当前目标检测点所对应的距离信息。For the physical ray corresponding to each target detection point, determine the current physical ray between the first sub-model and the second sub-model corresponding to the current target detection point when the current physical ray passes through the first sub-model and the second sub-model. distance information, and use the current distance information as the distance information corresponding to the current target detection point.
与每个目标检测点所对应的物理射线,能够在第一子模型上的目标检测点上发生碰撞,并能够透过第一子模型在第二子模型上发生碰撞。目标检测点所对应的物理射线在第一子模型上的碰撞点应当是目标检测点,并将上述物理射线透过第一子模型碰撞到第二子模型的碰撞点作为第二碰撞点。可以确定目标检测点与第二碰撞点的位置信息,位置信息可以是空间位置信息,也可以是目标检测点与第二碰撞点之间的相对位置信息。根据目标检测点与第二碰撞点的碰撞点位置信息,可以进一步确定目标检测点与第二碰撞点之间的当前距离信息,距离信息获取方法可以是根据预设的算法获取的,也可以是通过两点间的距离公式计算获取的。进一步,可以将当前距离信息作为当前目标检测点的距离信息。The physical rays corresponding to each target detection point can collide on the target detection point on the first sub-model, and can collide on the second sub-model through the first 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 physical ray collides with the second sub-model through the first sub-model is taken as the second collision point. The position information of the target detection point and the second collision point may be determined, and the position information may be spatial position information or relative position information between the target detection point and the second collision point. According to the collision point position information between the target detection point and the second collision point, the current distance information between the target detection point and the second collision point can be further determined. The distance information acquisition method can be obtained according to a preset algorithm, or can be Calculated by the distance formula between two points. Further, the current distance information can be used as the distance information of the current target detection point.
例如,也可以是以第一子模型上的一个目标检测点作为球心,向空间中的每个方向发射物理射线,确定每条物理射线与第二子模型的交点与目标检测点之间距离信息。物理射线在该射线的方向上与第二子模型存在交点,则将该交点与目标检测点的距离作为目标检测点在该方向上与第二子模型之间的距离信息。球形射线在该射线的方向上与第二子模型不存在交点,则可以将预设的最大距离信息作为目标检测点在该方向上与第二子模型之间的距离信息。进一步,可以将上述距离信息存储至目标检测点所对应的存储空间中,与当前角度对应存储。根据当前角度可以从预先存储的对应关系中确定目标检测点所对应的第一子模型与第二子模型之间的距离信息。For example, a target detection point on the first sub-model can also be used as the center of the sphere, physical rays are emitted in each direction in the space, and the distance between the intersection of each physical ray and the second sub-model and the target detection point can be determined. information. If the physical ray has an intersection with the second sub-model in the direction of the ray, the distance between the intersection and the target detection point is used as the distance information between the target detection point and the second sub-model in this direction. If there is no intersection between the spherical ray and the second sub-model in the direction of the ray, the preset maximum distance information may be used as the distance information between the target detection point and the second sub-model in this direction. Further, the above distance information may be stored in the storage space corresponding to the target detection point, and stored corresponding to the current angle. The distance information between the first sub-model and the second sub-model corresponding to the target detection point can be determined from the pre-stored correspondence according to the current angle.
S520、针对每个目标检测点,确定当前目标检测点的第一颜色信息,和在 当前角度下在第二子模型上与当前目标检测点所对应的第二颜色信息。S520. For each target detection point, determine the first color information of the current target detection point, and the second color information corresponding to the current target detection point on the second sub-model at the current angle.
其中,颜色信息是用于表示像素点的色彩的信息,是模型进行透明显示时的影响因素。Among them, the color information is the information used to represent the color of the pixel, and is an influencing factor when the model is transparently displayed.
可以将当前角度下的物理射线透过第一子模型碰撞到第二子模型的碰撞点作为第二碰撞点,根据已有的第一子模型的颜色信息可以确定目标检测点的颜色信息为第一颜色信息,根据已有的第二子模型的颜色信息可以确定第二碰撞点的颜色信息为第二颜色信息。The collision point where the physical ray at the current angle collides with the second sub-model through the first sub-model can be taken as the second collision point, and the color information of the target detection point can be determined according to the existing color information of the first sub-model as the first a color information. According to the existing color information of the second sub-model, the color information of the second collision point can be determined as the second color information.
S530、基于与每个目标检测点所对应的第一颜色信息、第二颜色信息以及距离信息,确定每个目标检测点在当前角度下的颜色融合参数。S530 , based on the first color information, the second color information, and the distance information corresponding to each target detection point, determine a color fusion parameter of each target detection point at the current angle.
示例性的,可以使用插值计算的方式确定目标检测点在当前角度下的颜色融合参数,公式如下:Exemplarily, the color fusion parameter of the target detection point at the current angle can be determined by means of interpolation, and the formula is as follows:
Cdiff=mix(Cdiff1,Cdiff2,Thickness)Cdiff=mix(Cdiff1, Cdiff2, Thickness)
其中,Cdiff表示目标检测点在当前角度下的颜色融合参数,Cdiff1表示第一颜色信息,Cdiff2表示第二颜色信息,Thickness表示距离信息,mix为插值计算符号。Among them, Cdiff represents the color fusion parameter of the target detection point at the current angle, Cdiff1 represents the first color information, Cdiff2 represents the second color information, Thickness represents the distance information, and mix is the interpolation calculation symbol.
例如,使用插值计算方法计算目标检测点在当前角度下的颜色融合参数的公式可以是:For example, the formula for calculating the color fusion parameters of the target detection point at the current angle using the interpolation calculation method can be:
Cdiff=Cdiff1×normal(Thickness)+Cdiff2×(1-normal(Thickness))Cdiff=Cdiff1×normal(Thickness)+Cdiff2×(1-normal(Thickness))
其中,normal(Thickness)表示对距离信息进行归一化处理后的结果,取值范围在0到1之间。Among them, normal (Thickness) represents the result of normalizing the distance information, and the value range is between 0 and 1.
S540、针对每个目标检测点,确定当前目标检测点的第一粗糙度,和在当前角度下在第二子模型上与当前目标检测点所对应的第二粗糙度。S540. For each target detection point, determine the first roughness of the current target detection point and the second roughness corresponding to the current target detection point on the second sub-model at the current angle.
其中,粗糙度是用于表示物体表面状态的信息,是进行透明显示时的影响因素。Among them, roughness is information used to indicate the surface state of an object, and is an influencing factor when transparent display is performed.
示例性的,根据已有的第一子模型的粗糙度可以确定目标检测点的粗糙度为第一粗糙度,根据已有的第二子模型的粗糙度可以确定第二碰撞点的粗糙度为第二粗糙度。Exemplarily, the roughness of the target detection point can be determined as the first roughness according to the roughness of the existing first sub-model, and the roughness of the second collision point can be determined according to the roughness of the existing second sub-model as: Second roughness.
S550、基于与每个目标检测点所对应的第一粗糙度、第二粗糙度以及距离信息,确定每个目标检测点在当前角度下的粗糙度融合参数。S550 , based on the first roughness, the second roughness, and the distance information corresponding to each target detection point, determine a roughness fusion parameter of each target detection point at the current angle.
示例性的,可以使用插值计算的方式确定目标检测点在当前角度下的粗糙度融合参数,公式如下:Exemplarily, the roughness fusion parameter of the target detection point at the current angle can be determined by means of interpolation calculation, and the formula is as follows:
Gloss=mix(Gloss1,Gloss2,Thickness)Gloss=mix(Gloss1, Gloss2, Thickness)
其中,Gloss表示目标检测点在当前角度下的粗糙度融合参数,Gloss1表示第一粗糙度,Gloss2表示第二粗糙度,Thickness表示距离信息,mix为插值计算符号。Among them, Gloss represents the roughness fusion parameter of the target detection point at the current angle, Gloss1 represents the first roughness, Gloss2 represents the second roughness, Thickness represents the distance information, and mix is the interpolation calculation symbol.
例如,使用插值计算方法计算目标检测点在当前角度下的粗糙度融合参数的公式可以是:For example, the formula for calculating the roughness fusion parameter of the target detection point at the current angle using the interpolation calculation method can be:
Gloss=Gloss1×normal(Thickness)+Gloss2×(1-normal(Thickness))Gloss=Gloss1×normal(Thickness)+Gloss2×(1-normal(Thickness))
其中,normal(Thickness)表示对距离信息进行归一化处理后的结果,取值范围在0到1之间。Among them, normal (Thickness) represents the result of normalizing the distance information, and the value range is between 0 and 1.
S560、针对每个目标检测点,确定当前目标检测点的第一高光度,和在当前角度下在第二子模型上与当前目标检测点所对应的第二高光度。S560. For each target detection point, determine the first specularity of the current target detection point and the second specularity corresponding to the current target detection point on the second sub-model at the current angle.
其中,高光度是用于表示物体表面的反射程度,是进行透明显示时的影响因素。Among them, the specularity is used to indicate the degree of reflection of the surface of the object, and is an influencing factor when transparent display is performed.
示例性的,根据已有的第一子模型的高光度可以确定目标检测点的高光度为第一高光度,根据已有的第二子模型的高光度可以确定第二碰撞点的高光度为第二高光度。Exemplarily, the specularity of the target detection point can be determined as the first specularity according to the specularity of the existing first sub-model, and the specularity of the second collision point can be determined according to the specularity of the existing second sub-model as: The second specular.
S570、基于与每个目标检测点所对应的第一高光度、第二高光度以及距离信息,确定每个目标检测点在当前角度下的高光度融合参数。S570 , based on the first highlight, the second highlight, and the distance information corresponding to each target detection point, determine the highlight fusion parameter of each target detection point at the current angle.
示例性的,可以使用插值计算的方式确定目标检测点在当前角度下的高光度融合参数,公式如下:Exemplarily, interpolation calculation can be used to determine the specular fusion parameters of the target detection point at the current angle, and the formula is as follows:
Cspec=mix(Cspec1,Cspec2,Thickness)Cspec=mix(Cspec1, Cspec2, Thickness)
其中,Cspec表示目标检测点在当前角度下的高光度融合参数,Cspec1表示第一高光度,Cspec2表示第二高光度,Thickness表示距离信息,mix为插值计算符号。Among them, Cspec represents the specular fusion parameter of the target detection point at the current angle, Cspec1 represents the first specularity, Cspec2 represents the second specularity, Thickness represents the distance information, and mix is the interpolation calculation symbol.
例如,使用插值计算方法计算目标检测点在当前角度下的高光度融合参数的公式可以是:For example, the formula for calculating the specular fusion parameters of the target detection point at the current angle using the interpolation calculation method can be:
Cspec=Cspec1×normal(Thickness)+Cspec2×(1-normal(Thickness))Cspec=Cspec1×normal(Thickness)+Cspec2×(1-normal(Thickness))
其中,normal(Thickness)表示对距离信息进行归一化处理后的结果,取值范围在0到1之间。Among them, normal (Thickness) represents the result of normalizing the distance information, and the value range is between 0 and 1.
需要说明的是,S520-S530,S540-S550以及S560-S570是当前角度下的三种融合参数的确定方法,可以使用其中任意一种融合参数的确定方法以得到融合参数,也可以是使用多种融合参数的确定方法,并将不同方法确定的融合参数进行加权计算,进而将加权计算后的融合参数作为当前角度下的融合参数。It should be noted that S520-S530, S540-S550 and S560-S570 are the three methods for determining the fusion parameters at the current angle. You can use any one of the methods for determining the fusion parameters to obtain the fusion parameters, or you can use multiple methods to determine the fusion parameters. A method for determining fusion parameters is used, and the fusion parameters determined by different methods are weighted and calculated, and the fusion parameters after the weighted calculation are used as fusion parameters at the current angle.
S580、根据与每个目标检测点所对应的融合参数,将第一子模型上的每个目标检测点透明显示。S580. Transparently display each target detection point on the first sub-model according to the fusion parameter corresponding to each target detection point.
示例性的,在确定当前角度下每个目标检测点所对应的融合参数后,基于上述融合参数可以调节第一子模型的透明度显示效果,以得到透明显示的第一子模型。Exemplarily, after determining the fusion parameter corresponding to each target detection point at the current angle, the transparency display effect of the first sub-model can be adjusted based on the fusion parameter to obtain a transparently displayed first sub-model.
在上述实施例的基础上,据第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在当前角度下的融合参数的方法还可以按如下步骤实现:On the basis of the above embodiment, according to the first attribute information, the second attribute information and the distance information of each target detection point, the method for determining the fusion parameters of each target detection point at the current angle can also be implemented as follows:
步骤一、针对每个目标检测点,根据预先设置距离信息和透光度参数对应关系以及当前目标检测点的距离信息,确定与所述当前目标检测点所对应的透光度参数。Step 1: For each target detection point, determine the transmittance parameter corresponding to the current target detection point according to the preset corresponding relationship between the distance information and the transmittance parameter and the distance information of the current target detection point.
其中,透光度参数是用于表示光线透过程度的参数,预先设置距离信息是当前角度下第一子模型上每个目标检测点所对应的第一子模型与第二子模型之间的距离信息。The transmittance parameter is a parameter used to indicate the degree of light transmission, and the preset distance information is the distance between the first sub-model and the second sub-model corresponding to each target detection point on the first sub-model at the current angle. distance information.
示例性的,可以根据如下公式确定当前目标检测点所对应的透光度参数:Exemplarily, the transmittance parameter corresponding to the current target detection point can be determined according to the following formula:
Transmittance=pow(1-clamp(Thickness×α,0.0,1.0),β)Transmittance=pow(1-clamp(Thickness×α,0.0,1.0),β)
其中,Transmittance是当前目标检测点所对应的透光度参数,Thickness表示距离信息,α表示距离缩放系数,可以是对距离信息进行归一化处理后的结果,β表示透光指数参数,可以根据实际需求进行设定。pow是进行乘方运算,例如:pow(x,y)表示x的y次方,clamp是(x,a,b)表示将x限制在a与b之间,是
Figure PCTCN2021131501-appb-000003
Among them, Transmittance is the transmittance parameter corresponding to the current target detection point, Thickness is the distance information, α is the distance scaling factor, which can be the result of normalizing the distance information, β is the transmittance index parameter, which can be determined according to Set the actual needs. pow is a power operation, for example: pow(x, y) means x to the y power, clamp is (x, a, b) means to limit x between a and b, yes
Figure PCTCN2021131501-appb-000003
步骤二、基于每个目标检测点的透光度参数、第一属性信息以及第二属性信息,确定每个目标检测点在当前角度下的融合参数。Step 2: Determine the fusion parameter of each target detection point at the current angle based on the transmittance parameter, the first attribute information and the second attribute information of each target detection point.
可以将目标检测点的透光度参数、第一属性信息以及第二属性信息进行进一步处理,处理方式可以是使用插值法等,确定当前角度下的融合参数,以将第一子模型按照融合参数进行透明显示。The transmittance parameter, the first attribute information and the second attribute information of the target detection point can be further processed, and the processing method can be to use an interpolation method, etc., to determine the fusion parameters at the current angle, so as to classify the first sub-model according to the fusion parameters. Make transparent display.
本申请实施例的技术方案,通过确定当前角度下第一子模型与第二子模型之间的距离信息,并且根据第一属性信息,第二属性信息以及距离信息确定融合参数,进一步根据距离信息和融合参数显示第一子模型,这样可以解决基于光栅化画家算法进行透明度确定时通用性和适用性差的问题,基于距离信息和 融合参数调节透明显示,进而提高用户视觉体验。In the technical solution of the embodiment of the present application, the distance information between the first sub-model and the second sub-model under the current angle is determined, and the fusion parameter is determined according to the first attribute information, the second attribute information and the distance information, and further according to the distance information and fusion parameters to display the first sub-model, which can solve the problem of poor versatility and applicability when determining transparency based on the rasterization painter algorithm, and adjust the transparent display based on distance information and fusion parameters, thereby improving the user's visual experience.
图6为本申请一实施例所提供的一种确定透明度的装置的结构示意图,该装置包括:距离信息确定模块610以及透明度参数确定模块620。FIG. 6 is a schematic structural diagram of an apparatus for determining transparency according to an embodiment of the present application. The apparatus includes: a distance information determination module 610 and a transparency parameter determination module 620 .
其中,距离信息确定模块610,设置为确定第一子模型和第二子模型上对应点之间的距离信息;所述第一子模型为包裹所述第二子模型局部的模型;透明度参数确定模块620,设置为根据所述距离信息,确定所述第一子模型和所述第二子模型上透明度参数。Wherein, the distance information determination module 610 is configured to determine the distance information between the corresponding points on the first sub-model and the second sub-model; the first sub-model is a model wrapping the part of the second sub-model; the transparency parameter is determined Module 620, configured to determine transparency parameters on the first sub-model and the second sub-model according to the distance information.
本申请实施例的技术方案,通过确定第一子模型和第二子模型上对应点之间的距离信息,进一步,根据距离信息,确定第一子模型和所述第二子模型上透明度参数,这样可以解决以固定透明度显示值对第一子模型进行透明显示时透明显示与实际情况存在偏差而导致的透明显示效果不佳,用户体验较差的问题,根据实际情况调整透明度参数,以使透明显示效果与实际理论效果相符,从而提高用户体验。In the technical solution of the embodiment of the present application, the distance information between the corresponding points on the first sub-model and the second sub-model is determined, and further, according to the distance information, the transparency parameter on the first sub-model and the second sub-model is determined, This can solve the problem of poor transparent display effect and poor user experience caused by the deviation of the transparent display from the actual situation when the first sub-model is transparently displayed with a fixed transparency display value. Adjust the transparency parameter according to the actual situation to make the transparent display more transparent. The display effect is consistent with the actual theoretical effect, thereby improving the user experience.
本申请实施例所提供的确定透明度的装置可执行本申请任意实施例所提供的确定透明度的方法,具备执行方法相应的功能模块和有益效果。The apparatus for determining transparency provided by the embodiment of the present application can execute the method for determining transparency provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method.
值得注意的是,上述装置所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多个功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。It is worth noting that the multiple units and modules included in the above 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 realized; in addition, the specific names of the multiple functional units It is only for the convenience of distinguishing from each other, and is not used to limit the protection scope of the embodiments of the present application.
图7为本申请另一实施例所提供的一种确定透明度的装置的结构示意图,该装置包括:碰撞点信息确定模块710,第一距离信息确定模块720以及透明度信息确定模块730。FIG. 7 is a schematic structural diagram of an apparatus for determining transparency provided by another embodiment of the present application. The apparatus includes: a collision point information determination module 710 , a first distance information determination module 720 and a transparency information determination module 730 .
其中,碰撞点信息确定模块710,设置为根据预先设置的与当前视觉角度相对应的物理射线参数信息,向第一子模型上的每个目标检测点发射物理射线,并确定每条物理射线透过所述第一子模型和第二子模型的碰撞点信息;所述第一子模型为包裹所述第二子模型局部的模型;第一距离信息确定模块720,设置为针对每个目标检测点,根据与当前目标检测点所对应的物理射线在所述第一子模型和所述第二子模型上的碰撞点信息,确定所述当前目标检测点所对应的所述第一子模型与所述第二子模型之间的距离信息;透明度信息确定模块730,设置为基于每个目标检测点所对应的距离信息,确定显示所述第一子模型和所述第二子模型时每个目标检测点的透明度信息。The collision point information determination module 710 is configured to emit physical rays to each target detection point on the first sub-model according to preset physical ray parameter information corresponding to the current visual angle, and determine the penetration of each physical ray. pass the collision point information of 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 first distance information determination module 720 is set to detect for each target point, according to the collision point information of the physical rays corresponding to the current target detection point on the first sub-model and the second sub-model, determine the first sub-model corresponding to the current target detection point and the The distance information between the second sub-models; the transparency information determination module 730 is configured to determine, based on the distance information corresponding to each target detection point, to determine when displaying the first sub-model and the second sub-model, each of the Transparency information for object detection points.
例如,所述装置还包括:参数信息存储模块,设置为根据所述第一子模型上的每个目标检测点,确定每个视觉角度所对应的所述物理射线参数信息,并将物理射线参数信息存储至目标存储空间,以从所述目标存储空间中获取相应的物理射线参数信息。For example, the device further includes: a parameter information storage module, configured 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 parameters The information is stored in the target storage space to obtain corresponding physical ray parameter information from the target storage space.
例如,碰撞点信息确定模块710,设置为当检测到触发确定透明信息或透明显示的控件时,从所述目标存储空间中调取与当前视觉角度相对应的物理射线参数信息,以基于调取的所述物理射线参数信息向所述第一子模型上的每个目标检测点发射物理射线。For example, the collision point information determination module 710 is configured to retrieve physical ray parameter information corresponding to the current visual angle from the target storage space when a control that triggers determination of transparent information or transparent display is detected, to retrieve The physical ray parameter information of , emits physical rays to each target detection point on the first sub-model.
例如,碰撞点信息确定模块710,设置为针对每条物理射线,确定当前物理射线依次与所述第一子模型和所述第二子模型碰撞时所对应的目标检测点信息和第二碰撞点信息;所述目标检测点信息和所述第二碰撞点信息包括空间坐标信息。For example, the collision point information determination module 710 is configured to, for each physical ray, determine the target detection point information and the second collision point corresponding to when the current physical ray collides with the first sub-model and the second sub-model in sequence information; the target detection point information and the second collision point information include spatial coordinate information.
例如,第一距离信息确定模块720,设置为针对每个目标检测点,根据与当前目标检测点所对应的空间坐标信息,和所述第二子模型上与所述当前目标检测点所对应的第二碰撞点的空间坐标信息,确定所述当前目标检测点所对应的第一子模型和所述第二子模型之间的距离信息。For example, the first distance information determination module 720 is configured to, for each target detection point, according to the spatial coordinate information corresponding to the current target detection point and the second sub-model corresponding to the current target detection point The spatial coordinate information of the second collision point determines the distance information between the first sub-model corresponding to the current target detection point and the second sub-model.
例如,透明度信息确定模块730,设置为根据预先确定的与每个距离信息所对应的透明度参数,以及与每个目标检测点所对应的距离信息,确定每个目标检测点的透明度信息;或,根据与每个目标检测点所对应的距离信息以及预先设置的透明度确定方法,确定每个距离信息所对应的透明度参数并作为与相应目标检测点对应的透明度信息。For example, the transparency information determination module 730 is configured to determine the transparency information of each target detection point according to the predetermined transparency parameter corresponding to each distance information and the distance information corresponding to each target detection point; or, According to the distance information corresponding to each target detection point and the preset transparency determination method, the transparency parameter corresponding to each distance information is determined as the transparency information corresponding to the corresponding target detection point.
例如,所述装置还包括:透明显示模块,设置为将所述当前视觉角度下的每个目标检测点依据相应的透明度信息进行透明显示。For example, the apparatus further includes: a transparent display module configured to transparently display each target detection point under the current visual angle according to corresponding transparency information.
本实施例的技术方案,通过根据与当前视觉角度相对应的物理射线参数信息向第一子模型上的每个目标检测点发射物理射线,根据与当前目标检测点所对应的物理射线在第一子模型和第二子模型上的碰撞点信息,确定相对应的距离信息,进一步确定每个目标检测点的透明度信息,这样可以解决以固定透明度显示值对第一子模型进行透明显示时透明显示与实际情况存在偏差而导致的透明显示效果不佳,用户体验较差的问题,根据实际情况调整透明度参数,以使透明显示效果与实际理论效果相符,从而提高用户体验。The technical solution of this embodiment is to emit 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, and according to the physical rays corresponding to the current target detection point The collision point information on the sub-model and the second sub-model, determine the corresponding distance information, and further determine the transparency information of each target detection point, which can solve the problem of transparent display when the first sub-model is transparently displayed with a fixed transparency display value. For the problem of poor transparent display effect and poor user experience caused by deviation from the actual situation, adjust the transparency parameters according to the actual situation to make the transparent display effect consistent with the actual theoretical effect, thereby improving the user experience.
本申请实施例所提供的确定透明度的装置可执行本申请任意实施例所提供的确定透明度的方法,具备执行方法相应的功能模块和有益效果。The apparatus for determining transparency provided by the embodiment of the present application can execute the method for determining transparency provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method.
值得注意的是,上述装置所包括的多个单元和模块只是按照功能逻辑进行 划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多个功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。It is worth noting that the multiple units and modules included in the above 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 the multiple functional units It is only for the convenience of distinguishing from each other, and is not used to limit the protection scope of the embodiments of the present application.
图8为本申请另一实施例所提供的一种确定透明度的装置的结构示意图,该装置包括:第二距离信息确定模块810,融合参数确定模块820以及显示模块630。FIG. 8 is a schematic structural diagram of an apparatus for determining transparency according to another embodiment of the present application. The apparatus includes: a second distance information determination module 810 , a fusion parameter determination module 820 and a display module 630 .
其中,第二距离信息确定模块810,设置为确定当前角度下第一子模型上每个目标检测点所对应的第一子模型与第二子模型之间的距离信息;融合参数确定模块820,设置为获取第一子模型的第一属性信息以及第二子模型的第二属性信息,并根据第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在当前角度下的融合参数;融合参数包括颜色融合参数、粗糙度融合参数以及高光度融合参数;显示模块830,设置为根据与每个目标检测点相对应的距离信息以及融合参数,显示第一子模型。Wherein, the second distance information determination module 810 is configured to determine the distance information between the first sub-model and the second sub-model corresponding to each target detection point on the first sub-model under the current angle; the fusion parameter determination module 820, Set to obtain the first attribute information of the first sub-model and the second attribute information of the second sub-model, and determine each target detection point according to the first attribute information, the second attribute information and the distance information of each target detection point The fusion parameters at the current angle; the fusion parameters include color fusion parameters, roughness fusion parameters and highlight fusion parameters; the display module 830 is set to display the first display according to the distance information and fusion parameters corresponding to each target detection point submodel.
例如,第二距离信息确定模块810,设置为确定第一子模型上每个目标检测点与拍摄装置的相对拍摄角度;以拍摄装置为物理射线的发射中心,基于每个目标检测点与拍摄装置的相对拍摄角度向第一子模型上每个目标检测点发射物理射线;针对与每个目标检测点所对应的物理射线,确定当前物理射线透过第一子模型和第二子模型时,当前目标检测点所对应的第一子模型与第二子模型之间的当前距离信息;将当前距离信息作为当前目标检测点的距离信息。For example, the second distance information determination module 810 is configured to determine the relative shooting angle of each target detection point on the first sub-model and the shooting device; taking the shooting device as the emission center of the physical ray, based on each target detection point and the shooting device The relative shooting angle of , emits physical rays to each target detection point on the first sub-model; for the physical rays corresponding to each target detection point, it is determined that when the current physical ray passes through the first sub-model and the second sub-model, the current The current distance information between the first sub-model and the second sub-model corresponding to the target detection point; the current distance information is used as the distance information of the current target detection point.
例如,属性信息中包括模型所使用的颜色,融合参数确定模块820,设置为针对每个目标检测点,确定当前目标检测点的第一颜色信息,和在当前角度下在第二子模型上与当前目标检测点所对应的第二颜色信息;基于与每个目标检测点所对应的第一颜色信息、第二颜色信息以及距离信息,确定每个目标检测点在当前角度下的颜色融合参数。For example, the attribute information includes the color used by the model, and the fusion parameter determination module 820 is configured to determine, for each target detection point, the first color information of the current target detection point, and at the current angle on the second sub-model with The second color information corresponding to the current target detection point; based on the first color information, second color information and distance information corresponding to each target detection point, determine the color fusion parameter of each target detection point at the current angle.
例如,属性信息中包括模型粗糙度,融合参数确定模块820,设置为针对每个目标检测点,确定当前目标检测点的第一粗糙度,和在当前角度下在第二子模型上与当前目标检测点所对应的第二粗糙度;基于与每个目标检测点所对应的第一粗糙度、第二粗糙度以及距离信息,确定每个目标检测点在当前角度下的粗糙度融合参数。For example, the attribute information includes the model roughness, and the fusion parameter determination module 820 is configured to determine the first roughness of the current target detection point for each target detection point, and the second sub-model at the current angle and the current target on the second sub-model. The second roughness corresponding to the detection point; based on the first roughness, the second roughness and the distance information corresponding to each target detection point, determine the roughness fusion parameter of each target detection point at the current angle.
例如,属性信息中包括模型高光度,融合参数确定模块820,设置为针对每个目标检测点,确定当前目标检测点的第一高光度,和在当前角度下在第二子模型上与当前目标检测点所对应的第二高光度;基于与每个目标检测点所对应 的第一高光度、第二高光度以及距离信息,确定每个目标检测点在当前角度下的高光度融合参数。For example, the attribute information includes model specularity, and the fusion parameter determination module 820 is configured to, for each target detection point, determine the first specularity of the current target detection point, and at the current angle on the second sub-model with the current target The second specularity corresponding to the detection point; based on the first specularity, the second specularity and the distance information corresponding to each target detection point, determine the specular fusion parameter of each target detection point at the current angle.
例如,融合参数确定模块820,设置为针对每个目标检测点,根据预先设置距离信息和透光度参数对应关系以及当前目标检测点的距离信息,确定与当前目标检测点所对应的透光度参数;基于每个目标检测点的透光度参数、第一属性信息以及第二属性信息,确定每个目标检测点在当前角度下的融合参数。For example, the fusion parameter determination module 820 is configured to, for each target detection point, determine the transmittance corresponding to the current target detection point according to the preset corresponding relationship between the distance information and the transmittance parameter and the distance information of the current target detection point parameter; based on the transmittance parameter, the first attribute information and the second attribute information of each target detection point, determine the fusion parameter of each target detection point at the current angle.
例如,显示模块830,设置为根据与每个目标检测点所对应的融合参数,将第一子模型上的每个目标检测点透明显示。For example, the display module 830 is configured to transparently display each target detection point on the first sub-model according to the fusion parameter corresponding to each target detection point.
本申请实施例的技术方案,通过确定当前角度下第一子模型与第二子模型之间的距离信息,并且根据第一属性信息,第二属性信息以及距离信息确定融合参数,进一步根据距离信息和融合参数显示第一子模型,这样可以解决基于光栅化画家算法进行透明度确定时通用性和适用性差的技术问题,基于距离信息和融合参数调节透明显示,进而提高用户视觉体验。In the technical solution of the embodiment of the present application, the distance information between the first sub-model and the second sub-model under the current angle is determined, and the fusion parameter is determined according to the first attribute information, the second attribute information and the distance information, and further according to the distance information and fusion parameters to display the first sub-model, which can solve the technical problem of poor versatility and applicability when determining transparency based on the rasterization painter algorithm, and adjust the transparent display based on distance information and fusion parameters, thereby improving the user's visual experience.
本申请实施例所提供的确定透明度的装置可执行本申请任意实施例所提供的确定透明度的方法,具备执行方法相应的功能模块和有益效果。The apparatus for determining transparency provided by the embodiment of the present application can execute the method for determining transparency provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method.
值得注意的是,上述装置所包括的多个单元和模块只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,多个功能单元的具体名称也只是为了便于相互区分,并不用于限制本申请实施例的保护范围。It is worth noting that the multiple units and modules included in the above 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 the multiple functional units It is only for the convenience of distinguishing from each other, and is not used to limit the protection scope of the embodiments of the present application.
图9为本申请一实施例提供的一种电子设备的结构示意图,如图9所示,该电子设备包括处理器90、存储器91、输入装置92和输出装置93;电子设备中处理器90的数量可以是一个或多个,图9中以一个处理器90为例;电子设备中的处理器90、存储器91、输入装置92和输出装置93可以通过总线或其他方式连接,图9中以通过总线连接为例。FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the application. As shown in FIG. 9 , the electronic device includes a processor 90, a memory 91, an input device 92, and an output device 93; The number can be one or more. In FIG. 9, one processor 90 is used as an example; the processor 90, the memory 91, the input device 92 and the output device 93 in the electronic device can be connected through a bus or other means. Take bus connection as an example.
存储器91作为一种计算机可读存储介质,可设置为存储软件程序、计算机可执行程序以及模块,如本申请实施例中的确定透明度的方法对应的程序指令/模块(例如,距离信息确定模块610以及透明度参数确定模块620,或者碰撞点信息确定模块710,第一距离信息确定模块720以及透明度信息确定模块730,或者第二距离信息确定模块810,融合参数确定模块820以及显示模块830)。处理器90通过运行存储在存储器91中的软件程序、指令以及模块,从而执行电子设备的多种功能应用以及数据处理,即实现上述的确定透明度的方法。As a computer-readable storage medium, the memory 91 can be configured to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the method for determining transparency in the embodiments of the present application (for example, the distance information determining module 610 and transparency parameter determination module 620, or collision point information determination module 710, first distance information determination module 720 and transparency information determination module 730, or second distance information determination module 810, fusion parameter determination module 820 and display module 830). The processor 90 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 91 , that is, to implement the above-mentioned method for determining transparency.
存储器91可主要包括存储程序区和存储数据区,其中,存储程序区可存储 操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器91可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器91可包括相对于处理器90远程设置的存储器,这些远程存储器可以通过网络连接至电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 91 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Additionally, memory 91 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 91 may include memory located remotely from processor 90, which may be connected to the electronic device through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
输入装置92可设置为接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。输出装置93可包括显示屏等显示设备。The input device 92 may be configured to receive input numerical or character information, and to generate key signal input related to user settings and function control of the electronic device. The output device 93 may include a display device such as a display screen.
本申请一实施例还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时设置为执行一种确定透明度的方法。An embodiment of the present application further provides a storage medium containing computer-executable instructions, the computer-executable instructions, when executed by a computer processor, are configured to perform a method of determining transparency.
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供的确定透明度的方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by the embodiments of the present application, the computer-executable instructions of which are not limited to the above-mentioned method operations, and can also execute any of the methods for determining transparency provided by any embodiment of the present application. related operations.
通过以上关于实施方式的描述,所属领域的技术人员可以清楚地了解到,本申请可借助软件及必需的通用硬件来实现,当然也可以通过硬件实现。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如计算机的软盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、闪存(FLASH)、硬盘或光盘等,包括若干指令用以使得一台计算机电子设备(可以是个人计算机,服务器,或者网络设备等)执行本申请多个实施例所述的方法。From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and necessary general-purpose hardware, and certainly can also be implemented by hardware. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence or the parts that make contributions to related technologies, and the computer software products can be stored in a computer-readable storage medium, such as a computer floppy disk, Read-Only Memory (ROM), Random Access Memory (RAM), Flash Memory (FLASH), hard disk or optical disk, etc., including several instructions for making a computer electronic device (which may be a personal computer) , server, or network device, etc.) to execute the methods described in the various embodiments of the present application.

Claims (18)

  1. 一种确定透明度的方法,包括:A method of determining transparency, including:
    确定第一子模型和第二子模型上对应点之间的距离信息;所述第一子模型为包裹所述第二子模型局部的模型;Determine the distance information between the corresponding points on 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;
    根据所述距离信息,确定所述第一子模型和所述第二子模型上透明度参数。According to the distance information, a transparency parameter on the first sub-model and the second sub-model is determined.
  2. 根据权利要求1所述的方法,其中,所述确定第一子模型和第二子模型对应点之间的距离信息,根据所述距离信息,确定第一子模型和所述第二子模型上透明度参数包括:The method according to claim 1, wherein the determining the distance information between the corresponding points of the first sub-model and the second sub-model, and determining the distance between the first sub-model and the second sub-model according to the distance information Transparency parameters include:
    根据预先设置的与当前视觉角度相对应的物理射线参数信息,向第一子模型上的每个目标检测点发射物理射线,并确定每条物理射线透过所述第一子模型和第二子模型的碰撞点信息;According to the preset physical ray parameter information corresponding to the current visual angle, a physical ray is emitted to each target detection point on the first sub-model, and it is determined that each physical ray passes through the first sub-model and the second sub-model The collision point information of the model;
    针对每个目标检测点,根据与当前目标检测点所对应的物理射线在所述第一子模型和所述第二子模型上的碰撞点信息,确定所述当前目标检测点所对应的所述第一子模型与所述第二子模型之间的距离信息;For each target detection point, according to the collision point information of the physical rays corresponding to the current target detection point on the first sub-model and the second sub-model, determine the said current target detection point corresponding to the distance information between the first sub-model and the second sub-model;
    基于每个目标检测点所对应的距离信息,确定显示所述第一子模型和所述第二子模型时每个目标检测点的透明度信息。Based on the distance information corresponding to each target detection point, the transparency information of each target detection point when the first sub-model and the second sub-model are displayed is determined.
  3. 根据权利要求2所述的方法,在所述根据预先设置的与当前视觉角度相对应的物理射线参数信息,向第一子模型上的每个目标检测点发射物理射线之前,还包括:The method according to claim 2, before the physical ray is emitted to each target detection point on the first sub-model according to the preset physical ray parameter information corresponding to the current visual angle, further comprising:
    根据所述第一子模型上的每个目标检测点,确定每个视觉角度所对应的所述物理射线参数信息,并将物理射线参数信息存储至目标存储空间,以从所述目标存储空间中获取相应的物理射线参数信息。According to each target detection point on the first sub-model, determine the physical ray parameter information corresponding to each visual angle, and store the physical ray parameter information in the target storage space, so as to retrieve the information from the target storage space. Obtain the corresponding physical ray parameter information.
  4. 根据权利要求3所述的方法,其中,所述根据预先设置的与当前视觉角度相对应的物理射线参数信息,向第一子模型上的每个目标检测点发射物理射线,包括:The method according to claim 3, wherein the transmitting physical rays to each target detection point on the first sub-model according to preset physical ray parameter information corresponding to the current visual angle, comprising:
    当检测到触发确定透明信息或透明显示的控件时,从所述目标存储空间中调取与当前视觉角度相对应的物理射线参数信息,以基于调取的所述物理射线参数信息向所述第一子模型上的每个目标检测点发射物理射线。When a control that triggers determination of transparent information or transparent display is detected, the physical ray parameter information corresponding to the current visual angle is retrieved from the target storage space, and based on the retrieved physical ray parameter information, the physical ray parameter information is retrieved to the first Each object detection point on a submodel emits a physical ray.
  5. 根据权利要求2所述的方法,其中,所述确定每条物理射线透过所述第一子模型和第二子模型的碰撞点信息,包括:The method according to claim 2, wherein the determining the collision point information of each physical ray passing through the first sub-model and the second sub-model comprises:
    针对每条物理射线,确定当前物理射线依次与所述第一子模型和所述第二子模型碰撞时所对应的目标检测点信息和第二碰撞点信息;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;
    所述目标检测点信息和所述第二碰撞点信息包括空间坐标信息。The target detection point information and the second collision point information include spatial coordinate information.
  6. 根据权利要求5所述的方法,其中,所述针对每个目标检测点,根据与当前目标检测点所对应的物理射线在所述第一子模型和所述第二子模型上的碰撞点信息,确定所述当前目标检测点所对应的所述第一子模型与所述第二子模型之间的距离信息,包括:The method according to claim 5, wherein, for each target detection point, the collision point information on the first sub-model and the second sub-model according to the physical ray corresponding to the current target detection point , determine the distance information between the first sub-model and the second sub-model corresponding to the current target detection point, including:
    针对每个目标检测点,根据与当前目标检测点所对应的空间坐标信息,和所述第二子模型上与所述当前目标检测点所对应的第二碰撞点的空间坐标信息,确定所述当前目标检测点所对应的第一子模型和所述第二子模型之间的距离信息。For each 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 corresponding to the current target detection point on the second submodel, determine Distance information between the first sub-model corresponding to the current target detection point and the second sub-model.
  7. 根据权利要求2所述的方法,其中,所述基于每个目标检测点所对应的距离信息,确定显示所述第一子模型和所述第二子模型时每个目标检测点的透明度信息,包括:The method according to claim 2, wherein, determining the transparency information of each target detection point when displaying the first sub-model and the second sub-model based on the distance information corresponding to each target detection point, include:
    根据预先确定的与每个距离信息所对应的透明度参数,以及与每个目标检测点所对应的距离信息,确定每个目标检测点的透明度信息;或,Determine the transparency information of each target detection point according to the predetermined transparency parameter corresponding to each distance information and the distance information corresponding to each target detection point; or,
    根据与每个目标检测点所对应的距离信息以及预先设置的透明度确定方法,确定每个距离信息所对应的透明度参数并作为与相应目标检测点对应的透明度信息。According to the distance information corresponding to each target detection point and the preset transparency determination method, the transparency parameter corresponding to each distance information is determined as the transparency information corresponding to the corresponding target detection point.
  8. 根据权利要求7所述的方法,还包括:The method of claim 7, further comprising:
    将所述当前视觉角度下的每个目标检测点依据相应的透明度信息进行透明显示。Each target detection point under the current visual angle is transparently displayed according to the corresponding transparency information.
  9. 根据权利要求1所述的方法,其中,所述确定第一子模型和第二子模型对应点之间的距离信息,根据所述距离信息,确定第一子模型和所述第二子模型上透明度参数包括:The method according to claim 1, wherein the determining the distance information between the corresponding points of the first sub-model and the second sub-model, and determining the distance between the first sub-model and the second sub-model according to the distance information Transparency parameters include:
    确定当前角度下第一子模型上每个目标检测点所对应的第一子模型与第二子模型之间的距离信息;Determine the distance information between the first sub-model and the second sub-model corresponding to each target detection point on the first sub-model under the current angle;
    获取所述第一子模型的第一属性信息以及第二子模型的第二属性信息,并根据所述第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在所述当前角度下的融合参数;所述融合参数包括颜色融合参数、粗糙度融合参数以及高光度融合参数;Obtain the first attribute information of the first sub-model and the second attribute information of the second sub-model, and determine each target according to the first attribute information, the second attribute information and the distance information of each target detection point fusion parameters of the detection point at the current angle; the fusion parameters include color fusion parameters, roughness fusion parameters, and specular fusion parameters;
    根据与每个目标检测点相对应的距离信息以及融合参数,显示所述第一子模型。The first sub-model is displayed according to the distance information and fusion parameters corresponding to each target detection point.
  10. 根据权利要求9所述的方法,其中,所述确定当前角度下第一子模型 上每个目标检测点所对应的第一子模型与第二子模型之间的距离信息,包括:The method according to claim 9, wherein, the distance information between the first sub-model and the second sub-model corresponding to each target detection point on the first sub-model under the current angle is determined, comprising:
    确定第一子模型上每个目标检测点与拍摄装置的相对拍摄角度;Determine the relative shooting angle of each target detection point on the first sub-model and the shooting device;
    以拍摄装置为物理射线的发射中心,基于每个目标检测点与拍摄装置的相对拍摄角度向第一子模型上每个目标检测点发射物理射线;Taking the shooting device as the emission center of the physical rays, based on the relative shooting angle between each target detection point and the shooting device, the physical rays are emitted to each target detection point on the first sub-model;
    针对与每个目标检测点所对应的物理射线,确定当前物理射线透过所述第一子模型和所述第二子模型时,当前目标检测点所对应的所述第一子模型与所述第二子模型之间的当前距离信息;For the physical ray corresponding to each target detection point, it is determined that when the current physical ray passes through the first sub-model and the second sub-model, the first sub-model corresponding to the current target detection point and the current distance information between the second sub-models;
    将所述当前距离信息作为所述当前目标检测点的距离信息。The current distance information is used as the distance information of the current target detection point.
  11. 根据权利要求9所述的方法,其中,所述属性信息中包括模型所使用的颜色,所述获取所述第一子模型的第一属性信息以及第二子模型的第二属性信息,并根据所述第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在所述当前角度下的融合参数,包括:The method according to claim 9, wherein the attribute information includes a color used by the model, and the acquiring the first attribute information of the first sub-model and the second attribute information of the second sub-model is based on The first attribute information, the second attribute information and the distance information of each target detection point determine the fusion parameters of each target detection point at the current angle, including:
    针对每个目标检测点,确定当前目标检测点的第一颜色信息,和在所述当前角度下在所述第二子模型上与所述当前目标检测点所对应的第二颜色信息;For each target detection point, determine the first color information of the current target detection point, and the second color information corresponding to the current target detection point on the second sub-model at the current angle;
    基于与每个目标检测点所对应的所述第一颜色信息、第二颜色信息以及距离信息,确定每个目标检测点在当前角度下的颜色融合参数。Based on the first color information, second color information and distance information corresponding to each target detection point, the color fusion parameter of each target detection point at the current angle is determined.
  12. 根据权利要求9所述的方法,其中,所述属性信息中包括模型粗糙度,所述获取所述第一子模型的第一属性信息以及第二子模型的第二属性信息,并根据所述第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在所述当前角度下的融合参数,包括:The method according to claim 9, wherein the attribute information includes model roughness, and the acquiring first attribute information of the first sub-model and the second attribute information of the second sub-model is performed according to the The first attribute information, the second attribute information and the distance information of each target detection point determine the fusion parameters of each target detection point at the current angle, including:
    针对每个目标检测点,确定当前目标检测点的第一粗糙度,和在所述当前角度下在所述第二子模型上与所述当前目标检测点所对应的第二粗糙度;For each target detection point, determine the first roughness of the current target detection point, and the second roughness corresponding to the current target detection point on the second sub-model at the current angle;
    基于与每个目标检测点所对应的所述第一粗糙度、第二粗糙度以及距离信息,确定每个目标检测点在当前角度下的粗糙度融合参数。Based on the first roughness, the second roughness, and the distance information corresponding to each target detection point, a roughness fusion parameter of each target detection point at the current angle is determined.
  13. 根据权利要求9所述的方法,其中,所述属性信息中包括模型高光度,所述获取所述第一子模型的第一属性信息以及第二子模型的第二属性信息,并根据所述第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在所述当前角度下的融合参数,包括:The method according to claim 9, wherein the attribute information includes model specularity, and the acquiring first attribute information of the first sub-model and the second attribute information of the second sub-model is performed according to the The first attribute information, the second attribute information and the distance information of each target detection point determine the fusion parameters of each target detection point at the current angle, including:
    针对每个目标检测点,确定当前目标检测点的第一高光度,和在所述当前角度下在所述第二子模型上与所述当前目标检测点所对应的第二高光度;For each target detection point, determine the first specularity of the current target detection point, and the second specularity corresponding to the current target detection point on the second sub-model at the current angle;
    基于与每个目标检测点所对应的所述第一高光度、第二高光度以及距离信息,确定每个目标检测点在当前角度下的高光度融合参数。Based on the first highlight, second highlight and distance information corresponding to each target detection point, a highlight fusion parameter of each target detection point at the current angle is determined.
  14. 根据权利要求9所述的方法,其中,所述根据所述第一属性信息、第二属性信息以及每个目标检测点的距离信息,确定每个目标检测点在所述当前角度下的融合参数,包括:The method according to claim 9, wherein the fusion parameter of each target detection point at the current angle is determined according to the first attribute information, the second attribute information and the distance information of each target detection point ,include:
    针对每个目标检测点,根据预先设置距离信息和透光度参数对应关系以及当前目标检测点的距离信息,确定与所述当前目标检测点所对应的透光度参数;For each target detection point, determine the transmittance parameter corresponding to the current target detection point according to the preset corresponding relationship between the distance information and the transmittance parameter and the distance information of the current target detection point;
    基于每个目标检测点的透光度参数、所述第一属性信息以及所述第二属性信息,确定每个目标检测点在所述当前角度下的融合参数。Based on the transmittance parameter of each target detection point, the first attribute information and the second attribute information, a fusion parameter of each target detection point at the current angle is determined.
  15. 根据权利要求9所述的方法,其中,所述根据与每个目标检测点相对应的距离信息以及融合参数,显示所述第一子模型,包括:The method according to claim 9, wherein the displaying the first sub-model according to the distance information and fusion parameters corresponding to each target detection point, comprises:
    根据与每个目标检测点所对应的融合参数,将所述第一子模型上的每个目标检测点透明显示。Each target detection point on the first sub-model is transparently displayed according to the fusion parameter corresponding to each target detection point.
  16. 一种确定透明度的装置,包括:A device for determining transparency, comprising:
    距离信息确定模块,设置为确定第一子模型和第二子模型上对应点之间的距离信息;所述第一子模型为包裹所述第二子模型局部的模型;a distance information determination module, configured to determine the distance information between the corresponding points on 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 transparency parameter determination module is configured to determine transparency parameters on the first sub-model and the second sub-model according to the distance information.
  17. 一种电子设备,包括:An electronic device comprising:
    一个或多个处理器;one or more processors;
    存储装置,设置为存储一个或多个程序;storage means arranged to store one or more programs;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-15中任一项所述的确定透明度的方法。The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of determining transparency of any of claims 1-15.
  18. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时设置为执行如权利要求1-15中任一项所述的确定透明度的方法。A storage medium containing computer-executable instructions which, when executed by a computer processor, are arranged to perform the method of determining transparency of any of claims 1-15.
PCT/CN2021/131501 2020-12-08 2021-11-18 Transparency determining method and apparatus, electronic device, and storage medium WO2022121655A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202011445986.5A CN114627233A (en) 2020-12-08 2020-12-08 Method and device for determining transparency, electronic equipment and storage medium
CN202011444074.6 2020-12-08
CN202011444074.6A CN114627232A (en) 2020-12-08 2020-12-08 Method and device for determining transparency, electronic equipment and storage medium
CN202011445986.5 2020-12-08

Publications (1)

Publication Number Publication Date
WO2022121655A1 true WO2022121655A1 (en) 2022-06-16

Family

ID=81974182

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/131501 WO2022121655A1 (en) 2020-12-08 2021-11-18 Transparency determining method and apparatus, electronic device, and storage medium

Country Status (1)

Country Link
WO (1) WO2022121655A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100201685A1 (en) * 2009-02-03 2010-08-12 Calgary Scientific Inc. Configurable depth-of-field raycaster for medical imaging
CN106652007A (en) * 2016-12-23 2017-05-10 网易(杭州)网络有限公司 Virtual sea surface rendering method and system
CN109685881A (en) * 2018-11-13 2019-04-26 青岛海信电器股份有限公司 A kind of object plotting method, device and smart machine
CN110728744A (en) * 2018-07-16 2020-01-24 青岛海信电器股份有限公司 Volume rendering method and device and intelligent equipment
CN111243075A (en) * 2020-03-17 2020-06-05 广东趣炫网络股份有限公司 Method, device and equipment for generating water depth map for hand tour

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100201685A1 (en) * 2009-02-03 2010-08-12 Calgary Scientific Inc. Configurable depth-of-field raycaster for medical imaging
CN106652007A (en) * 2016-12-23 2017-05-10 网易(杭州)网络有限公司 Virtual sea surface rendering method and system
CN110728744A (en) * 2018-07-16 2020-01-24 青岛海信电器股份有限公司 Volume rendering method and device and intelligent equipment
CN109685881A (en) * 2018-11-13 2019-04-26 青岛海信电器股份有限公司 A kind of object plotting method, device and smart machine
CN111243075A (en) * 2020-03-17 2020-06-05 广东趣炫网络股份有限公司 Method, device and equipment for generating water depth map for hand tour

Similar Documents

Publication Publication Date Title
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
JP6125108B1 (en) Method, apparatus and terminal for simulating sound in a virtual scenario
US20190384967A1 (en) Facial expression detection method, device and system, facial expression driving method, device and system, and storage medium
US20230128505A1 (en) Avatar generation method, apparatus and device, and medium
TW201814438A (en) Virtual reality scene-based input method and device
US20210312171A1 (en) Human body three-dimensional key point detection method, model training method and related devices
US11455765B2 (en) Method and apparatus for generating virtual avatar
CN109978984A (en) Face three-dimensional rebuilding method and terminal device
WO2020019665A1 (en) Three-dimensional special effect generation method and apparatus based on human face, and electronic device
TWI738717B (en) Verification processing method and device based on verification code
CN109844820A (en) The hand that hologram is modified based on contextual information is blocked
CN116051729B (en) Three-dimensional content generation method and device and electronic equipment
WO2023142354A1 (en) Target locking method and apparatus, and electronic device and storage medium
CN114529647A (en) Object rendering method, device and apparatus, electronic device and storage medium
WO2022121655A1 (en) Transparency determining method and apparatus, electronic device, and storage medium
US11107267B2 (en) Image generation apparatus, image generation method, and program
WO2019042028A1 (en) All-around spherical light field rendering method
CN115965735B (en) Texture map generation method and device
US20220392251A1 (en) Method and apparatus for generating object model, electronic device and storage medium
CN112639802A (en) Method, system and storage medium for generating pseudo-structured light illuminating face
CN114529648A (en) Model display method, device, apparatus, electronic device and storage medium
CN115793893B (en) Touch writing handwriting generation method and device, electronic equipment and storage medium
CN113209628B (en) AI-based image processing method and device
CN115761123B (en) Three-dimensional model processing method, three-dimensional model processing device, electronic equipment and storage medium
CN115531877B (en) Method and system for measuring distance in virtual engine

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21902362

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21902362

Country of ref document: EP

Kind code of ref document: A1