A 3D scene processing method, device, equipment and medium

By establishing rays in a three-dimensional scene and judging their overlap with objects, the problem of analyzing the relative positional relationship of three-dimensional objects in a three-dimensional scene is solved, and effective analysis and display of the field of vision and position relationship is achieved.

CN114419287BActive Publication Date: 2025-06-13TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111624741.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-06-13
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The prior art lacks effective analytical means to analyze the relative positional relationship between three-dimensional objects in a three-dimensional scene.

Method used

By determining the starting point and the end point in a three-dimensional scene, a ray shot from the starting point to the end point is established, and whether the ray coincides with the object in the three-dimensional scene. If it overlaps, the rays are divided into two segments and displayed by different colors.

Benefits of technology

It realizes effective analysis of the visual field analysis in a three-dimensional scene and the relative position relationship of three-dimensional objects, which can clearly display the overlap between rays and objects, and improve analysis efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419287B_ABST
    Figure CN114419287B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a three-dimensional scene processing method, apparatus, device, and medium. The three-dimensional scene processing method includes: after displaying a three-dimensional scene, determining a starting point and a corresponding ending point in the three-dimensional scene, and establishing a ray emitted from the starting point towards the ending point; determining whether the ray coincides with an object within the three-dimensional scene; if so, dividing the ray into at least two segments, the two segments including a first segment and a second segment, and the first segment and the second segment are displayed in different colors; where the first segment is the part between the starting point and the target intersection point on the ray; the second segment is the part after the target intersection point on the ray along the ray direction; and the target intersection point is the first intersection point of the ray and the first object that coincides with the ray along the ray direction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a three-dimensional scene processing method, apparatus, device, and medium. Background Art

[0002] In the prior art, a three-dimensional scene containing various three-dimensional objects can be constructed to bring a better visual effect, but there is a lack of analysis means for the relative position relationship between the three-dimensional objects in the three-dimensional scene.

[0003] In view of this, a solution that can perform field of view analysis in a three-dimensional scene or relative position analysis between three-dimensional objects in a three-dimensional scene is needed. Summary of the Invention

[0004] Embodiments of this specification provide a three-dimensional scene processing method to solve the technical problem of how to perform field of view analysis in a three-dimensional scene or relative position analysis between three-dimensional objects in a three-dimensional scene.

[0005] To solve the above technical problem, the embodiments of this specification provide the following technical solutions:

[0006] Embodiments of this specification provide a three-dimensional scene processing method, including:

[0007] After displaying the three-dimensional scene, determine the starting point and the ending point corresponding to the starting point in the three-dimensional scene, and establish a ray emitted from the starting point to the ending point;

[0008] Determine whether the ray coincides with an object in the three-dimensional scene;

[0009] If so, divide the ray into at least two segments, the two segments including a first segment and a second segment, and the first segment and the second segment are displayed in different colors; wherein, the first segment is the part between the starting point and the target intersection point on the ray; the second segment is the part after the target intersection point on the ray along the ray direction; the target intersection point is the first intersection point of the ray and the first object that coincides with the ray along the ray direction.

[0010] Optionally, determining the starting point and the ending point corresponding to the starting point in the three-dimensional scene includes:

[0011] Use the user's preferred point as the starting point, and use the point selected by the user after the preferred point as the ending point corresponding to the starting point.

[0012] Optionally, the method further includes:

[0013] If a re-selection instruction is obtained, clear the existing starting point, ending point information, and ray information.

[0014] Optionally, establishing a ray from the starting point to the ending point includes:

[0015] For any ending point corresponding to the starting point, establishing a ray from the starting point to this ending point;

[0016] Or,

[0017] Establishing a ray from the starting point to the ending point includes:

[0018] For any ending point corresponding to the starting point, determining the vector between the starting point and this ending point, and along this vector, establishing a ray from the starting point to this ending point.

[0019] Optionally, the method further includes:

[0020] Displaying the part of the second segment that coincides with the object and the part that does not coincide with the object in different colors.

[0021] Optionally, the method further includes:

[0022] Displaying the distance between the starting point and the target intersection point.

[0023] Optionally, the method further includes:

[0024] For the starting point and any ending point corresponding to the starting point, if the position of the starting point changes, establishing a ray from the starting point after the position change to this ending point;

[0025] Or,

[0026] If the position of this ending point changes, establishing a ray from the starting point to this ending point after the position change.

[0027] An embodiment of this specification provides a three-dimensional scene processing device, including:

[0028] A point-line module, configured to, after displaying a three-dimensional scene, determine a starting point and an ending point corresponding to the starting point in the three-dimensional scene, and establish a ray from the starting point to the ending point;

[0029] A judgment module, configured to judge whether the ray coincides with an object in the three-dimensional scene;

[0030] An analysis module, configured to divide the ray into at least two segments if the ray coincides with an object in the three-dimensional scene, where the two segments include a first segment and a second segment, and the first segment and the second segment are displayed in different colors; wherein, the first segment is the part between the starting point and the target intersection point on the ray; the second segment is the part of the ray after the target intersection point along the ray direction; the target intersection point is the first intersection point of the ray and the first object that coincides with the ray along the ray direction.

[0031] An embodiment of this specification provides a three-dimensional scene processing device, including:

[0032] At least one processor;

[0033] And,

[0034] A memory communicatively connected to the at least one processor;

[0035] Wherein,

[0036] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the above-mentioned three-dimensional scene processing method.

[0037] An embodiment of this specification provides a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the above-mentioned three-dimensional scene processing method is implemented.

[0038] The above-mentioned at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:

[0039] The above-mentioned technical solution determines and displays the field of view from the starting point to the ending point or the relative position relationship of the three-dimensional objects in the three-dimensional scene by judging whether the ray emitted from the starting point to the ending point in the three-dimensional scene coincides with the objects in the three-dimensional scene, and realizes the field of view analysis in the three-dimensional scene and the relative position analysis between the three-dimensional objects in the three-dimensional scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for the description in the embodiments of this specification or the prior art. Obviously, the drawings introduced below are only some of the drawings that may be involved in the embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

[0041] Figure 1Schematic diagram of the execution entity of the 3D scene processing method in the first embodiment of this specification.

[0042] Figure 2 Schematic flowchart of the 3D scene processing method in the first embodiment of this specification.

[0043] Figure 3 Ray effect diagram in the first embodiment of this specification.

[0044] Figure 4 Schematic diagram of ray segmentation and color display in the first embodiment of this specification.

[0045] Figure 5 Another schematic diagram of ray segmentation and color display in the first embodiment of this specification.

[0046] Figure 6 Another schematic diagram of ray segmentation and color display in the first embodiment of this specification.

[0047] Figure 7 Schematic diagram of the structure of the 3D scene processing device in the second embodiment of this specification. Detailed implementation manners

[0048] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of this specification. Obviously, the embodiments described in this specification are only part of the embodiments of this application, rather than all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

[0049] In the prior art, a 3D scene containing various 3D objects can be constructed and displayed, and the 3D scene can bring better visual effects and experiences to users. However, there is currently a lack of effective analysis means for the relative positional relationships between 3D objects within the 3D scene.

[0050] The first embodiment of this specification (hereinafter referred to as "Embodiment 1") provides a 3D scene processing method. The execution entity of Embodiment 1 can be a terminal (including but not limited to mobile phones, computers, pads, TVs) or a server or an operating system or an application or a 3D scene processing platform or a 3D scene processing system, etc. That is, the execution entity can be diverse and can be set, used, or transformed according to needs. In addition, a third-party application can assist the execution entity in executing Embodiment 1. For example Figure 1As shown in the figure, the three-dimensional scene processing method in the first embodiment can be executed by a server, and a corresponding application can be installed on a terminal (held by a user). Data can be transmitted between the terminal or the application and the server. Data collection, input, output, or page or information processing (to the user) can be performed through the terminal or the application, so as to assist the server in executing the three-dimensional scene processing method in the first embodiment.

[0051] As Figure 2 shown, the three-dimensional scene processing method provided in the first embodiment includes:

[0052] S101: After presenting the three-dimensional scene, determine the starting point and the corresponding ending point in the three-dimensional scene, and establish a ray shooting from the starting point to the ending point;

[0053] The execution entity of the first embodiment may have a display screen and present the three-dimensional scene according to user operations. For example, the user can import or transmit a three-dimensional scene file to the execution entity of the first embodiment, and the execution entity of the first embodiment loads the three-dimensional scene file to present the three-dimensional scene; or, the user can build a three-dimensional scene through the execution entity of the first embodiment, and the execution entity of the first embodiment presents the built three-dimensional scene. A corresponding application can be installed on the execution entity of the first embodiment to load the three-dimensional scene file or build the three-dimensional scene through the application, or present the three-dimensional scene through the application. Hereinafter, the three-dimensional scene presented by the execution entity of the first embodiment is referred to as the target three-dimensional scene.

[0054] After presenting the target three-dimensional scene, the execution entity of the first embodiment allows the user to select points on the target three-dimensional scene, and the execution entity of the first embodiment can determine the points selected by the user through user operations. Among them, the user can select points on the target three-dimensional scene by means of a mouse, a keyboard, touch, etc. For example, the user can move the cursor on the screen of the execution entity of the first embodiment with the mouse. When the user clicks the mouse, the execution entity of the first embodiment maps the position of the cursor on the screen to a point in the target three-dimensional scene as the point selected by the user; or, the user can move the cursor on the screen of the execution entity of the first embodiment with the keyboard arrow keys. When the user issues a confirmation instruction to the execution entity of the first embodiment through the keyboard (for example, when the user clicks the enter key, it is regarded as issuing a confirmation instruction), the execution entity of the first embodiment maps the position of the cursor on the screen to a point in the target three-dimensional scene as the point selected by the user; or, the user can click on the screen of the execution entity of the first embodiment with a finger (applicable to a touch screen), and the execution entity of the first embodiment maps the finger click position on the screen to a point in the target three-dimensional scene as the point selected by the user. Hereinafter, the points selected by the user are simply referred to as "selected points".

[0055] The execution entity of the first embodiment can determine the starting point and the corresponding ending point in the target three-dimensional scene. Among them, determining the starting point and the corresponding ending point in the three-dimensional scene includes: using the user's preferred point (i.e., the first selected point) after presenting the target three-dimensional scene as the starting point, and using the points selected by the user after the preferred point as the ending points corresponding to the starting point. In this way, one starting point can correspond to one or more ending points.

[0056] After determining the starting point and the corresponding ending point in the target three-dimensional scene, the execution entity of the first embodiment can establish a ray from the starting point to the ending point. Among them, establishing a ray from the starting point to the ending point can include: for any ending point corresponding to the starting point, establishing a ray from the starting point to this ending point; or, establishing a ray from the starting point to the ending point can include: for any ending point corresponding to the starting point, determining the vector between the starting point and this ending point, and along the vector, establishing a ray from the starting point to this ending point. Specifically, for any ending point corresponding to the starting point, according to the three-dimensional coordinates of the starting point and this ending point, a three-dimensional vector between the starting point and this ending point can be established, and then along the three-dimensional vector, a ray from the starting point to this ending point can be established.

[0057] If one starting point corresponds to multiple ending points, then a ray is emitted from this starting point to each corresponding ending point, as Figure 3 shown. For any ending point corresponding to the starting point, the length of the ray from the starting point to this ending point can be the line segment from the starting point to this ending point (i.e., equivalent to the line segment from the starting point to this ending point), or it can extend after emitting from the starting point and connecting this ending point.

[0058] S103: (The execution entity) determines whether the ray coincides with the objects in the three-dimensional scene;

[0059] For any ending point corresponding to the starting point, the execution entity of the first embodiment can determine whether the ray from the starting point to this ending point coincides with the objects in the target three-dimensional scene. Among them, the object generally refers to a three-dimensional model in the target three-dimensional scene (the three-dimensional model includes but is not limited to industrial product three-dimensional models or human body three-dimensional models).

[0060] S105: (The execution entity) if the ray coincides with the objects in the three-dimensional scene, then divide the ray into at least two segments, the two segments include a first segment and a second segment, and the first segment and the second segment are displayed in different colors; among them, the first segment is the ray part between the starting point and the target intersection point; the second segment is the ray part after the target intersection point along the ray direction; the target intersection point is the intersection point of the ray and the first object that coincides with the ray along the ray direction.

[0061] For any termination point corresponding to the starting point (hereinafter referred to as point A below the starting point), if the ray shot from the starting point to this termination point (hereinafter referred to as ray AB for the ray shot from point A to point B) coincides with an object in the target three-dimensional scene, it means that ray AB has collided with an object in the target three-dimensional scene, and the object that coincides with ray AB is the object that has collided with ray AB. Among them, the execution entity of the first embodiment can determine whether ray AB has collided with an object in the target three-dimensional scene by determining whether ray AB has hit an object with a collider. If ray AB has hit an object with a collider, it is determined that ray AB has collided with an object in the target three-dimensional scene, and the object hit by ray AB is the object that has collided with ray AB; if ray AB has not hit an object with a collider, it is determined that ray AB has not collided with an object in the target three-dimensional scene.

[0062] After ray AB collides with any object, there is an overlapping part between ray AB and the object it collides with.

[0063] If ray AB coincides with an object, the execution entity of the first embodiment can determine the first object that coincides with ray AB along the direction of ray AB (i.e., the direction from point A to point B), and determine the first intersection point of the first object that coincides with ray AB and ray AB along the direction of ray AB, and take the first intersection point as the target intersection point.

[0064] If ray AB coincides with an object, the execution entity of the first embodiment can divide ray AB into two segments, and the two segments include the first segment and the second segment. Among them, the first segment is the part between point A and the target intersection point on ray AB; the second segment is the part after the target intersection point on ray AB along the direction of ray AB. As Figure 4 or Figure 5 shown.

[0065] In the first embodiment, the first segment and the second segment are displayed in different colors, that is, the execution entity of the first embodiment can make the first segment and the second segment be displayed in different colors.

[0066] Since ray AB may coincide with or collide with one or more objects, the execution entity of the first embodiment can display the parts of the second segment that coincide with objects and the parts that do not coincide with objects in different colors. In this way, it is equivalent to re-segmenting the second segment, that is, each part of the second segment that coincides with an object is taken as a segment, and each part that does not coincide with an object is taken as a segment. That is to say, each continuous single-color segment in the second segment is taken as a segment. As Figure 6 shown.

[0067] Since the ray AB is segmented after overlapping with at least one object, at least a part of the second segment overlaps with the at least one object. Therefore, if the second segment is further segmented, the second segment can be divided into at least two segments. In this case, together with the first segment, the ray AB is divided into at least three segments.

[0068] In the first embodiment, the overlapping part of the ray AB and the object can be of the same color; or, the non-overlapping part of the second segment and the object can be of the same color, and generally of a different color from the first segment.

[0069] The execution entity of the first embodiment can determine the distance between point A and the target intersection point (the distance can be the three-dimensional space distance in the target three-dimensional scene or the real space distance, the same hereinafter. That is, it can determine the three-dimensional space distance between point A and the target intersection point, and can also convert the three-dimensional space distance into the real space distance), and display the distance between point A and the target intersection point in the target three-dimensional scene. Further, for any object that overlaps with the ray AB (including the first object that overlaps with the ray AB along the ray AB direction), the execution entity of the first embodiment can determine the distance between the first intersection point (abbreviation: "first intersection point", the first intersection point includes the target intersection point) of the object and the ray AB along the ray AB direction and point A, and display the distance in the target three-dimensional scene. Further, if there are at least two first intersection points on the ray AB, the execution entity of the first embodiment can determine the distance between any two first intersection points on the ray AB, and display the distance in the target three-dimensional scene.

[0070] In the first embodiment, the execution entity of the first embodiment can change the position of the starting point or the ending point according to the user operation. For example, for any user-selected point (which can be the starting point or the ending point), the user can select the point by mouse or keyboard or finger touch, and move the position of the point by dragging the mouse or using the keyboard arrow keys or finger sliding. Correspondingly, the execution entity of the first embodiment changes the position of the point according to the mouse dragging or keyboard arrow keys or finger sliding.

[0071] For the starting point and any corresponding ending point, if the position of the starting point changes, the execution entity of the first embodiment establishes a ray from the changed starting point to the ending point, and executes steps S103 and S105 as above; or, for the starting point and any corresponding ending point, if the position of the ending point changes, the execution entity of the first embodiment establishes a ray from the starting point to the changed ending point, and executes steps S103 and S105 as above.

[0072] In the first embodiment, the user can send a re - selection instruction to the execution entity of the first embodiment. For example, the user can send a re - selection instruction by operating the page of the execution entity of the first embodiment, or the user can send a re - selection instruction to the execution entity of the first embodiment through a device other than the execution entity of the first embodiment. If the execution entity of the first embodiment obtains the re - selection instruction, the execution entity of the first embodiment clears the existing starting point, ending point information, and ray information, so that the user can re - select points and execute the above - mentioned steps S101, S103, and S105.

[0073] The following uses some examples to illustrate the application of the first embodiment (the first embodiment is not limited to the following examples):

[0074] Example 1: The target 3D scene can be a residential area scene. There can be residential building models and a sun model in the target 3D scene, and the position of the sun model can change dynamically over time like in the real world, that is, the target 3D scene simulates the residential area scene in reality. For example, the user can select the sun model in the sky in the target 3D scene at 12 noon as the starting point, and select a point on the first floor of a certain residential building as the ending point, and establish a ray between the starting point and the ending point. If the part between the starting point and the ending point of the ray does not collide with other objects, that is, the ray does not overlap with other objects, it means that at 12 noon, the sunlight is not blocked by other objects and can shine on the first floor of this residential building; if the part between the starting point and the ending point of the ray collides with other objects (the other objects may be other residential buildings), that is, the ray overlaps with other objects, it means that at 12 noon, the sunlight is blocked by other objects and cannot shine on the first floor of this residential building. Therefore, in this example, by selecting the sun model as the starting point and the floor as the ending point, the ray from the starting point to the ending point is equivalent to the sunlight irradiation path. According to whether the part between the starting point and the ending point of the ray overlaps with objects, the daylighting situation of the floor can be simulated. Thus, this example can be used for daylighting simulation of real estate or other buildings. Of course, multiple floors of multiple residential buildings or multiple floors of a single residential building can be selected as the ending points, that is, multiple ending points are selected, and rays are established from the starting point to each ending point to simulate the daylighting situation of multiple floors of multiple residential buildings or multiple floors of a single residential building. Through the simulation of the daylighting situation, the relative position between residential buildings or the height of residential buildings can be analyzed, providing a reference for the construction of buildings.

[0075] Assume that the part between the starting point and the ending point of the ray overlaps with another residential building. Then, by determining the distance between the "first intersection point of the ray and the other residential building" and the ending point, the relative position between residential buildings or the height of residential buildings can be analyzed, providing a reference for the construction of buildings.

[0076] Since the position of the solar model changes over time, the starting point can be set to change with the position of the solar model, that is, the starting point is always on the solar model. In this way, it is possible to determine at what position the solar model changes when the part between the ray starting point and the ending point does not coincide with or coincides with other objects, enabling the analysis of the relative positions between residential buildings or the heights of residential buildings, and providing a reference for the construction of buildings.

[0077] Example 2: The target 3D scene can be an urban scene, in which there can be traffic signal models, road models, and vehicle models on the road. The position of the vehicle model can move along the road as in the real world, that is, the target 3D scene simulates the real urban scene. For example, the user can select the driver's eyes of the vehicle as the starting point and the traffic signal as the ending point to establish a ray between the starting point and the ending point. If the part between the ray starting point and the ending point does not collide with other objects, that is, the ray does not coincide with other objects, it means that the driver's field of view (or visual field, the same below) is not blocked by other objects and can see the traffic signal; if the part between the ray starting point and the ending point collides with other objects, that is, the ray coincides with other objects, it means that the driver's field of view is blocked by other objects and cannot see the traffic signal. Therefore, in this example, by selecting the driver's eyes of the vehicle as the starting point and the traffic signal as the ending point, the ray from the starting point to the ending point is equivalent to the driver's line of sight path. According to whether the part between the ray starting point and the ending point coincides with objects, the driver's field of view occlusion situation can be modeled, which can be used for driver's visual field analysis and provide a reference for the setting or construction of the relative positions of traffic signals or roads.

[0078] Since the position of the vehicle model changes over time, the starting point can be set to change with the position of the vehicle model, that is, the starting point is always on the driver model. In this way, it is possible to determine at what position the vehicle model changes when the part between the ray starting point and the ending point does not coincide with or coincides with other objects, which can be used for driver's visual field analysis and provide a reference for the setting or construction of the relative positions of traffic signals or roads.

[0079] Example 3: The target 3D scene can be an urban scene, and there can be a camera model and other common urban building or pedestrian models in the target 3D scene. For example, the user can select the camera model as the starting point and the pedestrian model as the ending point to establish a ray between the starting point and the ending point. If the part between the starting point and the ending point of the ray does not collide with other objects, that is, the ray does not overlap with other objects, it means that the camera is not blocked by other objects and can observe the pedestrian; if the part between the starting point and the ending point of the ray collides with other objects (the other objects may be other residential buildings), that is, the ray overlaps with other objects, it means that the camera is blocked by other objects and cannot observe the pedestrian. Therefore, in this example, by selecting the camera model as the starting point and the pedestrian model as the ending point, the ray from the starting point to the ending point is equivalent to the observation path of the camera. According to whether the part between the starting point and the ending point of the ray overlaps with objects, the observation distance or range (i.e., the field of view of the camera) of the camera can be simulated, which can be used for camera field of view analysis and provide a reference for the camera position setting. Of course, multiple pedestrians can be selected as the ending points, and the walking paths of different pedestrians can be different, that is, multiple ending points are selected to establish rays from the starting point to each ending point to simulate the observation distances or ranges in different directions of the camera and provide a reference for the camera position setting.

[0080] Since the position of the pedestrian model changes over time, the starting point can be set to change with the position of the pedestrian model, that is, the starting point is always on the pedestrian model. In this way, it can be determined at what position the pedestrian model changes when the part between the starting point and the ending point of the ray does not overlap or overlaps with other objects, which can be used for camera field of view analysis and provide a reference for the camera position setting.

[0081] In Embodiment 1, by determining whether the ray emitted from the starting point to the ending point in the 3D scene overlaps with the objects in the 3D scene, the field of view in the direction from the starting point to the ending point or the relative position relationship of the 3D objects in the 3D scene is determined and displayed, realizing the field of view analysis in the 3D scene and the relative position analysis between the 3D objects in the 3D scene, such as those described in Examples 1 to 3 above.

[0082] In Embodiment 1, the ray is segmented and different segments are displayed in different colors, which can more clearly show the overlapping situation of the ray and the object and improve the efficiency of field of view analysis and relative position analysis.

[0083] In Embodiment 1, the position of the starting point or the ending point can change, which is more in line with the actual situation. By determining the change in the overlapping of the ray and the object when the starting point or the ending point changes, that is, the change in the field of view, the analysis effect, flexibility, and reliability of the field of view analysis and relative position analysis are improved.

[0084] Embodiment 1 can be used for field of view analysis and relative position analysis in a variety of 3D scenarios (such as the above Examples 1 to 3), and has the characteristic of universality.

[0085] As Figure 7 shown, the second embodiment of this specification provides a 3D scene processing apparatus corresponding to the 3D scene processing method described in Embodiment 1, including:

[0086] A point-line module 202, configured to, after presenting the 3D scene, determine a starting point and an end point corresponding to the starting point in the 3D scene, and establish a ray emitted from the starting point to the end point;

[0087] A judgment module 204, configured to judge whether the ray coincides with an object in the 3D scene;

[0088] An analysis module 206, configured to, if the ray coincides with an object in the 3D scene, divide the ray into at least two segments, the two segments including a first segment and a second segment, and the first segment and the second segment are displayed in different colors; wherein, the first segment is the part between the starting point and the target intersection point on the ray; the second segment is the part after the target intersection point on the ray along the ray direction; the target intersection point is the first intersection point of the ray and the first object that coincides with the ray along the ray direction.

[0089] Optionally, determining the starting point and the end point corresponding to the starting point in the 3D scene includes:

[0090] Taking the user's preferred point as the starting point, and taking the point selected by the user after the preferred point as the end point corresponding to the starting point.

[0091] Optionally, the apparatus further includes:

[0092] A restoration module, configured to, if a re-selection instruction is obtained, clear the existing starting point, end point information, and ray information.

[0093] Optionally, establishing a ray emitted from the starting point to the end point includes:

[0094] For any end point corresponding to the starting point, establish a ray emitted from the starting point to this end point;

[0095] Or,

[0096] Establishing a ray emitted from the starting point to the end point includes:

[0097] For any end point corresponding to the starting point, determine the vector between the starting point and this end point, and along this vector, establish a ray emitted from the starting point to this end point.

[0098] Optionally, the analysis module 206 is further configured to display the parts of the second segment that coincide with the object and the parts that do not coincide with the object in different colors.

[0099] Optionally, the analysis module 206 is further configured to display the distance between the starting point and the target intersection point.

[0100] Optionally, the point-line module 202 is further configured to, for the starting point and any termination point corresponding to the starting point, if the position of the starting point changes, establish a ray emitted from the changed starting point to the termination point;

[0101] Or,

[0102] if the position of the termination point changes, establish a ray emitted from the starting point to the changed termination point.

[0103] The third embodiment of this specification provides a three-dimensional scene processing device, including:

[0104] At least one processor;

[0105] And,

[0106] A memory communicatively connected to the at least one processor;

[0107] Wherein,

[0108] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the three-dimensional scene processing method described in the first embodiment.

[0109] The fourth embodiment of this specification provides a computer-readable storage medium, and the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the three-dimensional scene processing method described in the first embodiment is implemented.

[0110] The above embodiments can be combined for use, and modules with the same name between different embodiments or within the same embodiment can be the same or different modules.

[0111] The above describes specific embodiments of this specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily have to be executed in the specific order or continuous order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0112] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other, and the key point of each embodiment is to illustrate the differences from other embodiments. In particular, for the embodiments of the device, equipment, and non-volatile computer-readable storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0113] The device, equipment, and non-volatile computer-readable storage medium provided in the embodiments of this specification correspond to the method. Therefore, the device, equipment, and non-volatile computer storage medium also have beneficial technical effects similar to the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding device, equipment, and non-volatile computer storage medium will not be elaborated here.

[0114] In the 1990s, it was obvious to distinguish whether an improvement to a technology was an improvement in hardware (e.g., improvement to circuit structures such as diodes, transistors, switches, etc.) or an improvement in software (improvement to method flows). However, with the development of technology, many improvements to method flows today can be regarded as direct improvements to hardware circuit structures. Almost all designers obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented with a hardware entity module. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logical function is determined by the user programming the device. The designer can program by himself to "integrate" a digital system on a piece of PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called Hardware Description Language (HDL), and there is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be clear that as long as the method flow is slightly logically programmed with the above-mentioned several hardware description languages and programmed into the integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.

[0115] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that, in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to logically program the method steps to enable the controller to be implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded microcontrollers to achieve the same function. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.

[0116] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0117] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0118] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, the embodiments of this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.

[0119] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It should be understood that each flow and / or block in the flowchart and / or block diagram, and combinations of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0120] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.

[0122] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0123] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.

[0124] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0125] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.

[0126] This specification can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0127] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and reference can be made to the relevant parts of the method embodiments for the related content.

[0128] The above are only examples of this specification and are not intended to limit this application. For those skilled in the art, various modifications and changes can be made to this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the scope of the claims of this application.

Claims

1. A three-dimensional scene processing method, comprising: After displaying a three-dimensional scene including a sun model and multiple building models on a display screen, using the sun model as the starting point and the floors of the multiple building models or multiple floors of any one building model as multiple end points; at the same time, establishing multiple rays emitted from the starting point to each end point, and the multiple rays are the sunlight irradiation paths of the sun model, and any point among the starting point and the multiple end points is mapped based on the click position on the display screen; Judging whether the target ray among the multiple rays that shoots towards the target end point coincides with other building models to simulate the daylighting situation of the floor of the first building model where the target end point is located; the target end point is any one of the multiple end points, and the other building models are at least one second building model other than the first building model among the multiple building models; If so, dividing the target ray into at least two segments, and displaying the first segment and the second segment in the two segments in different colors; wherein, the first segment is the part between the starting point and the target intersection on the target ray; the second segment is the part after the target intersection on the target ray along the direction of the target ray; the target intersection is the first intersection of the second building model that first coincides with the target ray and the target ray along the direction of the target ray; Displaying the first distance between the target intersection and the target end point; If the target ray coincides with at least two second building models, displaying the second distance between the first intersections of any two of the at least two second building models, and the first intersection of each second building model is the first intersection of each second building model and the target ray; Based on the first distances of the multiple rays and the second distances of the multiple rays, analyzing the relative positions or heights of the multiple building models to obtain an analysis result, and the analysis result is used to provide a reference for the construction of the multiple building models.

2. The method according to claim 1, the method further comprising: Taking the user's preferred point as the starting point, and taking the points selected by the user after the preferred point as the end points corresponding to the starting point.

3. The method according to claim 1, the method further comprising: If a re-selection instruction is obtained, clearing the existing starting point and end point information and ray information.

4. The method according to claim 1, the establishing of the ray emitted from the starting point to each end point comprising: For any end point corresponding to the starting point, establishing a ray emitted from the starting point to this end point; Or, The establishing of the ray emitted from the starting point to each end point includes: For any end point corresponding to the starting point, determining the vector between the starting point and this end point, and along the vector, establishing a ray emitted from the starting point to this end point.

5. The method according to claim 1, the method further comprising: Displaying the part of the second segment that coincides with an object and the part that does not coincide with an object in different colors.

6. The method according to claim 1, the method further comprises: displaying the distance between the starting point and the target intersection point.

7. The method according to claim 1, the method further comprises: for the starting point and any end point corresponding to the starting point, if the position of the starting point changes, a ray is established from the starting point after the position change to the end point; or, if the position of the end point changes, a ray is established from the starting point to the end point after the position change.

8. A three-dimensional scene processing device, comprising: a point-line module, configured to, after a three-dimensional scene including a sun model and a plurality of building models is displayed on a display screen, use the sun model as a starting point and use the floors of the plurality of building models or multiple floors of any one of the building models as a plurality of end points; meanwhile, establish a plurality of rays from the starting point to each end point, the plurality of rays being the sunlight irradiation paths of the sun model, and any point among the starting point and the plurality of end points is mapped based on a click position on the display screen; a judgment module, configured to judge whether a target ray that shoots towards a target end point among the plurality of rays coincides with other building models, so as to simulate the daylighting condition of the floor of the first building model where the target end point is located; the target end point is any one of the plurality of end points, and the other building models are at least one second building model other than the first building model among the plurality of building models; an analysis module, configured to, if the target ray coincides with other building models in the three-dimensional scene, divide the target ray into at least two segments, and display the first segment and the second segment in the two segments with different colors; wherein, the first segment is the part between the starting point and the target intersection point on the target ray; the second segment is the part after the target intersection point on the target ray along the direction of the target ray; the target intersection point is the first intersection point of the target ray and the first second building model that coincides with the target ray along the direction of the target ray; display the first distance between the target intersection point and the target end point; if the target ray coincides with at least two second building models, display the second distance between the first intersection points of any two of the at least two second building models, and the first intersection point of each second building model is the first intersection point of each second building model and the target ray; analyze the relative positions or heights of the plurality of building models based on the first distances of the plurality of rays and the second distances of the plurality of rays, and obtain an analysis result, and the analysis result is used as a reference for the construction of the plurality of building models.

9. The device according to claim 8, the point-line module is further configured to: use the user's preferred point as the starting point, and use the points selected by the user after the preferred point as the end points corresponding to the starting point.

10. The device according to claim 8, the device further comprises: a restoration module, configured to, if a re-selection instruction is obtained, clear the existing starting point, end point information and ray information.

11. The device according to claim 8, wherein the dotted line module is further configured to: For any end point corresponding to the start point, establish a ray shooting from the start point to the end point; Or For any end point corresponding to the start point, determine a vector between the start point and the end point, and along the vector, establish a ray shooting from the start point to the end point.

12. The device according to claim 8, wherein the analysis module is further configured to: Display the part of the second segment that coincides with the object and the part that does not coincide with the object in different colors.

13. The device according to claim 8, wherein the analysis module is further configured to: Display the distance between the start point and the target intersection point.

14. The device according to claim 8, wherein the dotted line module is further configured to: For the start point and any end point corresponding to the start point, if the position of the start point changes, establish a ray shooting from the start point with the changed position to the end point; Or If the position of the end point changes, establish a ray shooting from the start point to the end point with the changed position.

15. A three-dimensional scene processing device Comprising: At least one processor; And A memory communicatively connected to the at least one processor; Wherein The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the three-dimensional scene processing method according to any one of claims 1 to 7.

16. A computer-readable storage medium storing computer-executable instructions, which when executed by a processor implement the three-dimensional scene processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for interacting with virtual reality scene

    CN107145227A

  • Camera visual range judgment method and device, electronic equipment and storage medium

    CN110536126A