Method and system for displaying 2D games in 3D with naked eyes
The conversion of virtual 3D games into stereoscopic 3D games using viewer eye position parameters and matrix operations addresses the lack of realism in existing 3D games, resulting in a more immersive and adjustable 3D experience.
Patent Information
- Application Number
- JP2025541000
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-09-28
- Filing Date
- 2022-09-28
- Publication Date
- 2025-10-07
AI Technical Summary
Existing 3D games lack realism, making it difficult for players to experience an immersive game environment.
A method and system that converts virtual 3D games into stereoscopic 3D games by acquiring viewer eye position parameters, calculating viewing distance and angle, and performing rotation and shift operations on the game's viewpoint matrix to generate a stereoscopic 3D view.
Enhances the game's immersive experience by providing a more realistic and vivid stereoscopic 3D display, reducing image delays, and allowing players to adjust the 3D effect to their preference, thereby improving the overall gaming experience.
Smart Images

Figure 2025533676000001_ABST
Abstract
Description
[Technical Field]
[0001] The present application relates to the technical field of 3D games, and in particular to a method and system for converting virtual 3D games into stereoscopic 3D games. [Background technology]
[0002] With the development of electronic technology, the game industry has taken up an ever-increasing proportion in people's leisure and entertainment lives, and the variety of games and game devices has increased, leading to an ever-increasing demand for game experience from players, as vivid game screens can greatly enhance the player's experience.
[0003] Most existing game screens are 2D or virtual 3D. With the development of science and technology, 3D 3D games have also emerged. However, the screen effects of existing 3D 3D games are still not realistic, making it difficult for players to experience a good immersive experience. Summary of the Invention
[0004] To solve the above technical problems, the present application provides a method and system for converting a virtual 3D game into a stereoscopic 3D game.
[0005] The method for converting a virtual 3D game into a stereoscopic 3D game according to the present application includes the following steps. In step S01, the parameters of the viewer's eye position are acquired, and the viewing distance and viewing angle between the screen and the viewer are calculated at time T1. In step S02, the viewing distance and the viewing angle are predicted at time T2 based on gyro data and / or key position and force data. In step S03, the 2D game is converted into 3D based on the viewing distance, the shift angle, and the viewpoint angle, and is displayed on the naked-eye 3D display device at time T2.
[0006] Preferably, in step S03, the step of converting the 2D game into 3D further includes the following steps:
[0007] In step S031, the original game 3D view matrix of the game is rotated based on the viewpoint angle to obtain a stereo viewpoint matrix. In step S032, the stereoscopic viewpoint matrix is shifted based on the shift angle to obtain stereoscopic views of two or more viewpoints. In step S033, the stereoscopic view from each viewpoint is converted into a view in a predetermined format. In step S034, layout interleaving is performed on the view in the predetermined format to obtain a 3D game view to be rendered. In step S035, the 3D game view to be rendered is subjected to rendering interleaving to generate a stereoscopic 3D game view.
[0008] Preferably, in the calculation formula of the shift angle, The coordinates of any point in the stereoscopic view are defined as (x', y', z'), and the coordinates after shifting are defined as (x'', y'', z''). θ is defined as the shift angle, which means the angle between the viewpoint coordinate and the positive direction of the z' axis. t is the adjustment coefficient, and the range of t is 0 <t<1とする。
[0009] The formula for shifting the viewpoint in the negative X-axis direction is x''=x'+z'*tan(t*θ), y''=y', z''=z.
[0010] The expression for shifting the viewpoint in the positive X-axis direction is x''=x'-z'*tan(t*θ), y''=y', z''=z.
[0011] Preferably, in the calculation formula for the rotation process, With the center of the screen as the origin of the coordinate system O-XYZ, the angle between the projection of the connecting line from the human eye to the screen center onto the XOZ plane and the positive half axis of the Z axis is α, the angle between the projection of the connecting line from the human eye to the screen center onto the YOZ plane and the positive half axis of the Z axis is β, and the X axis direction points from the midpoint of the left side of the screen to the midpoint of the right side of the screen.
[0012] Based on angle α, angle β, the distance L from the eye to the screen, and the distance Z from the center of the scene to the screen, we can determine that the angle by which the scene rotates around the Y axis is a=arctan(L*tanα / (L+Z)).
[0013] The angle that the scene rotates around the X axis is b=arctan(L*tanβ / (L+Z)).
[0014] Preferably, step S01 includes the following sub-steps: In step S011, a face image of a person is captured by the front camera, and the time is recorded as T1. In step S012, facial feature points are calculated based on the AI model. In step S013, when performing calibration based on the 3D effect, the viewing distance and the viewing angle are calculated based on the dimensions and position of the face of the same user.
[0015] Preferably, step S02 includes the following sub-steps:
[0016] In step S021, the gyroscope is continuously sampled and the sampled data is queued. In step S022, the device posture data at time T1 and the posture data at the current time T are acquired, and a nine-dimensional data AI model is used to predict the change in the device posture from time T to time T2. In step S023, the viewing distance and viewpoint angle at time T are calculated from the viewing distance and viewpoint angle at time T1, and the posture change is further added to obtain the viewing distance and viewpoint angle at time T2.
[0017] Preferably, the step of predicting the viewing distance and the viewing angle at time T2 based on gyro data and / or key position and force data as described in step S02 further includes the following sub-steps:
[0018] In step S02a, the touch screen is a key pressure sensor. In step S02b, an AI model is constructed for the key force and the game key position, and posture change training is performed. In step S02c, based on the AI model, a change in posture with respect to key force and game key position during a continuous game is predicted.
[0019] Preferably, before step S01, the present application further includes the following steps:
[0020] In step Sa1, before starting the game, flags including at least a running state and a stopped state are set. In step Sa2, if the game can be made into 3D, the flag is set to a running state, and if the game cannot be made into 3D, the flag is set to a stopped state. Alternatively, when the user clicks the 2D / 3D switching key, the flag is flipped to start / stop. In step Sa3, it is determined whether the eye tracking and positioning module and the correction module start operating based on the flag. In step Sa4, it is determined based on the flag whether or not to acquire 2D game display data and convert it into 3D.
[0021] The present application also provides a system for displaying 2D games in naked-eye 3D, comprising: an eye tracking and positioning module for obtaining parameters of a viewer's eye position and calculating a viewing distance and a viewing angle based thereon; a 3D view generation module for determining a rotation angle and a shift angle based on the viewing distance and the viewing angle, and converting the 2D game into 3D for display on a naked-eye 3D display device; a display module for layout-interleaving the views in the preset format to generate a stereoscopic 3D game view; and a raster for layout interleaving the views of the preset format received by the display module.
[0022] Preferably, the system further comprises a 3D game management module capable of presetting 3D display parameters for adjusting the 2D game.
[0023] Preferably, the system further comprises a gyroscope and a key pressure sensor.
[0024] Compared with the prior art, the method and system for converting a virtual 3D game into a stereoscopic 3D game according to the present invention has the following beneficial effects:
[0025] The method for converting a virtual 3D game into a stereoscopic 3D game according to the present application first obtains parameters of the viewer's eye position, calculates a rotation angle and a shift angle based on the parameters, rotates the original virtual 3D viewpoint matrix of the game based on the rotation angle to obtain a stereoscopic viewpoint matrix, and shifts the stereoscopic viewpoint matrix based on the shift angle to obtain a stereoscopic view for each viewpoint. The stereoscopic views for each viewpoint are then converted into a predetermined format, and the views in the predetermined format are subjected to a layout and interleaving process and then rendered to finally generate a vivid stereoscopic 3D game view. Through the above steps, the method for converting a virtual 3D game into a stereoscopic 3D game according to the present application can convert an existing virtual 3D game screen into a stereoscopic 3D game screen, and after the rendering and interleaving process, the final stereoscopic 3D game screen display effect is more perfect, further providing a better immersive experience for game players and significantly improving the player's gaming experience.
[0026] In the method for converting a virtual 3D game into a stereoscopic 3D game according to the present application, the following process is performed before the game is launched. First, a specific flag is set, and based on the state of the flag, it is determined whether the game will be launched in stereoscopic 3D mode. If the game is launched in stereoscopic 3D mode, step S1 is executed; if not, the process is stopped and this flow ends. Setting this flag allows the game system to immediately determine whether the game screen can be converted into a stereoscopic 3D game screen. At the same time, it allows the player to manually set the display mode, which has the effect of improving the player's gaming experience.
[0027] In the method for converting a virtual 3D game into a stereoscopic 3D game according to the present application, when acquiring parameters of the viewer's eye position, such as the distance to the eye and the angle of rotation of the eye, the frequency and accuracy of parameter acquisition can be significantly improved by combining a gyroscope and a camera or a gyroscope and an infrared device. Significantly increasing the frequency of parameter acquisition effectively reduces image delays caused by changes in the relative position of the player and the stereoscopic 3D game screen, significantly improving the player's gaming experience. Furthermore, improving the accuracy of the acquired eye position parameters also improves the accuracy of the rotation angle and shift angle, allowing the view to rotate and shift appropriately when the player faces different angles. As a result, the stereoscopic 3D view becomes more vivid and realistic, providing a better immersive experience for game players.
[0028] In the method of converting a virtual 3D game into a stereoscopic 3D game according to the present application, by performing layout interleaving and rendering processes on views of a predetermined format, the stereoscopic 3D game view finally presented by the game becomes more vivid and impressive, thereby optimizing the player's visual experience and further improving the player's immersive experience, resulting in a significant improvement in the player's gaming experience.
[0029] In the method of converting a virtual 3D game into a stereoscopic 3D game according to the present invention, the player can adjust the shift angle according to his / her own sense and needs, thereby enhancing or weakening the 3D stereoscopic effect of the final view and adjusting the strength of the 3D stereoscopic effect, thereby reducing the 3D dizziness and improving the 3D experience.
[0030] This application further provides a system for converting a virtual 3D game into a stereoscopic 3D game, which includes at least an eye tracking and positioning module, a 3D view generation module, and a display module, and this system has the same effect as the above-mentioned method for converting a virtual 3D game into a stereoscopic 3D game, so the description will not be repeated here. [Brief explanation of the drawings]
[0031] In order to more clearly describe the technical aspects of the embodiments of the present application, the following briefly describes the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings based on these drawings without paying creative labor.
[0032] [Figure 1] 1 is a flowchart showing steps of a method for displaying 2D games in naked-eye 3D according to the present application. [Figure 2] FIG. 2 is a diagram showing the flow of converting a 2D game into 3D in step S03 in FIG. [Figure 3] 2 is a flowchart of step S01 in FIG. [Figure 4] FIG. 2 is a schematic diagram of step S02 in FIG. [Figure 5] FIG. 10 is a schematic diagram of steps based on gyro data and / or key position and force data according to step S02. [Figure 6] 1 is a schematic diagram of a glasses-free 3D display system for 2D games according to the present application. DETAILED DESCRIPTION OF THE INVENTION
[0033] The following clearly and completely describes the technical aspects of the embodiments of the present application in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and are not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without paying creative labor fall within the scope of protection of the present application.
[0034] 1 to 3, the method for displaying 2D games in naked-eye 3D according to the first embodiment of the present application includes the following steps.
[0035] In step S01, the parameters of the viewer's eye position are obtained, and the viewing distance and viewing angle between the display screen and the viewer at time T1 are calculated.
[0036] In step S02, the viewing distance and the viewing angle at time T2 are predicted based on gyro data and / or key position and force data.
[0037] In step S03, the 2D game is converted into 3D based on the aforementioned viewing distance, shift angle, and viewpoint angle, and is displayed on the naked-eye 3D display device at time T2.
[0038] The step S01 is Step S011: taking a face image of a person using a front camera and recording this time as T1; Step S012 of calculating facial feature points based on the AI model; The method further includes step S013 of calculating a viewing distance and a viewing angle based on the size and position of the face of the same user when calibrating based on the 3D effect.
[0039] The step S02 includes a step S021 of continuously sampling the gyroscope and queuing the sampling data; The method further includes step S022 of acquiring device posture data at time T1 and posture data at current time T, and predicting a change in the device posture from time T to time T2 using a 9-dimensional data AI model.
[0040] In step S023, the viewing distance and viewpoint angle at time T are calculated from the viewing distance and viewpoint angle at time T1, and the posture change is further added to obtain the viewing distance and viewpoint angle at time T2.
[0041] Step S02 of predicting the viewing distance and the viewing angle at time T2 based on the gyro data and / or key position and force data, Step S02a: providing a key pressure sensor on the touch screen; Step S02b: constructing an AI model for key force and game key position, and training posture changes; The method further includes a step S02c of predicting a change in posture with respect to key force and game key position during a continuous game based on the AI model.
[0042] The step of converting the 2D game into 3D as described in step S03 further includes: Step S031: rotating the original game 3D view matrix of the game based on the viewpoint angle to obtain a stereo viewpoint matrix; Step S032: shifting the stereoscopic viewpoint matrix based on the shift angle to obtain stereoscopic views of two or more viewpoints; Step S033 converts the stereoscopic views of each viewpoint into views in a predetermined format; Step S034 of performing layout interleaving processing on the views of the predetermined format to obtain a 3D game view to be rendered; and step S035 of rendering and interleaving the 3D game view to be rendered to generate a stereoscopic 3D game view.
[0043] In the calculation formula of the shift angle, Define the coordinates of an arbitrary point in the stereoscopic view as (x’, y’, z’), the coordinates after displacement as (x’’, y’’, z’’), define θ as the displacement angle, where θ is the angle formed by the viewpoint coordinates and the positive direction of the z’ axis, and define t as the adjustment coefficient, with the range of t defined as 0 < t < 1.
[0044] The expression for the displacement of the viewpoint in the negative X-axis direction is x’’ = x’ + z’ * tan(t * θ), y’’ = y’, z’’ = z. The expression for the displacement of the viewpoint in the positive X-axis direction is x’’ = x’ - z’ * tan(t * 0), y’’ = y’, z’’ = z.
[0045] The calculation formula for the rotation process is: taking the center of the screen as the origin of the coordinate system O-XYZ, the angle formed by the projection of the connection line from the human eye to the center of the screen on the XOZ plane and the positive half-axis of the Z-axis is α, the angle formed by the projection of the connection line from the human eye to the center of the screen on the YOZ plane and the positive half-axis of the Z-axis is β, and the X-axis direction points from the midpoint of the left side of the screen to the midpoint of the right side of the screen. Based on the angle α, the angle β, the distance L from the human eye to the screen, and the distance Z from the center of the scene to the screen, determine the angle by which the scene rotates around the Y-axis. a = arctan(L * tanα / (L + Z)). The angle by which the scene rotates around the X-axis is b = arctan(L * tanβ / (L + Z)).
[0046] <{ Also, the naked-eye 3D display system for the 2D game according to the present application An eye-tracking positioning module that acquires the parameters of the viewer's human eye position and calculates the viewing distance and viewpoint angle based on this, A 3D view generation module that determines the rotation angle and displacement angle based on the viewing distance and viewpoint angle, and 3Dizes the 2D game for display on the naked-eye 3D display device, A display module that performs layout interleaving processing on the view in the preset format to generate the view of the stereoscopic 3D game. and a raster for layout interleaving the views of the preset format received by the display module.
[0047] The naked-eye 3D display system for 2D games further comprises a 3D game management module capable of presetting 3D display parameters for adjusting the 2D game during the game.
[0048] The 2D game naked-eye 3D display system further includes a gyroscope and a key pressure sensor.
[0049] Based on the above-mentioned naked-eye 3D display method for 2D games, the view of the existing virtual 3D game can be transformed into a stereoscopic 3D game view, making the display effect of the stereoscopic 3D view more perfect, giving game players a better immersive experience, and greatly improving the player's gaming experience.
[0050] Furthermore, the following step Sa is further included before the above step S1.
[0051] Step Sa determines whether the game is launched in stereoscopic 3D mode, and if the game is launched in stereoscopic 3D mode, continues to execute step S1, and if the game is not launched in stereoscopic 3D mode, ends this flow.
[0052] Furthermore, the above step Sa specifically includes the following steps. In step Sa1, before starting the game, flags including at least the running state and the stopped state are set. In step Sa2, if the game is in virtual 3D format, the aforementioned flag is set to the activated state and execution of step S1 continues; if the game is in non-virtual 3D format, the aforementioned flag is set to the stopped state and this flow ends.
[0053] Specifically, as an embodiment, the following step Sa3 is further included after the above step Sa2.
[0054] In step Sa3, it is determined whether or not a stop activation signal set by the viewer has been detected, and if the result is "No," step S1 is executed. Conversely, this flow is ended.
[0055] By setting the flag, the game system can instantly determine whether the game can be converted to a stereoscopic 3D game screen, and the player can manually set the game display mode, thereby improving the player's gaming experience.
[0056] Furthermore, the human eye position parameters include at least the distance to the human eye and the rotation angle of the human eye, and at least one of the human eye position parameters is acquired by a gyroscope. Furthermore, the human eye position parameters are acquired by cooperation between a gyroscope and a camera or a gyroscope and an infrared device. Conventional cameras typically output data every 33 ms, which can result in significant delays in updating the 3D game screen when the relative position between the player and the game screen changes. However, a gyroscope can output data 1,000 times per second, i.e., every 1 ms. Cooperation between a gyroscope and a camera or a gyroscope and an infrared device can significantly improve the frequency and accuracy of parameter acquisition. Significantly improved parameter acquisition frequency effectively reduces image delays caused by changes in the relative position between the player and the 3D game screen, significantly improving the player's gaming experience. On the other hand, the improved accuracy of the acquired human eye position parameters means that the rotation and shift angles are more accurate, allowing the view to rotate and shift appropriately when the player is looking at different angles, making the stereoscopic 3D view more vivid and realistic and giving the player a better immersive experience.
[0057] Furthermore, the distance to the human eye is the distance between the position of the human eye and the center of the screen, and the rotation angle of the human eye is the angle change between the position of the human eye and the center of the screen.
[0058] Specifically, as an embodiment, in the method for converting a virtual 3D game into a stereoscopic 3D game provided in the first embodiment of the present application, the specific calculation method for obtaining the stereoscopic view of each viewpoint is as follows:
[0059] In step Sb, in a space in which the center of the screen is the origin of the O-XYZ three-dimensional coordinate system, the angle α by which the scene rotates around the Y axis and the angle β by which the scene rotates around the X axis are calculated based on the distance from the human eye position to the screen and the distance from the center of the scene to the screen.
[0060] In step Sc, the angle c by which the viewer and the center of the screen rotate around the Y axis and the angle d by which the viewer and the center of the screen rotate around the X axis are calculated based on the change in angle between the human eye position and the center of the screen.
[0061] In step Sd, a first rotation matrix and a second rotation matrix are obtained based on the angle a by which the scene rotates around the Y axis, the angle b by which the scene rotates around the X axis, the angle c by which the viewer and the center of the screen rotate around the Y axis, and the angle d by which the viewer and the center of the screen rotate around the X axis.
[0062] In step Se, the virtual view matrix is multiplied by the first rotation matrix and the second rotation matrix to obtain a stereoscopic view matrix.
[0063] See Figure 4. Specifically, let α be the angle between the projection of a connecting line from the human eye to the center of the screen on the XOZ plane and the positive half axis of the Z axis, and β be the angle between the projection of a connecting line from the human eye to the center of the screen on the YOZ plane and the positive half axis of the Z axis. Here, the X axis is the same as the left-right direction of the screen, and the positive direction of the X axis points from the center of the left side of the screen to the center of the right side of the screen. The Y axis is the same as the up-down direction of the screen, and the positive direction of the Y axis points from the upper midpoint of the screen to the lower midpoint of the screen. Based on the angles α and β, the distance H from the human eye to the screen, and the distance J from the center of the scene to the screen, the angle a by which the scene rotates around the Y axis can be determined as α = arctan(H × tan α / (H + J)), and the angle b by which the scene rotates around the X axis can be determined as b = arctan(H × tan β / (H + J)).
[0064] When acquiring the human eye position, the angle between the human eye position and the center of the screen is V1(aax1, aay1, aaz1). Before outputting the stereoscopic view matrix, the angle between the human eye position and the center of the screen is V2(aax2, aay2, aaz2). By V1 and V2, we obtain the angle data V that changes between the human eye position and the center of the screen.
[0065] JPEG2025533676000002.jpg10170
[0066] The angle c of rotation around the Y axis between the viewer and the center of the screen based on the changing angle data V is found to be c=a+aax2-aax1.
[0067] The angle d that the viewer and the center of the screen rotate around the X axis based on the changing angle data V is found to be d=b+aay2-aay1.
[0068] A first rotation matrix M1 and a second rotation matrix M2 are obtained based on the angle c of rotation around the Y axis between the viewer and the center of the screen and the angle d of rotation around the X axis between the viewer and the center of the screen. M1 and M2 are specifically obtained by the following formulas: JPEG2025533676000003.jpg62170
[0069] If the virtual view matrix before rotation is denoted by A and the stereoscopic view matrix is denoted by A', then A' = M1·M2·A.
[0070] In one preferred embodiment, after step S3, the method further includes the following steps:
[0071] In step Sf, the face image of the viewer is analyzed, and the distance from the center of the scene to the screen and / or the magnitude of the shift angle are adjusted based on the analysis results.
[0072] A displacement matrix is generated based on the adjusted distance from the center of the scene to the screen and / or the adjusted displacement angle, and a stereoscopic view of each viewpoint is generated by the displacement matrix and a stereoscopic viewpoint matrix.
[0073] Based on the above steps, the viewer's face image is analyzed, and the distance from the center of the scene to the screen and / or the shift angle can be adjusted based on the analysis result. The present application updates the shift matrix in real time based on different viewers, providing an optimal stereoscopic view and significantly improving the viewer's viewing experience.
[0074] Furthermore, the specific adjustment method for the distance from the center of the scene to the screen and / or the magnitude of the offset angle in step Sf is to obtain the distance between the left eye and the right eye of the viewer, and based on the distance between the left eye and the right eye, add a preset distance L to the distance from the screen to the center of the scene, and / or multiply the offset angle by a corresponding adjustment coefficient t to obtain the distance between the adjusted screen and the center of the scene and / or the adjusted offset angle. Here, 0 < t < 1, and the distance L and the adjustment coefficient t can be set by the viewer himself / herself.
[0075] Specifically, the new coordinate system after rotation is represented by O’-X’Y’Z’, and the origin 0’ coincides with the origin of the original O-XYZ three-dimensional coordinate system. The positive direction of the Z’ axis points to the coordinate of the center of the viewpoint along the coordinate of the viewer in the original coordinate system. The adjusted offset angle conversion means that y’ and z’ of the viewpoint remain unchanged, and the x’ value is linearly converted with the Z’ axis as the dependent axis. Taking the offset angle θ as the angle between the viewpoint coordinate and the positive direction of the Z’ axis, and taking the coordinate of any point in the scene as (x’, y’, z’), and the coordinate after offset as (x’’, y’’, z’’), as can be seen from the stereoscopic viewpoint matrix and the offset angle, the expression for the offset of the viewpoint in the negative X-axis direction is x’’ = x’ + z’ × tan(t × θ), y’’ = y’, z’’ = z.
[0076] The expression for the offset of the viewpoint in the positive X-axis direction is x’’ = x’ - z’ × tan(t × θ), y’’ = y’, z’’ = z. [[ID=In step Sg, the parallax of the stereoscopic view is automatically adjusted based on the value of the Z axis of the virtual view and a preset threshold value.
[0080] Specifically, in the process of converting the virtual viewpoint matrix into the stereoscopic view matrix, there are situations where z' is too large or too small, and the parallax of some areas of the stereoscopic view after the shift is too large or too small, which is likely to cause dizziness to the viewer and thereby affect the viewing experience. The embodiment of the present application avoids this phenomenon by smoothing z' and automatically adjusting the parallax of the stereoscopic view. Specifically, zg and zt are preset thresholds on the Z-axis line. The viewer can set the magnitudes of zg and zt themselves. The formula for the shift of the viewpoint in the negative X-axis direction after the adjustment is x' = x' + z' × tan(t × θ) × (1 - tanh((z' - zg) / zt), y' = y, z' = z.
[0081] Therefore, the shift matrix is expressed as follows: JPEG2025533676000004.jpg39170
[0082] The adjusted X-axis positive direction viewpoint shift matrix is expressed by the following formula. JPEG2025533676000005.jpg43170
[0083] The shift matrix M3 is multiplied by the corresponding stereo viewpoint matrix to generate the stereo view A'' for each viewpoint, realizing automatic adjustment of the stereo view parallax. Here, A''=M3·A'=M3·M1·M2·A
[0084] Specifically, as one embodiment, in the method for converting a virtual 3D game into a stereoscopic 3D game according to the first embodiment of the present invention, the parameters of the human eye position are obtained by the cooperation of a gyroscope and a camera.
[0085] Furthermore, in the method for converting a virtual 3D game into a stereoscopic 3D game according to the first embodiment of the present invention, the stereoscopic views of each viewpoint are converted into views of a preset format. The preset format can be a left-right format, a top-bottom format, or a nine-palace format. Specifically, in one embodiment, in the method for converting a virtual 3D game into a stereoscopic 3D game according to the first embodiment of the present invention, the stereoscopic views of each viewpoint are converted into views of a left-right format.
[0086] In addition, layout interleaving and row rendering interleaving are performed on the pre-defined format views, making the final stereoscopic 3D view presented by the game more vivid, thereby optimizing the player's visual sensation in the game, further improving the player's immersive experience, and significantly enhancing the player's gaming experience.
[0087] Optionally, after step S7, the shift angle is adjusted based on the viewer's setting parameters. Specifically, the player can choose whether to change the setting parameters according to their own needs. If the player adjusts the setting parameters according to their own senses and needs, the shift angle changes accordingly, strengthening or weakening the 3D stereoscopic parallax of the stereoscopic 3D game view and adjusting the strength of the 3D stereoscopic effect, thereby reducing the sense of dizziness and improving the 3D experience. On the other hand, if the player does not change the setting parameters according to their own senses and needs, the value of the shift angle remains the value calculated based on the human eye position parameters in step S2.
[0088] The setting parameters may be selectively adjusted through a UI interface or through a key, and the specific adjustment method is not limited. Specifically, in the method for converting a virtual 3D game into a stereoscopic 3D game according to the first embodiment of the present disclosure, the setting parameters are adjusted through a UI interface.
[0089] 5 and 6, a second embodiment of the present disclosure provides a system 1 for converting a virtual 3D game into a stereoscopic 3D game, which includes at least a human eye tracking and positioning module 12, a 3D view generation module 13, and a display module 14.
[0090] Furthermore, the eye tracking and positioning module 12 includes a gyroscope (not shown) for acquiring at least parameters of the viewer's eye position, where the parameters of the eye position include at least the distance to the eye and the rotation angle of the eye.
[0091] Furthermore, the 3D view generation module 13 of the present system functions as follows: First, calculate a rotation angle and a shift angle based on the parameters of the human eye position, then use the rotation angle to rotate the original virtual 3D view matrix of the game to obtain a stereoscopic view matrix, and then shift the stereoscopic view matrix according to the shift angle to obtain a stereoscopic view for each viewpoint. Then, convert the stereoscopic view for each viewpoint into a view of a predetermined format, and transmit the view of the predetermined format to the display module 14. The display module 14 includes at least a raster (not shown). Based on the physical parameters of the raster, the display module 14 performs layout interleaving on the received view of the predetermined format to obtain a 3D game view to be rendered. Then, the display module 14 performs rendering interleaving on the 3D game view to be rendered to generate a final stereoscopic 3D game view. By performing layout interleaving and rendering interleaving on views in a predefined format, the expressiveness of the stereoscopic 3D view presented by the game can be improved, optimizing the player's visual experience and enhancing the sense of immersion, significantly improving the player's gaming experience.
[0092] Optionally, the system 1 for converting a virtual 3D game into a stereoscopic 3D game according to the second embodiment of the present invention further includes a 3D game launch module 11 for determining whether the game is launched in stereoscopic 3D mode. If the game is launched in stereoscopic 3D mode, the system continues to operate. If the game is not launched in stereoscopic 3D mode, the system stops.
[0093] Specifically, the working principle of the stereoscopic 3D game launch module 11 is as follows: Before launching a game, the stereoscopic 3D game launch module 11 includes at least one flag (not shown). This flag has at least an active state and a stopped state. If the game is in virtual 3D format, the flag is in the active state and continues to execute step Sa3 or step S1. If the game is not in virtual 3D format, the flag is in the stopped state and stops the execution. If a start signal set by the viewer is detected or if no signal set by the viewer is detected, the flag is in the active state and continues to execute step S1. If a start / stop signal set by the viewer is detected, the flag is changed to the stopped state and stops the execution.
[0094] The system for converting a virtual 3D game into a stereoscopic 3D game according to the second embodiment of the present application further includes a stereoscopic parallax control module 15. The viewer adjusts the shift angle through the stereoscopic parallax control module 15. Specifically, the operation principle of the stereoscopic parallax control module 15 is as follows: The stereoscopic parallax control module 15 has built-in setting parameters, and the player can choose whether to adjust these setting parameters according to their own needs. If the player adjusts the setting parameters according to their own senses and needs, the shift angle changes appropriately according to the change in the setting parameters, effectively enhancing or weakening the 3D stereoscopic parallax of the stereoscopic 3D game view and adjusting the strength of the 3D effect. This achieves the effect of reducing the 3D dizziness and improving the 3D experience. On the other hand, if the player does not adjust the setting parameters according to their own senses and needs, the value of the shift angle is calculated based on the parameters of the player's eye position in step S2.
[0095] Optionally, the stereoscopic parallax control module 15 includes a UI interface and keys for receiving a player's stereoscopic parallax adjustment command. As can be understood, the components in the stereoscopic parallax control module 15 for receiving a player's adjustment command are not limited to a UI interface and keys, but may be any components capable of receiving a player's adjustment command.
[0096] Compared with the prior art, the method and system for converting a virtual 3D game into a stereoscopic 3D game provided in this application has the following beneficial effects:
[0097] First, the method for converting a virtual 3D game into a stereoscopic 3D game according to the present application first obtains parameters of the viewer's eye position, calculates a rotation angle and a shift angle based on the eye position parameters, rotates the original virtual 3D viewpoint matrix of the game based on the rotation angle to obtain a stereoscopic viewpoint matrix, and shifts the stereoscopic viewpoint matrix based on the shift angle to obtain a stereoscopic view for each viewpoint. Next, the stereoscopic views for each viewpoint are converted into a predetermined format, and the views in the predetermined format are subjected to a layout and interleaving process and then rendered to finally generate a vivid stereoscopic 3D game view. Through the above steps, the method for converting a virtual 3D game into a stereoscopic 3D game according to the present application can convert an existing virtual 3D game screen into a stereoscopic 3D game screen, and after rendering and interleaving, the final stereoscopic 3D game screen display effect is more perfect, further providing a better immersive experience for game players and significantly improving the player's gaming experience.
[0098] Second, the method for converting a virtual 3D game into a stereoscopic 3D game according to the present invention first sets a flag before launching the game. Specifically, if the game is in virtual 3D format, the flag is set to an active state, in which case processing continues. If the game is not in virtual 3D format, the flag is set to a stopped state, in which case processing stops. Next, if a start signal set by the viewer is detected, or if no signal set by the viewer is detected, the flag is set to an active state, in which case processing stops. If a start / stop signal set by the viewer is detected, the flag is adjusted to a stopped state, in which case processing stops. By setting the flag, the game system can immediately determine whether the game can be converted into a stereoscopic 3D game screen. At the same time, the player can manually set the game display mode, which improves the player's gaming experience.
[0099] Third, in the method of converting a virtual 3D game into a stereoscopic 3D game according to the present application, when acquiring parameters of the viewer's eye position, such as the distance to the eye and the angle of rotation of the eye, the frequency and accuracy of parameter acquisition can be significantly improved by combining a gyroscope with a camera or a gyroscope with an infrared device. Significantly increasing the frequency of parameter acquisition effectively reduces image delays caused by changes in the relative position of the player and the stereoscopic 3D game screen, significantly improving the player's gaming experience. Furthermore, improving the accuracy of the acquired eye position parameters also improves the accuracy of the rotation angle and shift angle, allowing the view to rotate and shift appropriately when the player faces different angles. As a result, the stereoscopic 3D view becomes more vivid and realistic, providing a better immersive experience for game players.
[0100] Fourth, in the method of converting a virtual 3D game into a stereoscopic 3D game according to the present application, by performing layout interleaving and rendering processes on views of a predetermined format, the stereoscopic 3D game view finally presented by the game becomes more vivid and impressive, thereby optimizing the player's visual experience and further improving the player's immersive experience, thereby significantly improving the player's gaming experience.
[0101] Fifth, in the method of converting a virtual 3D game into a stereoscopic 3D game according to the present application, the player can adjust the shift angle according to his / her own sense and needs, thereby enhancing or weakening the 3D stereoscopic parallax effect of the final view and adjusting the strength of the 3D stereoscopic effect, thereby realizing the effect of reducing the 3D dizziness and improving the 3D experience.
[0102] Sixth, the present application further provides a system for converting a virtual 3D game into a stereoscopic 3D game, which includes at least an eye tracking and positioning module, a 3D view generation module, and a display module. This system has the same effects as the above-mentioned method for converting a virtual 3D game into a stereoscopic 3D game, and therefore will not be described again here.
[0103] The above description is merely an example of the present application and is not intended to limit the scope of the patent of the present application. It goes without saying that any equivalent configuration or equivalent flow conversion made using the contents of the specification and drawings of the present application, or any direct or indirect application of the configuration of the present application to other related technical fields, are all included in the scope of the claims of the present application.
Claims
1. A method for displaying a 2D game in naked-eye 3D, comprising: Step S01: obtaining parameters of a viewer's eye position and calculating a viewing distance and a viewing angle between a display screen and the viewer at time T1; Step S02: predicting the viewing distance and the viewing angle at time T2 based on gyro data and / or key position and force data; and step S03 of converting the 2D game into 3D based on the viewing distance, the shift angle, and the viewpoint angle, and displaying the 2D game on a naked-eye 3D display device at time T2.
2. The step of converting a 2D game into 3D in step S03 includes: a step S031 of rotating a primitive game 3D viewpoint matrix of the game in accordance with the viewpoint angle to obtain a stereoscopic viewpoint matrix; Step S032: shifting the stereoscopic viewpoint matrix based on the shift angle to obtain stereoscopic views of two or more viewpoints; Step S033: converting the stereoscopic views of each viewpoint into views in a predetermined format; Step S034: performing layout interleaving on the view of the predetermined format to obtain a 3D game view to be rendered; The method for glasses-free 3D display of 2D games according to claim 1, further comprising a step S035 of performing rendering interleaving processing on the 3D game view to be rendered to generate a stereoscopic 3D game view.
3. Regarding the calculation formula for the shift angle, The coordinates of an arbitrary point in the stereoscopic view are defined as (x', y', z'), the coordinates after shifting are defined as (x'', y'', z''), θ is defined as the shift angle, θ is the angle between the viewpoint coordinate and the positive direction of the z' axis, t is an adjustment coefficient, and the range of t is defined as 0<t<1, The expression for shifting the viewpoint in the negative X-axis direction is: x''=x'+z'*tan(t*θ), y''=y', z''=z, The expression for shifting the viewpoint in the positive X-axis direction is:
3. The method for displaying 2D games in naked-eye 3D according to claim 2, wherein x''=x'-z'*tan(t*0), y''=y', and z''=z.
4. In the calculation formula for the rotation process, With the screen center as the origin of the coordinate system O-XYZ, the angle between the projection of the connecting line from the human eye to the screen center onto the XOZ plane and the positive half axis of the Z axis is α, the angle between the projection of the connecting line from the human eye to the screen center onto the YOZ plane and the positive half axis of the Z axis is β, and the X axis direction points from the midpoint of the left side of the screen to the midpoint of the right side of the screen, Based on the angles α and β, the distance L from the human eye to the screen, and the distance Z from the center of the scene to the screen, the angle by which the scene rotates around the Y axis is determined as α=arctan(L*tan α / (L+Z)); 、 3. The method for naked-eye 3D display of 2D games according to claim 2, wherein the angle by which the scene rotates around the X axis can be determined as b = arctan(L * tan β / (L + Z)).
5. The step S01 is Step S011: taking a face image of a person using a front camera and recording this time as T1; Step S012 of calculating facial feature points based on an AI model; The method for naked-eye 3D display of 2D games described in claim 1, further comprising a step S013 of calculating the viewing distance and viewpoint angle based on the dimensions and position of the same user's face when calibrating based on the 3D effect.
6. Step S02 Step S021 of continuously sampling the gyroscope and queuing the sampled data; and a step S022 of acquiring posture data of the device at time T1 and posture data of the device at current time T, and predicting a change in posture of the device from time T to time T2 using a nine-dimensional data AI model.
2. The method for naked-eye 3D display of a 2D game according to claim 1, wherein in step S023, the viewing distance and viewpoint angle at time T are calculated from the viewing distance and viewpoint angle at time T1, and the change in posture is further superimposed to obtain the viewing distance and viewpoint angle at time T2.
7. Step S02 of predicting the viewing distance and the viewing angle at time T2 based on the gyro data and / or key position and force data, Step S02a: providing a key pressure sensor on the touch screen; Step S02b of constructing an AI model for key force and game key position and training posture changes; 2. The method for displaying 2D games in 3D with naked eyes according to claim 1, further comprising: a step S02c of predicting changes in posture with respect to key force and game key position during a continuous game based on the AI model.
8. A naked-eye 3D display system for 2D games, comprising: an eye tracking and positioning module for obtaining parameters of a viewer's eye position and calculating a viewing distance and a viewing angle based thereon; a 3D view generation module for determining a rotation angle and a shift angle based on the viewing distance and the viewpoint angle, and converting the 2D game into 3D for display on a glasses-free 3D display device; a display module for layout interleaving the pre-defined format views to generate a stereoscopic 3D game view; A naked-eye 3D display system for 2D games, comprising: a raster for layout interleaving the views of the preset format received by the display module.
9. The glasses-free 3D display system for 2D games according to claim 8, further comprising a 3D game management module capable of presetting 3D display parameters for adjusting the 2D game during the game.
10. The glasses-free 3D display system for 2D games as claimed in claim 8, further comprising a gyroscope and a key pressure sensor.
Citation Information
Patent Citations
Naked eye 3D display method based on eye tracking
CN108600733A
Naked eye 3D display method and device and terminal
CN109842793A
Method and device for converting self-adaptive virtual view into stereoscopic view, which are applied to 3D game rendering engine
CN113379897A
Stereoscopic image generation device, stereoscopic image generation information, and information storage medium
JP2005051542A
Game device, stereoscopic view image generation method, program, and information storage medium
JP2010253264A