Three-dimensional interaction control processing method and device, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN ANYCUBIC TECH CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional 3D interactive controls are unstable in size when the viewpoint changes, affecting the user's visual experience and interactive operation, and are difficult to adapt to different resolution devices and achieve real-time rendering.
By acquiring information about changes in display viewing angle, calculating target rendering compensation parameters, dynamically adjusting the display size of controls to maintain constancy, and employing multi-resolution adaptive rendering and dual-channel rendering mechanisms, the adaptability of controls to changes in viewing angle and resolution is ensured.
It achieves stability in the display size of 3D interactive controls when the viewpoint changes, improves the real-time performance and cross-resolution compatibility of the interactive system, and reduces GPU load and development costs.
Smart Images

Figure CN122044720A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data display, and includes, but is not limited to, a three-dimensional interactive control processing method, apparatus, device, and storage medium. Background Technology
[0002] With the rapid development of virtual reality (VR), augmented reality (AR), industrial simulation, and 3D modeling, 3D interactive systems have become an important medium for human-computer interaction. In 3D scenes, users often manipulate and control virtual objects through interactive controls (such as buttons, sliders, and menus). However, traditional 3D interactive control rendering and display methods still face significant technical bottlenecks in terms of multi-resolution device support, dynamic viewpoint changes, and real-time interaction. Especially when users change their viewpoint by rotating, scaling, or panning the camera, the visual size of the controls on the screen changes significantly, affecting the user's visual experience and interactive operation. Summary of the Invention
[0003] In view of this, the three-dimensional interactive control processing method, apparatus, device, and storage medium provided in the embodiments of this application realize that the display size of the three-dimensional interactive control is not affected by the change in the display viewing angle.
[0004] The three-dimensional interactive control processing method, apparatus, device, and storage medium provided in this application embodiment are implemented as follows: One aspect of this application provides a method for processing three-dimensional interactive controls, the method comprising: In response to an operation that triggers a change in the display view of the target control, obtain information about the change in display view. The target rendering compensation parameters are determined based on the change information. The target rendering compensation parameters are used to compensate the display size of the target control after the display view changes so that the display size of the target control remains constant before and after the display view changes. The target display page after the viewpoint change is determined and displayed based on the target rendering compensation parameters.
[0005] In one possible implementation, the change information includes camera position information, and the target rendering compensation parameters are determined based on the change information, including: Based on the camera position information and the position information of the target control after the change of the display viewing angle, determine the target distance between the camera and the target control; The target rendering compensation parameters are determined based on the target distance, and the target rendering compensation parameters are positively correlated with the target distance.
[0006] In one possible implementation, the target rendering compensation parameters are determined based on the target distance, including: Based on target distance and viewpoint information, target rendering compensation parameters are determined, wherein viewpoint information and target rendering compensation parameters are negatively correlated; and / or Based on the mapping relationship between distance and rendering compensation parameters, determine the target rendering compensation parameters corresponding to the target distance.
[0007] In one possible implementation, the target rendering compensation parameters are determined based on the target distance, including: According to the formula The target rendering compensation parameters are calculated, where, Render compensation parameters for the target, where d is the target distance. This is information from a perspective.
[0008] In one possible implementation, the target display page after the change in the display viewpoint of the target control is determined and displayed based on the target rendering compensation parameters, including: Get the first rendered size of the target control after the display view changes; The first rendering size is compensated based on the target rendering compensation parameters to obtain the target rendering size; Render the target control according to the target rendering size to obtain the target display page including the target control; Display the target page.
[0009] In one possible implementation, the method also includes: The target rendering size is compensated and rendered according to the screen compensation parameters corresponding to the display device of the displayed target control, resulting in a target display page including the target control; and / or Obtain the first rendering size of the target control after the display view changes, including: Obtain the view projection matrix and viewport transformation matrix after the display perspective changes, and calculate the first rendering size of the target control based on the view projection matrix and viewport transformation matrix.
[0010] In one possible implementation, the target display page also includes a target model, and a target control is used to control the target model. The target display page after the viewing angle change is determined based on the target rendering compensation parameters, including: The target model is rendered within the target display page after the display view changes using the first rendering thread; The second rendering thread renders the target control within the target display page after the viewpoint changes, based on the target rendering compensation parameters.
[0011] Another aspect of the embodiments of this application provides a three-dimensional interactive control processing device, the device comprising: The parameter acquisition module is used to acquire information about the change in display view in response to an operation that triggers a change in the display view of the target control. This information is used to characterize the amount of change in the display view. The compensation parameter determination module is used to determine the target rendering compensation parameters based on the change information. The target rendering compensation parameters are used to compensate the display size of the target control after the display view changes so that the display size of the target control is constant before and after the display view changes. The page display module is used to determine and display the target display page after the target control's display perspective changes based on the target rendering compensation parameters.
[0012] In one possible implementation, the change information includes camera position information, and the compensation parameter determination module is further used for: Based on the camera position information and the position information of the target control after the change of the display viewing angle, determine the target distance between the camera and the target control; The target rendering compensation parameters are determined based on the target distance, and the target rendering compensation parameters are positively correlated with the target distance.
[0013] In one possible implementation, the compensation parameter determination module is further used for: Based on target distance and viewpoint information, target rendering compensation parameters are determined, wherein viewpoint information and target rendering compensation parameters are negatively correlated; and / or Based on the mapping relationship between distance and rendering compensation parameters, determine the target rendering compensation parameters corresponding to the target distance.
[0014] In one possible implementation, the compensation parameter determination module is further used for: According to the formula The target rendering compensation parameters are calculated, where, Render compensation parameters for the target, where d is the target distance. This provides perspective information. In one possible implementation, the page display module is further used for: Get the first rendered size of the target control after the display view changes; The first rendering size is compensated based on the target rendering compensation parameters to obtain the target rendering size; Render the target control according to the target rendering size to obtain the target display page including the target control; Display the target page.
[0015] In one possible implementation, the device further includes: The compensation rendering module is used to compensate the target rendering size according to the screen compensation parameters corresponding to the display device of the target control, so as to obtain the target display page including the target control; and / or The page display module is further used for: Obtain the view projection matrix and viewport transformation matrix after the display perspective changes, and calculate the first rendering size of the target control based on the view projection matrix and viewport transformation matrix.
[0016] In one possible implementation, the target display page also includes a target model, target controls for controlling the target model, and a page display module for further: The target model is rendered within the target display page after the display view changes using the first rendering thread; The second rendering thread renders the target control within the target display page after the viewpoint changes, based on the target rendering compensation parameters.
[0017] The electronic device provided in this application includes a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the method described in this application.
[0018] The computer-readable storage medium provided in this application embodiment stores a computer program thereon, which, when executed by a processor, implements the method provided in this application embodiment.
[0019] In some embodiments, information about the change in display view is acquired in response to an operation that triggers a change in the display view of the target control. Target rendering compensation parameters are determined based on the change information. These parameters are used to compensate for the display size of the target control after the change in display view, ensuring that the display size of the target control remains constant before and after the change in display view. The target display page after the change in display view of the target control is determined based on the target rendering compensation parameters and then displayed. In this embodiment, when the display view changes, the display size of the target control is compensated according to the change in display view before displaying, ensuring that the display size of the target control is not affected by the change in view view and optimizing the display effect of the interactive control. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart illustrating a three-dimensional interactive control processing method according to an embodiment of this application is shown; Figure 2 This diagram illustrates a method for determining a target display page according to an embodiment of this application. Figure 3This diagram illustrates another method for determining a target display page according to an embodiment of this application. Figure 4 This diagram illustrates a three-dimensional interactive control processing system according to an embodiment of the present application. Figure 5 This diagram illustrates a three-dimensional interactive control processing device according to an embodiment of the present application; Figure 6 A schematic diagram of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0024] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0025] It should be noted that the terms "first, second, third" used in the embodiments of this application are used to distinguish similar or different objects and do not represent a specific order of objects. It can be understood that "first, second, third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0026] The 3D interactive control processing method of this application embodiment can be executed by any electronic device, including but not limited to mobile phones, wearable devices (such as smartwatches, smart bracelets, smart glasses, etc.), tablet computers, laptops, in-vehicle terminals, PCs (Personal Computers), 3D printing equipment, etc. The functions implemented by this method can be achieved by the processor in the electronic device calling program code. Of course, the program code can be stored in a computer storage medium. Therefore, the electronic device includes at least a processor and a storage medium.
[0027] The 3D interactive control processing method of this application can be used in any application scenario that requires changing the perspective of the 3D interactive control. For example, this application embodiment can be applied to application scenarios where users interact with virtual objects through a 3D interface in VR / AR headsets or mobile AR applications. Alternatively, it can also be applied to application scenarios where engineers operate 3D model parameter controls in CAD (Computer-Aided Design), CAE (Computer-Aided Engineering), and digital twin platforms.
[0028] When rendering 3D interactive controls in the aforementioned application scenarios, the interactive controls are typically treated as geometric objects within the scene. The display size of the interactive controls on the screen depends on camera parameters (such as viewpoint and distance) and projection transformations. When the user changes the viewpoint by rotating, scaling, or panning the camera, the visual size of the controls on the screen changes significantly. When the camera moves away from the controls, they appear too small, making it difficult for the user to accurately identify and click them. When the camera moves closer to the controls, they become excessively enlarged, potentially obscuring key model areas in the scene and affecting user observation and operation.
[0029] Meanwhile, current 3D interactive systems typically employ fixed-resolution rendering strategies (such as designs based on 4K resolution). When faced with display devices of different resolutions (such as 1K, 2K, 4K, 8K, etc.), visual defects such as jagged edges and blurriness often appear on low-resolution devices. On high-resolution devices, there are issues of wasted rendering resources and excessive GPU load. Furthermore, to adapt to different resolutions, developers usually need to design separate rendering pipelines or UI resources for each device, resulting in high development costs, high system complexity, and difficulty in achieving dynamic adaptive cross-resolution rendering.
[0030] Furthermore, during dynamic perspective switching or rapid interactive operations, because the rendering updates of controls are not synchronized with camera movement in real time, the rendering of related technologies can result in a lag in control display compared to user actions. For example, untimely updates to control position and size affect the user's ability to locate and operate the controls. In scenarios with rapid perspective switching, the latency issue is particularly pronounced, severely restricting the real-time performance and smoothness of 3D interactive systems.
[0031] Therefore, the technical problems solved by the embodiments of this application are how to ensure that the display size of the three-dimensional interactive control is not affected when the angle is switched, how to adapt to the device resolution display, and how to ensure the real-time performance of the rendering and display process.
[0032] The following describes in detail the three-dimensional interactive control processing scheme of the present application embodiments with reference to the accompanying drawings.
[0033] Figure 1 A flowchart illustrating a three-dimensional interactive control processing method according to an embodiment of this application is shown. Figure 1 As shown, the three-dimensional interactive control processing method of this application embodiment may include the following steps S10-S30.
[0034] For ease of description, the three-dimensional interactive control processing method of this application embodiment is described using an electronic device as the execution subject. It should be understood that the execution subject of this application embodiment can also be a processor or chip in an electronic device, and this application embodiment does not impose any limitations.
[0035] Step S10: In response to the operation that triggers a change in the display view of the target control, obtain the change information of the display view.
[0036] The target control can be any interactive control in three-dimensional space (this application does not limit the interactive control to only one), and the interactive control is used to provide the basis for fine-tuning the three-dimensional model in three-dimensional space.
[0037] The display perspective refers to the user's observation perspective during the interaction process. For example, when a user observes an object in three-dimensional space based on a display screen, the display perspective can be understood as the display page of the display screen, that is, the camera perspective when the virtual camera captures the target control in three-dimensional space. On the other hand, if a user observes an object in three-dimensional space based on a VR / AR headset, the display screen of the VR / AR headset is the observation perspective. It is understood that the object to be observed includes, but is not limited to, target controls and three-dimensional models.
[0038] The change information may include the amount of change in the display viewpoint, or it may be camera information, control position, etc., after the change in display viewpoint. For example, the change information may be the movement or scaling parameters that trigger the operation to change the display viewpoint of the target control, or it may be the camera matrix parameters after the viewpoint change, which are further calculated based on the movement or scaling parameters. These camera matrix parameters may include the view projection matrix and the viewport transformation matrix. Furthermore, the change information may also include the camera position information after the change in display viewpoint, which represents the camera's position in the world coordinate system after the viewpoint change.
[0039] It is understandable that the operation that triggers the change in the display view of the target control includes, but is not limited to, operations triggered by the mouse, button, keyboard, or touch operations on the display screen (which can be touched).
[0040] For example, in one embodiment of this application, the three-dimensional space includes a target model to be observed. Users can observe the target model based on an interactive screen and control the target model in the three-dimensional space to achieve changes such as rotation, scaling, and movement using a mouse. Different interactive controls correspond to rotation, scaling, and movement in the three-dimensional space. For example, when the current interactive scenario is a scenario of controlling the scaling of the target model, the three-dimensional space includes the target model and a target control for controlling the scaling of the target model. The target control may further include a scaling sub-control for controlling scaling in the XYZ dimensions. Users operate the target control with the mouse to control the scaling of the target model. When the mouse triggers scaling, the display perspective of the target control and the target model changes. At this time, it is necessary to obtain the information of the change in display perspective in order to render the display page after the change in display perspective based on the display information.
[0041] In one possible implementation, the electronic device can display a target display page, including target controls, via a display device. The target display page may further include a target model. The target controls are 3D controls, and the target model is also a 3D model. Both the target model and the target controls reside in a 3D world coordinate system. The target controls are used to control the target model, and control methods may include editing controls such as zooming in, zooming out, adding, and deleting, or translation and rotation controls of the target model. Optionally, the electronic device captures the 3D coordinate points of the target model and target controls using a virtual camera in the world coordinate system, and maps these 3D coordinate points to the pixel coordinates of the display page using a view projection matrix and a viewport transformation matrix, resulting in the target display page being displayed on the display device.
[0042] In some embodiments, a user can trigger a change in the display view of the target control through human-computer interaction methods such as moving the mouse or controlling the keyboard. Alternatively, the electronic device can also trigger a change in the display view of the target control when a preset view change condition is triggered, or when it receives a view change command from another device. When the change in the display view of the target control is triggered, the electronic device acquires information about the change in display view.
[0043] Step S20: Determine the target rendering compensation parameters based on the change information.
[0044] It is understandable that the target rendering compensation parameters can be determined based on the change information through methods such as mapping and large models. For example: In one implementation, the target rendering compensation parameters corresponding to the change information are determined according to a preset mapping relationship. It is understood that the preset mapping relationship can be a function, a mapping table, etc. The preset mapping relationship can be obtained by analyzing multiple sets of data and constructing the mapping relationship. Each set of data includes a change information and the rendering compensation parameters corresponding to the change information.
[0045] In another implementation, the target rendering compensation parameters corresponding to the change information can also be determined according to a pre-trained preset model. That is, the change information is used as input to the preset model, and the target rendering compensation parameters corresponding to the change information are output. It is understood that the preset model is also trained through multiple sets of data. Similarly, each set of data includes a change information and the rendering compensation parameters corresponding to the change information.
[0046] In one possible implementation, the visual size of the target control on the screen changes significantly when the user changes the display viewpoint by rotating, scaling, or panning the camera. For example, when the camera moves away from the control, it appears too small, making it difficult for the user to accurately identify and click. When the camera moves closer to the control, it becomes excessively enlarged, potentially obscuring key model areas in the scene and affecting user observation and operation. Therefore, when the electronic device needs to control changes in the camera's display viewpoint, it can acquire information about these changes and determine target rendering compensation parameters for dynamic compensation. These parameters are used to compensate for the display size of the target control after the viewpoint change, ensuring that the display size of the target control remains constant before and after the viewpoint change.
[0047] In some embodiments, when the change information includes camera position information, the electronic device can first determine the target distance between the camera and the target control based on the camera position information and the position information of the target control after the change in display viewing angle. Then, a target rendering compensation parameter is determined based on the target distance, wherein the target rendering compensation parameter is positively correlated with the target distance. That is, the larger the target distance, the larger the calculated target rendering compensation parameter; the smaller the target distance, the smaller the calculated target rendering compensation parameter. The position information of the target control may or may not change before and after the change in display viewing angle. For example, when the viewing angle change method is zooming, the position of the target control may not change. When the viewing angle change method is panning, the position of the target control may change.
[0048] Optionally, the target rendering compensation parameters in the embodiments of this application can be based on the formula The calculation yielded that, Render compensation parameters for the target. This refers to viewpoint information. This viewpoint information can be determined by acquiring the camera's viewpoint information after the display viewpoint changes.
[0049] It is understood that in some embodiments of this application, the viewpoint information may be a field of view, a field of view in radians, or other information that may represent the field of view. The above embodiments of this application use a field of view in radians, but this does not limit it to actual viewpoint information.
[0050] Based on the above formula, it can be seen that, under the condition that the viewpoint information is constant, the target rendering compensation parameter in this embodiment is only related to the target distance d. In this case, the electronic device can determine that the viewpoint compensation factor is a constant value, and determine the target rendering compensation parameter corresponding to the target distance according to the mapping relationship between distance and rendering compensation parameter, wherein the mapping relationship includes the viewpoint compensation factor corresponding to the viewpoint information.
[0051] In other embodiments, the viewpoint information can also be a dynamically changing value, for example, it can change according to changes in independent variables such as focal length. In this case, the electronic device can determine the target rendering compensation parameters based on the target distance and the viewpoint compensation factor corresponding to the viewpoint information, wherein the viewpoint information and the viewpoint compensation factor are negatively correlated.
[0052] Optionally, in this embodiment of the application, the electronic device can calculate the field of view of the camera by obtaining the screen height H of the electronic device's display device and the camera's focal length. This is to determine the camera's perspective information.
[0053] Step S30: Determine and display the target display page after the target control's display perspective changes based on the target rendering compensation parameters.
[0054] In one possible implementation, after calculating the target rendering compensation parameters, the electronic device performs parameter compensation on the display size of the target control after the display view changes, so as to obtain a target control whose display size after compensation is the same as the display size before the display view changes, and then determines and displays the target display page including the target control after the display view changes.
[0055] In some embodiments, the process by which an electronic device determines a target display page based on target rendering compensation parameters may include: obtaining a first rendering size corresponding to a change in the display viewing angle of the target control; compensating the first rendering size according to the target rendering compensation parameters to obtain a target rendering size; rendering the target control according to the target rendering size to obtain a target display page including the target control, and displaying the target display page.
[0056] Optionally, in this embodiment, the first rendering size corresponding to the target control can be calculated using the view projection matrix and viewport transformation matrix of the camera after the display viewing angle changes. Specifically, the electronic device can first obtain the view projection matrix and viewport transformation matrix after the display viewing angle changes, as well as the local coordinates of the target control in the world coordinate system, and then perform transformation calculations on the local coordinates based on the view projection matrix and viewport transformation matrix to obtain the first rendering size of the target control.
[0057] For example, for the local coordinates (xl, yl, zl) of the triangular facet of the target control in the world coordinate system, the electronic device can first determine the coordinates based on the view projection matrix M after the display viewing angle change, using the formula... The normalized device coordinates N(xn, yn, zn) are calculated. Then, the formula is calculated based on the viewport transformation matrix V. This is done to transform the normalized device coordinates N to the screen coordinate system via viewport transformation. In the screen coordinate system... and These are respectively used as the width and height in the first rendering size of the target control.
[0058] Furthermore, after determining the first rendering size, the electronic device can adjust the width of the first rendering size using the target rendering compensation parameter scalefactor. and high Compensation is performed to obtain the width of the target rendering size. and high After obtaining the target rendering size, the electronic device can render the target control according to the target rendering size to obtain the target display page including the target control, and then display the target display page.
[0059] Figure 2 This diagram illustrates a method for determining a target display page according to an embodiment of this application. Figure 2 As shown, when an electronic device detects an operation that triggers a change in the display view of a target control, the change information of the viewpoint, as well as the view projection matrix and viewport transformation matrix after the viewpoint change, can be determined. Further, target rendering compensation parameters are determined based on the change information, and the first rendering size of the target control is calculated based on the view projection matrix and viewport transformation matrix. Then, the first rendering size is compensated according to the target rendering compensation parameters to obtain a target rendering size that is consistent with the display size before and after the viewpoint change. The target control is then rendered according to the target rendering size to obtain the target display page including the target control.
[0060] In other embodiments, to further adapt to display devices with different resolutions and avoid pixel distortion and performance waste in fixed-resolution rendering, the embodiments of this application can further compensate and adjust the target rendering size according to the resolution of the display device after determining the target rendering size. Optionally, this compensation method can be to compensate the target rendering size according to the screen compensation parameters corresponding to the display device of the displayed target control, so as to obtain a target display page including the target control.
[0061] Optionally, in this embodiment, the screen compensation parameters corresponding to the display device can be calculated based on the resolution of the display device. For example, for a resolution of... For display devices, electronic devices can calculate a resolution scaling matrix (scalematrix) as a screen compensation parameter based on a preset reference resolution (e.g., 1920×1080). The formula for calculating this resolution scaling matrix is:
[0062] This matrix is used to adapt the rendering results at the base resolution to the display device resolution.
[0063] After calculating the screen compensation parameters, the electronic device can adjust the display device resolution accordingly. The target rendering size of the target control is dynamically compensated to avoid pixel distortion and performance waste caused by fixed-resolution rendering. The calculation formula for this dynamic compensation process can be... The compensation rendering result, 'result,' is the final transformation matrix, used to transform the coordinates, size, and other data of graphic elements so that the elements can be adapted to the current rendering environment (such as screens of different resolutions or viewports of different sizes). In other words, after determining the transformation matrix, the electronic device can render the target control based on the transformation matrix to obtain the target display page including the target control.
[0064] Figure 3 This diagram illustrates another method for determining a target display page according to an embodiment of this application. Figure 3 As shown, when an electronic device detects an operation that triggers a change in the display view of a target control, it can determine the change information of the view, as well as the view projection matrix and viewport transformation matrix after the view change. Further, based on the change information, target rendering compensation parameters are determined, and the first rendering size of the target control is calculated based on the view projection matrix and viewport transformation matrix. Then, the first rendering size is compensated according to the target rendering compensation parameters to obtain a target rendering size that is consistent with the display size before and after the view change. The electronic device then determines screen compensation parameters based on the resolution of the display device, and performs compensated rendering on the target control based on the screen compensation parameters and the target rendering size to obtain the target display page including the target control.
[0065] In some embodiments, to avoid rendering delays and improve rendering efficiency, this application embodiment can determine the target display page by rendering the target model and target controls in parallel via dual channels. Optionally, the electronic device can render the target model within the target display page after the display view changes using a first rendering thread. A second rendering thread can render the target controls within the target display page after the display view changes, based on target rendering compensation parameters. The first rendering thread can use a standard rendering pipeline to process the target model data, including geometric transformations, lighting calculations, texture mapping, and other processes. The second rendering thread can render the target controls using the target rendering parameters calculated in this application embodiment, independently handling target control rendering. Asynchronous parallel computation with the first rendering thread is achieved through a command buffer, realizing asynchronous parallel processing of dual channels and reducing rendering pipeline congestion.
[0066] Figure 4 A schematic diagram of a three-dimensional interactive control processing system according to an embodiment of this application is shown. Figure 4 As shown in the embodiments of this application, the electronic device can modularize the execution algorithm of the three-dimensional interactive control processing method, namely, the camera parameter capture module, the dynamic scaling calculation module, and the resolution adaptation module.
[0067] The camera parameter capture module can acquire information such as changes in viewing angle and camera parameters after the viewing angle changes. The dynamic scaling calculation module is used to compensate for the display size of the control after the viewing angle changes. The resolution adaptation module is used to perform display compensation based on the resolution of the display device. Furthermore, in this embodiment, each module can also synchronously perform rendering parameter compensation on the target module, and render and display the target module and target control through two different rendering threads, the first rendering thread and the second rendering thread, respectively.
[0068] Based on the aforementioned technical features, this application's embodiments achieve a constant physical size of 3D interactive controls as the camera's viewpoint changes through a dynamic viewport scaling algorithm, a multi-resolution adaptive rendering engine, and a double-buffered asynchronous rendering mechanism. Simultaneously, adaptive rendering on multiple resolution devices significantly reduces GPU load and effectively improves real-time interactive response, providing a stable, efficient, and highly compatible 3D interactive solution for scenarios such as virtual reality and industrial simulation.
[0069] It should be understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0070] Based on the foregoing embodiments, this application provides a three-dimensional interactive control processing device, which includes various modules and units included in each module, and can be implemented by a processor; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA), etc.
[0071] Figure 5 A schematic diagram of a three-dimensional interactive control processing device according to an embodiment of this application is shown. Figure 5 As shown, the three-dimensional interactive control processing device in this embodiment of the application includes: The parameter acquisition module 50 is used to acquire information about the change in display view in response to an operation that triggers a change in the display view of the target control. The change information is used to characterize the amount of change in display view. The compensation parameter determination module 51 is used to determine the target rendering compensation parameter based on the change information. The target rendering compensation parameter is used to compensate the display size of the target control after the change of the display view so that the display size of the target control is constant before and after the change of the display view. The page display module 52 is used to determine and display the target display page after the target control's display perspective changes based on the target rendering compensation parameters.
[0072] In one possible implementation, the change information includes camera position information, and the compensation parameter determination module 51 is further used for: Based on the camera position information and the position information of the target control after the change of the display viewing angle, determine the target distance between the camera and the target control; The target rendering compensation parameters are determined based on the target distance, and the target rendering compensation parameters are positively correlated with the target distance.
[0073] In one possible implementation, the compensation parameter determination module 51 is further used for: Based on target distance and viewpoint information, target rendering compensation parameters are determined, wherein viewpoint information and target rendering compensation parameters are negatively correlated; and / or Based on the mapping relationship between distance and rendering compensation parameters, determine the target rendering compensation parameters corresponding to the target distance.
[0074] In one possible implementation, the compensation parameter determination module 51 is further used for: According to the formula The target rendering compensation parameters are calculated, where, Render compensation parameters for the target, where d is the target distance. This provides perspective information. In one possible implementation, the page display module 52 is further used for: Get the first rendered size of the target control after the display view changes; The first rendering size is compensated based on the target rendering compensation parameters to obtain the target rendering size; Render the target control according to the target rendering size to obtain the target display page including the target control; Display the target page.
[0075] In one possible implementation, the device further includes: The compensation rendering module is used to compensate the target rendering size according to the screen compensation parameters corresponding to the display device of the target control, so as to obtain the target display page including the target control; and / or Page display module 52 is further used for: Obtain the view projection matrix and viewport transformation matrix after the display perspective changes, and calculate the first rendering size of the target control based on the view projection matrix and viewport transformation matrix.
[0076] In one possible implementation, the target display page also includes a target model, a target control for controlling the target model, and the page display module 52, further used for: The target model is rendered within the target display page after the display view changes using the first rendering thread; The second rendering thread renders the target control within the target display page after the viewpoint changes, based on the target rendering compensation parameters.
[0077] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0078] It should be noted that, in the embodiments of this application... Figure 5The module division of the 3D interactive control processing device shown is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or have two or more units integrated into one unit. The integrated units can be implemented in hardware, as software functional units, or a combination of software and hardware.
[0079] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0080] Figure 6 A schematic diagram of an electronic device according to an embodiment of this application is shown. For example... Figure 6 As shown in the figure, this application provides an electronic device, which can be a server, and its internal structure diagram can be as follows. Figure 6 As shown, the electronic device includes a processor 620, a memory, and a transceiver 640 connected via a system bus 610. The processor 620 provides computing and control capabilities. The memory includes a non-volatile storage medium 631 and internal memory 632. The non-volatile storage medium 631 stores an operating system, computer programs, and a database. The internal memory 632 provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium 631. The database stores data. The transceiver 640 communicates with external terminals via a network connection. The computer program, when executed by the processor 620, implements the methods described above.
[0081] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor 620, implements the steps of the method provided in the above embodiments.
[0082] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the method provided in the above-described method embodiments.
[0083] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0084] In one possible implementation, the shooting prompting device provided in this application can be implemented as a computer program, which can be configured as follows: Figure 6 The device operates on the electronic device shown. The memory of the electronic device can store the various program modules that make up the above-described apparatus. The computer program composed of the various program modules causes the processor 620 to execute the steps of the methods in the various embodiments of this application described in this specification.
[0085] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0086] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, phrases such as "in one possible implementation," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.
[0087] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.
[0088] 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 apparatus 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 apparatus. 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 apparatus that includes that element.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.
[0090] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.
[0091] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.
[0092] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0093] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0094] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0095] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0096] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0097] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for processing three-dimensional interactive controls, characterized in that, The method includes: In response to an operation that triggers a change in the display view of the target control, information about the change in the display view is obtained; Based on the change information, target rendering compensation parameters are determined. These parameters are used to compensate for the display size of the target control after the change in display view, so that the display size of the target control remains constant before and after the change in display view. The target display page after the change of the target viewpoint is determined and displayed based on the target rendering compensation parameters.
2. The three-dimensional interactive control processing method according to claim 1, characterized in that, The change information includes camera position information, and determining the target rendering compensation parameters based on the change information includes: Based on the camera position information and the position information of the target control after the change in display viewing angle, the target distance between the camera and the target control is determined; The target rendering compensation parameter is determined based on the target distance, wherein the target rendering compensation parameter is positively correlated with the target distance.
3. The three-dimensional interactive control processing method according to claim 2, characterized in that, The step of determining the target rendering compensation parameters based on the target distance includes: Based on the target distance and viewpoint information, target rendering compensation parameters are determined, wherein the viewpoint information and the target rendering compensation parameters are negatively correlated; and / or Based on the mapping relationship between distance and rendering compensation parameters, the target rendering compensation parameters corresponding to the target distance are determined.
4. The three-dimensional interactive control processing method according to claim 2, characterized in that, The step of determining the target rendering compensation parameters based on the target distance includes: According to the formula The target rendering compensation parameters are calculated, wherein, The target is rendered with compensation parameters, where d is the target distance. This is information from a perspective.
5. The three-dimensional interactive control processing method according to claim 1, characterized in that, The step of determining and displaying the target display page after the change in the display view of the target control based on the target rendering compensation parameters includes: Obtain the first rendering size corresponding to the change in the display view of the target control; The first rendering size is compensated according to the target rendering compensation parameters to obtain the target rendering size; The target control is rendered according to the target rendering size to obtain a target display page including the target control; Display the target page.
6. The three-dimensional interactive control processing method according to claim 5, characterized in that, The method further includes: The target rendering size is compensated and rendered according to the screen compensation parameters corresponding to the display device of the displayed target control to obtain a target display page including the target control; and / or The step of obtaining the first rendering size corresponding to the change in the display view of the target control includes: Obtain the view projection matrix and viewport transformation matrix after the display perspective change, and calculate the first rendering size of the target control based on the view projection matrix and the viewport transformation matrix.
7. The three-dimensional interactive control processing method according to any one of claims 1-6, characterized in that, The target display page also includes a target model, and the target control is used to control the target model. Determining the target display page after the viewpoint change based on the target rendering compensation parameters includes: The target model is rendered within the target display page after the display perspective changes via the first rendering thread; The second rendering thread renders the target control within the target display page after the viewing angle changes, based on the target rendering compensation parameters.
8. A three-dimensional interactive control processing device, characterized in that, The device includes: The parameter acquisition module is used to acquire information about the change in the display view in response to an operation that triggers a change in the display view of the target control. The change information is used to characterize the amount of change in the display view. The compensation parameter determination module is used to determine the target rendering compensation parameter based on the change information. The target rendering compensation parameter is used to compensate the display size of the target control after the display view changes so that the display size of the target control is constant before and after the display view changes. The page display module is used to determine and display the target display page after the target control's display perspective changes based on the target rendering compensation parameters.
9. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.