Visual training animation production method and device, equipment and medium

By moving display elements in a virtual 3D space and using a perspective camera for projection rendering, the problem of insufficient convenience and universality of existing naked-eye 3D vision training technology is solved, realizing the diversification and sustained interest of vision training and improving the effect of farsighted vision training.

CN121414928APending Publication Date: 2026-01-27SHENZHEN JIZHOU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511596057.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-01-27

AI Technical Summary

Technical Problem

Existing naked-eye 3D vision training technologies are not easy to implement, difficult to popularize on a large scale, have monotonous content, are easy for trainees to get bored, lack effective distant-looking training scenarios, and cannot improve farsighted vision.

Method used

By acquiring display elements and mapping them into a virtual 3D space equipped with a perspective camera, the elements move between the nearest and farthest planes according to preset movement rules and direction vectors, and are then projected onto a reference area using the perspective camera to create vision training animations.

Benefits of technology

It improves the convenience and universality of vision training, enhances trainees' interest, enables long-term immersive training, and effectively improves eyesight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121414928A_ABST
    Figure CN121414928A_ABST
Patent Text Reader

Abstract

The invention discloses a visual training animation production method and device, equipment and a medium, and relates to the technical field of visual training, and the visual training animation production method comprises the following steps: obtaining a plurality of display elements, and mapping the display elements to a virtual three-dimensional space provided with a perspective camera; the display elements are replaceable elements; the display elements are to-be-displayed elements stored in an associated medium of the display device and / or elements displayed in a reference area of the display device; determining a moving direction vector corresponding to the display element, and moving the display element in the virtual three-dimensional space according to a preset element moving sequence on the basis of a preset moving rule and the moving direction vector corresponding to the display element, the display elements are projected and rendered to the reference area by using the perspective camera every preset frame rendering time interval so as to complete animation production; the preset movement rule is that the display element moves between the farthest plane and the nearest plane. The convenience and universality of visual training can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vision training technology, and in particular to a method, apparatus, equipment and medium for producing vision training animations. Background Technology

[0002] Currently, human society has developed into a society with highly advanced information technology, and massive amounts of information are everywhere. When observers use their eyes at close range for extended periods to obtain information, it causes ciliary muscle spasm. Ciliary muscle spasm causes the image to fall behind the retina, inducing continuous elongation of the eye axis and leading to myopia.

[0003] Naked-eye 3D vision training is a newly emerging technology in recent years. It can significantly improve the eye's accommodative function, reduce accommodative lag, and enhance accommodative sensitivity, thus having a positive effect on the prevention and treatment of myopia.

[0004] However, existing naked-eye 3D vision training technologies rely on pre-made training animations or special devices, which have the following drawbacks: low ease of implementation and difficulty in widespread adoption; monotonous content, which can easily lead to boredom and difficulty in persisting; and a lack of effective distant-viewing training scenarios, which cannot improve farsighted vision.

[0005] In summary, improving the convenience and universality of vision training is an urgent problem to be solved. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for producing vision training animations, which can improve the convenience and universality of vision training. The specific solution is as follows:

[0007] In a first aspect, this application discloses a method for producing vision training animation, including:

[0008] Acquire several display elements and map the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device's associated medium and / or elements already displayed in the reference area of ​​the display device;

[0009] Determine the movement direction vector corresponding to the display element, and move the display element in the virtual three-dimensional space according to the preset element movement order, based on the preset movement rules and the movement direction vector corresponding to the display element. Starting from when all display elements have not moved, use a perspective camera to project and render the display elements in the virtual three-dimensional space to the reference area every preset frame rendering time interval to complete the production of vision training animation.

[0010] The preset movement rule is that the display element moves between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively.

[0011] Optionally, determining the movement direction vector corresponding to the displayed element includes:

[0012] The movement direction vectors corresponding to all display elements are determined based on the line segments of the preset starting point and the preset target ending point; wherein, the projection of the line segments of the preset starting point and the preset target ending point onto the Z-axis of the camera coordinate system is not 0;

[0013] Alternatively, a first direction vector is determined based on a straight line segment between a preset starting point and a preset first ending point, and a second direction vector is determined based on a straight line segment between a preset starting point and a preset second ending point. The movement direction vector is adjusted every preset frame rendering time interval within a preset reference time interval so as to change the movement direction vector corresponding to all display elements from the first direction vector to the second direction vector in sequence.

[0014] Set the second direction vector as the new first direction vector, select a new preset second endpoint, and jump to the step of determining the second direction vector based on the straight line segment of the preset starting point and the preset second endpoint, until there are no display elements that have not moved along the movement direction vector; wherein, the projections of the first direction vector and the second direction vector on the camera coordinate system Z axis are both not 0.

[0015] Optionally, after determining the movement direction vector corresponding to the displayed element, the method further includes:

[0016] If no spatial perception reference elements are established, then spatial perception reference elements are established based on the process of establishing target spatial perception reference elements;

[0017] If a spatial perception reference element has been established and the direction of the movement direction vector remains unchanged, then the established spatial perception reference element will be used as the current spatial perception reference element.

[0018] If a spatial perception reference element has been established, and the movement direction vector changes, a new spatial perception reference element will be established in real time based on the changed movement direction vector and the target spatial perception reference element establishment process.

[0019] Accordingly, the process of establishing spatial perception reference elements includes:

[0020] Set a spatial awareness reference element template and set the current instance of the template to a preset initial position in the virtual 3D space;

[0021] According to the target movement rules, the current instance of the template is moved along the movement direction vector to obtain the target instance;

[0022] The target instance is taken as the current instance, and the process jumps to the step of moving the current instance of the template along the movement direction vector by a preset distance until the number of instances of the template reaches a set number to obtain a spatially perceptible reference element; wherein, the instance arrangement direction is the same as the movement direction vector; the spatially perceptible reference element template is a display element that can be repeatedly instantiated in the virtual three-dimensional space;

[0023] Accordingly, the step of projecting and rendering the display elements in the virtual three-dimensional space onto the reference area using a perspective camera includes:

[0024] The display elements and spatial perception reference elements in the virtual three-dimensional space are projected and rendered onto the reference area using a perspective camera.

[0025] Optionally, before moving the display elements in the virtual three-dimensional space according to a preset element movement order based on preset movement rules and the movement direction vector corresponding to the display elements, the method further includes:

[0026] Treat all display elements and spatially-aware reference elements as a single target; determine the target displacement of the current frame during projection rendering, and translate the entire target based on the target displacement.

[0027] Optionally, the step of moving the display elements sequentially according to a preset element movement order based on preset movement rules and the movement direction vector corresponding to the display elements includes:

[0028] According to the preset element movement order, each display element is moved sequentially along the corresponding movement direction vector according to the preset movement rules;

[0029] After all display elements have been moved, each display element is moved sequentially along its corresponding target direction vector according to a preset element movement order and a preset movement rule; the target direction vector corresponding to each display element is the opposite direction vector of the movement direction vector corresponding to the display element.

[0030] After all display elements have been moved, the process jumps to the step of moving each display element sequentially along the corresponding movement direction vector according to the preset element movement order and preset movement rules, until a stop command is obtained.

[0031] Optionally, the method for creating the vision training animation further includes:

[0032] If a display element reset command is obtained, all display elements are reset, and the process jumps to the step of determining the movement direction vector corresponding to the display element to restart the element movement.

[0033] Optionally, the method for creating the vision training animation further includes:

[0034] The preset viewing distance ratio is set to be no less than 1; the preset viewing distance ratio is the ratio of the preset farthest distance to the preset nearest distance.

[0035] Secondly, this application discloses an apparatus for producing vision training animations, comprising:

[0036] A mapping module is used to acquire several display elements and map the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device's associated medium and / or elements already displayed in the reference area of ​​the display device;

[0037] The motion production module is used to determine the movement direction vector corresponding to the display element. In the virtual three-dimensional space, the display elements are moved sequentially according to the preset movement order, based on the preset movement rules and the movement direction vector corresponding to the display element. Starting from when all display elements have not moved, the display elements in the virtual three-dimensional space are projected and rendered onto the reference area using a perspective camera every preset frame rendering time interval to complete the production of the vision training animation.

[0038] The preset movement rule is that the display element moves between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively.

[0039] Thirdly, this application discloses an electronic device, including:

[0040] Memory, used to store computer programs;

[0041] A processor is used to execute the computer program to implement the aforementioned method for creating vision training animations.

[0042] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for creating vision training animations.

[0043] As can be seen, this application obtains several display elements and maps the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device's associated medium and / or elements already displayed in the reference area of ​​the display device; the movement direction vector corresponding to the display element is determined, and the display elements are moved sequentially in the virtual three-dimensional space according to a preset element movement order based on preset movement rules and the movement direction vector corresponding to the display element, and starting from when all display elements have not moved, the display elements in the virtual three-dimensional space are projected and rendered to the reference area using the perspective camera every preset frame rendering time interval to complete the production of the vision training animation; wherein, the preset movement rule is that the display elements move between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively. Therefore, this application directly creates animations for vision training on existing display devices based on the original display elements in the display device or the elements to be displayed stored in the associated medium of the display device. It does not rely on specific devices, thus improving universality. The display devices and display elements are diversified, and it does not rely on repetitive compositions, which increases the trainee's interest and allows the trainee to engage in long-term immersive training, ensuring better training results. In addition, this application completes the animation production based on the projection rendering function of the perspective camera, which is simple and fast. Furthermore, this application sets the display elements to move between the farthest plane and the nearest plane according to the set movement direction vector, which can effectively train vision. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0045] Figure 1 This is a flowchart of a method for producing a vision training animation disclosed in this application;

[0046] Figure 2 This is a schematic diagram of a reference area disclosed in this application;

[0047] Figure 3 This is a schematic diagram of the perspective camera frustum for a virtual three-dimensional space disclosed in this application;

[0048] Figure 4 A schematic diagram illustrating the preparation for establishing a spatial perception reference element as disclosed in this application;

[0049] Figure 5 This is a schematic diagram of a spatial perception reference element disclosed in this application;

[0050] Figure 6 This is a schematic diagram illustrating the movement process of the display elements disclosed in this application;

[0051] Figure 7 This application discloses a flowchart of a specific method for creating a vision training animation.

[0052] Figure 8 This is a schematic diagram illustrating the movement process of a display element as disclosed in this application, showing the change in the position of a spatially perceived reference element.

[0053] Figure 9 This application discloses a flowchart of a specific method for creating a vision training animation.

[0054] Figure 10 This is a schematic diagram illustrating the movement process of a display element as the spatial perception reference element changes with the direction vector of movement, as disclosed in this application.

[0055] Figure 11 This is a schematic diagram of the structure of a vision training animation production device disclosed in this application;

[0056] Figure 12 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Existing naked-eye 3D vision training technologies rely on pre-made training animations or special devices, which have the following drawbacks: low ease of implementation and difficulty in widespread adoption; monotonous content, which can easily lead to boredom and difficulty in persisting; and a lack of effective distant-viewing training scenarios, which cannot improve farsighted vision.

[0059] Therefore, this application proposes a vision training animation production scheme, which can improve the convenience and universality of vision training.

[0060] This application discloses a method for creating vision training animations, see [link to relevant documentation]. Figure 1 As shown, the method includes:

[0061] Step S11: Obtain several display elements and map the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device's associated medium and / or elements already displayed in the reference area of ​​the display device.

[0062] It should be noted that the virtual three-dimensional space may coincide with the camera coordinate system, but this does not mean that all embodiments of this application must coincide.

[0063] In this embodiment, the display device includes all visual output terminals such as a display screen, projector, and AR glasses. The display elements are elements displayed on all visual output terminals, such as text, images, animations, video playback windows, and 3D models. Display elements can be elements to be displayed stored in the associated medium of the display device and / or elements already displayed in the reference area of ​​the display device. The physical width of the reference area can be set to ≤50mm. Since most trainees have an interpupillary distance of 60mm, trainees can comfortably enter a naked-eye 3D state when observing from a distance of 25-30cm from the display device. If the physical width of the reference area increases, trainees need to increase their observation distance to comfortably enter a naked-eye 3D state. See also... Figure 2 The diagram shown is a schematic representation of a reference area; the elements displayed in the diagram are text already displayed in the reference area of ​​the display device.

[0064] In this embodiment, the process of mapping the display elements to a virtual 3D space equipped with a perspective camera involves first establishing a local coordinate system and mapping the display elements to this system to achieve local coordinateization. Then, a virtual 3D space is established, including a 3D Cartesian world coordinate system (the world coordinate system in the virtual 3D space, also known as the global coordinate system) and a perspective camera defined by the view frustum. The camera coordinate system is made to coincide with the world coordinate system, and the display elements are then set to the virtual 3D space to achieve global coordinateization. The specific steps are as follows: First, a segment of text in the reference area of ​​the display device is acquired. Specifically, the visual features of the text are acquired, obtaining the mesh data (including vertex coordinates, triangle indices, normal vectors, and UV coordinates), material, and texture of each display element, and determining the axis of each display element. Using the geometric center of the reference area as the origin, the horizontal direction to the right is the positive X-axis, the vertical upward direction is the positive Y-axis, and the direction perpendicular to the reference area inward is the positive Z-axis. A three-dimensional Cartesian coordinate system (local coordinate system) is established. Text is typed to obtain the coordinates of each display element in the local coordinate system. These coordinates are the local coordinates, and the process is called local coordinateization of the display elements. Second, a virtual three-dimensional space is established. Specifically, a three-dimensional Cartesian world coordinate system and a perspective projection camera defined by the view frustum are established. A camera coordinate system is established and made to coincide with the world coordinate system. The perspective projection camera uses the perspective projection matrix determined by the view frustum to photograph the elements in the virtual three-dimensional space. The specific process of setting the display elements in the virtual three-dimensional space (i.e., global coordinateization) is as follows: The local coordinate system is placed in the (0, 0, ...) coordinate system of the world coordinate system. ) place ( This indicates the preset maximum target distance. (This indicates the preset nearest target distance). The positive directions of the X, Y, and Z axes of the local coordinate system are the same as those of the world coordinate system. The display element and the local coordinate system are treated as a whole, and the scaling is adjusted so that the display element is appropriately displayed within the entire reference area; it can occupy the entire reference area or a portion of it. The world coordinates of all display elements after scaling are recorded, thus completing the global coordinateization process. All operations on display elements in the following steps will use their world coordinates.

[0065] It should be noted that the pivot point is the reference point for performing operations such as translation and rotation on the displayed element. The position of the displayed element in the world coordinate system is described by the coordinates of the pivot point, which is generally set at the geometric center of the displayed element. (Preset maximum distance) : The maximum distance between the displayed element and the camera's XOY coordinate plane. The displayed element moves to the furthest distance equal to the Z coordinate. It will no longer stray far from the camera's XOY coordinate plane. Preset closest distance. : The minimum distance between the displayed element and the camera's XOY coordinate plane. The displayed element moves to the closest distance at the Z coordinate. It then no longer approaches the camera's XOY coordinate plane. In one specific embodiment, =50, =250, at which point the viewing distance ratio is 5.

[0066] It should be noted that: World coordinate system: a global coordinate system that defines the absolute position and orientation of displayed elements in virtual 3D space. Camera coordinate system: a local coordinate system established with the camera's world coordinate system as the origin and the camera's shooting direction as the positive Z-axis. View frustum: a flat cone extending from the camera's world coordinate system, composed of a near clipping plane, a far clipping plane, and four side planes, enabling the mapping from virtual 3D space to the 2D screen of the display device. Its core defined parameters include: near clipping distance n, far clipping distance f, and vertical field of view angle. (Field of View, vertical) Aspect Ratio Generally, the aspect ratio of the view frustum is set to the aspect ratio of the entire screen or the target reference area; in this embodiment, the specific parameters of the view frustum are as follows: near clipping distance n=0.3, far clipping horizontal distance f=1200, aspect ratio =9:16, vertical field of view =60°. See also Figure 3 The image shown is a schematic diagram of a camera view frustum in a virtual three-dimensional space.

[0067] Step S12: Determine the movement direction vector corresponding to the display element. In the virtual 3D space, according to the preset element movement order, move the display elements sequentially based on the preset movement rules and the movement direction vector corresponding to the display elements. Starting from when all display elements have not moved, every preset frame rendering time interval, use a perspective camera to project and render the display elements in the virtual 3D space onto the reference area to complete the production of the vision training animation. The preset movement rule is that the display elements move between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively.

[0068] It should be noted that the movement direction vector is a 3D vector that controls the direction of movement of the displayed element in the virtual 3D space, with a magnitude of 1 unit. The movement direction vector can change over time, but at any given moment, the movement direction vector of all moving displayed elements is the same. The movement direction vector is determined by a start point and an end point; generally, the camera's coordinates are used as the start point, and the initial coordinates of the first displayed element are used as the end point. A key characteristic of the movement direction vector is that its Z-axis projection in the camera coordinate system is not equal to 0. This ensures that as the displayed element moves along the movement direction vector, it will increase or decrease in size in the output training animation.

[0069] In one specific embodiment, when the displayed element is text, the movement direction vector can be determined based on a straight line segment connecting the camera coordinates and the initial coordinates of the first character at the top left corner of the reference area, wherein the initial coordinates of the first character at the top left corner are: The camera coordinates are The direction vector of movement is .

[0070] In this embodiment, the preset viewing distance ratio is set to be no less than 1; the preset viewing distance ratio is the ratio of the preset farthest distance to the preset closest distance; in this embodiment, the preset viewing distance ratio is specifically set to 5 to guide the trainee's eyes to focus on the display device to achieve naked-eye 3D distance viewing training; it should be noted that the physical viewing distance The distance from the midpoint of the line connecting the trainee's eyes to the plane of the display device. Maximum naked-eye 3D viewing distance. The theoretical distance at which a trainee's eyes focus on the farthest display element in the world coordinate system under naked-eye 3D conditions is determined by the preset viewing distance ratio and the physical viewing distance. The maximum naked-eye 3D viewing distance determines whether distant viewing is possible. For example: In the world coordinate system, there are two display elements, one located at (0, 0, ...). Another is located at (0, 0, ...). The trainee enters a naked-eye 3D state, with both eyes focusing on (0, 0, ...). The naked-eye 3D viewing distance when displaying elements at () is equal to the physical viewing distance. Focusing on (0, 0, The naked-eye 3D viewing distance when an element is displayed at () is the maximum naked-eye 3D viewing distance, and its value is .make =10, =30cm, then the maximum naked-eye 3D viewing distance It can reach 3 meters. It should be noted that as long as the line-of-sight ratio is... A value greater than 1 is sufficient to create naked-eye 3D training animations.

[0071] It should be noted that a preset viewing distance ratio selection process can be set up before the production process of the vision training animation begins. Users can choose a preset viewing distance ratio that suits their own situation in order to improve the user experience.

[0072] In this embodiment, display elements can move back and forth between the nearest plane and the farthest plane. After all display elements have moved from one plane to another, they then move back from the other plane to the first plane, repeating this process. Specifically, the step of moving display elements according to a preset element movement order based on preset movement rules and the corresponding movement direction vectors includes: moving each display element sequentially along the corresponding movement direction vector according to the preset movement rules, according to the preset element movement order; after all display elements have moved, moving each display element sequentially along the corresponding target direction vector according to the preset movement rules, according to the preset element movement order; the target direction vector corresponding to each display element is the opposite direction vector of the movement direction vector corresponding to the display element; after all display elements have moved, jumping to the step of moving each display element sequentially along the corresponding movement direction vector according to the preset movement rules, according to the preset element movement order, until a stop command is obtained.

[0073] It should be noted that the preset element movement order can start from the first display element in the upper left corner, and add one moving display element row by row from left to right at preset reference time intervals. The preset reference time interval can be represented by a frame interval, which can be 29 frames, with one moving display element added every 29 frames. It should also be noted that all moving display elements can be stored in a moving element set. When a new moving display element is added, it is added to the moving element set; when a moving display element stops moving, it is removed from the moving element set.

[0074] It should be noted that the movement speed of the displayed elements also needs to be set. Of course, the movement speed of all displayed elements can be set to be equal, or the movement speeds of different displayed elements can be set to be unequal, and the movement speed of the same displayed element at different times may also be unequal. Specifically, the movement speed of the displayed elements can be adjusted according to the actual situation. It is also possible to set the movement speed of the displayed elements to be adjusted every target time interval. In one specific embodiment, the movement speed of all displayed elements can be set to be equal, and the movement speed... The length is 50 units per second. Let ∆t be the time interval between the current frame and the previous frame (the preset frame rendering time interval). Then, the displacement vector of the moving display element's coordinates in the current frame relative to its coordinates in the previous frame is... By adding the displacement vector to the coordinates of the moving display element in the previous frame, we can obtain the coordinates of the moving display element in the current frame. It should be noted that although the frame rate is set to 60, it may fluctuate due to factors such as hardware performance, and the frame rendering time interval may not be strictly equal to 1 / 60 of a second. Therefore, the input parameter for calculation is the measured time interval between the previous frame and the current frame.

[0075] It should be noted that, starting from when all display elements are still, the process involves using a perspective camera to project and render the display elements in the virtual 3D space onto the reference area at preset frame rendering intervals. Specifically, one frame of image is rendered at each preset frame rendering interval, which can be converted into a frame rate, specifically 60 frames per second. In detail, at the set frame rate, the camera projects and renders the elements in the virtual 3D space, and outputs the resulting image to the reference area of ​​the display device. The specific process is as follows: all display elements and spatial perception reference elements within the view frustum are compressed into normalized device coordinates (NDCs) through perspective projection transformation, clipping, and perspective division; then, the NDC coordinates are linearly mapped to screen pixel coordinates through viewport transformation; finally, the color of each pixel on the screen is determined through rendering.

[0076] In this embodiment, spatial perception reference elements are a series of display elements added to the virtual 3D space, arranged along the movement direction vector, to assist trainees in forming naked-eye 3D spatial perception. Specifically, after determining the movement direction vector corresponding to the display element, the process further includes: if no spatial perception reference element has been established, then a spatial perception reference element is established based on the target spatial perception reference element establishment process; if a spatial perception reference element has been established and the direction of the movement direction vector remains unchanged, then the established spatial perception reference element is used as the current spatial perception reference element; if a spatial perception reference element has been established but the movement direction vector changes, then a new spatial perception reference element is established in real time based on the changed movement direction vector and the target spatial perception reference element establishment process; correspondingly, the spatial perception reference element establishment process includes: setting a spatial perception reference element template and setting the current instance of the template to the virtual 3D space. A preset initial position in space; according to the target movement rule, the current instance of the template is moved along the movement direction vector to obtain the target instance; the target instance is used as the current instance, and the process jumps to the step of moving the current instance of the template along the movement direction vector by a preset distance, until the number of instances of the template reaches a set number to obtain a spatially perceptible reference element; wherein, the instance arrangement direction is the same as the movement direction vector; the spatially perceptible reference element template is a display element that can be repeatedly instantiated in the virtual three-dimensional space; correspondingly, if a spatially perceptible reference element is established, a perspective camera is needed to project and render the display elements in the virtual three-dimensional space and the spatially perceptible reference element onto the reference area. The target movement rule can be to move the current instance along the movement direction vector by a set distance, and the set distance for different movements may be the same or different.

[0077] In one specific embodiment, the steps for establishing spatially aware reference elements are as follows: See Figure 4 The diagram shown illustrates the preparation for establishing a spatially perceptual reference element. Rectangle ABCD is set as the spatially perceptual reference element template, and it is placed at a preset initial position (0, 0, ...). The first instance is obtained, and the first instance is moved a set distance along the moving direction vector. , to move to (0, 0, The second instance rectangle is obtained at (). The first instance and the second instance are the spatial sensing reference elements of this embodiment. Optionally, corresponding points of the first instance and the second instance are connected by line segments. See also Figure 5 The diagram shown illustrates a spatial sensing reference element. It should be noted that the spatial sensing reference element template has at least one instance, the specific number of which is determined by a set quantity and a set distance.

[0078] It should be noted that when using a rectangle as a template instance, there are at least two instances; when using a square prism... When a template exists, there must be at least one instance.

[0079] See Figure 6 The figure shows a schematic diagram of the movement process of display elements. The figure includes an animation frame diagram (a) when the movement just begins, an animation frame diagram (b) during the middle movement process, and an animation frame diagram (c) when all display elements have moved to the preset farthest plane. It should be noted that the movement direction vector and the spatial perception reference element in the figure have not changed, only the position of the display elements has changed.

[0080] In this embodiment, a reset command for display elements can be added to control the timing of the start of display element movement. Specifically, if a display element reset command is obtained, all display elements are reset, and the process jumps to the step of determining the movement direction vector corresponding to the display element to restart element movement. It should be noted that this reset command can also be used to reset spatial perception reference elements.

[0081] As can be seen, this application obtains several display elements and maps the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device's associated medium and / or elements already displayed in the reference area of ​​the display device; the movement direction vector corresponding to the display element is determined, and the display elements are moved sequentially in the virtual three-dimensional space according to a preset element movement order based on preset movement rules and the movement direction vector corresponding to the display element, and starting from when all display elements have not moved, the display elements in the virtual three-dimensional space are projected and rendered to the reference area using the perspective camera every preset frame rendering time interval to complete the production of the vision training animation; wherein, the preset movement rule is that the display elements move between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively. Therefore, this application directly creates animations for vision training on existing display devices based on the original display elements in the display device or the elements to be displayed stored in the associated medium of the display device. It does not rely on specific devices, thus improving universality. The display devices and display elements are diversified, and it does not rely on repetitive compositions, which increases the trainee's interest and allows the trainee to engage in long-term immersive training, ensuring better training results. In addition, this application completes the animation production based on the projection rendering function of the perspective camera, which is simple and fast. Furthermore, this application sets the display elements to move between the farthest plane and the nearest plane according to the set movement direction vector, which can effectively train vision.

[0082] This application discloses a specific method for creating vision training animations. Compared to the previous embodiment, this embodiment further explains and optimizes the technical solution. See also... Figure 7 As shown, it specifically includes:

[0083] Step S21: Obtain several display elements and map the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device's associated medium and / or elements already displayed in the reference area of ​​the display device.

[0084] Step S22: Determine the movement direction vector corresponding to all display elements based on the line segments of the preset starting point and the preset target ending point; wherein, the projection of the line segments of the preset starting point and the preset target ending point on the Z-axis of the camera coordinate system is not 0.

[0085] In this embodiment, the preset starting point is the coordinates of the camera; the preset target endpoint can be any display element; specifically, the preset target endpoint can be the first display element in the upper left corner. At this time, the movement direction vector is determined based on the straight line segment between the preset starting point and the initial coordinates of the first text in the upper left corner, so the direction of the movement direction vector remains unchanged.

[0086] In one specific embodiment, when the displayed element is text, the movement direction vector can be determined based on a straight line segment connecting the camera coordinates and the initial coordinates of the first character at the top left corner of the reference area, wherein the initial coordinates of the first character at the top left corner are: The camera coordinates are The direction vector of movement is .

[0087] In this embodiment, if no spatial perception reference element is established, a spatial perception reference element is established based on the target spatial perception reference element establishment process; if a spatial perception reference element has been established and the direction of the movement direction vector remains unchanged, the established spatial perception reference element is used as the current spatial perception reference element.

[0088] Step S23: In the virtual 3D coordinate system, according to the preset element movement order, the display elements are moved sequentially based on the preset movement rules and the movement direction vector corresponding to the display elements. Starting from when all display elements have not moved, the display elements in the virtual 3D coordinate system are projected and rendered onto the reference area using a perspective camera every preset frame rendering time interval to complete the production of the vision training animation. The preset movement rule is that the display elements move between the nearest plane and the farthest plane. The nearest plane and the farthest plane are parallel to the XOY plane of the camera coordinate system, and the distances between the nearest plane and the farthest plane and the XOY plane of the camera coordinate system are the preset nearest distance and the preset farthest distance, respectively.

[0089] In this embodiment, before moving the display elements in the virtual 3D space according to a preset element movement order based on preset movement rules and the movement direction vector corresponding to the display elements, the method further includes: treating all display elements and spatially perceived reference elements as a single target; determining the target displacement of the current frame during projection rendering; and translating the single target based on the target displacement. It should be noted that the target displacement can be the displacement between each two frames obtained by evenly dividing the total displacement between the single target at the new time corresponding to two consecutively added moving display elements; alternatively, the target displacement can also be the displacement obtained based on information input by the trainee through several input devices. The target displacement determined based on the input devices can be a change to the target displacement of a certain current frame, or a unified specification of the target displacement corresponding to the single target during the movement of the display elements.

[0090] It should be noted that, while keeping the direction of the movement direction vector unchanged, the positions of the spatial reference element and all display elements relative to the perspective camera can be adjusted in each frame of the animation. The spatial reference element and all display elements are translated as a whole by a target displacement. Specifically, after determining the movement direction vector corresponding to all display elements based on the straight line segment connecting the perspective camera coordinates as a preset starting point and the coordinates of the first text in the upper left corner, the process further includes: adding a moving display element every 29 frames; calculating the total displacement of the subsequent 30 frames of animation with the current frame as the first frame in the frame where the moving display element is added; dividing the total displacement into 30 equal parts to obtain the target displacement of each of the 30 frames of animation to ensure the continuity of the training animation; adjusting the positions of the spatial reference element and all display elements relative to the perspective camera in the rendering frame; and translating the spatial reference element and all display elements as a whole by a target displacement. It should be noted that when calculating the total displacement, it is necessary to ensure that the newly added moving display element in the display device can occlude a predetermined position; the predetermined position can be any position on the farthest plane, specifically the template instance rectangle of the farthest plane. The location or any location within or around the target area.

[0091] In one specific embodiment, within the frame of the newly added moving display element, the total displacement of the subsequent 30 animation frames, with the current frame as the first frame, is calculated. Specifically, firstly, the process of the display element moving towards the farthest plane can be as follows: within the frame of the newly added moving display element, the template instance rectangle on the farthest plane among the spatially aware reference elements is selected. In Using this as a reference point, the camera coordinates are obtained. The intersection of the line determined by the coordinates of the previous frame and the nearest plane. Let E be the coordinate of the newly added moving display element in the previous frame, then the total displacement of the target is... To ensure the continuity of the training animation, the target displacement vector for each of the 30 frames starting from the current frame is calculated. The overall translation visual effect is to make the newly added moving display elements appear as template instance rectangles on a distant plane in the training animation after 30 frames. of The proximity of the point helps trainees read all the information with almost no eye movement. Secondly, the process of displaying elements moving towards the nearest plane: in the frame where the moving display element reaches the nearest plane, a rectangle is selected. of Using point as a reference point, the camera coordinates are obtained. The intersection of the line determined by the coordinates of the previous frame and the nearest plane. Let F be the coordinates of the point that just reached the nearest display element on the plane. Calculate the total displacement of the target over the 30 frames of animation starting from the current frame. Then the target displacement vector for the overall translation of each frame is The overall translation effect at this point is to make the template instance rectangle, which is the display element on the nearest plane in the current frame, appear on the farthest plane in the training animation 30 frames later. of Near the point. It should be noted that after the overall translation, some of the output training animation frames may be outside the target display area and thus disappear. However, as long as the trainer's reading speed is greater than the speed at which the displayed elements of the training animation disappear, the disappeared content is considered read and will not affect usage.

[0092] See Figure 8As shown in the figure, it is a schematic diagram of the movement process of display elements that sense the position change of reference elements in space; the figure includes a schematic diagram of an animation frame when the character "West" starts to move (a), a schematic diagram of an animation frame when the character "You" starts to move (b), a schematic diagram of an animation frame when the character "Sheng" starts to move (c), and a schematic diagram of an animation frame when the character "Jiang" starts to move (d). Among them, figures (c) and (d) are more obvious. When the character "Sheng" starts to move, the character "Da" in front is located at near the point. When the character "Jiang" starts to move, the character "Gui" in front is located at near the point.

[0093] It can be seen that this application obtains a number of display elements and maps the display elements to a virtual three-dimensional coordinate system equipped with a virtual perspective camera; the display elements are replaceable elements; the display elements are the elements to be displayed stored in the associated medium of the display device and / or the elements that have been displayed in the reference area of the display device; based on the straight line segment between the preset starting point and the preset target end point, determine the movement direction vectors corresponding to all display elements; where the projections of the preset starting point and the preset target end point on the Z axis of the camera coordinate system are not zero; in the virtual three-dimensional coordinate system, move the display elements in sequence based on the preset element movement order, the preset movement rules, and the movement direction vectors corresponding to the display elements, and starting from when all display elements have not moved, project and render the display elements in the virtual three-dimensional coordinate system to the reference area using the perspective camera at every preset frame rendering time interval to complete the production of the vision training animation; where the preset movement rule is that the display elements move between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the XOY plane of the camera coordinate system, and the distances between the nearest plane and the farthest plane and the XOY plane of the camera coordinate system are the preset nearest distance and the preset farthest distance respectively. Thus, this application discloses the movement situation of display elements when the direction of the movement direction vector remains unchanged, and further discloses the situation of display elements when the direction of the movement direction vector remains unchanged, but all display elements and the space perception reference elements are translated as a whole, expanding the movement methods of display elements in the animation, improving the generality of the method, and being able to better exercise the human eye.

[0094] The embodiment of this application discloses a specific method for producing a vision training animation. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. See Figure 9 As shown in the figure, it specifically includes:

[0095] Step S31: Obtain a number of display elements and map the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are the elements to be displayed stored in the associated medium of the display device and / or the elements that have been displayed in the reference area of the display device.

[0096] Step S32: Determine a first direction vector based on a straight line segment between a preset starting point and a preset first ending point; determine a second direction vector based on a straight line segment between a preset starting point and a preset second ending point; and adjust the movement direction vector every preset frame rendering time interval within a preset reference time interval to sequentially change the movement direction vector corresponding to all display elements from the first direction vector to the second direction vector; set the second direction vector as the new first direction vector, select a new preset second ending point, and jump to the step of determining the second direction vector based on the straight line segment between the preset starting point and the preset second ending point until there are no display elements that have not moved along the movement direction vector; wherein, the projections of the first direction vector and the second direction vector on the Z-axis of the camera coordinate system are both non-zero.

[0097] In this embodiment, the coordinates of the perspective camera are used as the preset starting point, the initial coordinates of the first character in the upper left corner are used as the preset first endpoint, the initial coordinates of the second character in the upper left corner are used as the preset second endpoint, and so on. After all the characters in the current line have been used as endpoints, the first character in the left corner of the next line is used as the endpoint until there are no display elements that have not been moved along the direction of movement.

[0098] In this embodiment, if no spatial perception reference element has been established, it is established based on the target spatial perception reference element establishment process. If a spatial perception reference element has been established and the movement direction vector changes, a new spatial perception reference element is established in real time based on the changed movement direction vector and the target spatial perception reference element establishment process. It should be noted that after each change in the movement direction vector, the arrangement direction of the spatial perception reference element template instance and the coordinates of all displayed elements need to be updated.

[0099] It should be noted that the movement direction vector changes in real time. The arrangement direction of the template instances in the spatially perceived reference elements remains the same as the direction of the movement direction vector. Therefore, the spatially perceived reference elements also change in real time with the movement direction vector. At this time, the position of the template instance in the nearest plane remains unchanged, while the position of the template instance not in the nearest plane changes to keep the arrangement direction of all template instances the same as the movement direction vector. Specifically, when there is a newly added moving display element in the current frame, the movement direction vector of each of the 30 frames starting from the current frame is calculated, the movement direction vector of the current frame is set, the spatially perceived reference elements of the current frame are updated, and the coordinates of the display element in the farthest plane and the moving display element are updated.

[0100] It should be noted that the movement direction vector changes in real time. In order to make the training animation coherent, the movement direction vector changes in the following way: First, the reference angle is bisected, which is the angle between the first direction vector and the second direction vector. The reference angle is averaged to determine several intermediate direction vectors. The movement direction vector is changed from the first direction vector through several intermediate direction vectors until it changes to the second direction vector. In one embodiment, it is divided into 30 parts, because there are 29 frames between the animation frames where two consecutive display elements start moving. Each frame corresponds to a movement direction vector. The movement direction vector of each frame is the movement direction vector of the previous frame plus the average component of the reference angle. Second, instead of bisecting the reference angle, the reference displacement is bisected. A spatially perceived reference template instance or display element located on the nearest plane is selected as the reference display element. The reference display element is translated from the nearest plane to the farthest plane along a first direction vector to obtain a first coordinate. The reference display element is then translated from the nearest plane to the farthest plane along a second direction vector to obtain a second coordinate. Subtracting the first coordinate from the second coordinate yields the total displacement of the projection of the reference display element onto the farthest plane after the change from the first direction vector to the second direction vector. This total displacement is the reference displacement. In one embodiment, the reference displacement can be divided into 30 parts, corresponding to 30 frames of rendered images. Each frame corresponds to a movement direction vector. The movement direction vector of each frame can be calculated by adding the bisected displacement to the coordinates of the projection of the reference display element of the previous frame onto the farthest plane along the direction of the previous frame's movement direction vector.

[0101] In one specific embodiment, a new moving display element is added every 29 frames. For the case of bisecting the reference displacement, the specific steps are described as follows: The process of the display element moving towards the farthest plane is determined by the following method for the movement direction vector of the first 30 frames starting from the frame where the new moving display element is added: When the first moving display element is added, the movement direction vector remains unchanged within 30 frames, and is... Figure 1 The corresponding implementation is similar; starting from the second newly added moving display element, with camera coordinate C as the preset starting point, the initial coordinates of the previously added moving display element are... To establish the first endpoint, a first direction vector is created. The initial coordinates of the newly added motion display element, using the camera coordinates as the preset starting point. To establish a second endpoint, a second direction vector is created. Select the newly added motion display element as the reference display element, and calculate the reference displacement using the method described above for determining the bisecting reference displacement. The average displacement is obtained by dividing the reference displacement into 30 equal parts. Clearly, in this example, the reference time interval is the period between the time of the currently added moving display element and the time of the next added moving display element. The initial coordinates of the reference display element are projected along the first direction vector onto the farthest plane to obtain the coordinates. If the frame containing the newly added motion display element is taken as the first frame, then the motion direction vector of the first frame is... Then the motion direction vector of the i-th frame is... Obviously, , The displacement caused by the change in direction vector for the moving display element in the current frame is calculated based on the ratio of its distance to the nearest plane to the distance between the farthest and nearest planes. Let the displacement be denoted as the first... The Z-coordinate of each moving display element is The displacement caused by the change in the current frame's movement direction vector. Similarly, for spatially-aware reference element template instances that are not on the nearest plane in the current frame, the displacement caused by the change in direction vector is calculated based on the ratio of their distance to the nearest plane to the distance between the farthest and nearest planes. Clearly, display elements and spatially-aware reference template instances on the nearest plane will not change position due to the change in movement direction vector.

[0102] In addition, the process of the display element moving towards the nearest plane is the same as the process of moving towards the farthest plane. The preset reference time interval is the time period between the time when the current newly added and stopped display element is added and the time when the next newly added and stopped display element is added. The rest is the same as the process of moving towards the farthest plane, and will not be described in detail here.

[0103] Step S33: In the virtual 3D space, according to the preset element movement order, the display elements are moved sequentially based on the preset movement rules and the movement direction vector corresponding to the display elements. Starting from when all display elements have not moved, the display elements in the virtual 3D space are projected and rendered onto the reference area using a perspective camera every preset frame rendering time interval to complete the production of the vision training animation. The preset movement rule is that the display elements move between the nearest plane and the farthest plane. The nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are the preset nearest distance and the preset farthest distance, respectively.

[0104] See Figure 10As shown in the figure, it is a schematic diagram of the movement process of a display element where a spatial perception reference element changes with a movement direction vector. The figure includes the schematic diagram of the animation frame when the character "West" starts to move (a), the schematic diagram of the animation frame when the character "You" starts to move (b), the schematic diagram of the animation frame when the character "Tai" starts to move (c), the schematic diagram of the animation frame when the character "Ju" starts to move (d), and the schematic diagram of the animation frame when the character "Ying" starts to move (e). In the figure, the position of the template instance of the spatial perception reference element in the nearest plane remains unchanged, the position of the display element (the display element that has not started to move along the movement direction vector) in the nearest plane remains unchanged, and the position of the template instance of the spatial perception reference element in the farthest plane changes to ensure that the template instances of the spatial perception reference are arranged along the movement direction vector.

[0105] It can be seen that this application obtains a number of display elements and maps the display elements into a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are the elements to be displayed stored in the medium associated with the display device and / or the elements that have been displayed in the reference area of the display device; based on the straight line segment between the preset starting point and the preset first end point, a first direction vector is determined, based on the straight line segment between the preset starting point and the preset second end point, a second direction vector is determined, and the movement direction vector is adjusted at every preset frame rendering time interval within the preset reference time interval, so as to sequentially change the movement direction vectors corresponding to all display elements from the first direction vector to the second direction vector; the second direction vector is set as the new first direction vector, a new preset second end point is selected, and it jumps to the step of determining the second direction vector based on the straight line segment between the preset starting point and the new preset second end point until there is no display element that has not moved along the movement direction vector; where the projections of the first direction vector and the second direction vector on the Z axis of the camera coordinate system are both non-zero; in the virtual three-dimensional space, the display elements are moved in sequence based on the preset movement rule and the movement direction vector corresponding to the display element according to the preset element movement order, and starting from when all display elements have not moved, the display elements in the virtual three-dimensional space are projected and rendered to the reference area by using the perspective camera at every preset frame rendering time interval to complete the production of the vision training animation; where the preset movement rule is that the display element moves between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the XOY plane of the camera coordinate system, and the distances between the nearest plane and the farthest plane and the XOY plane of the camera coordinate system are the preset nearest distance and the preset farthest distance respectively. Thus, it can be seen that this application proposes a way of moving display elements with a real-time changing movement direction vector. On this basis, the spatial perception reference element also moves according to the change of the movement direction vector, which can expand the movement mode of display elements in the animation, improve the universality of the method, and also enhance the exercise of the human eye.

[0106] Accordingly, this application also discloses an apparatus for creating vision training animations, see [link to relevant documentation]. Figure 11 As shown, the device includes:

[0107] The mapping module 11 is used to acquire a plurality of display elements and map the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device associated medium and / or elements already displayed in the reference area of ​​the display device;

[0108] The motion production module 12 is used to determine the movement direction vector corresponding to the display element, and move the display element in the virtual three-dimensional space according to the preset element movement order, based on the preset movement rules and the movement direction vector corresponding to the display element. Starting from when all display elements have not moved, the display elements in the virtual three-dimensional space are projected and rendered to the reference area using a perspective camera every preset frame rendering time interval to complete the production of vision training animation.

[0109] The preset movement rule is that the display element moves between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively.

[0110] The more specific working process of each of the above modules can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0111] As can be seen, this application obtains several display elements and maps the display elements to a virtual three-dimensional space equipped with a perspective camera; the display elements are replaceable elements; the display elements are elements to be displayed stored in the display device's associated medium and / or elements already displayed in the reference area of ​​the display device; the movement direction vector corresponding to the display element is determined, and the display elements are moved sequentially in the virtual three-dimensional space according to a preset element movement order based on preset movement rules and the movement direction vector corresponding to the display element, and starting from when all display elements have not moved, the display elements in the virtual three-dimensional space are projected and rendered to the reference area using the perspective camera every preset frame rendering time interval to complete the production of the vision training animation; wherein, the preset movement rule is that the display elements move between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively. Therefore, this application directly creates animations for vision training on existing display devices based on the original display elements in the display device or the elements to be displayed stored in the associated medium of the display device. It does not rely on specific devices, thus improving universality. The display devices and display elements are diversified, and it does not rely on repetitive compositions, which increases the trainee's interest and allows the trainee to engage in long-term immersive training, ensuring better training results. In addition, this application completes the animation production based on the projection rendering function of the perspective camera, which is simple and fast. Furthermore, this application sets the display elements to move between the farthest plane and the nearest plane according to the set movement direction vector, which can effectively train vision.

[0112] Furthermore, embodiments of this application also provide an electronic device. Figure 12 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0113] Figure 12 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the vision training animation production method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0114] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0115] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. The computer programs 221 may include, in addition to computer programs capable of performing the vision training animation production method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, computer programs capable of performing other specific tasks.

[0116] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for creating vision training animations.

[0117] The specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0118] The various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts between the various embodiments, refer to each other. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to in the method section.

[0119] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0120] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0121] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0122] The above provides a detailed description of the method, apparatus, device, and storage medium for producing vision training animations provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas 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 this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for producing vision training animation, characterized in that, include: Acquire several display elements and map the display elements into a virtual three-dimensional space equipped with a perspective camera; The display element is a replaceable element; The display element is the element to be displayed stored in the display device associated medium and / or the element already displayed in the reference area of ​​the display device; Determine the movement direction vector corresponding to the display element, and move the display element in the virtual three-dimensional space according to the preset element movement order, based on the preset movement rules and the movement direction vector corresponding to the display element. Starting from when all display elements have not moved, use a perspective camera to project and render the display elements in the virtual three-dimensional space to the reference area every preset frame rendering time interval to complete the production of vision training animation. The preset movement rule is that the display element moves between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively.

2. The method for producing vision training animation according to claim 1, characterized in that, The determination of the movement direction vector corresponding to the displayed element includes: The movement direction vectors corresponding to all display elements are determined based on the line segments of the preset starting point and the preset target ending point; wherein, the projection of the line segments of the preset starting point and the preset target ending point onto the Z-axis of the camera coordinate system is not 0; Alternatively, a first direction vector is determined based on a straight line segment between a preset starting point and a preset first ending point, and a second direction vector is determined based on a straight line segment between a preset starting point and a preset second ending point. The movement direction vector is adjusted every preset frame rendering time interval within a preset reference time interval so as to change the movement direction vector corresponding to all display elements from the first direction vector to the second direction vector in sequence. Set the second direction vector as the new first direction vector, select a new preset second endpoint, and jump to the step of determining the second direction vector based on the straight line segment of the preset starting point and the preset second endpoint, until there are no display elements that have not moved along the movement direction vector; wherein, the projections of the first direction vector and the second direction vector on the camera coordinate system Z axis are both not 0.

3. The method for producing vision training animation according to claim 1, characterized in that, After determining the movement direction vector corresponding to the displayed element, the method further includes: If no spatial perception reference elements are established, then spatial perception reference elements are established based on the process of establishing target spatial perception reference elements; If a spatial perception reference element has been established and the direction of the movement direction vector remains unchanged, then the established spatial perception reference element will be used as the current spatial perception reference element. If a spatial perception reference element has been established, and the movement direction vector changes, a new spatial perception reference element will be established in real time based on the changed movement direction vector and the target spatial perception reference element establishment process. Accordingly, the process of establishing spatial perception reference elements includes: Set a spatial awareness reference element template and set the current instance of the template to a preset initial position in the virtual 3D space; According to the target movement rules, the current instance of the template is moved along the movement direction vector to obtain the target instance; The target instance is taken as the current instance, and the process jumps to the step of moving the current instance of the template along the movement direction vector by a preset distance until the number of instances of the template reaches a set number to obtain a spatially perceptible reference element; wherein, the instance arrangement direction is the same as the movement direction vector; the spatially perceptible reference element template is a display element that can be repeatedly instantiated in the virtual three-dimensional space; Accordingly, the step of projecting and rendering the display elements in the virtual three-dimensional space onto the reference area using a perspective camera includes: The display elements and spatial perception reference elements in the virtual three-dimensional space are projected and rendered onto the reference area using a perspective camera.

4. The method for producing vision training animation according to claim 1, characterized in that, Before moving the display elements in the virtual three-dimensional space according to the preset element movement order and based on the preset movement rules and the movement direction vector corresponding to the display elements, the method further includes: Treat all display elements and spatially-aware reference elements as a single target; determine the target displacement of the current frame during projection rendering, and translate the entire target based on the target displacement.

5. The method for producing vision training animation according to claim 3, characterized in that, The step of moving the display elements according to a preset element movement order, based on preset movement rules and the movement direction vector corresponding to the display elements, includes: According to the preset element movement order, each display element is moved sequentially along the corresponding movement direction vector according to the preset movement rules; After all display elements have been moved, each display element is moved sequentially along its corresponding target direction vector according to a preset element movement order and a preset movement rule; the target direction vector corresponding to each display element is the opposite direction vector of the movement direction vector corresponding to the display element. After all display elements have been moved, the process jumps to the step of moving each display element sequentially along the corresponding movement direction vector according to the preset element movement order and preset movement rules, until a stop command is obtained.

6. The method for producing vision training animation according to claim 1, characterized in that, Also includes: If a display element reset command is obtained, all display elements are reset, and the process jumps to the step of determining the movement direction vector corresponding to the display element to restart the element movement.

7. The method for producing vision training animation according to claim 1, characterized in that, Also includes: The preset viewing distance ratio is set to be no less than 1; the preset viewing distance ratio is the ratio of the preset farthest distance to the preset nearest distance.

8. A device for producing vision training animations, characterized in that, include: The mapping module is used to acquire several display elements and map the display elements to a virtual three-dimensional space equipped with a perspective camera; The display element is a replaceable element; The display element is the element to be displayed stored in the display device associated medium and / or the element already displayed in the reference area of ​​the display device; The motion production module is used to determine the movement direction vector corresponding to the display element. In the virtual three-dimensional space, the display elements are moved sequentially according to the preset movement order, based on the preset movement rules and the movement direction vector corresponding to the display element. Starting from when all display elements have not moved, the display elements in the virtual three-dimensional space are projected and rendered onto the reference area using a perspective camera every preset frame rendering time interval to complete the production of the vision training animation. The preset movement rule is that the display element moves between the nearest plane and the farthest plane; the nearest plane and the farthest plane are parallel to the camera coordinate system XOY plane, and the distances between the nearest plane and the farthest plane and the camera coordinate system XOY plane are preset nearest distance and preset farthest distance, respectively.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method for producing vision training animation as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the method for creating vision training animations as described in any one of claims 1 to 7.