Image rendering method, related device and storage medium

By adjusting the size of objects to occupy more screen pixels, the problem of small objects being discarded in traditional rendering techniques is solved, achieving efficient and low-cost display effects.

CN121544453BActive Publication Date: 2026-05-15SHENYANG AIRCRAFT DESIGN INST AVIATION IND CORP OF CHINA +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENYANG AIRCRAFT DESIGN INST AVIATION IND CORP OF CHINA
Filing Date
2026-01-20
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In traditional rendering techniques, small objects are discarded because they occupy less than one physical pixel in screen space, affecting information integrity and decision accuracy. Existing solutions consume large amounts of computing resources or are costly, making it difficult to effectively display small objects.

Method used

By adjusting the size of the object to occupy more screen pixels, and using interpolation and magnification factors to dynamically adjust based on the distance between the object and the camera and the number of screen pixels, the object is ensured to be visible on the screen without affecting the realism of the scene.

Benefits of technology

It enables the visibility of small objects on the screen, improves information integrity and user experience, and reduces computing resource consumption and costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121544453B_ABST
    Figure CN121544453B_ABST
Patent Text Reader

Abstract

The application relates to the field of image rendering, and provides an image rendering method, related devices and a storage medium. The method comprises the following steps: receiving scene information and the pixel width and height of a screen, wherein the scene information comprises the coordinates of an object, the size of the object, the coordinates of a camera and the viewport information of the camera; adjusting the size of the object; rendering the object according to the coordinates of the object, the adjusted size of the object, the coordinates of the camera and the viewport information of the camera; the adjusting of the size of the object comprises the following steps: determining the number of pixels occupied by the object on the screen according to the scene information and the pixel width and height of the screen; adjusting the size of the object according to the number of pixels occupied by the object on the screen; or adjusting the size of the object according to the distance between the object and the camera. The size of the object in the display picture is adjusted, so that smaller objects can also be displayed in the picture, and the integrity of the picture is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image rendering, and more specifically to an image rendering method, related apparatus, and storage medium. Background Technology

[0002] The rendering process of a rendering engine includes: application stage, geometry stage, rasterization stage, pixel shading stage, and output merging stage. In traditional solutions, during the rasterization stage, small objects in some images are discarded because their size in screen space is less than one physical pixel. This prevents the objects from being rendered and displayed, affecting the integrity of information and the accuracy of decision-making, posing a serious hidden danger, especially in applications such as monitoring, simulation, and command.

[0003] Some solutions attempt to provide higher-precision source images during the application phase, but this cannot overcome the limitation of the fixed physical resolution of the screen. For simulation scenarios, this method is ineffective, and it consumes significant computational resources with low returns.

[0004] In other approaches, Level of Detail (LOD) techniques are used in reverse during the application and geometry phases to employ higher-precision models for distant objects. However, this increases the computational burden and offers limited improvement to the problem of discarding small objects. For objects smaller than a pixel, increasing the number of vertices in the model (e.g., turning a point into a tiny triangle) may still not cover a complete pixel, offering limited improvement while significantly increasing the burden on the geometry and rasterization phases, resulting in a low return on investment.

[0005] In other solutions, the problem is fundamentally solved by replacing the output devices with higher-density ones, i.e., increasing the physical resolution of the hardware, but this is extremely costly and not suitable for upgrading existing facilities. Summary of the Invention

[0006] This application provides an image rendering method, related apparatus, and storage medium that can adjust the size of objects in the display screen, so that smaller objects can also be displayed in the screen, thereby improving the integrity of the screen.

[0007] In a first aspect, embodiments of this application provide an image rendering method, the method comprising: receiving scene information and the pixel width and height of a screen, the scene information including the coordinates of an object, the size of the object, the coordinates of a camera, and the viewport information of the camera; adjusting the size of the object; rendering the object based on the coordinates of the object, the adjusted size of the object, the coordinates of the camera, and the viewport information of the camera; wherein adjusting the size of the object comprises: determining the number of pixels on the screen occupied by the object based on the scene information and the pixel width and height of the screen; adjusting the size of the object based on the number of pixels on the screen occupied by the object; or, adjusting the size of the object based on the distance between the object and the camera.

[0008] This solution breaks away from the traditional thinking that rendering must strictly adhere to actual spatial proportions, introducing an object magnification mechanism. For objects that need to be magnified, such as those important to the observer but far from the camera, whose actual size is less than one screen pixel, or objects that wouldn't be displayed on the screen according to existing rendering methods, the object's size is magnified so that the rendered object occupies more screen pixels, thus making the object visible on the screen. For objects that need to be shrunk, such as those that would be too large to display on the screen and negatively impact the user's viewing experience, the shrunk object is rendered so that it appears smaller on the screen, improving the user's viewing comfort.

[0009] Furthermore, in this solution, the size of the object is adjusted based on its distance from the camera or the number of pixels it occupies on the screen. The adjustment method is related to the size of the object displayed on the screen. The object adjustment process has little impact on the realism of the scene in which the object is located and is less likely to cause misunderstandings for the observer.

[0010] In some implementations, the first interpolation coefficient is determined according to the following formula:

[0011]

[0012] in, Indicates the first interpolation coefficient. This indicates the distance between the object and the camera. Indicates the preset minimum distance. This indicates the preset maximum distance.

[0013] In some embodiments, determining the first magnification factor based on the first interpolation factor, the preset magnification factor corresponding to the preset minimum distance, and the preset magnification factor corresponding to the preset maximum distance includes: determining the first magnification factor according to the following formula:

[0014]

[0015] in, Indicates the first magnification factor. Indicates the first interpolation coefficient. This indicates the preset magnification factor corresponding to the preset minimum distance. This indicates the preset magnification factor corresponding to the preset maximum distance.

[0016] In this scheme, the magnification factor changes linearly with distance. When the object moves continuously, the magnification factor also changes continuously, so that the observer on the other side will not see obvious distortion of the object, and the magnification process of the object is more natural.

[0017] In some implementations, adjusting the size of the object based on the number of pixels on the screen occupied by the object includes: if the number of pixels on the screen occupied by the object is less than a first preset number of pixels, then adjusting the size of the object based on the number of pixels on the screen occupied by the object.

[0018] In some implementations, adjusting the size of the object based on the number of pixels on the screen occupied by the object if the number of pixels on the screen occupied by the object is less than a first preset number of pixels includes: if the number of pixels on the screen occupied by the object is less than the first preset number of pixels, then performing the following steps: obtaining a second preset distance between the object and the camera; determining the pixels corresponding to the second preset distance, wherein the pixels corresponding to the second preset distance are the number of pixels on the screen occupied by the object when the distance between the object and the camera is the second preset distance; determining a first distance between the object and the camera, wherein the first distance is the distance between the object and the camera when the number of pixels on the screen occupied by the object is equal to the first preset number of pixels; determining a second interpolation coefficient based on the current distance between the object and the camera, the second preset distance, and the first distance; determining a second magnification coefficient based on the second interpolation coefficient and the pixels corresponding to the second preset distance; and magnifying the size of the object based on the second magnification coefficient.

[0019] In some implementations, the second interpolation coefficient is determined according to the following formula:

[0020]

[0021] in, This represents the second interpolation coefficient. This indicates the current distance between the object and the camera. Indicates the first distance. This indicates the second preset distance.

[0022] In this scheme, the magnification factor only takes effect when the object is shrunk to a very small size, such as 3 pixels. It only slows down the process of the object shrinking to 2 pixels. In reality, what is seen is only one or two dots. At this size level, it is difficult for the human eye to judge when the object should disappear, thus making the process of object magnification more natural.

[0023] In some implementations, the number of pixels corresponding to the second preset distance is less than the number of pixels corresponding to the first preset distance.

[0024] In some implementations, the object enclosure information is the information about how the object encloses the sphere.

[0025] In some implementations, the object bounding information is the information of the object bounding box.

[0026] In some implementations, adjusting the size of the object includes adjusting the object's size with the object's center of motion as the center point. This implementation zooms in on the object's center of motion, rather than the object's modeling center point, which reduces the deviation in the object's position caused during the zooming process.

[0027] In some implementations, the center of motion of the object is the object's center of mass.

[0028] In some implementations, the center of motion of the object is the geometric center of the object.

[0029] In some implementations, the center of motion of the object is a pre-set point.

[0030] In some implementations, before adjusting the size of the object, the method further includes: obtaining an importance identifier for the object. The importance identifier is used to determine whether the object is an important object. Adjusting the size of the object includes: if the object is an important object, adjusting its size. By adjusting the size of important objects, smaller important objects can be displayed on the screen, or larger important objects can be reduced in size, minimizing their impact on other objects and improving the user experience.

[0031] In some implementations, adjusting the size of the object includes: if the object is not an important object, then not adjusting the size of the object and outputting the rendered object.

[0032] In some embodiments, the method further includes: merging rendered objects without resizing and rendered objects with resizing into the same frame, and outputting the merged frame to a display device or storage device.

[0033] In some embodiments, the object includes a first object and a second object, and the method further includes:

[0034] The first object is rendered based on its coordinates, adjusted size, camera coordinates, and viewport information.

[0035] The second object is rendered based on its coordinates, its unadjusted size, the camera's coordinates, and the camera's viewport information.

[0036] Merge the rendered first object and the rendered second object.

[0037] In some implementations, the method further includes: outputting the merged first object and the second object.

[0038] Secondly, embodiments of this application provide an image rendering apparatus having functions corresponding to the rendering method provided in the first aspect above. These functions can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, and these modules can be software and / or hardware.

[0039] In one embodiment, the image rendering apparatus includes an input / output module and a processing module. The input / output module receives scene information and the pixel width and height of the screen, the scene information including the coordinates of an object, the size of the object, the coordinates of the camera, and the viewport information of the camera. The processing module adjusts the size of the object. Adjusting the size of the object includes: determining the number of pixels on the screen occupied by the object based on the scene information and the pixel width and height of the screen; adjusting the size of the object based on the number of pixels on the screen occupied by the object, or adjusting the size of the object based on the distance between the object and the camera; and rendering the object based on the object's coordinates, the adjusted size of the object, the camera's coordinates, and the camera's viewport information.

[0040] In some implementations, the processing module is further configured to calculate the distance between the object and the camera based on the object's coordinates and the camera's coordinates; if the distance between the object and the camera is greater than a first preset distance, the size of the object is enlarged.

[0041] In some embodiments, the processing module is further configured to determine a first preset distance interval based on the distance between the object and the camera. The first preset distance interval includes a preset maximum distance and a preset minimum distance, wherein the preset minimum distance is greater than or equal to the first preset distance, the distance between the object and the camera is greater than or equal to the preset minimum distance, and the distance between the object and the camera is less than the preset maximum distance. The processing module is further configured to determine a first interpolation coefficient based on the preset maximum distance, the preset minimum distance, and the distance between the object and the camera. The processing module is further configured to determine a first magnification coefficient based on the first interpolation coefficient, a preset magnification coefficient corresponding to the preset minimum distance, and a preset magnification coefficient corresponding to the preset maximum distance. The processing module is further configured to magnify the size of the object based on the first magnification coefficient.

[0042] In some implementations, the first interpolation coefficient is determined according to the following formula:

[0043]

[0044] in, Indicates the first interpolation coefficient. This indicates the distance between the object and the camera. Indicates the preset minimum distance. This indicates the preset maximum distance.

[0045] In some implementations, the processing module is also configured to determine a first amplification factor according to the following formula:

[0046]

[0047] in, Indicates the first magnification factor. Indicates the first interpolation coefficient. This indicates the preset magnification factor corresponding to the preset minimum distance. This indicates the preset magnification factor corresponding to the preset maximum distance.

[0048] In some implementations, the processing module is further configured to enlarge the size of the object if the number of pixels occupied by the object on the screen is less than a first preset number of pixels.

[0049] In some embodiments, the processing module is further configured to perform the following steps: obtaining a second preset distance between the object and the camera; determining the pixels corresponding to the second preset distance, wherein the pixels corresponding to the second preset distance are the number of pixels on the screen occupied by the object when the distance between the object and the camera is the second preset distance; determining a first distance between the object and the camera, wherein the first distance is the distance between the object and the camera when the number of pixels on the screen occupied by the object is equal to a first preset number of pixels; determining a second interpolation coefficient based on the current distance between the object and the camera, the second preset distance, and the first distance; determining a second magnification coefficient based on the second interpolation coefficient and the pixels corresponding to the second preset distance; and magnifying the size of the object based on the second magnification coefficient.

[0050] In some implementations, the second interpolation coefficient is determined according to the following formula:

[0051]

[0052] in, This represents the second interpolation coefficient. This indicates the current distance between the object and the camera. Indicates the first distance. This indicates the second preset distance.

[0053] In some implementations, the second magnification factor is determined according to the following formula:

[0054]

[0055] in, This represents the second amplification factor. First preset number of pixels The number of pixels the object is expected to display when the distance between the object and the camera is a second preset distance, wherein , A positive number greater than 1 Indicates the second interpolation coefficient. This represents the pixel corresponding to the second preset distance.

[0056] In some implementations, the pixel corresponding to the second preset distance is smaller than the first preset pixel.

[0057] In some implementations, the processing module is also used to perform perspective transformation and viewport transformation on the object to obtain the number of pixels on the screen occupied by the object.

[0058] In some implementations, the object enclosure information is the information about how the object encloses the sphere.

[0059] In some implementations, the object bounding information is the information of the object bounding box.

[0060] In some implementations, the processing module is also used to adjust the size of the object with the object's center of motion as the center point.

[0061] In some implementations, the center of motion of the object is the object's center of mass.

[0062] In some implementations, the center of motion of the object is the geometric center of the object.

[0063] In some implementations, the center of motion of the object is a pre-set point.

[0064] In some implementations, the processing module is further configured to obtain an importance identifier for the object, determine whether the object is an important object based on the importance identifier, and adjust the size of the object if it is an important object. By adjusting the size of important objects, smaller important objects can be displayed on the screen, or larger important objects can be reduced in size, minimizing their impact on other objects and improving the user experience.

[0065] In some implementations, if the object is not considered an important object, the processing module is also used to output the rendered object without adjusting its size.

[0066] In some implementations, the processing module is also used to merge the rendered objects (without resizing) and the rendered objects (with resizing) into the same screen, and the input / output module is also used to output the merged screen to a display device or storage device.

[0067] In some implementations, the object includes a first object and a second object, and the processing module is further configured to render the first object according to the coordinates of the first object, the adjusted size of the first object, the coordinates of the camera and the viewport information of the camera; render the second object according to the coordinates of the second object, the unadjusted size of the second object, the coordinates of the camera and the viewport information of the camera; and merge the rendered first object and the rendered second object.

[0068] In some implementations, the input / output module is also used to output the merged first object and the second object.

[0069] Thirdly, embodiments of this application provide a display method, the method comprising:

[0070] Rendering objects using the method of the first aspect and any of its embodiments;

[0071] Display the rendered object.

[0072] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect.

[0073] Fifthly, embodiments of this application provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.

[0074] Sixthly, embodiments of this application provide a chip including a processor coupled to a transceiver for executing the technical solution provided in the first aspect of this application. In one possible design, the chip can also be a dedicated hardware structure for implementing the technical solution provided in the first aspect above; for example, processing involving neural network models can be implemented by a dedicated neural network processor or a graphics processor.

[0075] In a seventh aspect, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to perform the method provided in the first aspect described above.

[0076] The beneficial effects of aspects two through seven mentioned above can be referred to in aspect one, and will not be discussed further here. Attached Figure Description

[0077] The objectives, features, and advantages of the embodiments of this application will become readily understood by referring to the accompanying drawings and the detailed description of the embodiments. Wherein:

[0078] Figure 1 A flowchart illustrating an image rendering method provided in an embodiment of this application;

[0079] Figure 2 This is a schematic diagram of the horizontal cross-section of the sphere surrounded by the object in the embodiment of this application under perspective projection;

[0080] Figure 3 A schematic diagram illustrating the process of adjusting the size of an object based on the distance between the object and the camera, provided for an embodiment of this application;

[0081] Figure 4 A schematic diagram illustrating the process of enlarging the size of an object based on the distance between the object and the camera, provided for an embodiment of this application;

[0082] Figure 5 A flowchart illustrating the process of adjusting the size of an object based on the number of pixels it occupies on the screen, provided for an embodiment of this application;

[0083] Figure 6This is a schematic diagram of the horizontal cross-section of the sphere surrounded by another object in the embodiments of this application under perspective projection;

[0084] Figure 7 A flowchart illustrating another image rendering method provided in an embodiment of this application;

[0085] Figure 8 A flowchart illustrating another image rendering method provided in an embodiment of this application;

[0086] Figure 9 This is a schematic diagram of the device according to an embodiment of this application;

[0087] Figure 10 This is another schematic diagram of the device according to an embodiment of this application;

[0088] Figure 11 This is a schematic diagram of a server structure in one embodiment of this application.

[0089] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0090] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects (e.g., the first magnification factor and the second magnification factor represent different magnification factors, and so on), and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The division of modules in the embodiments of this application is merely a logical division; in actual applications, there may be other division methods. For example, multiple modules may be combined into or integrated into another system, or some features may be ignored or not performed. Additionally, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interface, indirect coupling between modules, or electrical or other similar forms of communication connection, none of which are limited in the embodiments of this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed among multiple circuit modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of this application.

[0091] Understandably, in computer graphics, the eye point is the center of the camera lens, or the position of the camera. The following text will not distinguish between the eye point and the camera.

[0092] This application provides an image rendering method that can be executed by an image rendering device and can be applied to scenes that require displaying small objects. This method enlarges small objects to reduce the loss of small objects during the display process.

[0093] The method proposed in this application can be applied in various scenarios, such as flight simulators, military command, public safety monitoring, airport tower dispatching, and space observation, where large, low-pixel-pitch displays are used to display critical information (i.e., important objects). It can also be applied to professional visualization applications that require maintaining detail visibility on large-pixel screens, such as displaying athletes' numbers from a distance during live broadcasts of large sporting events or showing tiny models at a distance in large-scale sand table simulations.

[0094] The following section uses the example of pilot training to identify virtual targets in a flight simulator to illustrate the solution of this application.

[0095] First, information such as the position and size of the virtual target (e.g., aircraft 1) is obtained, and the distance between the virtual target and the pilot (an example of an eye point) is calculated. Then, the size of the virtual target on the screen after perspective transformation is calculated using existing techniques. When the target is smaller than 2 pixels, the magnification factor S of the virtual target is calculated according to steps 303 to 305 below, based on a pre-set maximum visible distance for the pilot, and the virtual target is magnified. The magnified virtual target is then rendered, ensuring that it can be recognized by the pilot's eye within the maximum visible distance.

[0096] The following is a detailed description of the solutions in the embodiments of this application. (Refer to...) Figure 1 , Figure 1 This is a flowchart illustrating an image rendering method provided in an embodiment of this application. The method includes steps 101-103.

[0097] Step 101: Receive scene information and the pixel width and height of the screen.

[0098] The scene information includes the object's coordinates, the object's dimensions, the camera's coordinates, and the camera's viewport information.

[0099] An object's coordinates can be represented by a three-dimensional vector in the world coordinate system, such as... This coordinate system defines the specific location of the object's origin (such as the object's center or bottom) in the global virtual space.

[0100] The size of an object can be determined by its bounding information, such as the object's bounding sphere or bounding box.

[0101] The camera's coordinates are represented by a three-dimensional vector in the world coordinate system, such as... This indicates the location of the camera (eye point) in the virtual world.

[0102] The camera's viewport information includes projection parameters and viewport transformation parameters.

[0103] Projection parameters define how a 3D scene is projected onto a 2D imaging plane. For example, if the projection type is perspective projection, the projection parameters include the field of view angle, aspect ratio, near clipping plane, and far clipping plane. If the projection type is orthographic projection, the projection parameters include the range of left and right, top and bottom, and near and far clipping planes.

[0104] The viewport transformation parameters define how the projected 2D image is mapped onto a specific area on the screen, including the lower left corner coordinates, width, height, and depth range of the viewport on the screen.

[0105] The pixel dimensions of a screen include the screen's pixel width (or the number of pixels in the width direction) and the screen's pixel height (or the number of pixels in the height direction).

[0106] It's understandable that "screen" refers to the area used to display objects. This screen can be the entire display (or the whole screen), or a portion of the display, not just the entire screen. Different screen sizes will cause variations in the screen's pixel dimensions.

[0107] For example, the display screen is 27 inches in size with an aspect ratio of 16:9 and a resolution of 2560 × 1440 pixels, meaning that the screen's pixel width is 2560 and the screen's pixel height is 1440.

[0108] If the image is displayed in a portion of the screen, the screen's pixel width can be 1920, 1600, etc., and the screen's pixel height can be 1200, 1050, etc.

[0109] Step 102: Adjust the size of the object.

[0110] In some examples, step 102 includes step 1021. In other examples, step 102 includes steps 1022 and 1023.

[0111] Step 1021: Adjust the size of the object according to the distance between the object and the camera.

[0112] See Figure 3In some embodiments, step 1021 can be implemented as steps 10211 and 10212.

[0113] Step 10211: Calculate the distance between the object and the camera based on the object's coordinates and the camera's coordinates.

[0114] Assuming the camera position is used express, The position of an object is used express, Referring to Formula 1, the distance from the object to the camera is obtained based on the Euclidean distance. .

[0115] Formula 1

[0116] Step 10212: If the distance between the object and the camera is greater than the first preset distance, then enlarge the size of the object according to the distance between the object and the camera.

[0117] The first preset distance can include multiple, for example, the first preset distance This can be configured by those skilled in the art according to the actual project requirements. For example, if an object is more than 1000 meters away and cannot be displayed on the screen, then to see the object, the settings can be adjusted accordingly. Set it to 1000.

[0118] Each object has an independent first preset distance. For example, the first preset distance of aircraft number 1. The first preset distance for aircraft number 2 is 1000 meters. It is 1100 meters.

[0119] In some embodiments, if the distance between the object and the camera is not greater than a first preset distance, the size of the object is not magnified.

[0120] See Figure 4 Step 10212 can be implemented as follows: if the distance from the object to the camera is greater than the first preset distance, then execute steps 201 to 204.

[0121] Step 201: Determine the first preset distance range based on the distance from the object to the camera.

[0122] The first preset distance range includes a preset maximum distance and a preset minimum distance. The preset minimum distance is greater than or equal to the first preset distance, and the distance between the object and the camera is greater than or equal to the preset minimum distance and less than the preset maximum distance.

[0123] Those skilled in the art can define a first preset distance range for each object as needed. For example, if it is desired that the object gradually zooms in from 1000 meters away from the camera, and zooms in to the maximum at 2000 meters, then the preset maximum distance is 2000 meters and the preset minimum distance is 1000 meters.

[0124] There can be multiple first preset distance intervals for each object, and each first preset distance interval can be set with a preset magnification factor. For example, the first preset distance intervals for aircraft No. 1 include 1000 meters to 2000 meters, 2000 meters to 3000 meters, and 3000 meters to 5000 meters. The preset magnification factor for 1000 meters is 4.0, and the preset magnification factors for 2000 meters, 3000 meters, and 5000 meters are 3.0, 1.5, and 1.0, respectively. Therefore, the magnification factor for the first preset distance interval 1000 meters to 2000 meters is between 4.0 and 3.0, and the magnification factor for 2000 meters to 3000 meters is between 3.0 and 1.5.

[0125] Based on the distance from the object to the camera, the current location of the object within a pre-set distance range can be determined. For example, if aircraft number 1 is currently 1200 meters away from the camera, it falls within the 1000-2000 meter range. The pre-set minimum distance can be equal to or greater than the pre-set distance; for example, if the pre-set distance is 1000 meters, the pre-set minimum distance can be 1000 meters, 2000 meters, etc.

[0126] By setting multiple first preset distance intervals for each object, the magnification factor of the object can be determined according to the first preset distance interval to which the object belongs when the object is at different distances from the eye point. This allows for more flexible setting of the magnification factor when the object is at different distances from the eye point in subsequent steps.

[0127] Step 202: Determine the first interpolation coefficient based on the preset maximum distance, preset minimum distance, and the distance between the object and the camera.

[0128] For example, the first interpolation coefficient is determined by referring to Formula 2. .

[0129] Formula 2

[0130] in, Indicates the distance between the object and the camera. Indicates the preset minimum distance. This represents the preset maximum distance. The first interpolation coefficient, determined by Formula 2, allows the object to be smoothly magnified or shrunk when the distance between the camera and the object changes, reducing abrupt changes in the object's size.

[0131] First interpolation coefficient The computation function satisfies the condition in the domain [ Within the range [0,1], the value is an increasing function. Formula 2 above provides a method for determining the first interpolation coefficient using the linear interpolation coefficient calculation formula. In other embodiments, the first interpolation coefficient can also be calculated using other interpolation methods. For example, referring to Formula 3, the first interpolation coefficient is calculated using the smoothing interpolation coefficient calculation formula. .

[0132] , Formula 3

[0133] Smooth interpolation function in and The first derivative is 0 in both places, which makes the change of coefficients at the start and end points smoother, and the final scaling effect will be smoother and less likely to be noticed.

[0134] Step 203: Determine the first magnification factor based on the first interpolation factor, the preset magnification factor corresponding to the preset minimum distance, and the preset magnification factor corresponding to the preset maximum distance.

[0135] For example, the first amplification factor can be determined by referring to Formula 4.

[0136] Formula 4

[0137] in, Indicates the first magnification factor. This indicates the preset magnification factor corresponding to the preset minimum distance. This indicates the preset magnification factor corresponding to the preset maximum distance.

[0138] Step 204: Enlarge the size of the object according to the first magnification factor.

[0139] For example, during rendering, the transformation of an object from model space to world space is related to the magnification matrix. This allows you to magnify the object. Refer to Formula 5 for the magnification transformation matrix. From the first magnification factor generate.

[0140] Formula 5

[0141] By setting the first preset distance range, the preset magnification factor corresponding to the minimum preset distance, and the preset magnification factor corresponding to the maximum preset distance for each object, the magnification factor corresponding to different distances between the object and the eye point can be determined, thus enabling more flexible magnification of the object.

[0142] Step 1022: Determine the number of pixels on the screen occupied by the object based on the scene information and the pixel width and height of the screen.

[0143] The object's bounding information and position within the camera's view frustum can be determined using the object's coordinates, dimensions, and camera coordinates. By rendering the object based on its position within the camera's view frustum, the camera's viewport information, and the screen's pixel width and height, the number of pixels the object occupies on the screen can be obtained.

[0144] Object bounding information can be implemented as a bounding box or a bounding sphere, etc. The following introduction will take the bounding sphere as an example.

[0145] Assume the forward direction vector of the eye point is represented as The direction vector at the eye point is represented as The right-direction vector of the eye point is represented as Then, the view matrix of the camera used to transform the object from world coordinates to camera coordinates. This can be represented as Formula 6.

[0146] Formula 6

[0147] To transform the camera's view frustum into a standard cube, the camera's perspective projection matrix... This can be represented as Formula 7.

[0148] Formula 7

[0149] in, Indicates the distance between the near cutting plane and the eye point. Indicates the distance between the far cutting plane and the eyepoint. The angles subtended by the viewport in the left, right, bottom, and top directions are respectively represented by the product of the tangent of the angle and n, which is the viewport cone angle.

[0150] Reference Figure 2 , Figure 2 This is a schematic diagram of the horizontal cross-section of the object-enclosed sphere under perspective projection in an embodiment of this application. The horizontal cross-section of the object-enclosed sphere under perspective projection is used to calculate the number of pixels on the screen in the horizontal direction occupied by the object. Where O represents the eye point, P represents the object position, r represents the radius of the object-enclosed sphere, and dis represents the length of OP (i.e., the aforementioned...). ), n represents the distance between the near cutting plane and the eye point, f represents the distance between the far cutting plane and the eye point, G represents the point of tangency between the eye point and the right tangent of the bounding ball, a is a parallel line passing through point P and parallel to n, J represents the intersection of OD and a, I represents the intersection of OG and a, ON is perpendicular to a, N is the perpendicular point, K, Q, R, L represent the intersections of the lines connecting eye point O and J, N, P, I with the near cutting plane, respectively.

[0151] Figure 2 The position of the object-enclosed sphere in the camera's view frustum can be represented by the coordinates of the center point of the object-enclosed sphere and the radius of the sphere.

[0152] The camera's viewport information includes the distance between the near clipping plane and the eyepoint, the distance between the far clipping plane and the eyepoint, the product of the tangent values ​​of the angles subtended by the camera's viewport in the left, right, bottom, and top directions and the distance between the near clipping plane and the eyepoint, or the viewport cone angles in the up, down, left, and right directions, and the camera's position and orientation information, etc.

[0153] Based on the position of the object surrounding the sphere within the camera's view frustum, the number of pixels the object occupies on the screen can be calculated. Let's take calculating the pixel width of the object on the screen as an example:

[0154] Referring to formula 8, Points near the cutting surface It can be determined by the view matrix. and projection matrix It comes from transformation.

[0155] Formula 8

[0156] Referring to Formula 9, the half-angle of the angle formed by the camera and the object surrounding the sphere can be obtained using trigonometric functions. .

[0157] Formula 9

[0158] Referring to Formula 10, based on the camera's view matrix and the forward direction vector of the eye point Get the camera's forward direction .

[0159] Formula 10

[0160] Referring to Formula 11, based on the camera's view matrix and the direction the eye point is pointing towards the object Obtain the orientation of the object in the camera (referred to as the object orientation). .

[0161] Formula 11

[0162] Referring to Formula 12, and using the dot product formula, the forward direction of the camera is obtained. and object direction The included angle .

[0163] Formula 12

[0164] Referring to formulas 13 to 15, the distance from the camera to the near-cutting plane of the object is obtained using the trigonometric tangent calculation formula. .

[0165] Formula 13

[0166] Formula 14

[0167] Formula 15

[0168] in, This represents the distance from the leftmost projection of the object onto the cutting plane to the center of the cutting plane. This represents the distance from the rightmost side of the object's projection onto the cutting plane to the center of the cutting plane.

[0169] Therefore, referring to Formula 16, the pixel width of the object on the screen can be obtained. .

[0170] Formula 16

[0171] in, Indicates the screen pixel width. These represent the products of the tangent values ​​of the angles subtended in the four directions of the viewport (left, right, bottom, and top) and n, respectively.

[0172] Similarly, referencing step 1022 above... Figure 2 By replacing the horizontal cross-sectional view with a vertical cross-sectional view, the pixel height of the object on the screen can be calculated. This will not be elaborated upon here.

[0173] Step 1023: Adjust the size of the object according to the number of pixels it occupies on the screen.

[0174] For example, the number of pixels an object occupies on the screen can be 0.1 pixels, 0.5 pixels, 1 pixel, 1.4 pixels, 2 pixels, 10 pixels, etc.

[0175] The number of pixels an object occupies on the screen includes the pixel width or pixel height of the object, or both.

[0176] In some embodiments, step 1023 can be implemented as step 10231.

[0177] Step 10231: If the number of pixels on the screen occupied by the object is less than the first preset number of pixels, then adjust the size of the object according to the number of pixels on the screen occupied by the object.

[0178] The number of pixels occupied by an object on the screen being less than a first preset number of pixels includes the number of pixels occupied by the object on the screen in the width direction being less than the first preset pixel width, or the number of pixels occupied by the object on the screen in the height direction being less than the first preset pixel height, or the number of pixels occupied by the object on the screen in the width direction being less than the first preset pixel width and the number of pixels occupied by the object on the screen in the height direction being less than the first preset pixel height.

[0179] In some existing technologies, if an object occupies less than 1 pixel on the screen, then that object's pixels are not displayed on the screen. If an object occupies more than 1 pixel but less than 2 pixels, then the object's pixel may be located between two pixels on the screen. For example, if the first and second pixels on the screen are adjacent, and the object occupies 1.2 pixels, with 0.5 pixels located in the first pixel and 0.7 pixels located in the second pixel, then although the object's pixel count is greater than 1 pixel, it does not completely cover any pixel on the screen, and therefore, the corresponding pixel is not displayed.

[0180] In some examples of this application, the first preset pixel height is 2 pixels. The first preset pixel width is 2 pixels. By setting the pixel for determining whether to enlarge the object size to 2, even if the object's pixel position is located at two screen pixels, it will at least cover one complete screen pixel. This ensures that the object will not be discarded because its pixel position on the screen is less than 1 pixel, thus improving the success rate of object display.

[0181] In other examples, the first preset pixel height is 1 pixel. The first preset pixel width is 1 pixel. Enlarging objects smaller than 1 pixel—that is, enlarging them before they are displayed, rather than enlarging them earlier—saves computational resources.

[0182] In other examples, the first preset pixel height is 3, 4, or 5 pixels. The first preset pixel width is 3, 4, or 5 pixels. Enlarging the object when it is large can give it a better magnification effect.

[0183] In some examples, both the first preset pixel height and the first preset pixel width are less than 10 pixels. This is because excessively large pixels can affect the display of other objects in the image, such as obscuring them. By setting both the first preset pixel height and the first preset pixel width to less than 10 pixels, the impact on other objects in the image is reduced, allowing the image to display normally on the screen.

[0184] The implementation method of step 10231 is described below. (Refer to...) Figure 5Step 10231 can be implemented as follows: if the number of pixels occupied by the object on the screen is less than the first preset number of pixels, then steps 301 to 306 are executed.

[0185] Step 301: Obtain the second preset distance between the object and the camera.

[0186] In some examples, the second preset distance is a preset distance. This second preset distance can be stored in memory connected to the image rendering device. For example, if it is desired that the object can still be displayed at a distance of 2000 meters from the camera, the second preset distance is set to 2000. Alternatively, the second preset distance is the farthest distance from the camera when the object needs to be magnified.

[0187] Step 302: Determine the pixel corresponding to the second preset distance.

[0188] Wherein, the pixels corresponding to the second preset distance are the number of pixels on the screen occupied by the object when the distance between the object and the camera is the second preset distance.

[0189] The pixel corresponding to the second preset distance is obtained through calculation. This pixel can be a decimal or an integer, such as 0.1, 1, or 2.

[0190] The pixels corresponding to the second preset distance can be determined by... It is indicated that the method for determining the pixels corresponding to the second preset distance can refer to the above description of calculating the number of pixels on the screen occupied by the object based on the position of the object surrounding the sphere in the camera's view frustum, such as Formulas 8 to 16.

[0191] It is understood that the pixel corresponding to the second preset distance may include the pixel width and the pixel height corresponding to the second preset distance. The pixel width and the pixel height corresponding to the second preset distance may be the same or different.

[0192] In some examples, referring to Formula 17, the pixel corresponding to the second preset distance is determined by the smaller of the pixel width and pixel height of the object on the screen.

[0193] Formula 17

[0194] In some embodiments, the number of pixels corresponding to the second preset distance is less than the number of pixels corresponding to the first preset distance. This allows for a gradual reduction in the size of objects in scenes where their dimensions are decreasing, such as when an airplane flies away into the distance, thus reducing abrupt changes in object size on the screen and making the image transitions smoother.

[0195] In some examples, the number of pixels corresponding to the second preset distance being less than the number of pixels corresponding to the first preset distance can be implemented as follows: the width of the pixel corresponding to the second preset distance is less than the width of the first preset pixel. Alternatively, it can be implemented as the height of the pixel corresponding to the second preset distance is less than the height of the first preset pixel. Or, it can be implemented as both the width and height of the pixel corresponding to the second preset distance being less than the width and height of the first preset pixel.

[0196] Step 303: Determine the initial distance between the object and the camera.

[0197] Wherein, the first distance is the distance between the object and the camera when the number of pixels on the screen occupied by the object is a first preset number of pixels.

[0198] Reference Figure 6 Using objects to surround the sphere, with the center of the sphere facing the camera, for the first distance Estimation is performed. Here, O represents the eye point, P represents the object position, r represents the radius of the object's bounding sphere, and dis represents the length of OP (i.e., the aforementioned...). ), n represents the distance between the near cutting plane and the eye point, f represents the distance between the far cutting plane and the eye point, G represents the point of tangency between the eye point and the right tangent of the bounding ball, a is a parallel line passing through point P and parallel to n, J represents the intersection of OD and a, I represents the intersection of OG and a, ON is perpendicular to a, N is the perpendicular point, K, Q, R, L represent the intersections of the lines connecting eye point O and J, N, P, I with the near cutting plane, respectively.

[0199] First, let's set Let the first preset number of pixels be set. This represents the number of pixels the object is expected to display when the distance between the object and the camera is a second preset distance. , It is a positive number greater than 1.

[0200] In some embodiments, .

[0201] Calculate the length of half of the sphere enclosed by the object on the near-cut plane. :

[0202] Formula 18

[0203] in, This indicates the number of pixels in the width direction of the screen.

[0204] Determine the included angle using Formula 19. .

[0205] Formula 19

[0206] in, This indicates the distance between the near cut plane and the eye point.

[0207] In some embodiments, another In other words, the magnified object changes within a 1-pixel range. When At that time, Formula 19 can be expressed as Formula 20.

[0208] Formula 20

[0209] Therefore, referring to Formula 21, the number of pixels occupied by the width or height of the object on the screen is determined as follows: At that time, the first distance between the object and the camera .

[0210] Formula 21

[0211] Step 304: Determine the second interpolation coefficient based on the current distance between the object and the camera, the second preset distance, and the first distance.

[0212] Taking a first preset pixel count of 3 and a maximum object display pixel count of 2 at the farthest distance as an example, referring to formula 22, according to... In the interval Calculate the second interpolation coefficient within the position.

[0213] Formula 22

[0214] in, Indicates the second interpolation coefficient. , Indicates the second preset distance. Indicates the first distance.

[0215] The first distance is between the object and the camera. The number of pixels at time is the first preset number of pixels. In order to make the zooming process of objects smoother in scenes where objects in the picture are getting smaller and reduce the sudden change in the size of objects, zooming should start when the distance between the object and the camera is greater than the first distance to ensure that the object is visible. The farther the distance, the greater the zoom needs to be. This represents the number of screen pixels an object needs to occupy. In other words, it indicates the desired screen size. At that time, the object's pixels on the screen are , When the object appears on the screen, the pixel count is... To obtain this result, we substitute it into formula 22 and calculate... The range is [0,1], in order to achieve the target value , will [0,1] become Then become And thus obtained This is the formula for calculating pixels. If the target value is [2,3], then the formula is obtained. .

[0216] This application example uses the example of an object changing by 1 pixel. It is understood that those skilled in the art can modify the formula to make the range of pixel change of the object on the screen between 2 or 3 pixels.

[0217] Step 305: Determine the second magnification factor based on the second interpolation factor and the pixels corresponding to the second preset distance.

[0218] Referring to Formula 23, based on the second interpolation coefficient The second magnification factor is determined by the pixels corresponding to the second preset distance from the object. .

[0219] Formula 23

[0220] in, Indicates the second interpolation coefficient. This indicates the number of pixels the object occupies on the screen before being magnified, or the number of pixels corresponding to the second preset distance.

[0221] when When that happens, Formula 23 can be expressed as Formula 24.

[0222] Formula 24

[0223] Step 306: Enlarge the size of the object according to the second magnification factor.

[0224] During rendering, the transformation of an object from model space to world space is related to the magnification matrix. Multiplication magnifies the object. (Magnification transformation matrix) By the second magnification factor generate.

[0225]

[0226] In some other embodiments, step 1022 may also include step 10223.

[0227] Step 10223: If the number of pixels on the screen occupied by the object is greater than the second preset number of pixels, then reduce the size of the object according to the number of pixels on the screen occupied by the object.

[0228] In some examples of this application, the second preset pixel count may include a second preset pixel count in the screen height direction (or second preset pixel height) and a second preset pixel count in the screen width direction (or second preset pixel width). The second preset pixel height is... The number of pixels along the screen height, and the second preset pixel width are... The number of pixels in the width direction of the screen. For example, m = 3, 4, 5, etc. For instance, if the number of pixels in the width direction is 2560 and the number of pixels in the height direction is 1440, when m = 3, the second preset pixel width... Second preset pixel height Therefore, the number of pixels occupied by the object in the width direction of the screen is greater than... When the object size is reduced, the number of pixels occupied by the object in the height direction of the screen is greater than [a certain value]. When that happens, the size of the object is reduced.

[0229] By reducing the size of objects when they are too large, we can reduce the number of objects that occupy too much space on the screen, making the displayed image more harmonious and improving the user's viewing experience.

[0230] Step 103: Render the object based on its coordinates, the adjusted size of the object, the camera's coordinates, and the camera's viewport information.

[0231] Referring to step 1022 above, the adjusted object size is used as the object size. Based on the object's coordinates, the adjusted object size, the camera's coordinates, and the camera's viewport information, the number of pixels on the screen occupied by the adjusted object is obtained.

[0232] Therefore, according to the method of this application embodiment, by enlarging the object, smaller objects can be displayed on the screen, thereby improving the integrity of the image. Furthermore, the method of this application embodiment can shrink larger objects, reducing the occlusion of larger objects on other objects in the image and displaying more elements in the image.

[0233] Reference Figure 7 In some embodiments, steps 401 and 402 are included before step 102, and the adjustment of the object size in steps 1023 and 1021 can be implemented as step 403.

[0234] Step 401: Obtain the importance label of the object.

[0235] Step 402: Determine whether an object is important by using its importance indicator.

[0236] An object's importance label indicates whether it is important. For example, the importance of an object can be determined by the different importance labels it carries: an importance label of 1 indicates an important object, while an importance label of 0 indicates a non-important object. Similarly, the presence or absence of an importance label can also determine an object's importance: an important object carries an importance label, while a non-important object does not.

[0237] In some embodiments, the importance of an object can be indicated by its type; for example, an object classified as a vehicle is considered an important object.

[0238] In some embodiments, objects of different importance carry different importance identifiers. For example, in an airport tower dispatching scenario, aircraft number 1 has an importance identifier of 0001, and aircraft number 2 has an importance identifier of 0010. By assigning different importance identifiers to different aircraft, pre-stored information can be retrieved for each aircraft in subsequent operations, allowing for personalized rendering of each aircraft and achieving better rendering results.

[0239] In some embodiments, the importance indicator can represent the level of importance of an object. For example, an importance indicator of 11 indicates that the object is important, an importance indicator of 10 indicates that the object is relatively important, and an importance indicator of 01 indicates that the object is not important. That is, the importance of objects from highest to lowest is 11 > 10 > 01.

[0240] Step 403: If the object is important, adjust its size.

[0241] By first determining whether an object is important, and then adjusting the size of important objects (such as by enlarging them), the rendering effect can be more tailored to the user's needs, resulting in a more accurate rendering. Furthermore, this improves rendering efficiency and saves computing resources.

[0242] In some embodiments, an object's importance can be determined by its importance identifier; for example, objects identified as 11 and 10 are considered important. Alternatively, an object identified as 11 is considered important.

[0243] By setting different importance labels to identify important objects, the objects that need to be adjusted can be flexibly modified in actual use of the embodiments, thereby improving the flexibility of object adjustment.

[0244] If the object is not important, its size will not be adjusted.

[0245] In some embodiments, step 1021 can also be implemented as follows: if the object is an important object, adjust the size of the object according to the distance between the object and the camera.

[0246] In some embodiments, step 10212 can also be implemented as follows: if the object is an important object and the distance from the object to the camera is greater than a first preset distance, then steps 201 to 204 are executed.

[0247] In some embodiments, step 1023 can also be implemented as follows: if the object is an important object, adjust the size of the object according to the number of pixels it occupies on the screen.

[0248] In some embodiments, step 10231 can also be implemented as follows: if the number of pixels occupied by the object on the screen is less than the first preset number of pixels, and the object is an important object, then steps 301 to 306 are executed.

[0249] In some embodiments, adjusting the object size in steps 1022 and 1021 can be achieved by adjusting the object's size with the object's center of motion as the center point. This implementation zooms in with the object's center of motion, rather than with the object's modeling center point, which reduces the deviation in the object's position caused during the zooming process.

[0250] The object includes a first object and a second object, and the method further includes:

[0251] The first object is rendered based on its coordinates, adjusted size, camera coordinates, and viewport information.

[0252] The second object is rendered based on its coordinates, its unadjusted size, the camera's coordinates, and the camera's viewport information.

[0253] Merge the rendered first object and the rendered second object;

[0254] Output the merged first and second objects;

[0255] Adjusting the size of the object includes: adjusting the size of the object with the center of motion of the object as the center point.

[0256] Reference Figure 8 , Figure 8 This is a schematic flowchart illustrating another image rendering method provided in an embodiment of this application. The image rendering method in this embodiment includes steps 501 to 410.

[0257] Step 501: Receive scene information and the pixel width and height of the screen.

[0258] The scene information includes the object's coordinates, the object's size, the camera's coordinates, and the camera's viewport information.

[0259] When rendering an image, the received scene information may include multiple objects, or in other words, the image to be rendered may consist of multiple objects. The image may include important objects and unimportant objects, that is, objects whose display size needs to be adjusted and objects whose display size does not need to be adjusted.

[0260] The relevant description of step 501 can be found in step 101.

[0261] Step 502: Determine whether an object in the scene is an important object.

[0262] For each object in the scene, the judgment in step 502 can be performed on that object.

[0263] If the object in the scene is an important object, proceed to step 503; if the object in the scene is not an important object, proceed to step 508.

[0264] The description of step 502 can be found in step 402. It is understood that step 402 provides a method for determining whether an object is important. In the implementation of this application embodiment, other methods can also be used to determine whether an object is important, such as based on the area where the object is located.

[0265] Step 503: Determine whether the distance between the object and the camera is greater than the first preset distance.

[0266] If the distance between the object and the camera is greater than the first preset distance, then proceed to step 504; if the distance between the object and the camera is not greater than the first preset distance, then proceed to step 505.

[0267] Step 504: Adjust the size of the object according to the distance between the object and the camera.

[0268] Step 505: Determine whether the number of pixels occupied by the object on the screen is less than the first preset number of pixels.

[0269] Step 506: Adjust the size of the object according to the number of pixels it occupies on the screen.

[0270] Step 507: Render the object based on the object's coordinates, the adjusted object size, the camera's coordinates, and the camera's viewport information.

[0271] The relevant descriptions of steps 504 to 507 can be found in step 102 above.

[0272] Step 508: Render the object.

[0273] Step 508 can be implemented by rendering the object based on its coordinates, the unadjusted size of the object, the camera's coordinates, and the camera's viewport information. In other words, rendering unimportant objects does not require enlarging them.

[0274] Step 509: Composite the rendered images of multiple objects.

[0275] For example, the rendered images of important objects (an example of the first object) and unimportant objects (an example of the second object) are composited.

[0276] Step 510: Output the composite image.

[0277] Through the embodiments of this application, important objects in the image can be magnified, so that the important objects are displayed better in the image and the display effect of the image is improved.

[0278] It is understandable that after step 502, step 505 can be executed first, and then step 503 can be executed.

[0279] The above describes an image rendering method according to an embodiment of this application. The following describes the image rendering apparatus (e.g., a server) that performs the above image rendering method.

[0280] See Figure 9 ,like Figure 9 The diagram shows the structure of an image rendering apparatus. The image rendering apparatus 60 in this embodiment can achieve the functionality described above. Figure 2 The steps of the image rendering method executed in the corresponding embodiment are described above. The functions implemented by the image rendering device 60 can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, and the modules can be software and / or hardware. The image rendering device 60 may include an input / output module 601 and a processing module 602. The functional implementation of the processing module 602 and the input / output module 601 can be found in [reference]. Figure 2 The operations performed in the corresponding embodiments will not be described in detail here. For example, the processing module 602 can be used to control the sending, receiving, and acquiring operations of the input / output module 601.

[0281] The image rendering apparatus 60 in this application embodiment has been described above from the perspective of modular functional entities. The image rendering apparatus in this application embodiment will be described below from the perspective of hardware processing.

[0282] It should be noted that, Figure 9The physical device corresponding to the input / output module 601 shown can be a transceiver, radio frequency circuit, communication module, and input / output (I / O) interface, etc., and the physical device corresponding to the processing module 602 can be a processor.

[0283] Figure 9 The devices shown can all have the following characteristics: Figure 10 The structure shown, when Figure 9 The image rendering device 60 shown has, for example, Figure 10 When the structure shown is used, Figure 10 The processor and transceiver in the device can perform the same or similar functions as the processing module 602 and input / output module 601 provided in the aforementioned device embodiments. Figure 10 The memory stores the computer programs that the processor needs to call when executing the above image rendering method.

[0284] This application also relates to a chip system including at least one processor and an interface circuit. The processor includes a plurality of vector storage units. The processor is used to perform instruction and / or data interaction through the interface circuit, causing the chip system to perform the methods of any of the above embodiments.

[0285] In one possible implementation, the chip system may also directly include a memory in which computer programs or computer instructions are stored.

[0286] For example, the memory can be volatile memory or non-volatile memory, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM).

[0287] This application also relates to a processor, which includes a plurality of storage units for calling computer programs or computer instructions stored in the memory to cause the processor to execute the methods described in any of the above embodiments.

[0288] For example, in the embodiments of this application, the processor is an integrated circuit chip with signal processing capabilities. For instance, the processor may be an FPGA, a general-purpose processor, a DSP, an ASIC, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, a SoC, a CPU, a network processor (NP), a microcontroller unit (MCU), a PLD, or other integrated chips, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. In one possible implementation, the embodiments of this application also provide a computer-readable storage medium storing program code, which, when executed on the computer, causes the computer to perform the above-described method embodiments.

[0289] It should be noted that the computing devices involved in the embodiments of this application may be servers and / or terminal devices.

[0290] The server involved in the embodiments of this application can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0291] The terminal devices involved in the embodiments of this application can be devices that provide voice and / or data connectivity to users, handheld devices with wireless connectivity, or other processing devices connected to a wireless modem. Examples include mobile phones (or "cellular" phones) and computers with mobile terminals, such as portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile devices that exchange voice and / or data with a wireless access network. Examples include Personal Communication Service (PCS) phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDAs), and other devices.

[0292] This application also provides a server; please refer to [link / reference]. Figure 11 , Figure 11 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 1100 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1122 (e.g., one or more processors) and memory 1132, and one or more storage media 1130 (e.g., one or more mass storage devices) for storing application programs 1142 or data 1144. The memory 1132 and storage media 1130 may be temporary or persistent storage. The program stored in the storage media 1130 may include one or more modules (not shown in the figure), each module may include a series of instruction operations on the server. Furthermore, the CPU 1122 may be configured to communicate with the storage media 1130 and execute the series of instruction operations in the storage media 1130 on the server 1100.

[0293] Server 1100 may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1158, and / or one or more operating systems 1141, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.

[0294] The steps performed by the server in the above embodiments can be based on this Figure 11 The structure of server 1100 is shown. For example, in the above embodiment, it consists of... Figure 9 The steps performed by the input / output module 601 and the processing module 602 shown can be based on this Figure 11 The server structure is shown. For example, the central processing unit 1122 performs the following operations by calling instructions from memory 1132:

[0295] Adjusting the size of the object includes: determining the number of pixels the object occupies on the screen based on the scene information and the pixel width and height of the screen; adjusting the size of the object based on the number of pixels it occupies on the screen, or adjusting the size of the object based on the distance between the object and the camera; and rendering the object based on the object's coordinates, the adjusted size of the object, the camera's coordinates, and the camera's viewport information.

[0296] The scene information and the pixel width and height of the screen are received through the input / output interface 1158. The scene information includes the coordinates of the object, the size of the object, the coordinates of the camera, and the viewport information of the camera.

[0297] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0298] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or modules, and may be electrical, mechanical, or other forms.

[0299] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0300] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0301] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0302] The technical solutions provided in the embodiments of this application have been described in detail above. Specific examples have been used in the embodiments of this application to illustrate the principles and implementation methods of the embodiments of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of the embodiments of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the embodiments of this application. Therefore, the content of this specification should not be construed as a limitation on the embodiments of this application.

Claims

1. An image rendering method, characterized in that, The method includes: The system receives scene information and the pixel width and height of the screen. The scene information includes the coordinates of the object, the size of the object, the coordinates of the camera, and the viewport information of the camera. The size of the object is determined by the object enclosure information. Adjusting the size of the object, wherein adjusting the size of the object means enlarging the size of the object; The position of the adjusted object's bounding information in the camera's view frustum is determined based on the object's coordinates, the adjusted size of the object, and the camera's coordinates. The object is rendered based on its position in the camera's view frustum, the camera's viewport information, and the pixel width and height of the screen. The adjustment of the object's size includes: The number of pixels on the screen occupied by the object is determined based on the scene information and the pixel width and height of the screen; Adjust the size of the object according to the number of pixels it occupies on the screen; or... Calculate the distance between the object and the camera based on the object's coordinates and the camera's coordinates; If the distance between the object and the camera is greater than a first preset distance, then the following steps are performed: A first preset distance range is determined based on the distance between the object and the camera. The first preset distance range includes a preset maximum distance and a preset minimum distance. The preset minimum distance is greater than or equal to the first preset distance. The distance between the object and the camera is greater than or equal to the preset minimum distance. The distance between the object and the camera is less than the preset maximum distance. The first interpolation coefficient is determined based on the preset maximum distance, the preset minimum distance, and the distance between the object and the camera; The first magnification factor is determined based on the first interpolation factor, the preset magnification factor corresponding to the preset minimum distance, and the preset magnification factor corresponding to the preset maximum distance; The size of the object is magnified according to the first magnification factor.

2. The method according to claim 1, characterized in that, The step of adjusting the size of the object according to the number of pixels it occupies on the screen includes: If the number of pixels occupied by the object on the screen is less than the first preset number of pixels, the size of the object is adjusted according to the number of pixels occupied by the object on the screen.

3. The method according to claim 2, characterized in that, The step of adjusting the size of the object according to the number of pixels it occupies on the screen includes: Obtain the second preset distance between the object and the camera; Determine the pixels corresponding to the second preset distance, wherein the pixels corresponding to the second preset distance are the number of pixels on the screen occupied by the object when the distance between the object and the camera is the second preset distance; Determine a first distance between the object and the camera, wherein the first distance is the distance between the object and the camera when the number of pixels occupied by the object on the screen is equal to a first preset number of pixels; The second interpolation coefficient is determined based on the current distance between the object and the camera, the second preset distance, and the first distance; The second magnification factor is determined based on the second interpolation factor and the pixels corresponding to the second preset distance; The size of the object is magnified according to the second magnification factor.

4. The method according to claim 3, characterized in that, The second preset distance is the farthest distance between the object and the camera when the object is magnified. The second magnification factor is determined by the following formula: in , Indicates the second interpolation coefficient. This represents the pixel corresponding to the second preset distance. Indicates the first preset number of pixels. This indicates the number of pixels the object is expected to display when the distance between the object and the camera is a second preset distance.

5. The method according to any one of claims 1-4, characterized in that, Before adjusting the size of the object, the method further includes: Obtain the importance identifier of the object; Whether an object is important is determined by the object's importance indicator; Adjusting the size of the object includes: if the object is an important object, adjusting the size of the object.

6. The method according to any one of claims 1-4, characterized in that, The object includes a first object and a second object, and the method further includes: The first object is rendered based on its coordinates, adjusted size, camera coordinates, viewport information, and pixel width and height of the screen. The second object is rendered based on the coordinates of the second object, the unadjusted size of the second object, the coordinates of the camera, the viewport information of the camera, and the pixel width and height of the screen. Merge the rendered first object and the rendered second object; Output the merged first and second objects; Adjusting the size of the object includes: adjusting the size of the object with the center of motion of the object as the center point.

7. An image rendering apparatus, characterized in that, include: Input / output modules and processing modules; The input / output module is used to receive scene information and the pixel width and height of the screen. The scene information includes the coordinates of the object, the size of the object, the coordinates of the camera, and the viewport information of the camera. The size of the object is determined by the object bounding information. The processing module is used to adjust the size of the object, determine the position of the adjusted object's bounding information in the camera's view frustum based on the object's coordinates, the adjusted object's size, and the camera's coordinates; render the object based on the position of the adjusted object's bounding information in the camera's view frustum, the camera's viewport information, and the screen's pixel width and height. Adjusting the object's size includes: determining the number of pixels the object occupies on the screen based on the scene information and the screen's pixel width and height; adjusting the object's size based on the number of pixels the object occupies on the screen; wherein, adjusting the object's size involves enlarging the object's size; or... Calculate the distance between the object and the camera based on the object's coordinates and the camera's coordinates; If the distance between the object and the camera is greater than a first preset distance, then the following steps are performed: A first preset distance range is determined based on the distance between the object and the camera. The first preset distance range includes a preset maximum distance and a preset minimum distance. The preset minimum distance is greater than or equal to the first preset distance. The distance between the object and the camera is greater than or equal to the preset minimum distance. The distance between the object and the camera is less than the preset maximum distance. The first interpolation coefficient is determined based on the preset maximum distance, the preset minimum distance, and the distance between the object and the camera; The first magnification factor is determined based on the first interpolation factor, the preset magnification factor corresponding to the preset minimum distance, and the preset magnification factor corresponding to the preset maximum distance; The size of the object is magnified according to the first magnification factor.

8. A computer-readable storage medium, characterized in that, It includes instructions that, when run on a computer, cause the computer to perform the method as described in any one of claims 1-6.

9. A computer program product comprising computer instructions, characterized in that, When executed by a processor, the computer instructions implement the method of any one of claims 1-6.