CN113259651B - Stereoscopic display method, apparatus, medium, and computer program product - Google Patents

Stereoscopic display method, apparatus, medium, and computer program product Download PDF

Info

Publication number
CN113259651B
CN113259651B CN202110765590.7A CN202110765590A CN113259651B CN 113259651 B CN113259651 B CN 113259651B CN 202110765590 A CN202110765590 A CN 202110765590A CN 113259651 B CN113259651 B CN 113259651B
Authority
CN
China
Prior art keywords
stereoscopic display
engine
display
eye image
plug
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110765590.7A
Other languages
Chinese (zh)
Other versions
CN113259651A (en
Inventor
罗军
熊晗立
刘小兰
王鲁平
冯诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangxi Kejun Industrial Co ltd
Original Assignee
Jiangxi Kejun Industrial Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangxi Kejun Industrial Co ltd filed Critical Jiangxi Kejun Industrial Co ltd
Priority to CN202110765590.7A priority Critical patent/CN113259651B/en
Publication of CN113259651A publication Critical patent/CN113259651A/en
Application granted granted Critical
Publication of CN113259651B publication Critical patent/CN113259651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/302Image reproducers for viewing without the aid of special glasses, i.e. using autostereoscopic displays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/10Processing, recording or transmission of stereoscopic or multi-view image signals
    • H04N13/106Processing image signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a stereoscopic display method, a device, a medium and a computer program product, wherein the stereoscopic display method comprises the following steps: the method comprises the steps of obtaining a configuration state corresponding to an editor of the 3D engine, obtaining a left eye image and a right eye image corresponding to the 3D engine through a display plug-in unit if the configuration state is a three-dimensional display state, creating a three-dimensional display exchange chain through the display plug-in unit, storing the left eye image into a left eye background buffer area of the three-dimensional display exchange chain and storing the right eye image into a right eye background buffer area of the three-dimensional display exchange chain based on the three-dimensional display exchange chain, and outputting the left eye image in the left eye background buffer area and the right eye image in the right eye background buffer area to a display screen in a frame sequence mode to display a three-dimensional display effect. The application solves the technical problem of low debugging efficiency of the 3D engine.

Description

Stereoscopic display method, apparatus, medium, and computer program product
Technical Field
The present application relates to the field of stereoscopic display technologies, and in particular, to a stereoscopic display method, device, medium, and computer program product.
Background
With the development of computer technology, the application of stereoscopic display technology of a 3D engine is more and more widespread. At present, in the non-head-mounted stereoscopic display of 3D engine, the editor of 3D engine only supports to present acquiescent 2D display effect after getting into play mode, can't demonstrate the stereoscopic display effect in the editor, also can't switch acquiescent demonstration and stereoscopic display under the editor, therefore, can't debug according to the stereoscopic display effect in real time in the program compiling process of editor, only after the program compiling development is accomplished, can only verify the stereoscopic display effect with the program publishing of 3D engine on the real machine platform, but it takes more time to publish the program compiling of 3D engine on the real machine platform to test the display effect, and then lead to 3D engine debugging inefficiency.
Disclosure of Invention
The present application mainly aims to provide a stereoscopic display method, a stereoscopic display device, a stereoscopic display medium, and a computer program product, and aims to solve the technical problem of low debugging efficiency of a 3D engine in the prior art.
In order to achieve the above object, the present application provides a stereoscopic display method, including:
acquiring a configuration state corresponding to an editor of the 3D engine;
if the configuration state is a three-dimensional display state, acquiring a left eye image and a right eye image corresponding to the 3D engine through a display plug-in;
creating a stereoscopic display exchange chain through the display plug-in;
based on the stereoscopic display exchange chain, storing the left-eye image into a left-eye background buffer area of the stereoscopic display exchange chain and storing the right-eye image into a right-eye background buffer area of the stereoscopic display exchange chain;
and outputting the left eye image of the left eye background buffer area and the right eye image of the right eye background buffer area to a display screen in a frame sequence mode to display a stereoscopic display effect.
Optionally, the step of obtaining the left-eye image and the right-eye image corresponding to the 3D engine through the display plug-in includes:
placing two cameras in the 3D engine according to a preset distance threshold to obtain a left-eye camera and a right-eye camera;
and acquiring the left eye image shot by the left eye camera and the right eye image shot by the right eye camera through the display plug-in.
Optionally, the step of acquiring, by the display plug-in, the left-eye image captured by the left-eye camera and the right-eye image captured by the right-eye camera includes:
setting an image interface through the display plug-in, wherein the image interface comprises a left eye pointer parameter corresponding to the left eye image and a right eye pointer parameter corresponding to the right eye image;
and calling a function corresponding to the image interface to obtain a left eye image corresponding to the left eye pointer parameter and a right eye image corresponding to the right eye pointer parameter.
Optionally, the step of creating a stereoscopic display swap chain by the display plug-in includes:
calling an equipment interface function of the 3D engine to obtain running equipment corresponding to the 3D engine;
and if the operating equipment detects that the display card applied by the 3D engine supports a stereoscopic display mode, establishing the stereoscopic display exchange chain.
Optionally, after the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method includes:
and if the configuration state is the default display state, displaying a default display mode.
Optionally, before the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method further includes:
adding an extended menu in an editor of the 3D engine;
and saving the configuration state corresponding to the expansion menu through the 3D engine.
Optionally, before the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method further includes:
creating the display plug-in according to a plug-in interface of the 3D engine;
and importing the display plug-in into a stereoscopic display program corresponding to the 3D engine.
The present application further provides a stereoscopic display device, the stereoscopic display device is a virtual device, the stereoscopic display device includes:
the first acquisition module is used for acquiring a configuration state corresponding to an editor of the 3D engine;
the second obtaining module is used for obtaining a left eye image and a right eye image corresponding to the 3D engine through a display plug-in if the configuration state is a three-dimensional display state;
the creation module is used for creating a stereoscopic display exchange chain through the display plug-in;
the image storage module is used for storing the left-eye image into a left-eye background buffer area of the stereoscopic display exchange chain and storing the right-eye image into a right-eye background buffer area of the stereoscopic display exchange chain based on the stereoscopic display exchange chain;
and the display module is used for outputting the left eye image of the left eye background buffer area and the right eye image of the right eye background buffer area to a display screen in a frame sequence mode so as to display a stereoscopic display effect.
Optionally, the second obtaining module is further configured to:
placing two cameras in the 3D engine according to a preset distance threshold to obtain a left-eye camera and a right-eye camera;
and acquiring the left eye image shot by the left eye camera and the right eye image shot by the right eye camera through the display plug-in.
Optionally, the second obtaining module is further configured to:
setting an image interface through the display plug-in, wherein the image interface comprises a left eye pointer parameter corresponding to the left eye image and a right eye pointer parameter corresponding to the right eye image;
and calling a function corresponding to the image interface to obtain a left eye image corresponding to the left eye pointer parameter and a right eye image corresponding to the right eye pointer parameter.
Optionally, the creating module is further configured to:
calling an equipment interface function of the 3D engine to obtain running equipment corresponding to the 3D engine;
and if the operating equipment detects that the display card applied by the 3D engine supports a stereoscopic display mode, establishing the stereoscopic display exchange chain.
Optionally, the stereoscopic display device is further configured to:
and if the configuration state is the default display state, displaying a default display mode.
Optionally, the stereoscopic display device is further configured to:
adding an extended menu in an editor of the 3D engine;
and saving the configuration state corresponding to the expansion menu through the 3D engine.
Optionally, the stereoscopic display device is further configured to:
creating the display plug-in according to a plug-in interface of the 3D engine;
and importing the display plug-in into a stereoscopic display program corresponding to the 3D engine.
The present application further provides a stereoscopic display device, the stereoscopic display device is an entity device, the stereoscopic display device includes: a memory, a processor and a stereoscopic display program stored on the memory, the stereoscopic display program being executed by the processor to implement the steps of the stereoscopic display method as described above.
The application also provides a medium which is a readable storage medium, wherein a stereoscopic display program is stored on the readable storage medium, and the stereoscopic display program is executed by a processor to realize the steps of the stereoscopic display method.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the stereoscopic display method as described above.
The application provides a stereoscopic display method, equipment, a medium and a computer program product, compared with the technical means that debugging can not be carried out in real time according to a stereoscopic display effect in the process of program compiling adopted by the prior art, the method comprises the steps of firstly obtaining a configuration state corresponding to an editor of a 3D engine, obtaining a left eye image and a right eye image corresponding to the 3D engine through a display plug-in if the configuration state is the stereoscopic display state, establishing a stereoscopic display exchange chain through the display plug-in, storing the left eye image into a left eye background buffer area of the stereoscopic display exchange chain and storing the right eye image into a right eye background buffer area of the stereoscopic display exchange chain based on the stereoscopic display exchange chain, and further outputting the left eye image in the left eye background buffer area and the right eye image in the right eye background buffer area to a display screen in a frame sequence form to display the stereoscopic display effect, the display plug-in is used for displaying the stereoscopic display effect realized by the display plug-in when the editor of the 3D engine enters a play mode, and simultaneously, the stereoscopic display program corresponding to the 3D engine is issued to a real machine platform for operation and also can display the stereoscopic display effect according to the display plug-in, and the purpose of selectively displaying the stereoscopic display effect or default display effect based on the configuration state is also realized, so that debugging is carried out according to the stereoscopic display effect in real time, the problem that debugging can not be carried out according to the stereoscopic display effect in the program compiling process in the prior art is overcome, the stereoscopic display effect can be verified only by issuing the program of the 3D engine to the real machine platform after the program compiling and developing are finished, but more time is needed for compiling and issuing the program of the 3D engine to the real machine platform for testing the display effect, and further, the technical defect that the debugging efficiency of the 3D engine is low is caused, so that the debugging efficiency of the 3D engine is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flow chart of a stereoscopic display method according to a first embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a stereoscopic display method according to a second embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating a third embodiment of a stereoscopic display method according to the present application;
FIG. 4 is a schematic flow chart illustrating a fourth embodiment of a stereoscopic display method according to the present application;
fig. 5 is a schematic structural diagram of a stereoscopic display device in a hardware operating environment related to a stereoscopic display method in an embodiment of the present application.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In a first embodiment of the stereoscopic display method, referring to fig. 1, the stereoscopic display method is applied to a non-head-mounted stereoscopic display device of a 3D engine, and the stereoscopic display method includes:
step S10, acquiring a configuration state corresponding to the editor of the 3D engine;
in this embodiment, it should be noted that the configuration state is a state in which a corresponding display effect is selectively presented under the editor, where the configuration state includes a stereoscopic display state, a default display state, and the like, and further, when the editor of the 3D engine enters a play mode and when the stereoscopic display program corresponding to the 3D engine is in an issue mode, the configuration state can be obtained, where the play mode is a mode in which the editor of the 3D engine performs compiling operation to present a stereoscopic display effect or a default display effect, the issue mode is a mode in which the stereoscopic display program corresponding to the 3D engine is issued to a live machine platform for running, and the live machine platform includes a smart phone, a tablet computer, and the like.
The configuration state corresponding to the editor of the 3D engine is obtained, specifically, an extension menu is added in the editor of the 3D engine, and it should be noted that a new extension menu is allowed to be created in a top-level toolbar in the editor of the 3D engine, where the extension menu is a custom menu for selecting whether to display a stereoscopic display effect, and the configuration state corresponding to the extension menu is obtained, so that the configuration state corresponding to the stereoscopic display is automatically selected or a default configuration state is selected through the extension menu, and a display effect corresponding to the configuration state is presented according to the selected configuration state. For example, the attribute of the extended menu is set to be boolean type, that is, when the stereoscopic display is selected, the configuration state corresponding to the extended menu is set to 1, when the stereoscopic display is deselected, the configuration state is set to 0, and when the editor of the 3D engine enters a play mode or when the stereoscopic display program corresponding to the 3D engine is in the release mode, the currently selected configuration state is read.
After the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method includes:
step a10, if the configuration state is the default display state, displaying a default display mode.
In this embodiment, it should be noted that the default display state is a state in which a display effect of a normal 2D picture is presented.
And if the configuration state is a default display state, displaying a default display mode, specifically, if the default display state presenting a common display effect is selected in the configuration state corresponding to the extended menu, displaying a two-dimensional picture.
Step S20, if the configuration state is a three-dimensional display state, acquiring a left-eye image and a right-eye image corresponding to the 3D engine through a display plug-in;
in this embodiment, it should be noted that the stereoscopic display state is a state in which a stereoscopic display effect is presented, and includes a state in which an editor of the 3D engine presents a stereoscopic display effect and a state in which a stereoscopic display program corresponding to the 3D engine presents the stereoscopic display effect when the stereoscopic display program is in a release mode, and the display plug-in is a library pre-written in a development language to implement presentation of the stereoscopic display effect, and the display plug-in includes plug-ins such as a C language display plug-in and a C + + display plug-in.
If the configuration state is a stereoscopic display state, acquiring a left eye image and a right eye image corresponding to the 3D engine through a display plug-in, specifically, setting an interface for acquiring a display state through the display plug-in, if the configuration state is the stereoscopic display state, calling a function corresponding to the interface for acquiring the display state in the display plug-in to acquire the stereoscopic display state, and further setting an image interface through the display plug-in, wherein the image interface is an interface for acquiring an image of the 3D engine and includes a left eye pointer parameter corresponding to the left eye image and a right eye pointer parameter corresponding to the right eye image, and further, transferring the left eye image corresponding to the left eye pointer parameter and the right eye image corresponding to the right eye pointer parameter into the display plug-in by calling the function corresponding to the image interface, for example, when a stereoscopic display program starts to run, an upper layer application script corresponding to the 3D engine calls an image interface reserved by the display plug-in, and then transmits the left-eye image and the right-eye image to the display plug-in.
Step S30, creating a stereoscopic display exchange chain through the display plug-in;
in this embodiment, it should be noted that the stereoscopic display exchange chain is an exchange chain supporting presentation of a stereoscopic display effect, and the stereoscopic display exchange chain includes a foreground buffer area and a background buffer area, where the foreground buffer area is a buffer area for storing image data currently displayed on a display screen, and the background buffer area is a buffer area for storing the left-eye image and the right-eye image.
Creating a stereoscopic display exchange chain, specifically, invoking an initialization method of the display plug-in to initialize the display plug-in, and then invoking a device interface function of the 3D engine to obtain an operating device corresponding to the 3D engine, where the operating device includes devices such as a D3D device and an OPENGL device, and is configured to detect hardware information corresponding to the 3D engine, and further, if it is detected that a display card applied by the 3D engine supports the stereoscopic display mode, that is, it is detected that the display card supports presenting a stereoscopic display effect, then creating the stereoscopic display exchange chain, so as to cache a left-eye image and a right-eye image obtained by the display plug-in.
Wherein the step of creating a stereoscopic display swap chain via the display plug-in comprises:
step S31, calling an equipment interface function of the 3D engine to obtain running equipment corresponding to the 3D engine;
in this embodiment, a device interface function of the 3D engine is called to obtain the running device corresponding to the 3D engine, specifically, the device interface function of the 3D engine is called to obtain a pointer pointing to the running device, and then according to the pointer, the interface function corresponding to the pointer is called to obtain the running device.
Step S32, if it is detected by the operating device that the graphics card applied by the 3D engine supports a stereoscopic display mode, creating the stereoscopic display exchange chain.
In this embodiment, if it is detected that the display card applied by the 3D engine supports the stereoscopic display mode through the operating device, the stereoscopic display exchange chain is created, specifically, the operating device can traverse the display card applied by the 3D engine, test the display card according to a pre-programmed test programming code, and if it is detected that the display card supports the stereoscopic display mode, create the stereoscopic display exchange chain.
Step S40, based on the stereoscopic display exchange chain, storing the left eye image into a left eye background buffer area of the stereoscopic display exchange chain and storing the right eye image into a right eye background buffer area of the stereoscopic display exchange chain;
in this embodiment, it should be noted that the left-eye background buffer area is a buffer area for storing a left-eye image to be displayed, and the right-eye background buffer area is a buffer area for a right-eye image to be displayed.
Storing the left eye image into a left eye background buffer area of the stereoscopic display exchange chain, storing the right eye image into a right eye background buffer area of the stereoscopic display exchange chain, specifically, respectively creating a rendering view corresponding to the left eye image and a rendering view corresponding to the right eye image, and respectively writing the left eye image and the right eye image obtained by the display plug-in into the respective rendering views, wherein the rendering view corresponding to the left eye image is bound with the left eye background buffer area, the rendering view corresponding to the right eye image is bound with the right eye buffer area, and then the left eye image is transmitted to the left eye background buffer area and the right eye is transmitted to the right eye background buffer area, and then the image to be displayed is stored by the buffer area corresponding to the stereoscopic display exchange chain, so as to avoid the current image being displayed on a display screen, for example, after each image frame shot in a main loop function in a stereoscopic display program is rendered, an image interface reserved by the display plug-in is called through an upper layer application script corresponding to the 3D engine, so that the left-eye image and the right-eye image are respectively written into the corresponding rendering views for image rendering, and then are transferred to the left-eye background buffer area and the right-eye background buffer area.
And step S50, outputting the left-eye image in the left-eye background buffer area and the right-eye image in the right-eye background buffer area to a display screen in a frame sequence form to display a stereoscopic display effect.
In this embodiment, the frame sequence format is a format in which image screen frames corresponding to the left and right eyes are displayed in a carousel manner.
The left eye image of the left eye background buffer area and the right eye image of the right eye background buffer area are output to a display screen in a frame sequence form to display a stereoscopic display effect, specifically, the left eye image of the left eye background buffer area is output in a frame sequence form and presented on the left side of the display screen, and the right eye image of the right eye background buffer area is output in a frame sequence form and presented on the right side of the display screen, so that the stereoscopic display effect is presented, and a picture with the stereoscopic display effect can be seen by wearing glasses matched with the display screen.
Additionally, in the prior art, there is a version of a 3D engine that does not support non-head mounted stereoscopic display, that is, the stereoscopic display effect cannot be presented neither in an editor of the 3D engine nor in issuing a stereoscopic display program corresponding to the 3D engine onto a real machine platform for operation.
In the application, the display plug-in is loaded through the editor of the 3D engine and the display plug-in is loaded when the stereoscopic display program is in the release mode, so that the stereoscopic display effect realized through the display plug-in can be presented, and even when the 3D engine does not support the non-head-mounted stereoscopic display, the stereoscopic display effect can be presented through the display plug-in.
The embodiment of the application provides a stereoscopic display method, compared with the technical means that debugging can not be performed in real time according to a stereoscopic display effect in the process of program compilation adopted by the prior art, the method comprises the steps of firstly obtaining a configuration state corresponding to an editor of a 3D engine, obtaining a left eye image and a right eye image corresponding to the 3D engine through a display plug-in if the configuration state is a stereoscopic display state, creating a stereoscopic display exchange chain through the display plug-in, storing the left eye image into a left eye background buffer area of the stereoscopic display exchange chain and storing the right eye image into a right eye background buffer area of the stereoscopic display exchange chain based on the stereoscopic display exchange chain, and further outputting the left eye image in the left eye background buffer area and the right eye image in the right eye background buffer area to a display screen in a frame sequence form to display the stereoscopic display effect, the display plug-in is used for displaying the stereoscopic display effect realized by the display plug-in when the editor of the 3D engine enters a play mode, and simultaneously, the stereoscopic display effect can be also displayed by issuing the stereoscopic display program corresponding to the 3D engine to a real machine platform for operation according to the display plug-in, and the purpose of selectively displaying the stereoscopic display effect or default display effect based on the configuration state is also realized, so that debugging is carried out according to the stereoscopic display effect in real time, the problems that debugging cannot be carried out according to the stereoscopic display effect in the program compiling process in the prior art, the stereoscopic display effect can be verified only by issuing the program of the 3D engine to the real machine platform after the program compiling and developing are completed, but more time is needed for testing the display effect by compiling and issuing the program of the 3D engine to the real machine platform are solved, and further, the technical defect that the debugging efficiency of the 3D engine is low is caused, so that the debugging efficiency of the 3D engine is improved.
Further, referring to fig. 2, based on the first embodiment in the present application, in another embodiment of the present application, before the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method further includes:
step B10, adding an expansion menu in an editor of the 3D engine;
in this embodiment, it should be noted that, in the editor of the 3D engine, a new extended menu is allowed to be created in the top-level toolbar, where the extended menu is a custom menu for selecting whether to display a stereoscopic display effect.
Adding an extended menu in an editor of the 3D engine, specifically, adding an extended menu for selecting whether to display a stereoscopic display effect in a customized manner in an editor of the 3D engine, for example, creating an extended menu script by the 3D engine, using a MenuItem attribute in the 3D engine to identify the extended menu, for example, [ MenuItem ("extended menu/stereoscopic display") ], that is, creating a menu item named extended menu in a toolbar, and generating a button for stereoscopic display.
And step B20, saving the configuration state corresponding to the expansion menu through the 3D engine.
In this embodiment, the configuration state corresponding to the extended menu is saved by the 3D engine, specifically, the configuration state corresponding to the extended menu is selected by clicking the extended menu, that is, the stereoscopic display state is selected or the default display state is selected, and the configuration state is saved by a preset data saving manner, where the preset data saving manner includes saving by using an EditorPrefs function, a PlayerPrefs function, and the like of the 3D engine.
The embodiment of the application provides a stereoscopic display method, namely, an extension menu is added in an editor of a 3D engine, and then the configuration state corresponding to the extension menu is stored through the 3D engine, so that the configuration state corresponding to the extension menu is selected based on the extension menu, and the display effect corresponding to the configuration state is presented according to the selected configuration state, namely, the stereoscopic display effect or the default display effect can be selectively presented, so that the method lays a foundation for overcoming the technical defect that in the prior art, debugging can not be performed according to the stereoscopic display effect in real time in the program compiling process, however, more time is needed for the 3D engine to compile and issue the mobile platform to test the display effect, and further the debugging efficiency of the 3D engine is low.
Further, referring to fig. 3, based on the first embodiment in the present application, in another embodiment of the present application, before the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method further includes:
step C10, creating the display plug-in according to the plug-in interface of the 3D engine;
in this embodiment, it should be noted that the display plug-in is a library which is written in advance by a development language and realizes the presentation of a stereoscopic display effect, and the display plug-in includes plug-ins such as a C display plug-in and a C + + display plug-in.
The display plug-in is created according to a plug-in interface of the 3D engine, specifically, a plug-in interface for the display plug-in is reserved by the 3D engine, and then based on the plug-in interface, a library for realizing the stereoscopic display effect is created, that is, the display plug-in, for example, a C + + project is created in Visual Studio programming software, and then based on the plug-in interface provided by the 3D engine, a code library corresponding to the realization of the stereoscopic display effect is written in the C + + project, the code library is compiled to output a compilation log, and if the compilation log is not reported in error, the display plug-in is obtained.
And step C20, importing the display plug-in into a stereoscopic display program corresponding to the 3D engine.
In this embodiment, the display plug-in is imported into the stereoscopic display program corresponding to the 3D engine, specifically, the compiled library is copied into a folder corresponding to the stereoscopic display program, that is, the display plug-in is copied into the folder corresponding to the 3D engine, for example, the display plug-in is copied into a Plugins folder in the stereoscopic display program corresponding to the 3D engine.
The embodiment of the application provides a stereoscopic display method, that is, the display plug-in is created according to the plug-in interface of the 3D engine, and the display plug-in is imported into the stereoscopic display program corresponding to the 3D engine, so that the display plug-in is realized, the display plug-in is loaded through the editor of the 3D engine and loaded when the display plug-in is released to a real machine platform to run in a three-dimensional display program corresponding to the 3D engine, and the purpose of the three-dimensional display effect created by the display plug-in can be achieved.
Further, referring to fig. 4, according to the first embodiment of the present application, the step of obtaining the left-eye image and the right-eye image corresponding to the 3D engine by the display plug-in includes:
step D10, placing two cameras in the 3D engine according to a preset distance threshold value to obtain a left-eye camera and a right-eye camera;
in this embodiment, it should be noted that the preset distance threshold is a distance between two cameras set in advance.
The method includes the steps of placing two cameras in the 3D engine according to a preset distance threshold value to obtain a left-eye camera and a right-eye camera, specifically, distributing the two cameras in the 3D engine on the left side and the right side of a preset distance, taking the camera on the left side as the left-eye camera, and taking the camera on the right side as the right-eye camera.
Step D20, acquiring the left eye image shot by the left eye camera and the right eye image shot by the right eye camera through the display plug-in;
in this embodiment, through the display plug-in obtains the left eye image that the left eye camera was shot and the right eye image that the right eye camera was shot, specifically, through the display plug-in sets up the image interface, the image interface includes the left eye pointer parameter that the left eye image corresponds and the right eye pointer parameter that the right eye image corresponds, and then through the 3D engine will the left eye image that the left eye pointer parameter corresponds transmit to the display plug-in and will the right eye image that the right eye pointer parameter corresponds transmit to the display plug-in, can obtain through the display plug-in the left eye image that the left eye camera was shot and the right eye image that the right eye camera was shot.
Wherein the step of acquiring the left-eye image captured by the left-eye camera and the right-eye image captured by the right-eye camera through the display plug-in includes:
step D21, setting an image interface through the display plug-in, wherein the image interface comprises a left eye pointer parameter corresponding to the left eye image and a right eye pointer parameter corresponding to the right eye image;
in this embodiment, it should be noted that the image interface is an interface for acquiring images captured by a left-eye camera and a right-eye camera in a 3D engine.
And setting an image interface through the display plug-in, wherein the image interface comprises a left eye pointer parameter corresponding to the left eye image and a right eye pointer parameter corresponding to the right eye image, and specifically, setting the image interface through the display plug-in so as to acquire the image in the 3D engine by calling the image interface.
And D22, calling a function corresponding to the image interface to obtain a left-eye image corresponding to the left-eye pointer parameter and a right-eye image corresponding to the right-eye pointer parameter.
In this embodiment, a function corresponding to the image interface is called to obtain a left-eye image corresponding to the left-eye pointer parameter and a right-eye image corresponding to the right-eye pointer parameter, and specifically, the function corresponding to the image interface is called, so that the left-eye image corresponding to the left-eye pointer parameter and the right-eye image corresponding to the right-eye pointer parameter are transmitted to the display plug-in through the 3D engine.
The embodiment of the application provides a stereoscopic display method, that is, two cameras in the 3D engine are placed according to a preset distance threshold to obtain a left-eye camera and a right-eye camera, the left eye image shot by the left eye camera and the right eye image shot by the right eye camera are further obtained through the display plug-in, so that the left eye image and the right eye image obtained through the display plug-in are realized, the left eye image and the right eye image are output to a display screen in a frame sequence form, and then the purpose of presenting the stereoscopic display effect is achieved, and a foundation is laid for overcoming the technical defect that the program compiling process of the 3D engine in the prior art cannot be debugged according to the stereoscopic display effect in real time, but much time is needed for compiling and releasing the program of the 3D engine to the mobile platform for testing the display effect, and further the debugging efficiency of the 3D engine is low.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a stereoscopic display device in a hardware operating environment related to a stereoscopic display method in an embodiment of the present application.
As shown in fig. 5, the stereoscopic display device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the stereoscopic display device may further include a rectangular user interface, a network interface, a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, and so forth. The rectangular user interface may comprise a Display screen (Display), an input sub-module such as a Keyboard (Keyboard), and the optional rectangular user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WIFI interface).
Those skilled in the art will appreciate that the stereoscopic display device structure shown in fig. 5 does not constitute a limitation of a stereoscopic display device, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 5, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, and a stereoscopic display program. The operating system is a program that manages and controls hardware and software resources of the stereoscopic display device, and supports the operation of the stereoscopic display program and other software and/or programs. The network communication module is used for communication among the components in the memory 1005 and with other hardware and software in the stereoscopic display system.
In the stereoscopic display apparatus shown in fig. 5, the processor 1001 is configured to execute a stereoscopic display program stored in the memory 1005, and implement the steps of the stereoscopic display method described in any one of the above.
The specific implementation of the stereoscopic display device of the present application is substantially the same as that of each embodiment of the stereoscopic display method, and is not described herein again.
The present application further provides a stereoscopic display device, the stereoscopic display device includes:
the first acquisition module is used for acquiring a configuration state corresponding to an editor of the 3D engine;
the second obtaining module is used for obtaining a left eye image and a right eye image corresponding to the 3D engine through a display plug-in if the configuration state is a three-dimensional display state;
the creation module is used for creating a stereoscopic display exchange chain through the display plug-in;
the image storage module is used for storing the left-eye image into a left-eye background buffer area of the stereoscopic display exchange chain and storing the right-eye image into a right-eye background buffer area of the stereoscopic display exchange chain based on the stereoscopic display exchange chain;
and the display module is used for outputting the left eye image of the left eye background buffer area and the right eye image of the right eye background buffer area to a display screen in a frame sequence mode so as to display a stereoscopic display effect.
Optionally, the second obtaining module is further configured to:
placing two cameras in the 3D engine according to a preset distance threshold to obtain a left-eye camera and a right-eye camera;
and acquiring the left eye image shot by the left eye camera and the right eye image shot by the right eye camera through the display plug-in.
Optionally, the second obtaining module is further configured to:
setting an image interface through the display plug-in, wherein the image interface comprises a left eye pointer parameter corresponding to the left eye image and a right eye pointer parameter corresponding to the right eye image;
and calling a function corresponding to the image interface to obtain a left eye image corresponding to the left eye pointer parameter and a right eye image corresponding to the right eye pointer parameter.
Optionally, the creating module is further configured to:
calling an equipment interface function of the 3D engine to obtain running equipment corresponding to the 3D engine;
and if the operating equipment detects that the display card applied by the 3D engine supports a stereoscopic display mode, establishing the stereoscopic display exchange chain.
Optionally, the stereoscopic display device is further configured to:
and if the configuration state is the default display state, displaying a default display mode.
Optionally, the stereoscopic display device is further configured to:
adding an extended menu in an editor of the 3D engine;
and saving the configuration state corresponding to the expansion menu through the 3D engine.
Optionally, the stereoscopic display device is further configured to:
creating the display plug-in according to a plug-in interface of the 3D engine;
and importing the display plug-in into a stereoscopic display program corresponding to the 3D engine.
The specific implementation of the stereoscopic display device of the present application is substantially the same as that of the embodiments of the stereoscopic display method described above, and is not described herein again.
The present application provides a medium, which is a readable storage medium, and the readable storage medium stores one or more programs, and the one or more programs are further executable by one or more processors for implementing the steps of the stereoscopic display method described in any one of the above.
The specific implementation of the readable storage medium of the present application is substantially the same as that of each embodiment of the stereoscopic display method, and is not described herein again.
The present application provides a computer program product, and the computer program product includes one or more computer programs, which can also be executed by one or more processors for implementing the steps of the stereoscopic display method described in any one of the above.
The specific implementation of the computer program product of the present application is substantially the same as that of each embodiment of the stereoscopic display method, and is not described herein again.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (9)

1. A stereoscopic display method applied to a non-head mounted stereoscopic display device of a 3D engine, the stereoscopic display method comprising:
acquiring a configuration state corresponding to an editor of the 3D engine;
if the configuration state is a three-dimensional display state, acquiring a left eye image and a right eye image corresponding to the 3D engine through a display plug-in;
calling an equipment interface function of the 3D engine through the display plug-in, and if it is detected that a display card applied by the 3D engine supports a stereoscopic display mode, creating a stereoscopic display exchange chain, wherein the stereoscopic display exchange chain comprises a foreground buffer area and a background buffer area;
based on the stereoscopic display exchange chain, storing the left-eye image into a left-eye background buffer area of the stereoscopic display exchange chain and storing the right-eye image into a right-eye background buffer area of the stereoscopic display exchange chain;
and outputting the left eye image of the left eye background buffer area and the right eye image of the right eye background buffer area to a display screen in a frame sequence mode to display a stereoscopic display effect.
2. The stereoscopic display method of claim 1, wherein the step of obtaining the left-eye image and the right-eye image corresponding to the 3D engine through the display plug-in comprises:
placing two cameras in the 3D engine according to a preset distance threshold to obtain a left-eye camera and a right-eye camera;
and acquiring the left eye image shot by the left eye camera and the right eye image shot by the right eye camera through the display plug-in.
3. The stereoscopic display method of claim 2, wherein the step of acquiring the left-eye image captured by the left-eye camera and the right-eye image captured by the right-eye camera through the display plug-in comprises:
setting an image interface through the display plug-in, wherein the image interface comprises a left eye pointer parameter corresponding to the left eye image and a right eye pointer parameter corresponding to the right eye image;
and calling a function corresponding to the image interface to obtain a left eye image corresponding to the left eye pointer parameter and a right eye image corresponding to the right eye pointer parameter.
4. The stereoscopic display method of claim 1, wherein the step of calling the device interface function of the 3D engine through the display plug-in, and if it is detected that the graphics card applied by the 3D engine supports the stereoscopic display mode, creating a stereoscopic display swap chain comprises:
calling an equipment interface function of the 3D engine to obtain running equipment corresponding to the 3D engine;
and if the operating equipment detects that the display card applied by the 3D engine supports a stereoscopic display mode, establishing the stereoscopic display exchange chain.
5. The stereoscopic display method according to claim 1, wherein after the step of acquiring the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method comprises:
and if the configuration state is the default display state, displaying a default display mode.
6. The stereoscopic display method according to claim 1, wherein before the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method further comprises:
adding an extended menu in an editor of the 3D engine;
and saving the configuration state corresponding to the expansion menu through the 3D engine.
7. The stereoscopic display method according to claim 1, wherein before the step of obtaining the configuration state corresponding to the editor of the 3D engine, the stereoscopic display method further comprises:
creating the display plug-in according to a plug-in interface of the 3D engine;
and importing the display plug-in into a stereoscopic display program corresponding to the 3D engine.
8. A stereoscopic display device, characterized in that the stereoscopic display device comprises: a memory, a processor, and a stereoscopic display program stored on the memory,
the stereoscopic display program is executed by the processor to implement the stereoscopic display method according to any one of claims 1 to 7.
9. A medium which is a readable storage medium, characterized in that the readable storage medium has a stereoscopic display program stored thereon, and the stereoscopic display program is executed by a processor to implement the stereoscopic display method according to any one of claims 1 to 7.
CN202110765590.7A 2021-07-07 2021-07-07 Stereoscopic display method, apparatus, medium, and computer program product Active CN113259651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110765590.7A CN113259651B (en) 2021-07-07 2021-07-07 Stereoscopic display method, apparatus, medium, and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110765590.7A CN113259651B (en) 2021-07-07 2021-07-07 Stereoscopic display method, apparatus, medium, and computer program product

Publications (2)

Publication Number Publication Date
CN113259651A CN113259651A (en) 2021-08-13
CN113259651B true CN113259651B (en) 2021-10-15

Family

ID=77190962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110765590.7A Active CN113259651B (en) 2021-07-07 2021-07-07 Stereoscopic display method, apparatus, medium, and computer program product

Country Status (1)

Country Link
CN (1) CN113259651B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117009016A (en) * 2023-07-12 2023-11-07 江西科骏实业有限公司 Display mode switching method, system, terminal equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282536A (en) * 2015-10-27 2016-01-27 成都斯斐德科技有限公司 Naked-eye 3D picture-text interaction method based on Unity3D engine
CN105354872A (en) * 2015-11-04 2016-02-24 深圳墨麟科技股份有限公司 Rendering engine, implementation method and producing tools for 3D web game
CN106170085A (en) * 2016-08-02 2016-11-30 江苏维林苑影像科技有限公司 A kind of without mirror solid engine exchange method
CN109887097A (en) * 2019-02-01 2019-06-14 河南众诚信息科技股份有限公司 A kind of VR content development platform and method
WO2021081568A2 (en) * 2021-02-23 2021-04-29 Innopeak Technology, Inc. Advanced stereoscopic rendering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10671239B2 (en) * 2017-12-18 2020-06-02 Sony Interactive Entertainment America Llc Three dimensional digital content editing in virtual reality

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105282536A (en) * 2015-10-27 2016-01-27 成都斯斐德科技有限公司 Naked-eye 3D picture-text interaction method based on Unity3D engine
CN105354872A (en) * 2015-11-04 2016-02-24 深圳墨麟科技股份有限公司 Rendering engine, implementation method and producing tools for 3D web game
CN106170085A (en) * 2016-08-02 2016-11-30 江苏维林苑影像科技有限公司 A kind of without mirror solid engine exchange method
CN109887097A (en) * 2019-02-01 2019-06-14 河南众诚信息科技股份有限公司 A kind of VR content development platform and method
WO2021081568A2 (en) * 2021-02-23 2021-04-29 Innopeak Technology, Inc. Advanced stereoscopic rendering

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
《Demonstrating COLIBRI VR, an Open-Source Toolkit to Render Real-World Scenes in Virtual Reality》;G. D. d. Dinechin and A. Paljic;《"Demonstrating COLIBRI VR, an Open-Source Toolkit to Render Real-World Scenes in Virtual Reality," 2020 IEEE Conference on Virtual Reality and 3D User Interfaces Abstracts and Workshops (VRW), 2020, pp. 844-845, doi: 10.1109/VRW50115.2020.00273.》;20200331;全文 *
基于Unity3D的海战场三维态势实时显示系统设计与实现;江波等;《指挥控制与仿真》;20180415(第02期);全文 *
基于可视化的VR编辑引擎;蒋宁等;《计算机系统应用》;20200515(第05期);全文 *

Also Published As

Publication number Publication date
CN113259651A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN107832108B (en) Rendering method and device of 3D canvas webpage elements and electronic equipment
US10587871B2 (en) 3D User Interface—360-degree visualization of 2D webpage content
US10902663B2 (en) Method and apparatus for displaying 2D application interface in virtual reality device
US11003305B2 (en) 3D user interface
KR101267120B1 (en) Mapping graphics instructions to associated graphics data during performance analysis
CN107506306B (en) Art resource testing method and device
CN110968962B (en) Three-dimensional display method and system based on cloud rendering at mobile terminal or large screen
CN113259651B (en) Stereoscopic display method, apparatus, medium, and computer program product
CN110019464A (en) Page processing method and device
KR20150106846A (en) Improvements in and relating to rendering of graphics on a display device
US10623713B2 (en) 3D user interface—non-native stereoscopic image conversion
CN105808220A (en) Method and apparatus for displaying three-dimensional effect by application
CN111831497B (en) Equipment simulation method and device, storage medium and simulation terminal
CN115174993B (en) Method, apparatus, device and storage medium for video production
CN113676753B (en) Method and device for displaying video in VR scene, electronic equipment and storage medium
CN113114955B (en) Video generation method and device and electronic equipment
CN114153539B (en) Front-end application interface generation method and device, electronic equipment and storage medium
CN116958300A (en) Image processing apparatus, image processing method, image capturing apparatus, and electronic apparatus
Lu et al. Interactive augmented reality application design based on mobile terminal
CN117519686A (en) Three-dimensional UI development, three-dimensional UI development device, and storage medium
CN114153539A (en) Front-end application interface generation method and device, electronic equipment and storage medium
CN115996286A (en) Display control device and method, storage medium and electronic equipment
CN116360734A (en) Rendering method and device, storage medium and electronic equipment
CN116684747A (en) Image filter application method and device, equipment, medium and product thereof
CN116109802A (en) Image processing method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant