View layout method, apparatus, device, storage medium and product

By adjusting the viewpoint position in the view layout, calculating the resultant force by combining the repulsive and attractive forces between views, and iteratively updating the view state, the problems of balancing analytical and contextual aspects and occlusion in view display are solved, achieving an efficient and visual view layout and improving the user experience.

CN118797762BActive Publication Date: 2026-02-03CHINA MOBILE (JIANGXI) VIRTUAL REALITY TECH CO LTD +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410275365.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-11
Publication Date
2026-02-03
Estimated Expiration
2044-03-11

AI Technical Summary

Technical Problem

Existing technologies cannot simultaneously consider both analytical and contextual aspects when displaying views, and object occlusion leads to poor view layout.

Method used

By adjusting the viewpoint position in the view layout, and combining the total repulsive force between the view after the viewpoint position adjustment and other views, the first attractive force between the view after the viewpoint position adjustment and the physical reference position of the 3D model, and the second attractive force between the view after the viewpoint position adjustment and the viewpoint, the resultant force on the view after the viewpoint position adjustment is calculated. When the resultant force is less than a preset value, the view state is iteratively updated to obtain the optimal view layout.

Benefits of technology

It achieves enhanced contextuality and analytical capabilities in view presentation, reduces occlusion, provides efficient and visually appealing view layouts, and improves the user's immersive data visualization experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797762B_ABST
    Figure CN118797762B_ABST
Patent Text Reader

Abstract

The application discloses a view layout method, device, equipment, storage medium and product, the method comprises: adjusting the view point position of the view in the current view layout, obtaining the view state; according to the repulsive force sum of the view after the view point position is adjusted and other views in the current view layout, the first attractive force of the view and the physical reference position of the three-dimensional model corresponding to the view, and the second attractive force of the view and the view point of the view, the resultant force suffered by the view after the view point position is adjusted is obtained; or when the resultant force is less than a preset value, the target view state is obtained according to the view state, and when the iteration termination condition is met, the target view layout is obtained according to the target view state, the analysis and the situation when the view is displayed can be considered at the same time, and the optimal view layout is obtained by considering the occlusion of the object to the view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual reality technology, and in particular to a view layout method, apparatus, device, storage medium, and product. Background Technology

[0002] In today's digital age, data visualization has become an indispensable tool across various industries. By presenting data in a visual way, people can understand and analyze it more intuitively, leading to better decision-making. The application of 3D visualization technology in data presentation is receiving increasing attention. It can use virtual reality technology to visualize the view information corresponding to a 3D model, providing users with an immersive data presentation experience.

[0003] Currently, image-based rendering techniques typically process existing images to quickly generate views. Alternatively, model-based rendering methods rely on geometric models of real-world objects, which can provide more realistic visual effects and are highly advantageous for applications that require finely detailed representations of scene details.

[0004] However, the above methods cannot simultaneously consider both analytical and contextual aspects when displaying a view, and there are situations where objects obstruct the view, making it impossible to obtain the optimal view layout. Summary of the Invention

[0005] This application provides a view layout method, apparatus, device, storage medium, and product, aiming to simultaneously consider the analytical and contextual aspects of view display, and take into account the occlusion of objects on the view, in order to obtain the optimal view layout.

[0006] This application provides a view layout method, the view layout method including:

[0007] Adjust the viewpoint position of the views in the current view layout to obtain the view state;

[0008] The resultant force on the view after the view position is adjusted is obtained based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the 3D model corresponding to the view, and the second attractive force between the view after the view position is adjusted and the viewpoint of the view.

[0009] When the resultant force is less than the preset value, the target view state is obtained according to the view state, and when the iteration termination condition is met, the target view layout of the current virtual scene is obtained according to the target view state.

[0010] Optionally, before the step of obtaining the resultant force on the view after the view position is adjusted based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the corresponding 3D model, and the second attractive force between the view after the view position is adjusted and the viewpoint of the view, the method further includes:

[0011] Get the distances between the view after the viewpoint position is adjusted and all other views in the current view layout, and get the repulsion coefficient;

[0012] Based on the distance between the view after the viewpoint position is adjusted and each other view, and the repulsion coefficient, the repulsion force between the view after the viewpoint position is adjusted and each other view is obtained;

[0013] The total repulsive force is obtained based on the repulsive force between the view adjusted by the viewpoint position and each other view.

[0014] Obtain the distance between the view after the viewpoint position is adjusted and the physical reference position of the corresponding 3D model, and obtain the first gravity coefficient;

[0015] The first gravitational force is obtained based on the distance between the view adjusted by the viewpoint position and the physical reference position of the corresponding three-dimensional model, and the first gravitational force coefficient.

[0016] Obtain the distance between the view after the viewpoint position is adjusted and the viewpoint of the view, and obtain the second gravity coefficient;

[0017] The second gravitational force is obtained based on the distance between the view adjusted by the viewpoint position and the viewpoint of the view, and the second gravitational coefficient.

[0018] Optionally, the step of obtaining the resultant force on the view after the view position is adjusted based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the corresponding 3D model, and the second attractive force between the view after the view position is adjusted and the viewpoint of the view includes:

[0019] Determine the first product between the sum of the repulsive forces and the repulsive force coefficient, the second product between the first attractive force and the first attractive force coefficient, and the third product between the second attractive force and the second attractive force coefficient;

[0020] The resultant force on the view after the viewpoint position is adjusted is obtained by summing the first product, the second product, and the third product.

[0021] Optionally, the step of obtaining the target view layout of the current virtual scene based on the target view state when the iteration termination condition is met includes:

[0022] If the current updated temperature is lower than the preset temperature, the target view layout of the current virtual scene is obtained according to the target view state;

[0023] Alternatively, if the current cumulative iteration count reaches a preset number, the target view layout of the current virtual scene is obtained based on the target view state;

[0024] If the energy change in the current iteration process is less than a preset change value, the target view layout of the current virtual scene is obtained based on the target view state.

[0025] Optionally, before the step of adjusting the viewpoint position of the view in the current view layout to obtain the view state, the method further includes:

[0026] Obtain the identification information associated with each 3D model in the current virtual scene;

[0027] The views associated with each 3D model are obtained based on the identification information;

[0028] The current view layout is obtained by rendering the various 3D models and their associated views in the current display screen.

[0029] Optionally, after the step of obtaining the target view layout of the current virtual scene based on the target view state when the iteration termination condition is met, the method further includes:

[0030] Obtain the distances from the human eye to views located on different spheres, where each view is located on a different sphere.

[0031] The scaling ratio corresponding to each view located on different spheres is determined based on the distance.

[0032] The dimensions of the corresponding views located on different spheres are adjusted based on the scaling ratio;

[0033] The target virtual scene is obtained by rendering based on the resized view and the viewpoint positions corresponding to each view in the target view layout.

[0034] In addition, to achieve the above objectives, this application also provides a view layout device, comprising:

[0035] The view position adjustment module is used to adjust the viewpoint position of the view in the current view layout to obtain the view state;

[0036] The resultant force determination module is used to obtain the resultant force on the view after the view position is adjusted based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the 3D model corresponding to the view, and the second attractive force between the view after the view position is adjusted and the view of the view.

[0037] The iteration module is used to obtain the target view state based on the view state when the resultant force is less than the preset value, and to obtain the target view layout of the current virtual scene based on the target view state when the iteration termination condition is met.

[0038] In addition, to achieve the above objectives, this application also provides a view layout device, including: a memory, a processor, and a view layout program stored in the memory and executable on the processor, wherein the view layout program, when executed by the processor, implements the steps of the view layout method described above.

[0039] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a view layout program thereon, which, when executed by a processor, implements the steps of the view layout method described above.

[0040] In addition, to achieve the above objectives, the present invention also provides a computer program product, the computer program product including a view layout program, which, when executed by a processor, implements the steps of the view layout method as described above.

[0041] This application provides a technical solution for a view layout method, apparatus, device, storage medium, and product. The method involves adjusting the viewpoint position of a view in the current view layout to obtain a view state. Based on the sum of the repulsive forces between the view with the adjusted viewpoint and other views in the current view layout, the first attractive force between the adjusted view and the physical reference position of the corresponding 3D model, and the second attractive force between the adjusted view and the viewpoint, the resultant force on the view with the adjusted viewpoint is obtained. When the resultant force is less than a preset value, a target view state is obtained based on the view state. Upon meeting the iteration termination condition, the target view layout of the current virtual scene is obtained based on the target view state. Since the viewpoint position of the view is continuously iterated based on the principle of simulated annealing, the aim is to minimize the resultant force on the view to balance the view's contextuality and analytical nature. Simultaneously, the repulsive forces between views reduce view occlusion, resulting in an efficient and visually-optimized view layout that enhances both contextuality and visual analysis experience, thus achieving the optimal view layout. Attached Figure Description

[0042] Figure 1This is a schematic diagram of the hardware operating environment involved in the embodiments of this application;

[0043] Figure 2 This is a flowchart illustrating the first embodiment of the view layout method of this application;

[0044] Figure 3 This is a schematic diagram of the view layout before optimization;

[0045] Figure 4 This is a schematic diagram of the optimized view layout;

[0046] Figure 5 This is a functional block diagram of the view layout device of this application.

[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings are only one embodiment and not the entirety of the invention. Detailed Implementation

[0048] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0049] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment of the view layout device involved in the embodiments of this application.

[0050] like Figure 1 As shown, the view layout device may include: a processor 1001, such as a CPU; a memory 1005; a user interface 1003; a network interface 1004; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM or a stable memory, such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0051] Those skilled in the art will understand that Figure 1 The view layout device structure shown does not constitute a limitation on the view layout device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0052] like Figure 1As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a view layout program. The operating system is a program that manages and controls the hardware and software resources of the view layout device, as well as the operation of the view layout program and other software or programs.

[0053] exist Figure 1 In the view layout device shown, the user interface 1003 is mainly used to connect to the terminal and communicate with the terminal; the network interface 1004 is mainly used to communicate with the backend server; and the processor 1001 can be used to call the view layout program stored in the memory 1005.

[0054] In this embodiment, the view layout device includes: a memory 1005, a processor 1001, and a view layout program stored in the memory and executable on the processor, wherein:

[0055] When processor 1001 calls the view layout program stored in memory 1005, it performs the following operations:

[0056] Adjust the viewpoint position of the views in the current view layout to obtain the view state;

[0057] The resultant force on the view after the view position is adjusted is obtained based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the 3D model corresponding to the view, and the second attractive force between the view after the view position is adjusted and the viewpoint of the view.

[0058] When the resultant force is less than the preset value, the target view state is obtained according to the view state, and when the iteration termination condition is met, the target view layout of the current virtual scene is obtained according to the target view state.

[0059] This invention provides a view layout method, referring to... Figure 2 , Figure 2 This is a schematic flowchart illustrating an embodiment of the view layout method of the present invention. In this embodiment, the view layout method of this application includes the following steps:

[0060] Step S110: Adjust the viewpoint position of the view in the current view layout to obtain the view state.

[0061] Immersive data visualization is a method of presenting data using virtual reality or augmented reality technologies. Through immersive data visualization, users can immerse themselves in a virtual environment, interacting and exploring the data to gain a more intuitive and direct understanding. By employing immersive data visualization technology, users can observe data from all angles and distances, helping to discover patterns and trends. Users can interact with the data through gestures, head movements, and other methods, adjusting the visualization effects in real time and exploring the information behind the data. Users can experience the scenes and contexts presented by the data as if they were actually there, enhancing their understanding and retention of the data. Users can move and explore the data freely in the virtual environment, gaining a deeper understanding of the relationships and connections between data points. Multiple users can simultaneously enter the same virtual environment to explore the data together, discuss it, and achieve collaborative analysis.

[0062] Optionally, a 3D virtual scene contains multiple 3D models, each with corresponding views. Each view contains corresponding view information, and the view layout changes accordingly when the viewpoint position changes. In real-world scenarios, objects can occlude views, making it difficult to clearly and accurately obtain the view information of occluded views. Therefore, it is necessary to adjust the view positions and optimize the current view layout to clearly and accurately display each view, thereby improving the immersive data visualization effect. Figure 3 As shown, Figure 3 The view layout of the current 3D model and its corresponding view is shown.

[0063] Optionally, this application iteratively updates the current view layout based on the principle of simulated annealing algorithm. A view is randomly selected from the current view layout, and the viewpoint position corresponding to the view is adjusted. After each viewpoint position adjustment, a new view state is obtained. This view state is used to characterize the view layout after the viewpoint position is adjusted. Different view states correspond to different view layouts.

[0064] Optionally, the viewpoint position mentioned above can be the center position of the view corresponding to the view, or any position on the view. It can be the default position or the viewpoint position after the previous iteration update.

[0065] Step S120: Based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the corresponding 3D model, and the second attractive force between the view after the view position is adjusted and the view's viewpoint, the resultant force on the view after the view position is adjusted is obtained.

[0066] After adjusting the viewpoint position of the view, the view with the adjusted viewpoint position is obtained. Based on the principle of simulated annealing, this application continuously iterates the viewpoint position of the view to minimize the resultant force on the view, thereby balancing the contextuality and analytical nature of the view. At the same time, the repulsive force between views is used to reduce the view occlusion rate, resulting in an efficient visualization view layout that can enhance the sense of context and improve the visual analysis experience, thus obtaining the optimal view layout.

[0067] Optionally, the physical reference position of the 3D model is the initial center position of the matched view. Specifically, by setting the default center position of the corresponding view, the initial value of the view is set to the physical reference position of the associated 3D model. If this is not the first iteration, then the default center position of the view here should be the center position of the view calculated in the previous iteration.

[0068] Optionally, a first product between the sum of repulsive forces and the repulsive force coefficient, a second product between the first attractive force and the first attractive force coefficient, and a third product between the second attractive force and the second attractive force coefficient are determined; the resultant force on the view after the viewpoint position is adjusted is obtained based on the sum of the first product, the second product, and the third product.

[0069] Specifically, the resultant force acting on a certain view is defined as... , , The weighted sum of the forces acting on the view is given by the following formula:

[0070] .

[0071] in: It is the sum of the repulsive forces between a certain view and other views. It is the physical reference position of a certain view and its corresponding 3D model. The first gravitational force, It is a view and its corresponding viewpoint. The second gravitational force, These are the repulsive force coefficient, the first attractive force coefficient, and the second attractive force coefficient, respectively. These coefficients can be set according to actual conditions. Three forces acting on the same view. Maintaining a fixed proportion ensures that the view achieves mechanical equilibrium under the action of various forces. These are the weights of the three forces, and this ratio is also used to calculate the weighted sum to obtain the resultant force.

[0072] Optionally, the distances between the view after the viewpoint position is adjusted and each other view in the current view layout are obtained, and the repulsion coefficient is obtained; based on the distances between the view after the viewpoint position is adjusted and each other view, and the repulsion coefficient, the repulsion between the view after the viewpoint position is adjusted and each other view is obtained; based on the repulsion between the view after the viewpoint position is adjusted and each other view, the total repulsion is obtained.

[0073] For example, the squared values ​​of the distances between the view after viewpoint position adjustment and each other view are determined, and the repulsive force between the view after viewpoint position adjustment and each other view is obtained based on the ratio of the repulsive force coefficient to the squared values ​​of the distances. The repulsive forces between the view after viewpoint position adjustment and each other view are summed to obtain the total repulsive force. Specifically, the sum of the repulsive forces between a certain view and other views is defined as denoted as . ,have ,in, It is the repulsion coefficient. This represents the distance from the current view to the i-th view.

[0074] Optionally, the distance between the view after the viewpoint position is adjusted and the physical reference position of the corresponding three-dimensional model is obtained, and a first gravity coefficient is obtained; the first gravity is obtained based on the distance between the view after the viewpoint position is adjusted and the physical reference position of the corresponding three-dimensional model, and the first gravity coefficient.

[0075] For example, the first gravitational force is obtained by multiplying the distance between the view adjusted by the viewpoint position and the physical reference position of the corresponding 3D model by a first gravitational coefficient. Specifically, the gravitational force between a view and the physical reference position of the corresponding 3D model, i.e., the first gravitational force, is defined as denoted as . ,have ,in, It is the first gravitational coefficient. This indicates the distance between the view and the physical reference position of the 3D model.

[0076] Optionally, the distance between the view after the viewpoint position is adjusted and the viewpoint of the view is obtained, and a second gravity coefficient is obtained; the second gravity is obtained based on the distance between the view after the viewpoint position is adjusted and the viewpoint of the view, and the second gravity coefficient. For example, the second gravity is obtained by multiplying the distance between the view after the viewpoint position is adjusted and the viewpoint of the view by the second gravity coefficient. Specifically, the gravity between a certain view and the viewpoint corresponding to that view is defined as the second gravity, denoted as […]. ,have ,in, It is the second gravitational coefficient. Indicates the distance between the view and the viewpoint of that view.

[0077] Step S130: When the resultant force is less than the preset value, the target view state is obtained according to the view state, and when the iteration termination condition is met, the target view layout of the current virtual scene is obtained according to the target view state.

[0078] Optionally, this application sets the number of iterations. During each iteration, the above steps are performed. In each iteration, a view is randomly selected based on the current view layout. The view state S corresponding to the current view layout is maintained, and the view position of the selected view is fine-tuned to obtain a new view state. Calculate the resultant force acting on the current view. Calculate the new view state. The resultant force acting on the view is calculated, and this resultant force is an important basis for determining whether the view is in equilibrium. If the resultant force is less than a preset value... Then accept the new view state If the resultant force is greater than or equal to the preset value Then there is a probability of accepting the view state. This probability depends on the view state. The resultant force, that is, the probability of accepting the view state is determined based on the calculated resultant force, and the decision on whether to accept the view state is based on this probability. If the view state... If accepted, the current view state is updated to the view state. Otherwise, the view state remains unchanged. It will not be updated.

[0079] Update the temperature during each iteration. The updated formula is as follows .in: It's the cooling rate of the algorithm. express The system operates at a constant temperature; as the temperature decreases, the system energy gradually diminishes, the system approaches cooling, and the iteration nears completion. When the iteration termination condition is met, the iteration layout stops, and the current state is output as the final view layout. The optimized view layout parameters are output, including the final position and orientation of each view, as well as relevant statistical information about the algorithm's operation.

[0080] Optionally, if the current updated temperature is less than a preset temperature, the target view layout of the current virtual scene is obtained according to the target view state; or, if the current cumulative iteration count reaches a preset number, the target view layout of the current virtual scene is obtained according to the target view state; and if the energy change in the current iteration process is less than a preset change value, the target view layout of the current virtual scene is obtained according to the target view state.

[0081] This embodiment, based on the above technical solution, obtains a view state by adjusting the viewpoint position of the view in the current view layout. The resultant force on the view after its viewpoint position adjustment is obtained based on the sum of the repulsive forces between the adjusted view and other views in the current view layout, the first attractive force between the adjusted view and the physical reference position of the corresponding 3D model, and the second attractive force between the adjusted view and the viewpoint of that view. When the resultant force is less than a preset value, a target view state is obtained based on the view state. Upon meeting the iteration termination condition, the target view layout of the current virtual scene is obtained based on the target view state. Since the viewpoint position of the view is continuously iterated based on the principle of simulated annealing, the aim is to minimize the resultant force on the view to balance the view's contextuality and analytical nature. Simultaneously, the repulsive forces between views reduce view occlusion, resulting in an efficient visualization view layout that enhances both contextuality and visual analysis experience, thus achieving the optimal view layout.

[0082] In another embodiment, the 3D model information of the virtual scene that needs to generate the initial view layout and the view information associated with the 3D model information of the virtual scene are collected. The 3D model information and view information are stored in the corresponding structure and summarized in the corresponding container to facilitate synchronous updates and view layout adjustments.

[0083] Specifically, this process involves loading 3D model information and corresponding view information from a 3D virtual scene. Each 3D model in the 3D virtual scene is assigned a unique identifier, which is also used to bind the 3D model to the corresponding view data. The process then accesses and analyzes the 3D model information and associated view information in the 3D virtual scene. The 3D model information includes spatial coordinates, 3D bounding box parameters, and the 3D model's identifier. The view information includes the data displayed by the view, its center position in 3D space, orientation, size, structural frame, and zoom level. The spatial coordinates, 3D bounding box parameters, and 3D model identifier information from the 3D model information in the 3D virtual scene are stored in a predefined 3D model information structure. Simultaneously, the center position coordinates, orientation, view size, structural frame, zoom level, and the corresponding 3D model identifier information from the view information are stored in a predefined view data structure. These structures optimize data retrieval and processing efficiency, facilitating view management and layout optimization. Finally, all 3D model structure instances are then collected into a container to construct and manage the entire 3D model collection in the 3D virtual scene. All view data structures are consolidated into another container to facilitate synchronized updates and view layout adjustments.

[0084] In another embodiment, obtaining the view information associated with the 3D model information in the above embodiment includes: obtaining the identification information associated with each 3D model in the current virtual scene; obtaining the view information corresponding to the view associated with each 3D model based on the identification information; and rendering the current view layout on the current display screen based on the 3D models and the view information corresponding to the views associated with each 3D model. The rendered current view layout is as follows: Figure 3 As shown.

[0085] Optionally, different 3D models have corresponding identification information, and the 3D model information and its corresponding view information are associated through the identification information. Therefore, after obtaining the 3D model information, the 3D model information is parsed to obtain the corresponding identification information, and then the corresponding view information is obtained. By parsing the view information, the viewpoint position of the corresponding view is obtained.

[0086] Optionally, this application also constructs a virtual scene hierarchy layout framework, from which the current view layout can be obtained. The virtual scene hierarchy layout framework is a spherical hierarchical structure layout centered on the view's viewpoint position, composed of concentric spheres of different radii centered on the viewpoint. A single view is located on one of these spheres, and views are placed on these spheres of different radii, thus ensuring that all view faces are directed towards the viewpoint. During the adjustment of the view's position, the normal vector of the view model automatically changes. This is due to the property that the normal vector of any tangent plane on the sphere always points to the center of the sphere, ensuring that the view's front always faces the viewpoint.

[0087] Specifically, each view is laid out on a sphere. Depending on the depth, there are n concentric spheres of varying radii centered on the view's viewpoint. The number of layers is determined using a dynamic algorithm, with n limited to a range of 1 to 4. This algorithm balances the number of views with visual clarity to ensure a good user experience. Layers are added when views are dense to distribute visual focus; layers are reduced when views are sparse to avoid unnecessary visual fragmentation.

[0088] In a 3D virtual scene, based on the minimum and maximum depths of the 3D model within the scene, n concentric spheres with different radii are placed in the scene. The radius of each sphere increases sequentially according to certain rules to adapt to different view densities and view sizes, ensuring dynamic optimization of the view and natural guidance of the user's line of sight.

[0089] In the hierarchical layout framework of the virtual scene, changing the position of a view automatically adjusts its orientation. This is determined by the characteristic that the normal of the tangent plane on the sphere points to the viewpoint, ensuring that the front of the view always faces the viewpoint. This ensures dynamic optimization of the view and natural guidance of the user's line of sight. This automatic adjustment mechanism enhances the user's immersion and interactive experience, while optimizing the readability and visual effects of the view. The position of the view in three-dimensional space can be determined solely by the distance from the viewpoint to the viewpoint and the view's orientation, improving the readability of views in the three-dimensional virtual scene and allowing users to accurately find the view corresponding to the three-dimensional model.

[0090] In another embodiment, the scaling ratio of the view arrangement on a spherical space with different radii is calculated according to the adaptive adjustment function, so that the view size is proportional to the distance of the view from the user. While maintaining the perspective effect, the distant view is appropriately magnified, and visual compensation is performed according to the view information to optimize the display layout.

[0091] Optionally, after obtaining the target view layout of the current virtual scene based on the target view state when the iteration termination condition is met, the method further includes: obtaining the distances between the views located on different spheres and the human eye; determining the scaling ratios corresponding to the views located on different spheres based on the distances; adjusting the sizes of the corresponding views located on different spheres based on the scaling ratios; and rendering the views based on the adjusted sizes and the viewpoint positions corresponding to each view in the target view layout to obtain the target virtual scene. Since the view size can be reasonably adjusted based on the distance from the view to the viewpoint, the user can clearly observe each view in the virtual environment.

[0092] The process of adjusting the size of corresponding views located on different spheres based on the scaling ratio specifically includes the following steps:

[0093] First, set the baseline for the standard view size. If all views are arranged on the near plane, then all views should be the same size, so set the baseline distance to the distance on the near plane.

[0094] Specifically, the scaling factor of the view at near-plane location is considered to be 1. For any view... And its distance from the human eye Distance adaptive scaling function It can be defined as:

[0095] .

[0096] in, It is less than A positive floating-point number used to adjust the degree of size adjustment. When At this time, it's a normal perspective effect; distant objects appear smaller in inverse proportion to the square of the distance. By selecting... This can reduce the effect, making distant objects appear larger visually, but still smaller than nearby objects, thus maintaining the sense of depth in the scene. After repeated experiments and parameter adjustments, the final setting was... .

[0097] Secondly, set the scaling range so that the size of the view satisfies the perspective relationship of near objects appearing larger and far objects appearing smaller. At the same time, limit the maximum and minimum scaling ratios to ensure that even distant views are not too small, and close views are not too large.

[0098] Specifically, by setting a maximum scaling ratio and a minimum scaling ratio Ensure that the size of the far-field view is not too small and the size of the near-field view is not too large:

[0099] .

[0100] This ensures that even in extreme cases, the view size remains within reasonable limits. Based on the near and far planes in the definition of the view frustum in 3D graphics rendering, we know that objects less than *n* in distance are subject to frustum culling. Therefore, choosing the near plane as the reference distance naturally limits the view scaling to a range less than or equal to 1. Thus, we only need to manually set the minimum scaling for more distant views to ensure that the view can still be observed and interacted with by the user at a distance. Therefore, a constant *c* is introduced here as the minimum scaling:

[0101] .

[0102] c is the value that the function expects to converge to as d approaches infinity, and empirically it can be set to 0.25. Thus, when d is very large, The partial value will approach 0, therefore f(d) will approach c. When d equals n (i.e., the observation point is on the near plane), f(d) should be 1 to ensure that the view size remains unchanged at the standard observation distance. This means:

[0103] .

[0104] Therefore at point n, regardless of Regardless of the value, the view size is always the standard size.

[0105] Finally, an adaptive adjustment function is set. This function is a distance-based function that adjusts the view size. Combining the standard view size baseline and the scaling range, an adaptive adjustment function is calculated that can adjust the view size in the entire virtual scene. This function can make the view size scaled proportionally to the distance between the view and the user, and can moderately magnify distant views while maintaining the perspective effect.

[0106] Specifically, we consider fitting the current occlusion function to preserve the characteristics of the original function as much as possible when d is small, while ensuring the scaling ratio tends to c as d increases. Therefore, we adjusted the function so that c has a smaller impact on the result when d is small, while the influence of c gradually becomes apparent as d increases. This can be achieved by adding a weight function related to d, which is close to 0 when d is small and close to 1 when d is large. For this purpose, a sigmoid-based weight function was added to adjust the weight of the function with respect to c:

[0107] .

[0108] k is a parameter that controls the steepness of the function. This is the distance value at which the weight function begins to change significantly. The overall function after adding the weight function becomes:

[0109] .

[0110] in:

[0111] d is the distance between the view and the human eye.

[0112] It is the near-plane distance, which is usually the standard viewing distance at which a view does not require resizing.

[0113] It is an exponent less than 1, used to adjust the degree of magnitude adjustment. During operation, Take 0.5.

[0114] c is the constant value that the view resizing function should tend to when d is large. During operation, c is set to 0.25.

[0115] `k` is a parameter that controls the slope of the Sigmoid function, i.e., how steep the function curve is, and determines the rate of change of the function. The choice of `k` depends on the desired speed of this transition. If `k` is large: the transition of the Sigmoid function will be very fast, and the shape of the function will be steeper. This means that `w(d)` will... The rapid increase in near-zero value to near-1 is useful for dividing sharp regions into two areas. If k is small: the transition will be smoother and slower, making w(d) gradual over a wider range of d. As a rule of thumb: if you want to... If w(d) changes significantly within a certain range (from near 0 to near 1), then k can be set to a larger value, which will make w(d) more likely to change within a certain range. The value of w(d) in the vicinity increases rapidly. k is set to 10 based on experience.

[0116] The center point of the sigmoid function, i.e., the point where the curve transitions from near 0 to near 1, determines the distance at which the weight function begins to change significantly. If we want to minimize d (e.g., ...), arrive If the original function's calculation result is preserved, then... It can be set outside this range. This can be designed based on 'c'. Therefore, according to calculate, .

[0117] To make the fitted curve of the function approach the original function when d is small. This allows for better preservation of perspective, while approaching a constant c when d is large, thus better ensuring the viewability and interactivity of distant views. We aim for w(d) to be close to 0 when d is small and close to 1 when d is large.

[0118] By adjusting k and We can finely control the view resizing behavior to ensure the best user experience at different viewing distances. Within a small range of d, w(d) should be close to 0, so that view resizing is primarily determined by perspective. The control is such that when d is large, w(d) approaches 1, and the size adjustment tends to a constant value c. This ensures that the view will not be too small even at extremely long distances, guaranteeing the feasibility of observation. After setting all the parameters, the final formula is:

[0119] .

[0120] Optionally, after completing the above view size adjustment, based on the adjusted view position and zoom level, the position and size of the view bound to each 3D model in the 3D scene are adjusted to render a complete view and scene. By rendering the view into the scene, the content in the view corresponds to the matching 3D model information, thus obtaining the visualization effect of this round of 3D virtual scene.

[0121] Optionally, in practical applications, the viewpoint position and line of sight are not static. To adapt to changes in viewpoint position and line of sight, the program will continuously execute the above steps in a loop, using the view position calculated in the previous round as the starting coordinates for the next round of calculations.

[0122] like Figure 4 As shown, the view layout method described above ensures that the view's front side always faces the user, allowing the user to clearly and accurately observe each view in the virtual environment and avoiding occlusion of views by objects in the virtual scene. This achieves automatic view arrangement in a 3D virtual scene, thereby improving view readability and enabling users to quickly find the view corresponding to the 3D model.

[0123] This application provides an embodiment of a view layout method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0124] like Figure 5 As shown, this application provides a view layout device, comprising:

[0125] The view position adjustment module 10 is used to adjust the viewpoint position of the view in the current view layout to obtain the view state.

[0126] The resultant force determination module 20 is used to obtain the resultant force on the view after the view position is adjusted based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the 3D model corresponding to the view, and the second attractive force between the view after the view position is adjusted and the viewpoint of the view.

[0127] The iteration module 30 is used to obtain the target view state according to the view state when the resultant force is less than the preset value, and to obtain the target view layout of the current virtual scene according to the target view state when the iteration termination condition is met.

[0128] The specific implementation of the view layout device in this application is basically the same as the various embodiments of the view layout method described above, and will not be repeated here.

[0129] Furthermore, embodiments of the present invention also propose a storage medium storing a view layout program, which, when executed by a processor, implements the steps of the view layout method described above.

[0130] Furthermore, embodiments of the present invention also propose a computer program product, including a view layout program, which, when executed by a processor, implements the steps of the view layout method as described above.

[0131] The specific implementation of the computer program product of the present invention is basically the same as the various embodiments of the view layout method described above, and will not be repeated here.

[0132] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0133] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, television, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0135] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A view layout method, characterized in that, The view layout method includes: Obtain the identification information associated with each 3D model in the current virtual scene; The views associated with each 3D model are obtained based on the identification information; The current view layout is obtained by rendering the various 3D models and the views associated with them in the current display screen. Adjust the viewpoint position of the views in the current view layout to obtain the view state; The resultant force on the view after the view position is adjusted is obtained based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the 3D model corresponding to the view, and the second attractive force between the view after the view position is adjusted and the viewpoint of the view. When the combined force is less than a preset value, the target view state is obtained according to the view state, and when the iteration termination condition is met, the target view layout of the current virtual scene is obtained according to the target view state. The iteration termination condition includes: the current update temperature is less than the preset temperature.

2. The view layout method as described in claim 1, characterized in that, Before the step of obtaining the resultant force on the view after the view position is adjusted based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the corresponding 3D model, and the second attractive force between the view after the view position is adjusted and the view's viewpoint, the method further includes: Get the distances between the view after the viewpoint position is adjusted and all other views in the current view layout, and get the repulsion coefficient; Based on the distance between the view after the viewpoint position is adjusted and each other view, and the repulsion coefficient, the repulsion force between the view after the viewpoint position is adjusted and each other view is obtained; The total repulsive force is obtained based on the repulsive force between the view adjusted by the viewpoint position and each other view. Obtain the distance between the view after the viewpoint position is adjusted and the physical reference position of the corresponding 3D model, and obtain the first gravity coefficient; The first gravitational force is obtained based on the distance between the view adjusted by the viewpoint position and the physical reference position of the corresponding three-dimensional model, and the first gravitational force coefficient. Obtain the distance between the view after the viewpoint position is adjusted and the viewpoint of the view, and obtain the second gravity coefficient; The second gravitational force is obtained based on the distance between the view adjusted by the viewpoint position and the viewpoint of the view, and the second gravitational coefficient.

3. The view layout method as described in claim 2, characterized in that, The step of obtaining the resultant force on the view after the view position is adjusted, based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the corresponding 3D model, and the second attractive force between the view after the view position is adjusted and the view's viewpoint, includes: Determine the first product between the sum of the repulsive forces and the repulsive force coefficient, the second product between the first attractive force and the first attractive force coefficient, and the third product between the second attractive force and the second attractive force coefficient; The resultant force on the view after the viewpoint position is adjusted is obtained by summing the first product, the second product, and the third product.

4. The view layout method as described in claim 1, characterized in that, The iteration termination condition also includes: The current cumulative number of iterations has reached the preset number; Alternatively, the energy change in the current iteration is less than the preset change value.

5. The view layout method as described in claim 1, characterized in that, After the step of obtaining the target view layout of the current virtual scene based on the target view state when the iteration termination condition is met, the method further includes: Obtain the distances from the human eye to views located on different spheres, where each view is located on a different sphere. The scaling ratio corresponding to each view located on different spheres is determined based on the distance. The dimensions of the corresponding views located on different spheres are adjusted based on the scaling ratio; The target virtual scene is obtained by rendering based on the resized view and the viewpoint positions corresponding to each view in the target view layout.

6. A view layout device, characterized in that, The view layout device includes: The view position adjustment module is used to obtain the identification information associated with each 3D model in the current virtual scene; obtain the view associated with each 3D model based on the identification information; render the current view layout based on the 3D model and the view associated with each 3D model in the current display screen; and adjust the viewpoint position of the view in the current view layout to obtain the view state. The resultant force determination module is used to obtain the resultant force on the view after the view position is adjusted based on the sum of the repulsive forces between the view after the view position is adjusted and other views in the current view layout, the first attractive force between the view after the view position is adjusted and the physical reference position of the 3D model corresponding to the view, and the second attractive force between the view after the view position is adjusted and the view of the view. An iteration module is used to obtain a target view state based on the view state when the resultant force is less than a preset value, and to obtain the target view layout of the current virtual scene based on the target view state when the iteration termination condition is met. The iteration termination condition includes: the current update temperature is less than a preset temperature.

7. A view layout device, characterized in that, The view layout device includes: a memory, a processor, and a view layout program stored in the memory and running on the processor, wherein the view layout program, when executed by the processor, implements the steps of the view layout method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a view layout program, which, when executed by a processor, implements the steps of the view layout method according to any one of claims 1-5.

9. A computer program product, characterized in that, The computer program product includes a view layout program, which, when executed by a processor, implements the steps of the view layout method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Force-directed adaptive graph layout method and system

    CN106780072A

  • Data visualization method and device and storage medium

    CN112632196A