Display method and device

By determining the vertex two-dimensional coordinates of the three-dimensional model in the naked-eye 3D editor and scaling, the problem of the model being unable to adapt is solved, and the best display and editing convenience of the model on the screen is achieved.

WO2025180198A1PCT designated stage Publication Date: 2025-09-04BOE TECHNOLOGY GROUP CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/076516
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-01
Filing Date
2025-02-08
Publication Date
2025-09-04

AI Technical Summary

Technical Problem

The three-dimensional models imported in the naked-eye 3D editor cannot adapt due to the inconsistent model production software. Some models exceed the edge of the screen or are smaller in size, making them difficult to view and edit.

Method used

Ensure that the model occupies the best proportional range on the screen by determining the two-dimensional coordinates of multiple vertices of the three-dimensional model on the display screen and scaling the model based on the boundaries of the target display area.

Benefits of technology

It realizes adaptive display of three-dimensional models in the naked-eye 3D editor, which facilitates model editing and observation, and improves the adaptability of different model generation software and editors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025076516_04092025_PF_FP_ABST
    Figure CN2025076516_04092025_PF_FP_ABST
Patent Text Reader

Abstract

A display method and a device, relating to the technical field of computers, and aiming to adaptively scale a model imported into a naked eye 3D editor, such that the model is located at an optimal visual angle. The method comprises: for imported first three-dimensional content, when a plurality of vertexes of the first three-dimensional content are projected to a display screen, determining two-dimensional coordinates of each of the plurality of vertexes on the display screen; scaling the first three-dimensional content on the basis of the plurality of two-dimensional coordinates and the boundary of a target display area in the display screen; and displaying scaled second three-dimensional content in the target display area, wherein the proportion of the second three-dimensional content occupying the target display area is within a preset proportion range.
Need to check novelty before this filing date? Find Prior Art

Description

Display method and device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 1, 2024, with application number 202410238954X and titled “A Display Method and Device,” the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present disclosure relates to the field of computer technology, and in particular to a display method and device. Background Art

[0004] When importing a 3D model into a naked-eye 3D editor, the imported model cannot be adapted due to the inconsistency of the model making software, making the model difficult to view.

[0005] Overview

[0006] Based on the background technology, the present disclosure proposes a display method and device.

[0007] According to a first aspect of the present disclosure, a display method is provided, comprising: determining, for imported first three-dimensional content, two-dimensional coordinates of each of a plurality of vertices of the first three-dimensional content on the display screen when projecting the vertices onto the display screen;

[0008] scaling the first three-dimensional content based on the plurality of two-dimensional coordinates and a region boundary of a target display region on the display screen;

[0009] The scaled second three-dimensional content is displayed in the target display area; wherein the proportion of the second three-dimensional content occupying the target display area is within a preset proportion range.

[0010] Furthermore, the determining of the two-dimensional coordinates corresponding to the plurality of vertices of the first three-dimensional content when projecting the plurality of vertices onto the display screen includes:

[0011] Acquiring resource parameters corresponding to the first three-dimensional content, where the resource parameters include remaining computing resources of a device where the display screen is located and / or a data volume of the first three-dimensional content;

[0012] determining, based on the resource parameters, a plurality of vertices to be projected from the first three-dimensional content;

[0013] The two-dimensional coordinates of each of the plurality of vertices to be projected on the display screen are determined.

[0014] Furthermore, the determining, based on the resource parameters, a plurality of vertices to be projected from the first three-dimensional content includes:

[0015] When the remaining computing resources are greater than a preset resource and / or the data amount is less than a preset data amount, determining all vertices of the first three-dimensional content as the plurality of vertices to be projected;

[0016] When the remaining computing resources are less than preset resources and / or the data amount is greater than a preset data amount, some vertices of the first three-dimensional content are determined as the multiple vertices to be projected.

[0017] Furthermore, determining some vertices of the first three-dimensional content as the multiple vertices to be projected includes:

[0018] determining a boundary of the first three-dimensional content;

[0019] A plurality of vertices on the boundary are used as the vertices to be projected.

[0020] Furthermore, after determining the boundary of the first three-dimensional content, the method further includes:

[0021] displaying the first three-dimensional content on the display screen, and displaying the boundary on the first three-dimensional content;

[0022] In response to the adjustment operation on the boundary, obtaining a new boundary;

[0023] A plurality of vertices on the new boundary are used as the vertices to be projected.

[0024] Furthermore, determining the boundary of the first three-dimensional content includes:

[0025] Obtaining a geometric center point of the first three-dimensional content;

[0026] A boundary surrounding the first three-dimensional content is generated based on the spatial coordinates of the geometric center point and extension lines from the geometric center point to the first three-dimensional content in various directions.

[0027] Furthermore, before scaling the first three-dimensional content, the method further includes:

[0028] Obtaining a target point based on the spatial coordinates of the plurality of vertices in the first three-dimensional content and the spatial coordinates of a plurality of third three-dimensional contents; wherein the Y-axis value of the target point in the spatial coordinates is the minimum Y-axis value of the plurality of vertices in the spatial coordinates, and the plurality of third three-dimensional contents includes the first three-dimensional content and content different from the first three-dimensional content;

[0029] creating an empty fourth three-dimensional content based on the three-dimensional coordinates of the target point in the spatial coordinates, and using the fourth three-dimensional content as a parent node of the first three-dimensional content;

[0030] Scaling the first three-dimensional content includes:

[0031] The first three-dimensional content is scaled based on the parent node and the target point.

[0032] Furthermore, acquiring the target point based on the spatial coordinates of the plurality of vertices in the first three-dimensional content and the spatial coordinates of the plurality of third three-dimensional contents includes:

[0033] Obtaining the center coordinates of the geometric center points of each of the plurality of third three-dimensional contents;

[0034] Based on the plurality of center coordinates and the minimum Y-axis value, the three-dimensional coordinates of the target point are acquired.

[0035] Furthermore, the acquiring the three-dimensional coordinates of the target point based on the plurality of center coordinates and the minimum Y-axis value includes:

[0036] Taking the average of the X-axis values ​​in the plurality of center coordinates as the X-axis value of the target point in the space coordinates;

[0037] Taking the average value of the Z-axis values ​​in the plurality of center coordinates as the Z-axis value of the target point in the space coordinates;

[0038] The three-dimensional coordinates of the target point are obtained based on the X-axis value, the Z-axis value, and the minimum Y-axis value.

[0039] Furthermore, scaling the first three-dimensional content based on positions of the plurality of two-dimensional coordinates on the display screen and a region boundary of a target display region on the display screen includes:

[0040] Obtaining endpoint coordinates of a plurality of endpoints on the boundary of the region;

[0041] determining, based on the endpoint coordinates and the two-dimensional coordinates of each of the plurality of vertices, whether the plurality of vertices satisfy a first condition, the first condition being that the plurality of vertices are all located within the boundary of the region;

[0042] If not, performing at least one reduction process on the first three-dimensional content until the first condition is met;

[0043] If so, determining whether the plurality of vertices satisfy a second condition, and if the second condition is not satisfied, performing at least one amplification process on the first three-dimensional content until the second condition is satisfied;

[0044] The second condition is that the plurality of vertices are all located within the region boundary, and the distances between the plurality of vertices and the region boundary are less than a preset distance.

[0045] Furthermore, the determining whether the plurality of vertices do not satisfy the first condition based on the endpoint coordinates and the two-dimensional coordinates of each of the plurality of vertices includes:

[0046] determining whether the first condition is satisfied based on the coordinate values ​​of the endpoint coordinates on the first coordinate axis and the coordinate values ​​of the vertex on the first coordinate axis;

[0047] The first coordinate axis is the X-axis in the coordinate system of the display screen.

[0048] Furthermore, the performing at least one magnification process on the first three-dimensional content based on the distances between the endpoint coordinates and the two-dimensional coordinates of each of the plurality of vertices includes:

[0049] Determine a first distance between the coordinate value of the endpoint coordinate on the first coordinate axis and the minimum coordinate value of each of the two-dimensional coordinates on the first coordinate axis, and a second distance between the endpoint coordinate and the maximum coordinate value of each of the two-dimensional coordinates on the first coordinate axis;

[0050] determining whether the second condition is satisfied based on the first distance and the second distance;

[0051] The first coordinate axis is the X-axis in the coordinate system of the display screen.

[0052] Furthermore, scaling the first three-dimensional content includes:

[0053] scaling the first three-dimensional content multiple times; wherein, during each scaling, scaling the first three-dimensional content based on a previous scaling value and the scaling compensation value determined this time;

[0054] The scaling compensation value is determined based on the scaling value.

[0055] Furthermore, scaling the first three-dimensional content based on the previous scaling value and the scaling compensation value determined this time during each scaling includes:

[0056] Obtaining a first scaling value of the first three-dimensional content at this time;

[0057] determining the current scaling compensation value according to the first scaling value;

[0058] In a case where the scaling is reduction, reducing the first three-dimensional content obtained this time based on a difference between the scaling compensation value and the first scaling value;

[0059] In a case where the scaling is magnification, the first three-dimensional content obtained this time is magnified based on the scaling compensation value.

[0060] Furthermore, determining the current scaling compensation value according to the first scaling value includes:

[0061] If the first scaling value is less than 1, multiplying the first scaling value by N times to obtain a second scaling value, and determining the scaling compensation value according to the number of decimal places contained in the second scaling value;

[0062] If the first scaling value is greater than 1, 1 / N times the first scaling value is used as the third scaling value, and the scaling compensation value is determined according to the number of integer bits contained in the third scaling value; wherein N is a multiple of 10.

[0063] Furthermore, the reducing the first three-dimensional content obtained this time based on the difference between the scaling compensation value and the first scaling value includes:

[0064] If the difference between the scaling compensation value and the first scaling value is less than 0, reducing the scaling compensation value by the preset multiple;

[0065] The first three-dimensional content obtained this time is scaled down based on the difference between the scaled-down scaling compensation value and the first scaling value.

[0066] Furthermore, the determining of the two-dimensional coordinates of each of the plurality of vertices of the first three-dimensional content on the display screen when projecting the plurality of vertices onto the display screen includes:

[0067] Obtaining spatial coordinates of a plurality of the vertices in the first three-dimensional content, wherein the spatial coordinates are coordinates of the first three-dimensional content in a model space;

[0068] Converting the spatial coordinates corresponding to each of the vertices into world coordinates;

[0069] The world coordinates corresponding to each of the multiple vertices are converted into two-dimensional coordinates on the display screen.

[0070] Furthermore, after displaying the scaled second three-dimensional content in the target display area, the method further includes:

[0071] In response to an adjustment operation on the resolution of the display screen, obtaining a target resolution of the display screen after adjustment;

[0072] Adjusting the target display area based on the target resolution;

[0073] The first three-dimensional content is scaled based on the adjusted target display area and the two-dimensional coordinates of each of the multiple vertices on the display screen; or the second three-dimensional content is scaled based on the adjusted target display area and the two-dimensional coordinates of each of the multiple vertices in the second three-dimensional content on the display screen.

[0074] Furthermore, after displaying the scaled second three-dimensional content in the target display area, the method further includes:

[0075] For fifth three-dimensional content to be displayed, obtaining a similarity between the fifth three-dimensional content and the first three-dimensional content; wherein the similarity is used to represent a size difference between the fifth three-dimensional content and the first three-dimensional content;

[0076] When the similarity is greater than a preset similarity, the fifth three-dimensional content is scaled according to the scaling parameter of the first three-dimensional content.

[0077] A second aspect of the present disclosure provides a three-dimensional content display system, comprising:

[0078] a display screen configured to display three-dimensional content, wherein a target display area is defined on the display screen;

[0079] A processor is connected to the display screen and is configured with a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by the processor, the processor performs the following steps:

[0080] determining, for the imported first three-dimensional content, two-dimensional coordinates of each of the plurality of vertices of the first three-dimensional content on the display screen when projecting the plurality of vertices onto the display screen;

[0081] scaling the first three-dimensional content based on positions of the plurality of two-dimensional coordinates on the display screen and a region boundary of the target display area;

[0082] The scaled second three-dimensional content is displayed in the target display area.

[0083] An embodiment of the present disclosure further discloses an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the display method described in the first aspect above when executing the computer program.

[0084] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below.

[0085] BRIEF DESCRIPTION OF THE DRAWINGS

[0086] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the following is a brief introduction to the drawings required for the description of the embodiments or related technologies. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. It should be noted that the scales in the drawings are for illustration only and do not represent the actual scale.

[0087] FIG1 is a schematic diagram showing a size relationship between a model and an actual screen after being imported into a naked-eye 3D editor;

[0088] FIG2 shows another schematic diagram of the size relationship between the naked-eye 3D model and the actual screen after the model is imported;

[0089] FIG3 shows a flowchart of the steps of the display method proposed in an embodiment of the present disclosure;

[0090] FIG4 is a schematic diagram showing a situation in which the second three-dimensional content is located in the target display area and has an optimal ratio range in an embodiment of the present disclosure;

[0091] FIG5 is a schematic diagram showing the position of a target display area in an embodiment of the present disclosure;

[0092] FIG6 is a schematic diagram showing a process of determining a boundary in an embodiment of the present disclosure;

[0093] FIG7 is a schematic diagram showing how to convert the spatial coordinates of a vertex into world coordinates in an embodiment of the present disclosure;

[0094] FIG8 is a schematic diagram showing how to convert world coordinates into two-dimensional coordinates on a display screen in an embodiment of the present disclosure;

[0095] FIG9 shows a schematic structural diagram of a three-dimensional content display system according to an embodiment of the present disclosure.

[0096] Detailed description

[0097] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0098] The naked-eye 3D editor is a naked-eye 3D content production editor developed based on Unity. It supports the import of scenes and models (three-dimensional content), model editing, animation, material, audio, lighting and other settings, and can generate different naked-eye 3D content according to user needs.

[0099] However, in the actual application of the naked-eye 3D editor, the models (i.e., three-dimensional content) obtained by different model generation software are of different sizes and cannot be well adapted to the naked-eye 3D editor, which results in the model presented in the naked-eye 3D editor exceeding the edge of the screen or being small in size, making it difficult to implement the editing process, and bringing inconvenience to the model editing. For example, as shown in Figures 1 and 2, Figures 1 and 2 respectively show the situations that may occur when the model is imported into the naked-eye 3D editor. According to Figure 1, after the model is imported into the naked-eye 3D editor, it is possible that part of the model exceeds the screen position, making it difficult to fully observe the model. According to Figure 2, after the model is imported into the naked-eye 3D editor, it is possible that the model occupies a small position on the screen, resulting in inconvenience in observation.

[0100] In view of this, the embodiments of the present disclosure provide a display method and device, which automatically scale and adjust the three-dimensional model imported into the naked-eye 3D editor so that the adjusted three-dimensional model can be presented in the editor at an optimal viewing angle, thereby facilitating the three-dimensional model editing process and improving the adaptability of different three-dimensional model generation software and the naked-eye 3D editor, so that the display of the three-dimensional model can adapt to the indicated target display area.

[0101] 3 , which shows a flowchart of a display method according to an embodiment of the present disclosure. As shown in FIG3 , the display method is applied to a naked-eye 3D editor, and specifically includes:

[0102] S101 : for an imported first three-dimensional content, determining two-dimensional coordinates of each of the vertices of the first three-dimensional content on the display screen when the vertices are projected onto the display screen.

[0103] The three-dimensional content described in the above examples of this embodiment, such as the first three-dimensional content, the second three-dimensional content, the third three-dimensional content, the fourth three-dimensional content, and the fifth three-dimensional content, can all be understood as three-dimensional models edited using a naked-eye 3D editor, including video-type three-dimensional models and image-type three-dimensional models. The three-dimensional content targeted by this application can be a frame of a video-type three-dimensional model or an image-type three-dimensional model, and its three-dimensional content includes all elements of the three-dimensional model.

[0104] Among them, the two-dimensional coordinates of each vertex on the display screen can be obtained through coordinate conversion. For example, the coordinates of each vertex in the first three-dimensional content in the world coordinate system are first obtained based on the model coordinates, and then the conversion relationship between the world coordinate system and the camera coordinate system is determined based on the camera position of the naked-eye 3D editor, and then the coordinates in the world coordinate system are converted into two-dimensional coordinates on the display screen.

[0105] In this embodiment, the first three-dimensional content is generated by model generation software, such as 3Ds max, etc. When viewing, editing and other operations are performed on the generated model, a naked-eye 3D editor is used, that is, the display method is implemented through the naked-eye 3D editor.

[0106] In the present disclosure, the relative position of the imported first three-dimensional content with respect to the display screen is determined by the coordinates of the first three-dimensional content on the display screen. When the first three-dimensional content exceeds the screen edge of the display screen, some or all of the vertices of the first three-dimensional content will exceed the range of the display screen. When the first three-dimensional content is small, the vertices of the first three-dimensional content will be close to the center of the display screen. Therefore, whether the first three-dimensional content needs to be adjusted can be determined based on the positions of the vertices of the first three-dimensional content on the display screen.

[0107] The multiple vertices of the first three-dimensional content determined may be all or some of the vertices of the first three-dimensional content. Using all vertices for subsequent boundary determination can more accurately determine the boundary position of the first three-dimensional content, while using some vertices can avoid the problem of occupying more computing resources when the model is more complex. In some embodiments, some of the vertices can be vertices at the boundary of the model itself, or they can be vertices re-determined based on the boundary. For example, based on the boundary and center of the model, a minimum cube that can accommodate the first three-dimensional content is determined, and then the vertices of the minimum cube are used as the re-determined vertices to accurately determine the vertices of the first three-dimensional content.

[0108] S102: Scale the first three-dimensional content based on the plurality of two-dimensional coordinates and a region boundary of a target display region in the display screen.

[0109] In the present disclosure, the target display area can be understood as the area occupied by the optimal screen size in the display screen. Multiple two-dimensional coordinates represent the screen coordinates of multiple vertices of the first three-dimensional content projected onto the display screen, which can indicate the position of the first three-dimensional content on the display screen. The first three-dimensional content can be scaled based on whether the multiple two-dimensional coordinates are located in the target display area, and if so, the area ratio occupied by the first three-dimensional content in the target display area, so that the first three-dimensional content can be located in the target display area and have the optimal display size, which is convenient for users to watch.

[0110] Specifically, the boundary endpoints of the region boundary can be obtained. In practice, based on the difference between the multiple two-dimensional coordinates and the display coordinates of the boundary endpoints on the display screen, it can be determined whether the first three-dimensional content is within the target display area, and if it is within the target display area, the size of the difference between the multiple two-dimensional coordinates and the display coordinates of the boundary endpoints on the display screen, thereby scaling the first three-dimensional content based on the above determination result. It should be noted that the above-mentioned target display area can be a rectangular area, and its boundary endpoints can be the four upper, lower, left, and right endpoints of the rectangular area. Of course, the target display area can also be designed as an area of ​​other shapes, such as a regular polygon area, a sector area, a circular area, etc. In this embodiment, regardless of the shape of the target display area, the method for scaling the first three-dimensional content is applicable.

[0111] The target display area may be any area on the display screen, and may be specifically indicated in advance by the user, such as an area selected by the user using a graphic frame on the display screen. Alternatively, it may be an area automatically generated based on the size of the display screen, and the automatically generated area may be the optimal display area of ​​the display screen.

[0112] It should be noted that the display coordinates of the multiple two-dimensional coordinates and the boundary endpoints on the display screen are based on the coordinates in the screen coordinate system where the display screen is located, that is, the two are based on the same coordinate system.

[0113] When scaling the first three-dimensional content, the scaling can be performed using a fixed scaling point. The scaling point can be the center point of the first three-dimensional content, or can be the position of any vertex in the first three-dimensional content, or can be a virtualized position based on the vertex coordinates of the first three-dimensional content. This disclosure does not impose any specific limitations. In one example, to avoid a situation where the scaling point deviates from the center, resulting in a portion of the boundary of the three-dimensional content being within the target display area and a portion being outside the target display area after scaling, the scaling point can be the center point of the three-dimensional content, or a point on a perpendicular or parallel line passing through the center point, to facilitate the scaling process.

[0114] It should be noted that when at least one of the multiple two-dimensional coordinates is outside the area boundary, the first three-dimensional content can be reduced; when the multiple two-dimensional coordinates are all within the area boundary and the distances of the multiple two-dimensional coordinates from the center point of the area boundary are all less than the preset distance, the first three-dimensional content can be enlarged.

[0115] Wherein, whether the first three-dimensional content is enlarged or reduced, when the first three-dimensional content is enlarged or reduced, it can be enlarged once or multiple times. Wherein, the scaling ratio of each scaling can be the same or different, so as to scale the first three-dimensional content to the target display area in the display screen. For example, the scaling ratio can be determined based on the distance between the two-dimensional coordinates corresponding to each vertex of the first three-dimensional content and the boundary of the target display area, and then the first three-dimensional content is scaled according to the ratio, so that the first three-dimensional content can be quickly scaled to the target display area; or the first three-dimensional content can be scaled according to a fixed ratio, and when the scaled first three-dimensional content is still not entirely within the target display area, the scaled first three-dimensional content is scaled again until the scaled first three-dimensional content is entirely within the target display area, so that the scaled first three-dimensional content can be ensured to be located at a better position in the display screen.

[0116] S103: Display the scaled second three-dimensional content in the target display area.

[0117] The proportion of the second three-dimensional content occupying the target display area is within a preset proportion range. The second three-dimensional content is obtained by scaling the first three-dimensional content, that is, the scaled first three-dimensional content is entirely within the target display area. The preset proportion range is the optimal proportion range for displaying the first three-dimensional content.

[0118] For example, referring to Figure 4, Figure 4 shows a schematic diagram of a situation in which the second three-dimensional content in the present disclosure is located within the target display area and has an optimal proportion range. According to Figure 4, the preset proportion range actually represents the area occupied by the three-dimensional content on the screen. The proportion range can be composed of the ratio between the width d of the three-dimensional content and the width D of the screen, and the ratio between the height h of the three-dimensional content and the height H of the screen.

[0119] In this embodiment, the target display area can be the local display area to which the first 3D content needs to be adjusted. For example, if the first 3D content needs to be placed above another 3D content, the area above the other 3D content is the target display area. The target display area can also be the optimal position for the first 3D content. For example, if the first 3D content is located in the center of the screen, it is at the optimal viewing angle. In this case, the target display area can be set to the area located in the exact center of the screen. The target display area can be an area defined by the optimal screen size. Being located in the area defined by the optimal screen size indicates that the first 3D content can be viewed at the optimal viewing angle.

[0120] In one example, as shown in Figure 5, Figure 5 shows a schematic diagram of the position of the target display area on the display screen. According to Figure 5, when the distance between the upper boundary of the target display area and the upper boundary of the display screen is one-fifth of the size of the display screen in the y direction, the distance between the lower boundary of the target display area and the lower boundary of the display screen is one-fifth of the size of the display screen in the y direction, the distance between the left boundary of the target display area and the left boundary of the display screen is one-quarter of the size of the display screen in the x direction, and the distance between the right boundary of the target display area and the right boundary of the display screen is one-quarter of the size of the display screen in the x direction, the first three-dimensional content has an optimal viewing angle.

[0121] The display method provided in this embodiment determines whether the position of the first three-dimensional content is a preferred display position by determining the positions of the vertices of the imported first three-dimensional content on the display screen and the position of the boundary of the target display area on the display screen. The first three-dimensional content is then scaled based on the determination result so that the scaled second three-dimensional content is located in the target display area. In this way, the first three-dimensional content is ensured to be located in the target display area of ​​the display screen after scaling, thereby enabling the first three-dimensional content to be fully displayed. At the same time, because the proportion of the second three-dimensional content occupying the target display area is within a preset proportion range, the second three-dimensional content can be located in the optimal display position in the target display area, thereby facilitating the viewing process of the three-dimensional model.

[0122] In one disclosed embodiment, considering the varying computational resources required due to varying complexities of different 3D content and varying numbers of vertices, the number of selected vertices, and thus the two-dimensional coordinates of the selected vertices, can be determined based on the computational resources required by the currently imported 3D content. The specific process may include: first, obtaining resource parameters corresponding to the first 3D content, including the remaining computational resources of the device hosting the display screen and / or the data volume of the first 3D content; then, determining multiple vertices to be projected from the first 3D content based on the resource parameters; and finally, determining the two-dimensional coordinates of each of the multiple vertices to be projected on the display screen.

[0123] In this embodiment, the resource parameter may be the remaining computing resources of the device where the display screen resides, or the data volume of the first three-dimensional content, or both. The remaining computing resources of the device where the display screen resides may represent the computing power of the device currently processing the first three-dimensional content, and the data volume of the first three-dimensional content may represent the amount of data that the device needs to process. Both parameters may affect the efficiency of scaling the first three-dimensional content.

[0124] Therefore, based on the resource parameters, multiple vertices to be projected can be selected from the first three-dimensional content. The selected multiple vertices can be all the vertices of the first three-dimensional content, or can be part of the vertices of the first three-dimensional content. When all the vertices are selected, the positional relationship between the first three-dimensional content and the area boundary of the target display area can be determined more accurately, but it will consume more computing resources. When some vertices are selected, the scaling efficiency will be improved.

[0125] The resource parameter corresponding to the first three-dimensional content may be the remaining computing resources mentioned above. In this case, the vertices to be projected in the three-dimensional content may be determined based on the remaining computing resources. For example, when the remaining computing resources are greater than a preset resource, all vertices of the first three-dimensional content are determined as the vertices to be projected. When the remaining computing resources are less than the preset resource, some vertices of the first three-dimensional content are determined as the vertices to be projected. It should be noted that these vertices, when connected, can form a complete boundary of the first three-dimensional content.

[0126] The resource parameter corresponding to the first three-dimensional content can also be the data volume of the first three-dimensional content. In this case, the vertices to be projected in the three-dimensional content can be determined based on the data volume of the first three-dimensional content. For example, when the data volume of the first three-dimensional content is less than a preset data volume, all vertices of the first three-dimensional content can be determined as the multiple vertices to be projected; when the data volume of the first three-dimensional content is greater than a preset data volume, some vertices of the first three-dimensional content can be determined as the multiple vertices to be projected. It should be noted that the determined partial vertices can be connected to form a complete boundary of the first three-dimensional content.

[0127] The resource parameters corresponding to the first three-dimensional content may also include the remaining computing resources of the device and the data volume of the first three-dimensional content. In this case, the vertices to be projected may be determined based on both. For example, when the remaining computing resources are greater than a preset resource and / or the data volume is less than a preset data volume, all vertices of the first three-dimensional content may be determined as the multiple vertices to be projected. When the remaining computing resources are less than the preset resource and / or the data volume is greater than the preset data volume, some vertices of the first three-dimensional content may be determined as the multiple vertices to be projected.

[0128] In one example, when remaining computing resources are greater than a preset amount and the data size of the first 3D content is less than a preset amount, all vertices of the first 3D content may be determined as the multiple vertices to be projected. In this case, there is a large amount of remaining computing resources, and the data size of the first 3D content itself is relatively small. Therefore, the computing resources of the device are sufficient to support the scaling calculation process using the vertices of the first 3D content.

[0129] When the remaining computing resources are less than or equal to the preset resources, or the data volume of the first three-dimensional content is greater than or equal to the preset data volume, considering that the computing resources are less or the data volume of the first three-dimensional content is large, if all the vertices of the first three-dimensional content are used as multiple vertices to be projected, it will occupy more computing resources and reduce computing efficiency. In order to ensure the efficiency of model scaling, when the computing resources are limited or the data volume of the first model is large, some vertices of the first three-dimensional content can be determined as vertices to be projected.

[0130] In another example, when the remaining computing resources are greater than the preset resources, or the data volume is less than the preset data volume, all vertices of the first three-dimensional content may be determined as multiple vertices to be projected. If the remaining computing resources are large, the data volume of the first three-dimensional content is large, and the device can also support it. If the data volume of the first three-dimensional content is small, the remaining computing resources are small and it can also be supported.

[0131] When the remaining computing resources are less than or equal to the preset resources and the data volume is greater than or equal to the preset data volume, the data volume of the first three-dimensional content is large and the remaining computing resources are small. At this time, the remaining computing resources are difficult to support the calculation of the scaling process using all the vertices of the first three-dimensional content. In this case, some vertices of the first three-dimensional content are determined as vertices to be projected.

[0132] The preset resources and the preset data volume can be set by the user or determined based on the performance of the device. When some vertices are determined as multiple vertices to be projected based on the remaining computing resources and / or the data volume of the first three-dimensional content, the number of vertices can be determined based on the specific remaining computing resources or data volume.

[0133] Based on the remaining computing resources, the computing resources can be divided into multiple levels, and the number of vertices to be screened can be determined based on the level of the remaining computing resources. For example, the computing resources are divided into three levels. The higher the level, the more remaining computing resources there are, and the more vertices to be screened. It should be noted that since the screened vertices need to enclose a boundary, when the number of screened vertices is large, multiple groups of boundaries can be included, each group of boundaries having a group of vertices, thereby improving the efficiency of its scaling.

[0134] Based on the data volume of the first three-dimensional content, multiple data volume ranges can be defined, and the number of vertices to be screened can be determined based on the ranges in which the first three-dimensional content is located. For example, the data volume can be divided into a first range, a second range, and a third range. When the data volume of the first three-dimensional content is within the first range, the data volume is small, and more vertices can be selected. When the data volume of the first three-dimensional content is within the second range, the data volume is medium, and fewer vertices can be selected. When the data volume of the first three-dimensional content is within the third range, only vertices that can determine the position of the first three-dimensional content can be screened.

[0135] By adopting the technical solution of this embodiment, after determining the remaining computing resources and the data volume of the first three-dimensional content, the computing resources can be reasonably allocated according to the remaining computing resources and / or the data volume of the first three-dimensional content, avoiding the situation where the large amount of computing results in low efficiency and a slow scaling process.

[0136] The process of determining some vertices of the first three-dimensional content as the multiple vertices to be projected is as follows: first, determining the boundary of the first three-dimensional content; and then, determining the multiple vertices on the boundary as the vertices to be projected.

[0137] Specifically, the determination process may be to first mesh the first three-dimensional content, then traverse all nodes of the first three-dimensional content, determine the positions of all sub-objects with mesh bodies, obtain the boundary of the first three-dimensional content, and then use the boundary points of each orientation in the first three-dimensional content as vertices to be projected.

[0138] In one embodiment, after determining the actual boundary of the three-dimensional model, the boundary can also be adjusted. By adjusting the boundary, the vertices of the determined first three-dimensional content are made more representative, which facilitates a more accurate subsequent scaling process. The specific process can be: displaying the first three-dimensional content on a display screen, and displaying the boundary on the first three-dimensional content; in response to the boundary adjustment operation, obtaining a new boundary; and using multiple vertices on the new boundary as vertices to be projected.

[0139] In this embodiment, by displaying the boundary of the first 3D content on the display screen, the user can easily observe the first 3D content and the boundary of the first 3D content. If the user needs to modify the boundary, they can directly adjust the boundary, thereby obtaining vertices that better meet the user's requirements based on the adjusted boundary. For example, after the boundary of the first 3D content is displayed, the user determines that one vertex in each of the four directions of up, down, left, and right is sufficient. The user can then manually adjust the boundary of the 3D model so that only one vertex exists in each direction.

[0140] The corresponding operation may be performed on each first three-dimensional content. By adjusting the boundaries of each first three-dimensional content, the number of vertices can be unified, making it easier to obtain the vertices. Alternatively, after obtaining the actual boundary of the three-dimensional model, it may be determined whether to perform boundary adjustment operations based on the amount of data of the actual boundary. For example, when the three-dimensional model has a large number of vertices, the number of vertices can be reduced by adjusting the three-dimensional model, thereby reducing the computing resources consumed by the first three-dimensional content.

[0141] Among them, the method for determining the boundary of the first three-dimensional content can specifically be: obtaining the geometric center point of the first three-dimensional content; based on the spatial coordinates of the geometric center point and the extension lines from the geometric center point to the first three-dimensional content in various directions, generating a boundary surrounding the first three-dimensional content. Specifically, referring to Figure 6, Figure 6 shows a schematic diagram of the method for determining the boundary in the embodiment of the present disclosure. As shown in Figure 6, for the first three-dimensional content, the geometric center point a of the first three-dimensional content can be obtained based on the coordinates of each node of the first three-dimensional content. Thereafter, an extension line starting from the geometric center point a is drawn to obtain multiple endpoints, so that the three-dimensional geometric figure formed by the multiple endpoints surrounds the first three-dimensional content. Then, each edge of the three-dimensional geometric figure can be regarded as the boundary of the first three-dimensional content.

[0142] After determining the boundary of the first three-dimensional content, the vertices on the boundary are used as vertices to be projected, and the two-dimensional coordinates of the vertices can be obtained to facilitate determining the positions of the vertices, and then scaling the first three-dimensional content. Before scaling the first three-dimensional content, the scaling point can be determined first, and scaling by a fixed scaling point can facilitate scaling the first three-dimensional content to a suitable size and a better viewing position. Specifically, first, based on the spatial coordinates of multiple vertices in the first three-dimensional content and the spatial coordinates of multiple third three-dimensional contents, a target point is obtained; then, based on the three-dimensional coordinates of the target point in the spatial coordinates, an empty fourth three-dimensional content is created, and the fourth three-dimensional content is used as the parent node of the first three-dimensional content, and then the first three-dimensional content can be scaled based on the parent node and the target point.

[0143] The Y-axis value of the target point in the spatial coordinates is the minimum Y-axis value of the multiple vertices in the spatial coordinates, and the multiple third three-dimensional contents include the first three-dimensional content and a model different from the first three-dimensional content.

[0144] In this embodiment, creating an empty fourth 3D content and using it as the parent node of the first 3D content ensures that the position of the fourth 3D content remains fixed, while the first 3D content is scaled according to the position of the fourth 3D content during scaling. Specifically, the parent node represents the scaling point. Thus, by assigning the target point's position to the parent node, scaling of the target point in the first 3D content is achieved.

[0145] In specific implementations, the target point can be determined based on the number of 3D models to be displayed on the screen. If only one first 3D content is present, the target point can be determined directly based on the spatial coordinates of the vertices of the first 3D content and the spatial position coordinates of the first 3D content. The target point can also be determined in conjunction with multiple third 3D contents to be displayed on the display screen. These multiple third 3D contents can be 3D models to be displayed or already displayed 3D models, without limitation. The target point can be determined based on the spatial coordinates of the vertices of the first 3D content and the spatial position coordinates of each vertex in the multiple third 3D contents. This allows the target point to be determined based on the display conditions of the other 3D content.

[0146] In one example, the spatial position coordinates of each third three-dimensional content can be represented by the spatial coordinates of its own geometric center point. The specific process of obtaining the target point can be: first, obtain the center coordinates of the geometric center points of multiple third three-dimensional contents; then, based on the multiple center coordinates and the minimum Y-axis value, obtain the three-dimensional coordinates of the target point.

[0147] Among them, if only the first three-dimensional content is displayed, the target point for scaling the first three-dimensional content can be directly determined based on the center point of the first three-dimensional content and the minimum Y-axis value. The target point is directly below the center point and the Y value is the minimum Y-axis value. If the screen needs to display not only the first three-dimensional content, but also multiple third three-dimensional contents different from the first three-dimensional content, if only the first three-dimensional content is scaled, it may cause the first three-dimensional content to overlap with the third three-dimensional content, which will make it impossible to fully observe multiple three-dimensional models. When the screen needs to display multiple three-dimensional models, the scaling point of the first three-dimensional content can be determined in combination with the third three-dimensional content.

[0148] At this time, the method for obtaining the three-dimensional coordinates of the target point is: taking the average value of the X-axis values ​​in multiple center coordinates as the X-axis value of the target point in the spatial coordinates, and taking the average value of the Z-axis values ​​in multiple center coordinates as the Z-axis value of the target point in the spatial coordinates; and, based on the X-axis value, Z-axis value and minimum Y-axis value, obtaining the three-dimensional coordinates of the target point.

[0149] In this case, the specific steps for determining the target point for scaling the first three-dimensional content are: determining the minimum Y-axis value based on the spatial coordinates of multiple vertices in the first three-dimensional content, and determining the spatial coordinates of the center point of each third three-dimensional content. The Y-axis value of the spatial coordinates of the target point is the determined minimum Y-axis value, the X-axis value of the spatial coordinates of the target point is the average of the X-axis values ​​of the spatial coordinates of the multiple center points, and the Z-axis value is the average of the Z-axis values ​​of the spatial coordinates of the multiple center points. The position of the target point is the lowest point of the first three-dimensional content. In this way, it can ensure that the lower boundary of the three-dimensional model does not exceed the edge of the screen during scaling, and the position of the first three-dimensional content will not change significantly during scaling, avoiding the situation where one end is within the edge of the screen and the other end is beyond the edge of the screen after scaling.

[0150] In one embodiment, after importing first three-dimensional content, it is not possible to directly determine whether to scale up or down the first three-dimensional content. Therefore, after obtaining the two-dimensional coordinates of multiple vertices of the first three-dimensional content on the display screen, the determination of whether to scale up or down the first three-dimensional content is made based on the two-dimensional coordinates and the coordinates of the region boundary of the target display area on the display screen. The specific determination process may be: first, obtaining the endpoint coordinates of multiple endpoints on the region boundary; then, based on the endpoint coordinates and the two-dimensional coordinates of each of the multiple vertices, determining whether the multiple vertices meet a first condition; if not, scaling down the first three-dimensional content at least once until the first condition is satisfied; if so, determining whether the multiple vertices meet a second condition, and if the second condition is not satisfied, scaling up the first three-dimensional content at least once until the second condition is satisfied.

[0151] The first condition is that the plurality of vertices are all located within the region boundary, and the second condition is that the plurality of vertices are all located within the region boundary, and the distance between the plurality of vertices and the region boundary is less than a preset distance.

[0152] Among them, the process of determining whether the first condition is met based on the endpoint coordinates and the two-dimensional coordinates of each of the multiple vertices can be judged based on only one of the X-axis value and the Y-axis value in the endpoint coordinates. For example, the endpoint coordinates are divided into two groups, one group of endpoint coordinates has the same X-axis value, and the other group of endpoint coordinates has the same Y-axis value. Then, in the group of endpoints with the same X-axis value, the larger Y-axis value is the position of the upper boundary, and the smaller Y-axis value is the position of the lower boundary; in the group of endpoints with the same Y-axis value, the larger X-axis value is the position of the right boundary, and the smaller X-axis value is the position of the left boundary. In this way, the four boundaries of the target display area are determined, and then according to the coordinates of the vertices of the first three-dimensional content, it can be determined whether the first three-dimensional content has more than four boundaries.

[0153] It is understood that even if none of the vertices of the first three-dimensional content exceeds the boundary of the target display area, the first three-dimensional content may still be small. In this case, directly displaying the first three-dimensional content may make it difficult to observe and inconvenience the first three-dimensional content, and thus difficult to edit the three-dimensional model. Therefore, a preset distance can be set between the vertices of the first three-dimensional content and the boundary of the target display area. If the distance between the vertices of the first three-dimensional content and the boundary of the target display area is less than this distance, it indicates that the first three-dimensional content is small and difficult to observe, and the first three-dimensional content needs to be enlarged. There is no limit on the number of times the first three-dimensional content can be enlarged or reduced, and it is sufficient to be able to enlarge the first three-dimensional content to an appropriate size.

[0154] It can be understood that when the first three-dimensional content is scaled based on the parent node and the target point, the position of the target point does not change, and the target point is at the lowest point of the first three-dimensional content, that is, the position of the lowest point of the first three-dimensional content remains unchanged. Then, when the first three-dimensional content is reduced or enlarged, its height direction changes in one direction, and its width direction changes in two directions. Then, when the vertices in the width direction are all within the boundary of the target display area, it can also be indirectly indicated that the first three-dimensional content is completely within the target display area. The screen width direction, that is, the coordinate value of the X-axis of the screen coordinate system where the display screen is located, can be used to determine whether the first condition is met.

[0155] In this case, the judgment process of the first condition can be simplified as follows: based on the coordinate values ​​of the endpoint coordinates on the first coordinate axis and the coordinate values ​​of the vertex on the first coordinate axis, determine whether the first condition is met, where the first coordinate axis is the X-axis in the coordinate system where the display screen is located.

[0156] Similarly, when determining whether multiple vertices meet the second condition, it is also possible to determine whether the difference in X value between the endpoint coordinates of an endpoint located at the screen boundary and the two-dimensional coordinates of the multiple vertices meets the second condition. Specifically, the following steps may be performed: first, determining the coordinate value of the endpoint coordinate on the first coordinate axis, and the first distance between each of the endpoint coordinates and the minimum coordinate value of each of the two-dimensional coordinates on the first coordinate axis, and the second distance between each of the endpoint coordinates and the maximum coordinate value of each of the two-dimensional coordinates on the first coordinate axis; then, determining whether the second condition is met based on the first distance and the second distance; wherein the first coordinate axis is the X-axis in the coordinate system of the display screen.

[0157] The first distance indicates the minimum distance between the first three-dimensional content and the left edge of the screen, and the second distance indicates the minimum distance between the first three-dimensional content and the right edge of the screen. Whether to scale up the first three-dimensional content is determined by determining whether the two distances are less than preset distances. In a specific implementation, the target display area is a quadrilateral area with the left and right edges each being one-quarter of the screen size away from the screen edge, and the top and bottom edges each being one-fifth of the screen size away from the screen edge. If both the first and second distances are greater than one-quarter of the screen size, multiple vertices do not meet the second condition. However, if both the first and second distances are less than or equal to one-quarter of the screen size, multiple vertices meet the second condition.

[0158] When it is determined that the first 3D content needs to be scaled, the first 3D content is scaled each time based on the previous scaling value and the scaling compensation value determined this time; wherein the scaling compensation value is determined based on the scaling value.

[0159] In this embodiment, the scaling value represents the initial scaling value of the first three-dimensional content after each scaling, and the scaling compensation value represents the scaling amount of the first three-dimensional content in this scaling. Since each scaling compensation value is determined based on the previous scaling value, the problem of over-reduction or over-enlargement caused by a large scaling amount is avoided, so that the first three-dimensional content can be scaled to a better viewing angle accurately and conveniently.

[0160] In a specific implementation, the process of scaling the first three-dimensional content may be: first, obtaining a first scaling value of the first three-dimensional content at this time; then, determining the scaling compensation value at this time based on the first scaling value; then, if the scaling is to reduce, reducing the first three-dimensional content obtained at this time based on the difference between the scaling compensation value and the first scaling value; if the scaling is to increase, increasing the first three-dimensional content obtained at this time based on the scaling compensation value.

[0161] In this embodiment, there is a situation where the sizes of model files corresponding to different model software imported into the naked-eye 3D editor are different. A first scaling value can be first determined based on the size of the imported model. The first scaling value is the initial scaling value of the first three-dimensional content in the naked-eye 3D editor. Then, a scaling compensation value for this scaling is determined based on the initial scaling value, and the first three-dimensional content is scaled based on the scaling compensation value. After that, the two-dimensional coordinates of the vertices of the first three-dimensional content are re-obtained, and it is re-determined whether to scale the scaled first three-dimensional content, until the vertices of the scaled first three-dimensional content meet the first and second conditions.

[0162] Specifically, when the first three-dimensional content is scaled down, the difference between the first scaling value and the scaling compensation value is obtained. The difference is the scaling value of the first three-dimensional content after scaling down. For example, the first scaling value of the first three-dimensional content is 192. The scaling compensation value is determined to be 10 based on the first scaling value, and the first three-dimensional content is scaled down from 192 to 182. If the first three-dimensional content is scaled down again, the first scaling value of the first three-dimensional content is now 182.

[0163] Similarly, when the first three-dimensional content is enlarged, the process of enlarging the first three-dimensional content according to the scaling compensation value is essentially to increase the scaling compensation value on the basis of the first scaling value. Taking the first scaling value of the first three-dimensional content as 192 as an example again, the scaling compensation value is determined to be 10 based on the first scaling value, and the first three-dimensional content is enlarged from 192 to 202. If the first three-dimensional content is enlarged again, the first scaling value of the first three-dimensional content is now 202.

[0164] In one example, the scaling compensation value is determined as follows: if the first scaling value is less than 1, the second scaling value is obtained by multiplying the first scaling value by N times, and the scaling compensation value is determined based on the number of decimal places contained in the second scaling value; if the first scaling value is greater than 1, 1 / N times the first scaling value is used as the third scaling value, and the scaling compensation value is determined based on the number of integer places contained in the third scaling value; wherein N is a multiple of 10.

[0165] Specifically, when the first scaling value is less than 1, it indicates that the first three-dimensional content has already been scaled down when imported into the naked-eye 3D editor. Therefore, whether scaling down or scaling up the first three-dimensional content is performed by an integer multiple, which would result in excessive scaling or scaling of the first three-dimensional content. Therefore, the first scaling value is scaled up by 10 times each time, and the scaling compensation value is determined based on the number of decimal places in the second scaling value after the 10-fold scaling. When the first scaling value is greater than 1, it indicates that the first three-dimensional content has already been scaled up when imported into the naked-eye 3D editor. Therefore, scaling up or scaling down by a decimal multiple would not significantly adjust the first three-dimensional content, resulting in a large number of times required to adjust the first three-dimensional content to the optimal viewing position, wasting computing resources. Therefore, the first scaling value is scaled down by 10 times, and the scaling compensation value is determined based on the number of integer places in the third scaling value after the scaling.

[0166] It should be noted that, when the first scaling value is less than 1, the second scaling value is obtained by multiplying the first scaling value by N times, and when the scaling compensation value is determined based on the number of decimal places contained in the second scaling value, assuming that the number of decimal places contained is m, the scaling compensation value can be 0.1 to the mth power; when the first scaling value is greater than 1, 1 / N times the first scaling value is used as the third scaling value, and when the scaling compensation value is determined based on the number of integer places contained in the third scaling value, assuming that the number of integer places contained is m, the scaling compensation value can be 10 to the mth power.

[0167] For example, assuming N is 10, if the first scaling value of the current three-dimensional model is 0.0345, the second scaling value is 0.345, and the scaling compensation value is 0.001. If the first scaling value of the current three-dimensional model is 192, the third scaling value is 19.2, and the scaling compensation value is 10.

[0168] It should be noted that, regardless of whether the three-dimensional model is reduced or enlarged, the scaling value of the first three-dimensional content is a positive value. If the difference between the first scaling value and the scaling compensation value is less than 0, it means that the content cannot be reduced according to the current scaling compensation value, and the scaling compensation value needs to be adjusted. Specifically, the process may be to first determine whether the difference between the scaling compensation value and the first scaling value is less than 0. If it is less than 0, the scaling compensation value is reduced according to the preset multiple; then, based on the difference between the scaled compensation value and the first scaling value, the first three-dimensional content obtained this time is reduced.

[0169] In one embodiment, a method for obtaining the two-dimensional coordinates of multiple vertices of a first three-dimensional content on a display screen is specifically as follows: first, obtaining the spatial coordinates of the multiple vertices in the first three-dimensional content, wherein the spatial coordinates are the coordinates of the first three-dimensional content in a model space; then, converting the spatial coordinates corresponding to each of the multiple vertices into world coordinates; and then, converting the world coordinates corresponding to each of the multiple vertices into two-dimensional coordinates on the display screen.

[0170] Specifically, referring to FIG7 , FIG7 shows the process of converting the spatial coordinates in the model space into the world coordinates in the present disclosure: first, the translation matrix T, the rotation matrix R, and the scaling matrix S from the model space to the world space are determined; then, according to the spatial coordinates p0 of the first three-dimensional content, the translation matrix T, the rotation matrix R, and the scaling matrix S, the spatial coordinates in the model space are converted into the world coordinates P M , that is, P M =T×R×S×p0.

[0171] Next, referring to FIG8 , FIG8 shows the process of converting the world coordinates into the screen coordinates in the present disclosure. Specifically, the world coordinates are first converted into the coordinates under the camera's perspective, and then the coordinates under the camera's perspective are projected into two-dimensional coordinates on the display screen through the projection matrix. The essence of converting the world coordinates into the coordinates under the camera's perspective is translation and rotation operations. The rotation matrix R corresponding to the camera's perspective can be used to convert the world coordinates into the screen coordinates. view The translation matrix T corresponding to the camera view To get the coordinates under the camera's perspective, and then use the projection matrix Mpresp to convert the coordinates of the vertex to the standard device coordinate system of [-1,1], that is, VP=R view ×T view ×Mpresp×P M , where VP is the two-dimensional coordinate on the display screen.

[0172] In one example, considering that the camera perspective of the naked-eye 3D editor is fixed, the conversion relationship between spatial coordinates and two-dimensional coordinates can be directly determined in advance. Therefore, when importing the first three-dimensional content, the two-dimensional coordinates of the vertices of the first three-dimensional content on the display screen can be directly obtained based on the conversion relationship.

[0173] This embodiment converts the spatial coordinates of multiple vertices of the first three-dimensional content into two-dimensional coordinates on the display screen when importing the first three-dimensional content, thereby facilitating the determination of the position of the boundary of the first three-dimensional content and further facilitating the determination of whether the first three-dimensional content needs to be scaled to meet viewing requirements.

[0174] In one embodiment, if the resolution of the display screen is adjusted, the scaled second three-dimensional content may not be able to adapt to the resolution. In this case, the second three-dimensional content displayed on the display screen may be incomplete or unclear, and the second three-dimensional content needs to be re-scaled. The specific process may be: first, in response to the adjustment operation of the resolution of the display screen, the target resolution of the adjusted display screen is obtained; then, based on the target resolution, the target display area is adjusted; thereafter, based on the adjusted target display area and the two-dimensional coordinates of each of the multiple vertices on the display screen, the second three-dimensional content is scaled; or, based on the adjusted target display area and the two-dimensional coordinates of each of the multiple vertices in the second three-dimensional content on the display screen, the second three-dimensional content is scaled.

[0175] Among them, the target display area represents the best area for displaying the three-dimensional model. After the user adjusts the resolution of the display screen, the target display area may be adjusted. After adjusting the resolution, the target display area can be re-determined according to the adjusted target resolution. Then, when the target display area is adjusted, the second three-dimensional content is re-scaled so that the second three-dimensional content is re-adapted to the target display area, thereby improving the user's viewing experience.

[0176] In one embodiment, after scaling first 3D content to obtain second 3D content, if new 3D content is imported, the similarity between the new 3D content and the first 3D content can be determined. If the similarity is high, it means that the new 3D content and the first 3D content have similar sizes. Therefore, when scaling the new 3D content, the scaling process of the scaled first 3D content can be directly referenced, thereby minimizing the steps of scaling the 3D model and saving computing resources.

[0177] The specific process may be: for the fifth three-dimensional content to be displayed, obtaining the similarity between the fifth three-dimensional content and the first three-dimensional content; wherein the similarity is used to represent the size difference between the fifth three-dimensional content and the first three-dimensional content; when the similarity is greater than a preset similarity, scaling the fifth three-dimensional content according to the scaling parameters of the first three-dimensional content.

[0178] In this embodiment, if multiple first 3D contents are displayed before the fifth 3D content is displayed, the similarities between the fifth 3D content and the multiple first 3D contents can be compared, and the fifth 3D content can be scaled based on the scaling parameter of at least one first 3D content having a similarity greater than a preset similarity. For example, the fifth 3D content can be scaled based on the scaling parameter of the first 3D content having a similarity greater than a preset similarity and having the highest similarity.

[0179] In this embodiment, it is possible to first determine whether the fifth three-dimensional content is located within the area boundary of the target display area. If so, the fifth three-dimensional content can be enlarged based on the scaling parameters of the first three-dimensional content having a similarity greater than a preset similarity and the highest similarity; if not, the fifth three-dimensional content can be reduced based on the scaling parameters of the first three-dimensional content having a similarity greater than a preset similarity and the highest similarity.

[0180] Of course, if the similarities between the fifth three-dimensional content and all the first three-dimensional content are small, such as smaller than the preset similarity, the fifth three-dimensional content can be scaled according to the process of steps S101 to S103 above.

[0181] The similarity between the fifth three-dimensional content and the first three-dimensional content is greater than a predetermined similarity, indicating that the size difference between the fifth three-dimensional content and the first three-dimensional content is small. Therefore, when scaling the fifth three-dimensional content, the scaling can be performed directly according to the scaling parameters of the first three-dimensional content without requiring multiple attempts. After scaling according to the scaling parameters of the first three-dimensional content is completed, the positions of the vertices of the fifth three-dimensional content and the boundary of the target display area can be re-compared to reduce the possibility that the fifth three-dimensional content remains difficult to view after scaling.

[0182] The disclosed embodiment determines the two-dimensional coordinates of multiple vertices of imported first three-dimensional content projected onto the display screen, and determines whether the first three-dimensional content is in a suitable position based on the two-dimensional coordinates and the regional boundary of the target display area on the display screen. If the first three-dimensional content is not in a suitable position, the first three-dimensional content is scaled multiple times according to the scaling value and scaling compensation value of the first three-dimensional content until second three-dimensional content occupying a suitable position is obtained. Thus, by automatically scaling the first three-dimensional content, adaptive adjustment of the first three-dimensional content according to the screen is achieved, so that the three-dimensional content imported into the naked-eye 3D editor for observation can always be at the optimal viewing angle, avoiding the situation where the size of the three-dimensional model imported by the naked-eye 3D editor is inconsistent, making the three-dimensional model difficult to observe.

[0183] The following describes the display method provided by the embodiment of the present disclosure in combination with specific scenarios:

[0184] First, in the naked eye 3D editor, when the first three-dimensional content is imported, the spatial coordinates P of the center point of the first three-dimensional content are determined. c Then, extend lines from the center point of the first three-dimensional content in all directions to obtain the smallest cube that surrounds the first three-dimensional content. The eight vertices of the cube are the vertices to be projected of the first three-dimensional content. The spatial coordinates of the eight vertices can be expressed as: P0 = P c +v3(Ex,Ey,Ez),P1=P c +v3(Ex,-Ey,Ez),P2=P c +v3(Ex,Ey,-Ez),P3=P c +v3(Ex,-Ey,-Ez), P4=P c +v3(-Ex,Ey,Ez),P5=P c +v3(-Ex,-Ey,Ez),P6=P c +v3(1E.x,Ey,1E.z),P7=P c +v3(-Ex,-Ey,-Ez).

[0185] Afterwards, according to the conversion relationship P between the spatial coordinates of the 3D model and the world coordinates M =T×R×S×p0, and the conversion relationship between world coordinates and screen coordinates VP=R view ×T view ×Mpresp×P M The two-dimensional coordinates of each vertex on the display screen can be obtained; where T is the translation matrix, R is the rotation matrix, S is the scaling matrix, p0 is the spatial coordinate, P M is the world coordinate, R view is the rotation matrix corresponding to the camera perspective, T view is the translation matrix corresponding to the camera perspective, Mpresp is the projection matrix, and VP is the two-dimensional coordinate.

[0186] Then, the maximum and minimum values ​​of the X-axis and the maximum and minimum values ​​of the Y-axis in the two-dimensional coordinates of multiple vertices of the first three-dimensional content can be determined, that is, Rect.X = Min(X), Rect.Y = Max(X), Rect.With = Min(Y) and Rect.Height = Max(Y).

[0187] Next, the target point of the first three-dimensional content in the world space can be obtained, and a fourth three-dimensional content can be created. The fourth three-dimensional content is an empty object. The coordinates of the target point of the first three-dimensional content in the world space are assigned to the fourth three-dimensional content, and the fourth three-dimensional content is used as the parent node of the first three-dimensional content to facilitate the subsequent scaling process. The target point is the lowest point of the first three-dimensional content. Scaling according to the lowest point can prevent the first three-dimensional content from exceeding the lower edge of the screen.

[0188] Among them, the Y-axis value of the lowest point is the smallest Y-axis value among the multiple vertices of the first three-dimensional content. If only the first three-dimensional content exists, the X-axis value and Z-axis value of the center point of the first three-dimensional content can be directly displayed as the X-coordinate and Z-coordinate of the lowest point; if there are other three-dimensional models besides the first three-dimensional content, the X-coordinate of the lowest point is determined as the average of the X-axis values ​​of the center points of the multiple three-dimensional models, and the Z-coordinate is determined as the average of the Z-axis values ​​of the center points of the multiple three-dimensional models.

[0189] Afterwards, the sizes of Rect.X, Rect.Y, Rect.With, and Rect.Height are compared with the boundary position of the target display area to determine whether the first three-dimensional content is within the optimal viewing angle. To reduce restrictions, it is possible to only determine whether the position of the three-dimensional model on the display screen is within the optimal viewing angle within the X-axis range, thereby determining whether to enlarge or reduce the first three-dimensional content.

[0190] If Rect.X > Screen.Width / 4 and Rect.Y < Screen.Width × 3 / 4, it means that the size of the first 3D content is within the target display area, but the occupied position is small and difficult to observe. At this time, the first 3D content needs to be enlarged.

[0191] In this case, obtain the first scaling value of the first 3D content. If the first scaling value is less than 1, expand the first scaling value by 10 times, and according to the number of decimal places N of the expanded first scaling value, obtain the scaling compensation value as the Nth power of 0.1. Then, enlarge the first 3D content according to the scaling compensation value. If the first scaling value is greater than 1, shrink the first scaling value by 10 times, and according to the number of integer digits N of the shrunk first scaling value, obtain the scaling compensation value as the (N - 2)th power of 10. Then, enlarge the first 3D content according to the scaling compensation value.

[0192] If Rect.X <= Screen.Width / 4 or Rect.X >= Screen.Width × 3 / 4, it means that at least one boundary of the first 3D content is outside the target display area, and the first 3D content needs to be shrunk.

[0193] In this case, obtain the first scaling value of the first 3D content. If the first scaling value is less than 1, expand the first scaling value by 10 times, and according to the number of decimal places N of the expanded first scaling value, obtain the scaling compensation value as the Nth power of 0.1. Then, shrink the first 3D content according to the difference between the first scaling value and the scaling compensation value. If the first scaling value is greater than 1, shrink the first scaling value by 10 times, and according to the number of integer digits N of the shrunk first scaling value, obtain the scaling compensation value as the (N - 2)th power of 10. Then, shrink the first 3D content according to the difference between the first scaling value and the scaling compensation value.

[0194] After scaling the first 3D content, update the coordinates of the vertices of the first 3D content to facilitate re - determining whether the scaled first 3D content still needs to be enlarged or shrunk. If any of the above conditions is met, repeat the process of enlarging or shrinking the first 3D content. If neither condition is met, it means that the first 3D content has been scaled to the optimal position. At this time, stop scaling the first 3D content and display the first 3D content in the target display area of the naked - eye 3D editor.

[0195] It should be noted that the above 3D model is the 3D content described in this embodiment.

[0196] The present disclosure also provides a three-dimensional content display system. Referring to FIG. 9 , FIG. 9 shows a schematic structural diagram of the three-dimensional content display system provided by the present disclosure. As shown in FIG. 9 , the display system specifically includes:

[0197] A display screen 201 is configured to display three-dimensional content, wherein a target display area is defined on the display screen 201;

[0198] The processor 202 is connected to the display screen 201 and is configured with a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by the processor, the processor performs the following steps: determining, for imported first three-dimensional content, two-dimensional coordinates of each of multiple vertices of the first three-dimensional content when projecting the vertices onto the display screen; and scaling the first three-dimensional content based on positions of the multiple two-dimensional coordinates on the display screen and a region boundary of the target display area.

[0199] The scaled second three-dimensional content is displayed in the target display area.

[0200] In this embodiment, the processor 202 may be configured in the display screen 201 . The process of scaling the first three-dimensional content by the processor 2020 may refer to the process of the display method described in the above embodiment, which is not described in detail here.

[0201] An embodiment of the present disclosure further provides an electronic device, including a processor and a memory, and a computer program stored in the memory and executable on the processor, causing the processor to execute the display method as described in any embodiment of the present disclosure.

[0202] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0203] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, commodity, or device that includes the element.

[0204] The above is a detailed introduction to a display method and device provided by the present disclosure. Specific examples are used herein to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method and core ideas of the present disclosure. At the same time, for those skilled in the art, according to the ideas of the present disclosure, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

[0205] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.

[0206] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0207] References herein to "one embodiment," "an embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Furthermore, please note that instances of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.

[0208] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0209] In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present disclosure may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present disclosure.

Claims

1. A display method, characterized in that: The method comprises: determining, for the imported first three-dimensional content, two-dimensional coordinates of each of the plurality of vertices of the first three-dimensional content on the display screen when projecting the plurality of vertices onto the display screen; scaling the first three-dimensional content based on the plurality of two-dimensional coordinates and a region boundary of a target display region on the display screen; The scaled second three-dimensional content is displayed in the target display area; wherein the proportion of the second three-dimensional content occupying the target display area is within a preset proportion range.

2. The display method according to claim 1, wherein: The determining of projecting the plurality of vertices of the first three-dimensional content onto the display screen includes: Acquiring resource parameters corresponding to the first three-dimensional content, where the resource parameters include remaining computing resources of a device where the display screen is located and / or a data volume of the first three-dimensional content; determining, based on the resource parameters, a plurality of vertices to be projected from the first three-dimensional content; The two-dimensional coordinates of each of the plurality of vertices to be projected on the display screen are determined.

3. The display method according to claim 2, wherein: The determining, based on the resource parameters, a plurality of vertices to be projected from the first three-dimensional content includes: When the remaining computing resources are greater than a preset resource and / or the data amount is less than a preset data amount, determining all vertices of the first three-dimensional content as the plurality of vertices to be projected; When the remaining computing resources are less than preset resources and / or the data amount is greater than a preset data amount, some vertices of the first three-dimensional content are determined as the multiple vertices to be projected.

4. The display method according to claim 3, wherein: The determining some vertices of the first three-dimensional content as the plurality of vertices to be projected includes: determining a boundary of the first three-dimensional content; A plurality of vertices on the boundary are used as the vertices to be projected.

5. The display method according to claim 4, wherein: After determining the boundary of the first three-dimensional content, the method further includes: displaying the first three-dimensional content on the display screen, and displaying the boundary on the first three-dimensional content; In response to the adjustment operation on the boundary, obtaining a new boundary; A plurality of vertices on the new boundary are used as the vertices to be projected.

6. The display method according to claim 4, wherein: The determining a boundary of the first three-dimensional content includes: Obtaining a geometric center point of the first three-dimensional content; A boundary surrounding the first three-dimensional content is generated based on the spatial coordinates of the geometric center point and extension lines from the geometric center point to the first three-dimensional content in various directions.

7. The display method according to claim 1, wherein: Before scaling the first three-dimensional content, the method further includes: Obtaining a target point based on the spatial coordinates of the plurality of vertices in the first three-dimensional content and the spatial coordinates of a plurality of third three-dimensional contents; wherein the Y-axis value of the target point in the spatial coordinates is the minimum Y-axis value of the plurality of vertices in the spatial coordinates, and the plurality of third three-dimensional contents includes the first three-dimensional content and content different from the first three-dimensional content; creating an empty fourth three-dimensional content based on the three-dimensional coordinates of the target point in the spatial coordinates, and using the fourth three-dimensional content as a parent node of the first three-dimensional content; Scaling the first three-dimensional content includes: The first three-dimensional content is scaled based on the parent node and the target point.

8. The display method according to claim 7, wherein: The acquiring of the target point based on the spatial coordinates of the plurality of vertices in the first three-dimensional content and the spatial coordinates of the plurality of third three-dimensional contents includes: Obtaining the center coordinates of the geometric center points of each of the plurality of third three-dimensional contents; Based on the plurality of center coordinates and the minimum Y-axis value, the three-dimensional coordinates of the target point are acquired.

9. The display method according to claim 8, wherein: The acquiring the three-dimensional coordinates of the target point based on the plurality of center coordinates and the minimum Y-axis value includes: Taking the average of the X-axis values ​​in the plurality of center coordinates as the X-axis value of the target point in the space coordinates; Taking the average value of the Z-axis values ​​in the plurality of center coordinates as the Z-axis value of the target point in the space coordinates; The three-dimensional coordinates of the target point are obtained based on the X-axis value, the Z-axis value, and the minimum Y-axis value.

10. The display method according to claim 1, wherein: Scaling the first three-dimensional content based on positions of the plurality of two-dimensional coordinates on the display screen and a region boundary of a target display region on the display screen includes: Obtaining endpoint coordinates of a plurality of endpoints on the boundary of the region; determining, based on the endpoint coordinates and the two-dimensional coordinates of each of the plurality of vertices, whether the plurality of vertices satisfy a first condition, the first condition being that the plurality of vertices are all located within the boundary of the region; If not, performing at least one reduction process on the first three-dimensional content until the first condition is met; If so, determining whether the plurality of vertices satisfy a second condition, and if the second condition is not satisfied, performing at least one amplification process on the first three-dimensional content until the second condition is satisfied; The second condition is that the plurality of vertices are all located within the region boundary, and the distances between the plurality of vertices and the region boundary are less than a preset distance.

11. The display method according to claim 1, wherein: Scaling the first three-dimensional content includes: scaling the first three-dimensional content multiple times; wherein, during each scaling, scaling the first three-dimensional content based on a previous scaling value and the scaling compensation value determined this time; The scaling compensation value is determined based on the scaling value.

12. The display method according to claim 11, wherein: Scaling the first three-dimensional content based on the previous scaling value and the scaling compensation value determined this time during each scaling, includes: Obtaining a first scaling value of the first three-dimensional content at this time; determining the current scaling compensation value according to the first scaling value; In a case where the scaling is reduction, reducing the first three-dimensional content obtained this time based on a difference between the scaling compensation value and the first scaling value; In a case where the scaling is magnification, the first three-dimensional content obtained this time is magnified based on the scaling compensation value.

13. The display method according to claim 12, wherein: The determining of the current scaling compensation value according to the first scaling value includes: If the first scaling value is less than 1, multiplying the first scaling value by N times to obtain a second scaling value, and determining the scaling compensation value according to the number of decimal places contained in the second scaling value; If the first scaling value is greater than 1, 1 / N times the first scaling value is used as the third scaling value, and the scaling compensation value is determined according to the number of integer bits contained in the third scaling value; wherein N is a multiple of 10.

14. The display method according to claim 13, wherein: The reducing the first three-dimensional content obtained this time based on the difference between the scaling compensation value and the first scaling value includes: If the difference between the scaling compensation value and the first scaling value is less than 0, reducing the scaling compensation value by the preset multiple; The first three-dimensional content obtained this time is scaled down based on the difference between the scaled-down scaling compensation value and the first scaling value.

15. The display method according to claim 1, wherein: After displaying the scaled second three-dimensional content in the target display area, the method further includes: In response to an adjustment operation on the resolution of the display screen, obtaining a target resolution of the display screen after adjustment; Adjusting the target display area based on the target resolution; The second three-dimensional content is scaled based on the adjusted target display area and the two-dimensional coordinates of each of the multiple vertices on the display screen; or the second three-dimensional content is scaled based on the adjusted target display area and the two-dimensional coordinates of each of the multiple vertices in the second three-dimensional content on the display screen.

16. The display method according to claim 1, wherein: After displaying the scaled second three-dimensional content in the target display area, the method further includes: For fifth three-dimensional content to be displayed, obtaining a similarity between the fifth three-dimensional content and the first three-dimensional content; wherein the similarity is used to represent a size difference between the fifth three-dimensional content and the first three-dimensional content; When the similarity is greater than a preset similarity, the fifth three-dimensional content is scaled according to the scaling parameter of the first three-dimensional content.

17. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when executed by the processor, the display method according to any one of claims 1 to 16 is implemented.

Citation Information

Patent Citations

  • Three-dimensional navigation display method and relevant device thereof

    CN102538802A

  • Three-dimensional display method and system for automatic parking interface and vehicle

    CN110794970A

  • Mapping method and device from three-dimensional space to two-dimensional plane, equipment and storage medium

    CN115546012A

  • Method for displaying real-size three-dimensional model and mobile terminal

    CN115797003A

  • Display method and device

    CN118605823A