Method and device for displaying bullet screen, equipment and medium
By obtaining the morphological changes and movement trajectory information of the barrage, as well as the attribute information of the space screen, the screen to be displayed is generated, which solves the user experience problem of barrage display in the virtual three-dimensional space, realizes animation effects and spatial interaction, and improves immersion. and fun.
Patent Information
- Application Number
- CN202311482231.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2024-09-27
AI Technical Summary
In virtual three-dimensional space scenes, existing technology is difficult to effectively display barrages with morphological changes and motion trajectories, resulting in poor user experience. Moreover, the interactive relationship between barrages and space screens is complex, affecting immersion and fun.
By obtaining the shape change information and motion trajectory information of the barrage to be displayed, as well as the position and size information of the spatial screen, the picture to be displayed is generated based on the spatial information of the head-mounted display device, and the animation effect of the barrage and the interaction with the spatial screen are realized. .
It improves the immersion and fun of the user experience and enhances the animation effect of the barrage, allowing it to move freely and change shapes in the three-dimensional space, independent of the display area of the space screen, and achieve a three-dimensional visual effect.
Smart Images

Figure CN118710796A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of scene rendering, and in particular to a method, device, equipment and medium for displaying bullet comments. Background Art
[0002] In a virtual three-dimensional space scene, such as a VR (Virtual Reality) scene or an AR (Augmented Reality) scene, a user can watch the content played on the space screen in the virtual three-dimensional space scene through a head-mounted display device, such as watching videos and images. During the viewing process, the user can comment on the content played and express his or her feelings through bullet screens. Summary of the invention
[0003] In a first aspect, an embodiment of the present disclosure provides a method for displaying barrage, comprising: obtaining first attribute information and a model map of a first model of the barrage to be displayed. The first attribute information includes morphological change information and motion trajectory information of the first model. Obtaining second attribute information of a second model of a spatial screen and playback picture data corresponding to the spatial screen, the second attribute information includes position information and size information of the second model in a virtual space coordinate system, and the first model is a model movable relative to the second model in the virtual space coordinate system. Based on the spatial information, the first attribute information, the model map, the second attribute information, and the playback picture data of the head-mounted display device, a picture to be displayed is generated.
[0004] In the second aspect, the embodiments of the present disclosure provide a device for displaying barrage, including: a first acquisition module, used to obtain first attribute information and a model map of a first model of the barrage to be displayed. The first attribute information includes morphological change information and motion trajectory information of the first model. A second acquisition module, used to obtain second attribute information of a second model of a spatial screen and playback picture data corresponding to the spatial screen, the second attribute information includes position information and size information of the second model in a virtual space coordinate system, and the first model is a model movable relative to the second model in the virtual space coordinate system. A processing module, used to generate a picture to be displayed based on the spatial information of a head-mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data.
[0005] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the method for displaying barrage provided by any of the above embodiments of the present disclosure.
[0006] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, which includes: a processor; a memory for storing processor executable instructions; a processor, configured to read executable instructions from the memory and execute the instructions to implement the method for displaying barrage provided in any of the above embodiments of the present disclosure.
[0007] In a fifth aspect, an embodiment of the present disclosure provides a head mounted display device, the head mounted display device comprising:
[0008] A processor; a memory for storing processor executable instructions; a processor, for reading executable instructions from the memory and executing the instructions to implement the method for displaying barrage provided in any of the above embodiments of the present disclosure.
[0009] In a sixth aspect, an embodiment of the present disclosure provides a computer program product, including computer program instructions. When the computer program instructions are executed by a processor, the processor executes the method for displaying barrage provided by any of the above embodiments.
[0010] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other purposes, features and advantages of the present disclosure will become more apparent by describing the embodiments of the present disclosure in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. In the drawings, the same reference numerals generally represent the same components or steps.
[0012] Figure 1 is an exemplary system architecture that can be applied to an embodiment of the method or apparatus for displaying bullet comments of the present disclosure;
[0013] Figure 2 is a flowchart of a method for displaying bullet comments provided by an exemplary embodiment of the present disclosure;
[0014] Figure 3 is a schematic diagram of a flow chart of generating a picture to be displayed provided by an exemplary embodiment of the present disclosure;
[0015] Figure 4a It is a schematic diagram of the shape and position change of a bullet screen to be displayed provided by an exemplary embodiment of the present disclosure;
[0016] Figure 4b is a schematic diagram of the shape and position change of a bullet screen to be displayed provided by another exemplary embodiment of the present disclosure;
[0017] Figure 5aIt is a schematic diagram of the occlusion relationship between the bullet screen to be displayed and the spatial screen provided by an exemplary embodiment of the present disclosure;
[0018] Figure 5b is a schematic diagram of the occlusion relationship between a bullet screen to be displayed and a spatial screen provided by another exemplary embodiment of the present disclosure;
[0019] Figure 5c is a schematic diagram of the occlusion relationship between a bullet screen to be displayed and a spatial screen provided by another exemplary embodiment of the present disclosure;
[0020] Figure 5d is a schematic diagram of the occlusion relationship between a bullet screen to be displayed and a spatial screen provided by another exemplary embodiment of the present disclosure;
[0021] Figure 6 is a schematic diagram of a flow chart of generating a picture to be displayed provided by another exemplary embodiment of the present disclosure;
[0022] Figure 7 It is a schematic diagram of the effect of the change in the form of the bullet screen to be displayed on the playback screen data provided by an exemplary embodiment of the present disclosure;
[0023] Figure 8 is a schematic diagram of a flow chart of generating a picture to be displayed provided by another exemplary embodiment of the present disclosure;
[0024] Fig. 9 is a schematic diagram of a display screen in a case of multiple sub-models provided by an exemplary embodiment of the present disclosure;
[0025] Fig.10 is a flowchart of a method for displaying bullet comments provided by another exemplary embodiment of the present disclosure;
[0026] Fig.11 is a schematic diagram of a flow chart of generating a picture to be displayed provided by another exemplary embodiment of the present disclosure;
[0027] Fig.12 is a structural schematic diagram of a device for displaying bullet comments provided by an exemplary embodiment of the present disclosure;
[0028] Fig.13 is a structural schematic diagram of a device for displaying bullet comments provided by another exemplary embodiment of the present disclosure;
[0029] Fig.14 It is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. DETAILED DESCRIPTION
[0030] Below, the exemplary embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments of the present disclosure, and it should be understood that the present disclosure is not limited to the exemplary embodiments described here.
[0031] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
[0032] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0033] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.
[0034] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0035] The embodiments of the present disclosure can be applied to electronic devices such as head-mounted display devices, terminal devices, servers, etc., which can operate with many other general or special computing system environments or configurations. Electronic devices such as head-mounted display devices, terminal devices, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Generally, program modules can include routines, programs, target programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system / server can be implemented in a distributed cloud computing environment, in which tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on a local or remote computing system storage medium including a storage device.
[0036] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0037] Figure 1 It is an exemplary system architecture that can be applied to an embodiment of the method or apparatus for displaying bullet comments of the present disclosure. The system architecture may include a head-mounted display device 1, a network 2, and a server 3. The network 2 may be a medium that provides a communication link between the head-mounted display device 1 and the server 3. The network 2 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0038] The head mounted display device 1 may be an electronic device having image display function and audio playback function. A user may watch a flat or three-dimensional picture or video through the head mounted display device. The head mounted display device includes but is not limited to an augmented reality (AR) device, a virtual reality (VR) device, a mixed reality (MR) device, etc.
[0039] A head-mounted display device may generally include an optical imaging system, an acoustic system, and a frame that carries the optical imaging system and the acoustic system. Through the optical imaging system, a user can view an image of a suitable size. Through the frame, a user can wear the head-mounted display device on the head to view the image through the optical imaging system. The frame may be in the form of glasses, a headband, a helmet, and the like.
[0040] The head-mounted display device 1 can be an all-in-one device, in which the function of a computing unit is integrated. The computing unit can provide processing capabilities for the head-mounted display device, and various client applications installed on the head-mounted display device are actually installed in the computing unit. Alternatively, the head-mounted display device can also be a split device, and the split head-mounted display device includes a head-mounted display and a computing unit that is separately arranged from the head-mounted display, and the display screen of the head-mounted display is used to display the image processed by the computing unit. The computing unit in the split head-mounted display device can be a terminal device, and the terminal device can be a mobile phone, a handle, an adapter, a PC, a tablet, a car computer, etc. For the case where the execution subject is a head-mounted display device, those skilled in the art should understand that for a split head-mounted display device, the execution subject is the computing unit.
[0041] The head-mounted display device 1 can provide various services. For example, when the user triggers the bullet screen, the first attribute information and model map of the first model of the bullet screen to be displayed are obtained. The first attribute information may include at least one of the morphological change information and motion trajectory information of the first model. The second attribute information of the second model of the spatial screen and the playback picture data corresponding to the spatial screen are obtained. The second attribute information includes the position information and size information of the second model in the virtual space coordinate system. The first model is a model that is movable relative to the second model in the virtual space coordinate system. Based on the spatial information of the head-mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data, a picture to be displayed is generated. The method for displaying the bullet screen provided in the embodiment of the present disclosure is usually performed by the above-mentioned head-mounted display device 1, and accordingly, the device for displaying the bullet screen is usually arranged in the head-mounted display device 1.
[0042] It should also be pointed out that the method for displaying barrage provided by the present disclosure can also be applied to other terminal devices (not shown in the figure). The other terminal devices here can be mobile phones, tablets, computers, etc. When the method of the present disclosure is applied to other terminal devices, the other terminal devices obtain the first attribute information and model map of the first model of the barrage to be displayed. The second attribute information of the second model of the spatial screen and the playback picture data corresponding to the spatial screen are obtained. Based on the spatial information of the head-mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data, a picture to be displayed is generated. The picture to be displayed can also be sent to the head-mounted display device for display. Accordingly, the device for displaying barrage can also be set in other terminal devices.
[0043] In addition to other terminal devices and head-mounted display devices, the method for displaying barrage can also be applied to server 3, which can be a background server.
[0044] Exemplary Methods
[0045] Figure 2 is a flowchart of a method for displaying bullet comments provided by an exemplary embodiment of the present disclosure. The embodiments of the present disclosure can be applied to electronic devices, such as Figure 2 As shown, the method comprises the following steps:
[0046] Step 20, obtaining first attribute information and model map of the first model of the bullet screen to be displayed.
[0047] In some optional embodiments of the present disclosure, the first attribute information includes morphological change information and motion trajectory information of the first model.
[0048] In some optional embodiments of the present disclosure, the rendering engine may create a virtual space, and the virtual space may have its own virtual space coordinate system, and the virtual space coordinate system may be a coordinate system associated with a world coordinate system in the real world. The first model is a model in the virtual space coordinate system.
[0049] In some optional embodiments of the present disclosure, the first model is a three-dimensional model in a virtual space coordinate system.
[0050] In some optional embodiments of the present disclosure, the morphological change information of the first model of the barrage to be displayed may include change information of the coordinate points on the first model, and the morphological change of the first model is achieved by the change of the coordinate points. The morphological change information of the first model of the barrage to be displayed represents the morphological change of the first model of the barrage to be displayed at different time points. For example, the first model changes from a complete egg shape to a broken egg shape. The motion trajectory information of the first model may include the position information of the first model at different time points. The motion trajectory information of the first model represents the position change of the first model in the virtual space coordinate system. For example, the first model moves from a first position in the virtual space coordinate system to a second position according to a certain motion trajectory. The position of the first model can be represented by the position of a preset point on the first model. For example, the position of the model center point of the first model represents the position of the first model.
[0051] In some optional embodiments of the present disclosure, the barrage to be displayed is an expression barrage with animation effects. For example, the barrage to be displayed may be a little monkey moving from one position of the display screen to another, and the movement form of the little monkey may change continuously during the movement. The barrage to be displayed may also be an egg smashing into the space screen in the display screen, and the egg breaks into yolk and egg white, and can slide down along the space screen. The barrage to be displayed may also be a desk lamp with a switching action, and the brightness of the playback screen of the space screen may be controlled as the desk lamp is turned on and off. The barrage to be displayed may also be an animated expression moving from one side of the space screen to the other side of the space screen, such as jumping from the back of the space screen to the front of the space screen. The specific form changes and movement trajectories of the barrage to be displayed are not limited.
[0052] In some optional embodiments of the present disclosure, the model map of the first model of the bullet screen to be displayed represents the bullet screen content that can be presented in the bullet screen to be displayed. For example, the model map is an egg map, a monkey map, a lamp map, etc. The model map of the first model changes with the change of the attribute information of the first model, thereby displaying the animated bullet screen to be displayed.
[0053] The execution subject of the method for displaying barrage (which may be a terminal device, such as a head-mounted display device, a mobile phone, a server, etc.) obtains the first attribute information and the model map of the first model of the barrage to be displayed.
[0054] Step 30, obtaining second attribute information of the second model of the spatial screen and playback picture data corresponding to the spatial screen.
[0055] In some optional embodiments of the present disclosure, the second attribute information includes position information and size information of the second model in the virtual space coordinate system. The first model is a model movable relative to the second model in the virtual space coordinate system.
[0056] In some optional embodiments of the present disclosure, the second model may be a cubic model with a certain thickness in a virtual space coordinate system. The position information of the second model may be expressed in any manner that can characterize the specific position of the second model. For example, the position information of the second model may include the coordinates of each corner point of the second model in the virtual space coordinate system. The position information of the second model may also include the coordinates of the center point of the second model and at least some of the corner points in the virtual coordinate system. The position information of the second model may also include the coordinates of the center point of the second model and the coordinates of the center points of at least three adjacent faces. The specific expression of the position information of the second model is not limited. The size information of the second model may include the height, width and thickness of the second model. For example, the height is 2 meters, the width is 2 meters, and the thickness is 10 centimeters.
[0057] In some optional embodiments of the present disclosure, the spatial screen is used to play images, videos and other pictures for users, so that users can watch the pictures played on the spatial screen through a head-mounted display device, providing users with an experience like watching a movie in a cinema.
[0058] In some optional embodiments of the present disclosure, the playback picture data corresponding to the spatial screen can be determined according to the user's selection. For example, the user selects a category to watch through the head-mounted display device, such as movies, TV series, etc., and the playback picture data of the category selected by the user is obtained as the playback picture data corresponding to the spatial screen. The playback picture data corresponding to the spatial screen can change according to the real-time playback picture. For example, if the user is watching a movie A, the playback picture data corresponding to the spatial screen obtained is the playback picture data of the movie A currently to be played. The playback picture data may include one or more frames of picture data. For example, multiple frames of picture data can be obtained at one time, and in the subsequent picture rendering process, the picture data of each frame is rendered in sequence to the area of the spatial screen in the picture to be displayed. It is also possible to obtain one frame of picture data each time for rendering the current frame of the picture to be displayed.
[0059] There is no restriction on the execution order of the above steps 20 and 30, and they can be executed sequentially or in parallel.
[0060] Step 40, generating a picture to be displayed based on the spatial information of the head mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data.
[0061] In some optional embodiments of the present disclosure, the spatial information of the head-mounted display device may include any one of the position information, posture information, and posture information of the head-mounted display device in the world coordinate system. The world coordinate system is associated with the virtual space coordinate system. Therefore, based on the spatial information of the head-mounted display device, any one of the position, posture, and posture of the head-mounted display device in the virtual space coordinate system can be determined. In this way, a conversion relationship between the display screen of the head-mounted display device and the virtual space coordinate system can be established, which is convenient for generating the image to be displayed.
[0062] In some optional embodiments of the present disclosure, based on the spatial information of the head-mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data, a rendering engine can be used to perform picture rendering to obtain a picture to be displayed.
[0063] In some optional embodiments of the present disclosure, in a rendering engine, a virtual camera is used to observe a spatial screen and bullet screens to be displayed in a virtual space coordinate system, and the virtual camera is used to render the spatial screen and bullet screens to be displayed to obtain a picture to be displayed.
[0064] In some optional embodiments of the present disclosure, the images to be displayed may include images corresponding to the left and right screens of the head-mounted display device respectively.
[0065] In some optional embodiments of the present disclosure, the pictures corresponding to the left and right screens respectively may be the same picture.
[0066] In some optional embodiments of the present disclosure, there may also be a certain parallax between the images corresponding to the left and right screens to simulate the parallax of the user's left and right eyes, so that the user can watch the three-dimensional animation effect of the barrage to be displayed, further improving the user experience.
[0067] The method for displaying barrage provided by the embodiment of the present disclosure can obtain the first attribute information and model map of the first model of the barrage to be displayed, the second attribute information of the second model of the spatial screen and the playback picture data corresponding to the spatial screen, and generate the picture to be displayed based on the spatial information, first attribute information, model map, second attribute information and playback picture data of the head-mounted display device. Since the first attribute information of the first model of the barrage to be displayed includes the morphological change information and motion trajectory information of the first model, the animation effect of the barrage can be achieved, which helps to improve the fun and enhance the user experience. And the barrage to be displayed has a first model that is movable relative to the second model and has a relative spatial relationship with the spatial screen. Therefore, the display area of the barrage to be displayed may not be affected by the display area of the spatial screen. The barrage to be displayed can be displayed in the picture area of the spatial screen playback picture, and can also be displayed in any direction outside the picture area of the spatial screen playback picture, such as above, below, left, right, etc. And the first model of the barrage to be displayed is a model under the virtual space coordinate system, which helps to combine the parallax between the binocular screens of the head-mounted display device to bring a three-dimensional visual effect to the user, further enhance the user's immersion and sense of depth in the three-dimensional space interactive experience, thereby further enhancing the fun of the user's barrage.
[0068] Figure 3 It is a schematic diagram of a flow chart of generating a picture to be displayed provided by an exemplary embodiment of the present disclosure.
[0069] In some optional embodiments of the present disclosure, Figure 3 As shown, step 40 generates a to-be-displayed picture based on the spatial information of the head mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data, including:
[0070] Step 410 , for any time point of at least one time point, determine the shape and position of the first model at the time point based on the first attribute information of the first model at the time point.
[0071] In some optional embodiments of the present disclosure, the bullet screen to be displayed may be a bullet screen of an animated expression with a preset duration. The preset duration may include at least one time point. Each time point may correspond to a frame of the screen to be displayed. The first model may have at least one of different forms and different positions at different time points. For example, the first model may have different forms and the same position at two adjacent time points. The first model may have the same form and different positions at two adjacent time points. The first model may have different forms and different positions at two adjacent time points.
[0072] In some optional embodiments of the present disclosure, Figure 4a and Figure 4bThe following is a schematic diagram of the form and position change of bullet comments to be displayed provided by some exemplary embodiments of the present disclosure. Figure 4a As shown, the bullet screen to be displayed is a little monkey swinging from the upper right corner of the space screen to the upper left corner of the space screen (the shape change and movement trajectory in the middle are not shown), and the shape has changed. Figure 4b As shown, the barrage to be displayed is a playback screen of an egg hitting the space screen, and after breaking, it turns into egg yolk and egg white with expressions falling and sliding down.
[0073] In some optional embodiments of the present disclosure, for any time point in at least one time point, the shape and position of the first model at the time point can be determined based on the first attribute information of the first model at the time point. For example, the shape of the first model at the time point is obtained based on the shape change information of the first model at the time point, combined with the shape of the previous time point. The position of the first model at the time point is obtained based on the motion trajectory information of the first model at the time point in the first attribute information.
[0074] In some optional embodiments of the present disclosure, the morphological change information of the first model at this time point may be the morphological change information of the time point relative to any time point before the time point (which may be used as the target time point). For example, the morphological change information of the first model at this time point is the morphological change information of the time point relative to the first time point (as the target time point), the morphological change information of the time point relative to the previous time point adjacent to the time point (as the target time point), etc. Then, the morphology of the first model at the time point may be obtained based on the morphological change information at the time point and the morphology at the target time point.
[0075] In some optional embodiments of the present disclosure, the motion trajectory information of the first model at the time point may be the position change information of the time point relative to the target time point. Then, the position of the first model at the time point may be obtained based on the position change information of the first model at the time point and the position of the first model at the target time point.
[0076] Step 420 , based on the shape and position of the first model at the time point, adjust the model texture of the first model to obtain the adjusted model texture of the first model.
[0077] In some optional embodiments of the present disclosure, the model map of the first model changes with the change of the attribute information of the first model. Therefore, after determining the shape and position of the first model at any point in time, the model map of the first model can be adjusted based on the shape and position of the first model at that point in time to obtain the adjusted model map of the first model. For example, at the time point before this time point, the model map of the first model is an unbroken egg, and the position of the first model is close to the spatial screen, which is equivalent to the egg hitting the spatial screen. At this time point, the shape of the first model becomes a broken egg, and the model map of the first model is adjusted to the map of the broken egg accordingly to achieve the shape change of the barrage. It can also be accompanied by a change in the position of the broken egg.
[0078] In some optional embodiments of the present disclosure, the first attribute information of the first model of the bullet screen to be displayed at any time point may be preset attribute information. After any user triggers the bullet screen to be displayed, the shape and position of the first model are adjusted according to the sequence of each time point to achieve the animation effect of the bullet screen to be displayed in the continuous frames.
[0079] Step 430, based on the shape and position of the first model at this point in time, the second attribute information of the second model at this point in time, and the spatial information of the head-mounted display device at this point in time, determine the occlusion relationship between the barrage to be displayed in the picture to be displayed and the spatial screen.
[0080] In some optional embodiments of the present disclosure, the second attribute information of the second model at this point in time can be determined based on the user's operation on the spatial screen. The user's operation on the spatial screen may include moving, rotating, scaling, etc. The second model of the spatial screen may have preset initial attribute information. If the user moves, rotates, scales, etc. on the spatial screen at any point in time, the attribute information of the spatial screen can be changed to obtain the second attribute information of the second model at that point in time. If the user never operates the spatial screen, the second attribute information of the second model at that point in time is the initial attribute information of the second model.
[0081] In some optional embodiments of the present disclosure, the spatial information of the head-mounted display device at the time point can be located by positioning the head-mounted display device in any positioning method. For example, the head-mounted display device can be positioned based on data collected by various sensors set on the head-mounted display device to obtain the spatial information of the head-mounted display device at the time point. For example, the positioning of the head-mounted display device can be achieved based on at least one of a visual sensor, an inertial measurement unit (IMU), a global positioning system (GPS), etc.
[0082] In some optional embodiments of the present disclosure, in the picture to be displayed, the occlusion relationship between the bullet to be displayed and the spatial screen may include any one of unoccluded, fully occluded, and partially occluded. Unoccluded may include the bullet to be displayed in any area around the spatial screen. For example, the bullet to be displayed is above, below, on the left, on the right, etc. of the spatial screen. Full occlusion may include two situations: the bullet to be displayed fully occludes the spatial screen and the spatial screen fully occludes the bullet to be displayed. The bullet to be displayed fully occludes the spatial screen, which means that the bullet to be displayed is entirely located in the display area of the spatial screen and blocks part or all of the spatial screen. The spatial screen fully blocks the bullet to be displayed, which means that in the picture to be displayed, the bullet to be displayed is hidden behind the spatial screen and is blocked by the spatial screen. Partial occlusion may include a part of the bullet to be displayed being blocked by the spatial screen, while another part of the bullet to be displayed may block the spatial screen or be located in the surrounding area of the spatial screen. For example, the bullet comment to be displayed is a kitten whose body is hidden behind the spatial screen and whose head leaks out from either side of the spatial screen, i.e., the kitten sticks its head out from behind the spatial screen. For another example, the nose and eyes of an animated character first jump from behind the spatial screen to the front of the spatial screen, blocking the spatial screen, while the other parts are still behind the spatial screen and blocked by the spatial screen.
[0083] In some optional embodiments of the present disclosure, Figure 5a to Figure 5d Schematic diagram of the occlusion relationship between the bullet screen to be displayed and the spatial screen provided by some exemplary embodiments of the present disclosure. Figure 5a As shown, in the picture to be displayed, all the bullet comments to be displayed are on the spatial screen, blocking the area of the spatial screen corresponding to the bullet comments to be displayed. Figure 5b As shown in FIG. 1 , part of the bullet screen to be displayed covers the space screen, and the other part is around the space screen. Figure 5c As shown in FIG, part of the bullet screen to be displayed is blocked by the spatial screen, and the other part is around the spatial screen. Figure 5d As shown, the bullet screen to be displayed does not block the spatial screen, and the bullet screen to be displayed is around the spatial screen.
[0084] In some optional embodiments of the present disclosure, the spatial information of the head mounted display device at this point in time can determine at least one of the posture, position, and posture of the virtual camera used for screen rendering in the virtual space coordinate system. Furthermore, based on the posture of the virtual camera, the shape and position of the first model at this point in time, and the position information and size information of the second model at this point in time, the occlusion relationship between the first model and the second model when the virtual camera observes (or shoots) the first model and the second model can be determined. Based on the occlusion relationship between the first model and the second model, the occlusion relationship between the to-be-displayed bullet screen and the spatial screen in the to-be-displayed screen can be determined.
[0085] There is no restriction on the execution order of the above steps 420 and 430, and they can be executed sequentially or in parallel.
[0086] Step 440, based on the spatial information of the head-mounted display device, the occlusion relationship, the adjusted model map of the first model, the second attribute information of the second model at this time point, and the playback picture data of the spatial screen at this time point, image rendering is performed to obtain the picture to be displayed at this time point.
[0087] In some optional embodiments of the present disclosure, the playback picture data of the spatial screen at this point in time can be used as a model map of the second model of the spatial screen at this point in time, and pasted on the preset surface of the second model, that is, a mapping relationship between the pixels of the playback picture data and the coordinate points on the preset surface of the second model is established, so as to facilitate the determination of the display content of the playback picture in the picture to be displayed when the picture is rendered.
[0088] In some optional embodiments of the present disclosure, for screen rendering, a conversion relationship between the pixels of the screen to be displayed and the coordinate points in the virtual space coordinate system can be established based on the spatial information of the head-mounted display device. According to the conversion relationship, the first model and the second model can be projected onto the screen to be displayed to obtain a mapping relationship between the first model and the second model and the pixels of the screen to be displayed. According to the mapping relationship and the model map of the first model, the pixel information of the pixels occupied by the bullet screen to be displayed in the screen to be displayed can be determined. The pixel information may include color information, brightness information, transparency, etc. According to the mapping relationship and the playback screen data of the spatial screen, the pixel information of the pixels occupied by the spatial screen in the screen to be displayed can be obtained, and then according to the occlusion relationship between the bullet screen to be displayed and the spatial screen, the pixel information finally displayed by each pixel in the screen to be displayed is determined to obtain the screen to be displayed at that time point. In practical applications, screen rendering can also be implemented in any other feasible manner, not limited to the above-mentioned manner.
[0089] In some optional embodiments of the present disclosure, the picture to be displayed may be a picture to be displayed at the current time point rendered in real time. Then, according to the above steps 410 to 440, the current picture to be displayed is obtained and displayed on the display screen of the head-mounted display device. As time goes by, the picture to be displayed at each time point is generated, and the animation display of the bullet screen to be displayed is completed.
[0090] The disclosed embodiment determines the shape and position of the first model at any time point, facilitates adjustment of the model map of the first model, and determines the occlusion relationship between the bullet screen to be displayed and the spatial screen in the screen to be displayed, and then performs screen rendering based on the spatial information of the head-mounted display device, the occlusion relationship, the adjusted model map of the first model, the second attribute information of the second model at this time point, and the playback screen data of the spatial screen at this time point, so as to effectively obtain the screen to be displayed at this time point. Accurate and effective rendering of the screen to be displayed at any time point is achieved, which is conducive to accurate and effective animation display of the bullet screen to be displayed.
[0091] In some optional embodiments of the present disclosure, the method of the embodiment of the present disclosure further includes any one of the following steps 510 and 520:
[0092] Step 510, obtain the brightness information of the playback picture data of the spatial screen, and determine the brightness of the barrage to be displayed according to the brightness information of the playback picture data.
[0093] In some optional embodiments of the present disclosure, the brightness information of the playback picture data of the spatial screen can be obtained from the playback picture data, and can also be obtained from a device that provides the playback picture data.
[0094] In some optional embodiments of the present disclosure, a mapping relationship between the brightness information of the playback screen data and the brightness of the barrage to be displayed can be set, and then based on the mapping relationship, the brightness information of the playback screen data can be mapped to the brightness of the barrage to be displayed.
[0095] In some optional embodiments of the present disclosure, the brightness of the bullet screen to be displayed may increase as the screen brightness of the playback screen data increases, and decrease as the screen brightness of the playback screen data decreases. That is, the higher the screen brightness of the playback screen data, the higher the brightness of the bullet screen to be displayed. The lower the screen brightness of the playback screen data, the lower the brightness of the bullet screen to be displayed.
[0096] In some optional embodiments of the present disclosure, the brightness of the barrage to be displayed may also decrease as the picture brightness of the playing picture data increases, and increase as the picture brightness of the playing picture data decreases.
[0097] In some optional embodiments of the present disclosure, after determining the brightness of the bullet screen to be displayed, the brightness of the model map of the first model of the bullet screen to be displayed can be adjusted according to the brightness of the bullet screen to be displayed. The brightness of the bullet screen to be displayed can also be adjusted in the subsequent screen rendering process. In the screen rendering process, the brightness of the bullet screen to be displayed is used to determine the brightness of the bullet screen to be displayed in the screen to be displayed. For example, according to the brightness of the bullet screen to be displayed, the brightness of the pixels occupied by the bullet screen to be displayed in the screen to be displayed is determined.
[0098] Step 520, obtaining brightness information of the bullet screen to be displayed, and determining the screen brightness of the playback screen data according to the brightness information of the bullet screen to be displayed.
[0099] In some optional embodiments of the present disclosure, the brightness information of the bullet screen to be displayed may be preset brightness information. The brightness information of the bullet screen to be displayed at different time points may be the same or different.
[0100] In some optional embodiments of the present disclosure, a mapping relationship between the brightness information of the barrage to be displayed and the screen brightness of the playback screen data can be set, and then based on the mapping relationship, the brightness information of the barrage to be displayed is mapped to the screen brightness of the playback screen data.
[0101] In some optional embodiments of the present disclosure, the screen brightness of the playback screen data may increase as the brightness of the bullet screen to be displayed increases, and may decrease as the brightness of the bullet screen to be displayed decreases.
[0102] In some optional embodiments of the present disclosure, the screen brightness of the playback screen data may also increase as the brightness of the barrage to be displayed decreases, and decrease as the brightness of the barrage to be displayed increases.
[0103] In some optional embodiments of the present disclosure, after determining the screen brightness of the playback screen data based on the brightness information of the barrage to be displayed, the playback screen data can be adjusted based on the determined screen brightness of the playback screen data to obtain adjusted new playback screen data for subsequent screen rendering to obtain the screen to be displayed.
[0104] This embodiment determines the brightness of the bullet screen to be displayed according to the brightness information of the playback screen data, which helps to achieve the brightness of the bullet screen to be displayed changing with the screen brightness of the playback screen data, and realizes the light and shadow effect of the bullet screen to be displayed, further enhancing the user's immersion, sense of space and fun in the virtual three-dimensional space. In addition, by determining the screen brightness of the playback screen data according to the brightness information of the bullet screen to be displayed, the interactive relationship between the bullet screen to be displayed and the space screen is realized, further improving the user experience.
[0105] Figure 6 It is a flowchart of generating a picture to be displayed provided by another exemplary embodiment of the present disclosure.
[0106] In some optional embodiments of the present disclosure, before performing picture rendering, the process further includes:
[0107] Step 610, determining the type of effect of the shape change of the bullet screen to be displayed at this point in time on the playback picture of the spatial screen.
[0108] In some optional embodiments of the present disclosure, the morphological changes of the bullet screen to be displayed can also have a certain effect on the playback screen of the spatial screen. Different action types can be set for different bullet screens. The action types may include, for example, adjusting the screen brightness of the playback screen data, drawing a curtain on the playback screen, and the like. Adjusting the screen brightness of the playback screen data may include two action types: brightening and dimming the screen brightness of the playback screen data. Drawing a curtain on the playback screen may include two action types: drawing a curtain on the playback screen and drawing an open curtain. The specific action type may be set according to actual needs.
[0109] In some optional embodiments of the present disclosure, the type of effect of a bullet screen on the playback screen may include one or more. For example, the type of effect on the playback screen can be set at one or more time points of the bullet screen. For example, the bullet screen to be displayed is a desk lamp that includes a light-on state change and a light-off state change. At the time point corresponding to the light-on state change, the type of effect of brightening the playback screen is set, and at the time point corresponding to the light-off state change, the type of effect of dimming the playback screen is set. Then, during the display process of the bullet screen to be displayed, at the time point when the desk lamp changes from the light-off state to the light-on state, the screen brightness of the playback screen data of the spatial screen is brightened. At the time point when the desk lamp goes from the light-on state to the light-off state, the screen brightness of the playback screen data of the spatial screen is dimmed. For another example, the bullet screen to be displayed is a pull rope that includes pulling up the curtain and opening the curtain. During the display process of the bullet screen to be displayed, as the pull rope moves from the target side (e.g., left side, right side, top, bottom, etc.) of the spatial screen to the middle, a certain proportion of the curtain is covered for the playback screen data. The ratio of the curtain covered at each time point to the playback screen can be determined according to the ratio of the first distance of the pull rope from the target side to the second distance of the middle point of the spatial screen from the target side. As the pull rope moves from the middle of the spatial screen to one side, the curtain is opened for the playback screen data.
[0110] Step 620, the playback picture data of the spatial screen is processed according to the action type to obtain new playback picture data.
[0111] In some optional embodiments of the present disclosure, the processing corresponding to the action type can be set according to the specific action type. For example, for the action type of turning on the light to brighten the playback screen, the screen brightness of the playback screen data is brightened. For the action type of drawing the curtain, the playback screen data covers the curtain of a corresponding proportion.
[0112] Step 440 performs picture rendering based on the spatial information of the head mounted display device, the occlusion relationship, the adjusted model map of the first model, the second attribute information of the second model at the time point, and the playback picture data of the spatial screen at the time point to obtain the picture to be displayed at the time point, including:
[0113] Step 4410, based on the spatial information of the head-mounted display device, the occlusion relationship, the adjusted model map of the first model, the second attribute information of the second model at this time point, and the new playback picture data of the spatial screen at this time point, image rendering is performed to obtain the picture to be displayed at this time point.
[0114] In some optional embodiments of the present disclosure, the specific screen rendering principle of step 4410 is similar to that of the aforementioned embodiment, except that the playback screen data of the spatial screen is different, which will not be elaborated here.
[0115] This embodiment determines the type of effect of the shape change of the barrage to be displayed on the spatial screen playback picture, processes the playback picture data of the spatial screen accordingly, obtains new playback picture data, and realizes the physical interaction relationship between the barrage to be displayed and the spatial screen, which helps to further enhance the user's interest.
[0116] In some optional embodiments of the present disclosure, the step 620 of performing processing corresponding to the action type on the playback screen data of the spatial screen to obtain new playback screen data includes:
[0117] In response to the action type being the light-off type, the screen brightness of the playback screen data is reduced by a first preset amount to obtain new playback screen data. In response to the action type being the light-on type, the screen brightness of the playback screen data is increased by a second preset amount to obtain new playback screen data.
[0118] In some optional embodiments of the present disclosure, the first preset amount and the second preset amount can be set according to actual needs, for example, they can be preset fixed amounts.
[0119] In some optional embodiments of the present disclosure, the first preset amount and the second preset amount can also be determined in real time according to the current screen brightness of the playback screen data. For example, the difference between the preset screen brightness upper limit value and the current screen brightness is used as the first preset amount. The difference between the current screen brightness and the preset screen brightness lower limit value is used as the second preset amount. Thus, when the playback screen is brightened, the screen brightness of the playback screen data can be adjusted to the preset screen brightness upper limit value. When the playback screen is dimmed, the screen brightness of the playback screen data can be adjusted to the preset screen brightness lower limit value.
[0120] In some optional embodiments of the present disclosure, Figure 7 FIG. 1 is a schematic diagram of the effect of the change in the form of the bullet screen to be displayed on the playback screen data provided by an exemplary embodiment of the present disclosure. Figure 7 As shown, the bullet screen to be displayed is a desk lamp expression bullet screen that can change with the shape of the pull cord to indicate turning on and off the light. When the desk lamp is turned on, the playback screen on the space screen becomes brighter. When the desk lamp is turned off, the space screen becomes darker.
[0121] The disclosed embodiment dims the picture brightness of the playback screen data of the spatial screen when the barrage to be displayed turns off the lights, and brightens the picture brightness of the playback screen data of the spatial screen when the barrage to be displayed turns on the lights, thereby controlling the brightness of the playback screen according to the shape changes of the barrage to be displayed, which helps to further enhance the user's interest and thus improve the user experience.
[0122] In some optional embodiments of the present disclosure, the first model includes at least two sub-models, each of which corresponds to a part of the bullet screen to be displayed.
[0123] In some optional embodiments of the present disclosure, the bullet screen to be displayed may be divided into at least two parts, a corresponding sub-model is established for each part, and each sub-model constitutes a first model of the bullet screen to be displayed.
[0124] The disclosed embodiment represents the first model of the barrage through at least two sub-models, which helps to form different occlusion relationships between different parts of the barrage and the spatial screen, and helps to increase the physical interaction relationship between the barrage and the spatial screen. For example, the barrage can be hidden behind the spatial screen and gradually cross the spatial screen to appear between the spatial screen and the user, thereby further enhancing the fun of the user sending the barrage.
[0125] Figure 8 It is a flowchart of generating a picture to be displayed provided by another exemplary embodiment of the present disclosure.
[0126] In some optional embodiments of the present disclosure, determining the shape and position of the first model at the time point based on the first attribute information of the first model at the time point in step 410 includes:
[0127] Step 4110, based on the first attribute information of each sub-model at the time point, determine the shape and position of each sub-model at the time point.
[0128] In some optional embodiments of the present disclosure, each sub-model may be set with corresponding first attribute information at each time point. Thus, the shape and position of each sub-model at any time point may be determined based on the first attribute information of each sub-model at that time point. The principle of determining the shape and position of each sub-model at that time point based on the first attribute information of the sub-model at that time point is similar to the first model of the aforementioned embodiment and is not described in detail here.
[0129] In some optional embodiments of the present disclosure, after determining the shape and position of each sub-model at the time point, step 420 of adjusting the model texture of the first model based on the shape and position of the first model at the time point to obtain the adjusted model texture of the first model may include: adjusting the model texture of each sub-model based on the shape and position of each sub-model at the time point to obtain the adjusted model texture of each sub-model.
[0130] In some optional embodiments of the present disclosure, each sub-model may have a model map corresponding to the sub-model, and the model map corresponding to the sub-model changes with the change of the attribute information of the sub-model.
[0131] Step 430 determines the occlusion relationship between the bullet screen to be displayed and the spatial screen in the picture to be displayed based on the shape and position of the first model at the time point, the second attribute information of the second model at the time point, and the spatial information of the head mounted display device at the time point, including:
[0132] Step 4310, based on the shape and position of each sub-model at this time point, the second attribute information of the second model at this time point, and the spatial information of the head-mounted display device at this time point, determine the occlusion relationship between each sub-model and the spatial screen in the picture to be displayed.
[0133] In some optional embodiments of the present disclosure, for any sub-model, the principle of determining the occlusion relationship between the sub-model and the spatial screen in the picture to be displayed is similar to the principle of determining the occlusion relationship between the first model and the spatial screen in the aforementioned embodiment, and will not be elaborated here.
[0134] In some optional embodiments of the present disclosure, for any two sub-models in the first model, the occlusion relationship between the two sub-models and the spatial screen at any point in time may be different. For example, for the bullet screen to be displayed of a cartoon character, the first model may include a mouth sub-model, an eye sub-model, a nose sub-model, a head outline sub-model, an arm sub-model, a body sub-model, a leg sub-model, and the like. At a certain point in time, the occlusion relationship between one or more of the sub-models and the spatial screen may be different from the occlusion relationship between other sub-models and the spatial screen. For example, at a certain point in time, the mouth sub-model and the eye sub-model are located in front of the second model of the spatial screen (i.e., between the spatial screen and the user), and other sub-models such as the nose sub-model and the arm sub-model are located behind the second screen. At this point in time, the bullet screen to be displayed seen by the user is only the mouth and eyes of the cartoon character on the playback screen of the spatial screen, blocking part of the playback screen. Fig. 9 , which is a schematic diagram of a display screen under multiple sub-models provided by an exemplary embodiment of the present disclosure. The eyes and mouth of the bullet comment to be displayed go beyond the spatial screen, blocking the playback screen of the spatial screen. The other parts of the bullet comment to be displayed are hidden behind the spatial screen and blocked by the playback screen of the spatial screen.
[0135] In some optional embodiments of the present disclosure, after determining the occlusion relationship between each sub-model and the spatial screen in the picture to be displayed, picture rendering can be performed based on the spatial information of the head-mounted display device, the occlusion relationship between each sub-model and the spatial screen, the adjusted model maps corresponding to each sub-model, the second attribute information of the second model at this time point, and the playback picture data of the spatial screen at this time point to obtain the picture to be displayed at this time point.
[0136] The disclosed embodiment represents the first model of the bullet screen to be displayed through at least two sub-models, and can determine the shape and position of each sub-model at any time point, and then determine the occlusion relationship between each sub-model and the spatial screen based on the shape and position of each sub-model at the time point and other relevant information, for rendering the screen to be displayed. Since each sub-model can correspond to a part of the bullet screen to be displayed and can have a corresponding model map, different sub-models can have different occlusion relationships with the spatial screen, which helps to further enhance the fun of the physical interaction between the bullet screen and the spatial screen.
[0137] Fig.10 It is a flowchart of a method for displaying barrage provided by another exemplary embodiment of the present disclosure.
[0138] In some optional embodiments of the present disclosure, the method of the embodiment of the present disclosure further includes:
[0139] Step 710: At any time point among at least one time point, in response to obtaining a first operation of the user on the spatial screen, an operation corresponding to the first operation is performed on the spatial screen and the bullet screen to be displayed.
[0140] In some optional embodiments of the present disclosure, the first operation of the user on the spatial screen may include at least one of a moving operation, a rotating operation, a scaling operation, etc. The moving operation is used to change the position of the spatial screen in the virtual spatial coordinate system. The rotating operation is used to change the posture of the spatial screen in the virtual spatial coordinate system. The scaling operation is used to change the size of the spatial screen in the virtual spatial coordinate system.
[0141] In some optional embodiments of the present disclosure, an operation corresponding to the first operation is performed on the spatial screen and the bullet screen to be displayed, which may include at least one of moving, rotating, scaling, etc., the spatial screen and the bullet screen to be displayed.
[0142] In some optional embodiments of the present disclosure, at any time point, the first model of the bullet screen to be displayed and the second model of the spatial screen have a certain relative posture relationship. When operating the spatial screen and the bullet screen to be displayed, the spatial screen and the bullet screen to be displayed can be operated together on the basis of keeping the relative relationship between the first model and the second model unchanged. For example, the spatial screen and the bullet screen to be displayed can be moved together, scaled together, etc.
[0143] This embodiment responds to obtaining the first operation of the user on the spatial screen and performs an operation corresponding to the first operation on the spatial screen and the bullet screen to be displayed. This allows the user to perform interactive operations such as moving, rotating, and scaling the spatial screen at any time point to meet the user's viewing needs and further enhance the user experience.
[0144] In some optional embodiments of the present disclosure, step 710 performs an operation corresponding to the first operation on the spatial screen and the bullet screen to be displayed, including:
[0145] In response to the first operation being a moving operation, the space screen and the bullet screen to be displayed are moved along a moving track corresponding to the moving operation. In response to the first operation being a zooming operation, the space screen and the bullet screen to be displayed are zoomed in and out corresponding to the zooming operation.
[0146] In some optional embodiments of the present disclosure, the movement trajectory corresponding to the movement operation can be determined according to the user's first operation. For example, the user selects the space screen through the control ray generated in the virtual space through the head-mounted display device or the terminal device connected to the head-mounted display device, and slides along a certain trajectory, then the movement trajectory corresponding to the movement operation can be determined according to the sliding trajectory of the control ray. The specific movement trajectory can be determined according to the control method, such as by identifying the user gesture, but is not limited to the above method.
[0147] In some optional embodiments of the present disclosure, moving the spatial screen and the bullet screen to be displayed along a moving trajectory corresponding to the moving operation may include moving the second model of the spatial screen and the first model of the bullet screen to be displayed along the moving trajectory.
[0148] In some optional embodiments of the present disclosure, the zoom ratio of the user's zoom operation can be obtained, and the spatial screen and the bullet screen to be displayed can be zoomed by the corresponding zoom ratio. The zoom ratio can be selected or input by the user, or can be determined according to the specific operation. For example, the user's gestures in the space are collected by the camera on the head-mounted display device, and the user's zoom operation and zoom ratio are determined by recognizing the gestures.
[0149] In some optional embodiments of the present disclosure, scaling processing corresponding to the scaling operation is performed on the spatial screen and the barrage to be displayed, which may include scaling the second model of the spatial screen and the first model of the barrage to be displayed, and scaling the sizes of the first model and the second model by corresponding proportions to achieve a change in the size of the screen area occupied by the barrage to be displayed and the spatial screen in the screen to be displayed.
[0150] This embodiment moves the spatial screen and the bullet screen to be displayed by responding to the user's movement operation, and scales the spatial screen and the bullet screen to be displayed by responding to the user's zoom operation, thereby effectively realizing the spatial interaction between the user and the spatial screen and the bullet screen to be displayed, and further enhancing the user's immersion and sense of depth in the three-dimensional space interaction experience.
[0151] In some optional embodiments of the present disclosure, the method of the embodiment of the present disclosure further includes:
[0152] At any time point among at least one time point, in response to obtaining a user's zoom operation on the spatial screen, the position of the virtual camera in the rendering engine is moved along a moving trajectory corresponding to the zoom operation, wherein the moving trajectory includes at least one of a trajectory close to the spatial screen and a trajectory away from the spatial screen.
[0153] In some optional embodiments of the present disclosure, the scaling of the spatial screen can also be achieved by moving the position of the virtual camera that observes the spatial screen. The virtual camera in the rendering engine is a camera that simulates the user observing the virtual spatial scene through a head-mounted display device during the rendering process. When the position of the virtual camera is moved away from the spatial screen, the area occupied by the spatial screen in the field of view of the virtual camera becomes smaller. When the position of the virtual camera is moved closer to the spatial screen, the area occupied by the spatial screen in the field of view of the virtual camera becomes larger. Based on this, the scaling effect of the spatial screen in the picture to be displayed viewed by the user is achieved.
[0154] In some optional embodiments of the present disclosure, the moving trajectory corresponding to the zoom operation can be obtained according to the mapping relationship between the user's zoom operation and the zoom ratio, and the mapping relationship between the zoom ratio and the moving trajectory. For example, the zoom ratio corresponding to the user's zoom operation can be obtained according to the mapping relationship between the user's zoom operation and the zoom ratio. According to the mapping relationship between the zoom ratio and the moving trajectory, the zoom ratio can be mapped to the moving distance. Based on the current posture of the virtual camera and the second attribute information of the second model of the spatial screen, the moving direction of the virtual camera can be obtained. For example, the moving direction is any one of the direction close to the spatial screen and the direction away from the spatial screen on the straight line where the optical axis of the virtual camera is located. Based on the moving direction and the moving distance, the moving trajectory of the virtual camera can be obtained. That is, the moving trajectory is the corresponding moving distance moved along the moving direction.
[0155] In some optional embodiments of the present disclosure, the rendering engine may be any implementable rendering engine, such as any engine that can be used for three-dimensional scene rendering.
[0156] The disclosed embodiment achieves scaling of the spatial screen in the picture to be displayed by moving the position of the virtual camera in the rendering engine. Since the position of the spatial screen can remain unchanged, the position of the bullet screen to be displayed also remains unchanged, which can reduce the amount of calculation compared to the aforementioned scaling of the spatial screen and the bullet screen to be displayed.
[0157] Fig.11 It is a flowchart of generating a picture to be displayed provided by another exemplary embodiment of the present disclosure.
[0158] In some optional embodiments of the present disclosure, step 40 generates a to-be-displayed picture based on the spatial information of the head mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data, including:
[0159] Step 450: Determine a first camera pose of a left-eye virtual camera and a second camera pose of a right-eye virtual camera in a rendering engine based on the spatial information of the head-mounted display device.
[0160] In some optional embodiments of the present disclosure, the left-eye virtual camera in the rendering engine corresponds to the left screen of the head-mounted display device. The right-eye virtual camera corresponds to the right screen of the head-mounted display device. The left-eye virtual camera and the right-eye virtual camera are arranged according to the left and right eyes of a person, respectively, and respectively shoot the same three-dimensional objects in the virtual space. The left-eye virtual camera shoots the left-eye image corresponding to the left screen (i.e., the picture to be displayed corresponding to the left eye), and the right-eye virtual camera shoots the right-eye image corresponding to the right screen (i.e., the picture to be displayed corresponding to the right eye). The left-eye image is displayed on the left screen of the head-mounted display device, and the right-eye image is displayed on the right screen of the head-mounted display device. Through the parallax between the left and right eyes, the user can watch the barrage to be displayed with a three-dimensional stereoscopic effect.
[0161] In some optional embodiments of the present disclosure, the left-eye virtual camera and the right-eye virtual camera are associated with a head-mounted display device. Therefore, the first camera pose of the left-eye virtual camera and the second camera pose of the right-eye virtual camera can be determined based on the spatial information of the head-mounted display device.
[0162] Step 460, based on the first camera posture, the first attribute information, the model map, the second attribute information, and the playback image data, image rendering is performed to obtain a first image to be displayed corresponding to the first screen of the head mounted display device.
[0163] In some optional embodiments of the present disclosure, the posture of the left virtual camera in the virtual space coordinate system can be established based on the first camera posture, and the pixel information corresponding to each pixel in the to-be-displayed picture can be calculated based on the posture, the first attribute information and the model map of the first model, the second attribute information and the playback picture data, so as to realize picture rendering and obtain the first to-be-displayed picture corresponding to the first screen (i.e., the left screen). The specific picture rendering principle can be referred to the aforementioned embodiment and will not be elaborated here.
[0164] Step 470, based on the second camera posture, the first attribute information, the model map, the second attribute information, and the playback picture data, the picture rendering is performed to obtain the second picture to be displayed corresponding to the second screen of the head mounted display device.
[0165] The rendering principle of the second picture to be displayed in step 470 is similar to that of the first picture to be displayed, and will not be described in detail here.
[0166] There is no restriction on the execution order of the above steps 460 and 470, and they can be executed sequentially or in parallel.
[0167] In some optional embodiments of the present disclosure, the to-be-displayed screen of any of the aforementioned embodiments may include a first to-be-displayed screen and a second to-be-displayed screen to provide the user with a three-dimensional animated expression barrage visual effect.
[0168] The disclosed embodiment simulates the parallax between a person's left and right eyes by setting a binocular virtual camera in the rendering engine, thereby providing the user with a display screen with parallax for the left and right eyes, enabling the user to obtain the barrage visual effect of three-dimensional stereoscopic animation, further enhancing the user's sense of immersion and depth in three-dimensional space, and increasing interest.
[0169] The bullet screen in the related art is usually a two-dimensional bullet screen, and the two-dimensional bullet screen is displayed in the video playback screen area. The bullet screen and the spatial screen of the embodiment of the present disclosure are two models, namely the first model of the bullet screen and the second model of the spatial screen, and the two models have a certain spatial relationship. Therefore, compared with the two-dimensional bullet screen in the scenes of computers, mobile phones, etc. in the related art, the embodiment of the present disclosure can realize a three-dimensional expression bullet screen. And in the display screen, the three-dimensional expression bullet screen of the embodiment of the present disclosure can exceed the playback screen area of the spatial screen and is not restricted by the playback screen area. The two-dimensional bullet screen in the related art can only move its position within the video playback screen area. The three-dimensional expression bullet screen of the embodiment of the present disclosure can not only move its position as a whole, but also change its form to achieve animation effects. In addition, the brightness of the three-dimensional expression bullet screen of the embodiment of the present disclosure can also be associated with the brightness of the playback screen of the spatial screen. It is also possible to adjust the brightness and screen content of the playback screen of the spatial screen according to the morphological changes of the three-dimensional expression bullet screen, which effectively expands the role of the bullet screen and increases the fun.
[0170] The above-mentioned embodiments or optional examples of the present disclosure may be implemented separately or in any combination without conflict. The specific configuration may be based on actual needs and the present disclosure does not limit this.
[0171] Any method for displaying bullet screen provided in the embodiments of the present disclosure may be executed by any appropriate device with data processing capability, including but not limited to: a terminal device and a server, etc. Alternatively, any method for displaying bullet screen provided in the embodiments of the present disclosure may be executed by a processor, such as the processor executing any method for displaying bullet screen mentioned in the embodiments of the present disclosure by calling corresponding instructions stored in a memory. This will not be described in detail below.
[0172] Exemplary Devices
[0173] Fig.12is a schematic diagram of the structure of a device for displaying bullet comments provided by an exemplary embodiment of the present disclosure. The device of this embodiment can be used to implement the corresponding method embodiment for displaying bullet comments of the present disclosure, such as Fig.12 The device shown includes: a first acquisition module 810 , a second acquisition module 820 and a processing module 830 .
[0174] The first acquisition module 810 is used to acquire first attribute information and a model map of a first model of a bullet message to be displayed. The first attribute information includes morphological change information and motion track information of the first model.
[0175] The second acquisition module 820 is used to acquire second attribute information of the second model of the spatial screen and the playback screen data corresponding to the spatial screen. The second attribute information includes position information and size information of the second model in the virtual space coordinate system. The first model is a model that is movable relative to the second model in the virtual space coordinate system.
[0176] The processing module 830 is used to generate a picture to be displayed based on the spatial information of the head mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data.
[0177] In some optional embodiments of the present disclosure, the processing module 830 is specifically used to:
[0178] For any time point among at least one time point, based on the first attribute information of the first model at the time point, determine the shape and position of the first model at the time point. Based on the shape and position of the first model at the time point, adjust the model map of the first model to obtain the adjusted model map of the first model. Based on the shape and position of the first model at the time point, the second attribute information of the second model at the time point, and the spatial information of the head-mounted display device at the time point, determine the occlusion relationship between the barrage to be displayed and the spatial screen in the picture to be displayed. Based on the spatial information of the head-mounted display device, the occlusion relationship, the adjusted model map of the first model, the second attribute information of the second model at the time point, and the playback picture data of the spatial screen at the time point, perform picture rendering to obtain the picture to be displayed at the time point.
[0179] In some optional embodiments of the present disclosure, the device of the embodiment of the present disclosure further includes at least one of the following first determination module and the second determination module:
[0180] The first determination module is used to obtain brightness information of the playback picture data of the spatial screen, and determine the brightness of the barrage to be displayed according to the brightness information of the playback picture data.
[0181] The second determination module is used to obtain the brightness information of the bullet screen to be displayed, and determine the screen brightness of the playback screen data according to the brightness information of the bullet screen to be displayed.
[0182] Fig.13 It is a structural diagram of a device for displaying barrage provided by another exemplary embodiment of the present disclosure.
[0183] In some optional embodiments of the present disclosure, the apparatus of the embodiments of the present disclosure further includes: a third determination module 840 and a fourth determination module 850 .
[0184] The third determination module 840 is used to determine the type of effect of the shape change of the to-be-displayed bullet screen at this time point on the playback picture of the spatial screen.
[0185] The first processing module 850 is used to process the playback picture data of the spatial screen according to the action type to obtain new playback picture data.
[0186] The processing module 830 is specifically used to perform picture rendering based on the spatial information of the head-mounted display device, the occlusion relationship, the adjusted model map of the first model, the second attribute information of the second model at this time point, and the new playback picture data of the spatial screen at this time point to obtain the picture to be displayed at this time point.
[0187] In some optional embodiments of the present disclosure, the first processing module 850 is specifically used for:
[0188] In response to the action type being the light-off type, the screen brightness of the playback screen data is reduced by a first preset amount to obtain new playback screen data. In response to the action type being the light-on type, the screen brightness of the playback screen data is increased by a second preset amount to obtain new playback screen data.
[0189] In some optional embodiments of the present disclosure, the first model includes at least two sub-models, each of which corresponds to a part of the bullet screen to be displayed.
[0190] In some optional embodiments of the present disclosure, the processing module 830 is specifically used to determine the shape and position of each sub-model at the time point based on the first attribute information of each sub-model at the time point.
[0191] The processing module 830 is specifically used to adjust the model texture of each sub-model based on the shape and position of each sub-model at that time point to obtain the adjusted model texture of each sub-model.
[0192] The processing module 830 is specifically used to determine the occlusion relationship between each sub-model and the spatial screen in the picture to be displayed based on the shape and position of each sub-model at this time point, the second attribute information of the second model at this time point, and the spatial information of the head-mounted display device at this time point.
[0193] The processing module 830 is specifically used for: performing picture rendering based on the spatial information of the head-mounted display device, the occlusion relationship between each sub-model and the spatial screen, the adjusted model map of each sub-model, the second attribute information of the second model at this time point, and the playback picture data of the spatial screen at this time point to obtain the picture to be displayed at this time point.
[0194] In some optional embodiments of the present disclosure, the processing module 830 is also used to: at any time point among at least one time point, in response to obtaining a first operation of the user on the spatial screen, perform an operation corresponding to the first operation on the spatial screen and the barrage to be displayed.
[0195] In some optional embodiments of the present disclosure, the processing module 830 is specifically used to:
[0196] In response to the first operation being a moving operation, the space screen and the bullet screen to be displayed are moved along a moving track corresponding to the moving operation. In response to the first operation being a zooming operation, the space screen and the bullet screen to be displayed are zoomed in and out corresponding to the zooming operation.
[0197] In some optional embodiments of the present disclosure, the processing module 830 is further configured to:
[0198] At any time point among at least one time point, in response to obtaining a user's zoom operation on the spatial screen, the position of the virtual camera in the rendering engine is moved along a moving trajectory corresponding to the zoom operation, wherein the moving trajectory includes at least one of a trajectory close to the spatial screen and a trajectory away from the spatial screen.
[0199] In some optional embodiments of the present disclosure, the processing module 830 is specifically used to:
[0200] Based on the spatial information of the head-mounted display device, determine the first camera pose of the left virtual camera and the second camera pose of the right virtual camera in the rendering engine. Based on the first camera pose, the first attribute information, the model map, the second attribute information, and the playback image data, perform image rendering to obtain a first image to be displayed corresponding to the first screen of the head-mounted display device. Based on the second camera pose, the first attribute information, the model map, the second attribute information, and the playback image data, perform image rendering to obtain a second image to be displayed corresponding to the second screen of the head-mounted display device.
[0201] It should be noted that the specific implementation of the device for displaying barrage in the embodiment of the present disclosure is similar to the specific implementation of the method for displaying barrage in the embodiment of the present disclosure. Please refer to the part of the method for displaying barrage for details. In order to reduce redundancy, it will not be described here.
[0202] Exemplary Electronic Devices
[0203] An embodiment of the present disclosure further provides an electronic device, including: a processor, and a memory for storing instructions executable by the processor.
[0204] A processor is used to read executable instructions from a memory and execute the executable instructions to implement the method for displaying barrage as described in any of the above embodiments of the present disclosure.
[0205] Exemplary head mounted display device
[0206] An embodiment of the present disclosure further provides an electronic device, including: a processor, and a memory for storing instructions executable by the processor.
[0207] A processor is used to read executable instructions from a memory and execute the executable instructions to implement the method for displaying barrage as described in any of the above embodiments of the present disclosure.
[0208] Fig.14 1 is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. The structure of the head mounted display device can refer to the structure of the electronic device. In this embodiment, the electronic device 100 includes one or more processors 110 and a memory 120.
[0209] The processor 110 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.
[0210] The memory 120 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 110 may run the program instructions to implement the methods of the various embodiments of the present disclosure described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0211] In one example, the electronic device 100 may further include: an input device 130 and an output device 140 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0212] For example, the input device 130 may be the microphone or microphone array mentioned above, which is used to capture the input signal of the sound source.
[0213] In addition, the input device 130 may also include, for example, a keyboard, a mouse, and the like.
[0214] The output device 140 can output various information to the outside, including the determined distance information, direction information, etc. The output device 140 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0215] Of course, to simplify, Fig.14 Only some of the components related to the present disclosure in the electronic device 100 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 100 may also include any other appropriate components.
[0216] Exemplary computer program products and computer-readable storage media
[0217] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of this specification.
[0218] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0219] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0220] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0221] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.
[0222] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A method for displaying a bullet screen, comprising: Acquire first attribute information and a model map of a first model of a bullet comment to be displayed, wherein the first attribute information includes morphological change information and motion trajectory information of the first model; Acquire second attribute information of a second model of the spatial screen and playback picture data corresponding to the spatial screen, wherein the second attribute information includes position information and size information of the second model in a virtual spatial coordinate system, and the first model is a model movable relative to the second model in the virtual spatial coordinate system; A picture to be displayed is generated based on the spatial information of the head mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data.
2. The method according to claim 1, wherein: The step of generating a picture to be displayed based on the spatial information of the head mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data comprises: For any time point of at least one time point, determining the shape and position of the first model at the time point based on the first attribute information of the first model at the time point; Adjusting the model map of the first model based on the shape and position of the first model at the time point to obtain an adjusted model map of the first model; Determine, based on the shape and position of the first model at the time point, the second attribute information of the second model at the time point, and the spatial information of the head mounted display device at the time point, the occlusion relationship between the bullet screen to be displayed and the spatial screen in the picture to be displayed; Based on the spatial information of the head-mounted display device, the occlusion relationship, the model map of the adjusted first model, the second attribute information of the second model at this point in time, and the playback picture data of the spatial screen at this point in time, picture rendering is performed to obtain the picture to be displayed at this point in time.
3. The method according to claim 1, wherein: The method further comprises any one of the following steps: Acquire brightness information of the playback screen data of the spatial screen, and determine the brightness of the bullet screen to be displayed according to the brightness information of the playback screen data; The brightness information of the bullet screen to be displayed is obtained, and the screen brightness of the playback screen data is determined according to the brightness information of the bullet screen to be displayed.
4. The method according to claim 2, wherein: Before the picture rendering is performed, the method further includes: Determine the type of effect of the shape change of the to-be-displayed bullet screen at the time point on the playback picture of the spatial screen; The playback picture data of the spatial screen is processed according to the action type to obtain new playback picture data.
5. The method according to claim 4, wherein: The processing of the playback picture data of the spatial screen corresponding to the action type to obtain new playback picture data includes: In response to the action type being a light-off type, reducing the screen brightness of the playback screen data by a first preset amount to obtain the new playback screen data; In response to the action type being a light-on type, the screen brightness of the playback screen data is increased by a second preset amount to obtain the new playback screen data.
6. The method according to any one of claims 2 to 5, wherein: The first model includes at least two sub-models; each of the sub-models corresponds to a part of the bullet screen to be displayed; The determining, based on the first attribute information of the first model at the time point, the shape and position of the first model at the time point includes: Based on the first attribute information of each sub-model at the time point, determining the shape and position of each sub-model at the time point; The determining, based on the shape and position of the first model at the time point, the second attribute information of the second model at the time point, and the spatial information of the head mounted display device at the time point, the occlusion relationship between the bullet screen to be displayed and the spatial screen in the picture to be displayed includes: Based on the shape and position of each sub-model at this point in time, the second attribute information of the second model at this point in time, and the spatial information of the head-mounted display device at this point in time, the occlusion relationship between each sub-model and the spatial screen in the picture to be displayed is determined.
7. The method according to any one of claims 1 to 5, wherein: Also includes: At any time point among at least one time point, in response to obtaining a first operation of the user on the spatial screen, an operation corresponding to the first operation is performed on the spatial screen and the bullet screen to be displayed.
8. The method according to claim 7, wherein: The performing an operation corresponding to the first operation on the space screen and the bullet screen to be displayed includes: In response to the first operation being a moving operation, moving the spatial screen and the bullet screen to be displayed along a moving track corresponding to the moving operation; In response to the first operation being a zoom operation, a zoom process corresponding to the zoom operation is performed on the spatial screen and the bullet screen to be displayed.
9. The method according to any one of claims 1 to 5, wherein: Also includes: At any time point among at least one time point, in response to obtaining a user's zoom operation on the spatial screen, the position of the virtual camera in the rendering engine is moved along a moving trajectory corresponding to the zoom operation, wherein the moving trajectory includes at least one of a trajectory close to the spatial screen and a trajectory away from the spatial screen.
10. A device for displaying bullet comments, comprising: A first acquisition module, used to acquire first attribute information and a model map of a first model of a bullet screen to be displayed, wherein the first attribute information includes morphological change information and motion trajectory information of the first model; A second acquisition module is used to acquire second attribute information of a second model of the spatial screen and playback picture data corresponding to the spatial screen, wherein the second attribute information includes position information and size information of the second model in a virtual spatial coordinate system, and the first model is a model movable relative to the second model in the virtual spatial coordinate system; A processing module is used to generate a to-be-displayed picture based on the spatial information of the head mounted display device, the first attribute information, the model map, the second attribute information, and the playback picture data.
11. A computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program is used to execute the method for displaying barrage as described in any one of claims 1 to 9.
12. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method for displaying barrage as described in any one of claims 1-9 above.
13. A head mounted display device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method for displaying barrage as described in any one of claims 1-9 above.
