CN-121999105-A - Image display method and device in virtual scene and electronic equipment
Abstract
The disclosure provides an image display method, an image display device and electronic equipment in a virtual scene, wherein a virtual model with a surface divided into a plurality of display units is provided, the center position of the display unit is controlled to deviate to a designated direction by a preset distance, the deviation position after the deviation of the center position is determined, the initial screen UV coordinates of each vertex in the display unit are processed according to the screen UV coordinates of the deviation position to obtain the screen UV of the display unit, the preset map corresponding to the display unit is sampled based on the screen UV of the display unit, and the display unit is rendered based on the map sampling result. In the mode, a single virtual model surface can display a plurality of different images, and the displayed images have a spatial sense display effect and a stereoscopic vision effect by shifting the center position of the display unit and processing each position point in the display unit, so that the user experience is improved.
Inventors
- WANG JIAWEI
Assignees
- 上海网之易璀璨网络科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251225
Claims (11)
- 1. A method of image presentation in a virtual scene, the method comprising: Providing a virtual scene in a graphical user interface, wherein the virtual scene comprises a virtual model for displaying images and a virtual camera corresponding to a virtual role, and the surface of the virtual model is divided into a plurality of display units; Determining an offset position of the center position of each display unit, which is offset by a preset distance to a specified direction, for each display unit in response to a rendering instruction, wherein the specified direction is the direction of the virtual camera relative to the display unit; Processing the initial screen UV coordinates of each vertex in the display unit according to the screen UV coordinates of the offset position to obtain a screen UV of the display unit, wherein the screen UV of the display unit takes the offset position of the central position of the display unit as an origin; And sampling a preset map corresponding to the display unit based on the screen UV of the display unit to obtain a map sampling result, and rendering the display unit based on the map sampling result.
- 2. The method according to claim 1, wherein the step of processing the initial screen UV coordinates of each vertex in the display unit according to the screen UV coordinates of the offset position to obtain the screen UV of the display unit comprises: And for each vertex in the display unit, controlling the initial screen UV coordinates of the vertex to subtract the screen UV coordinates of the offset position to obtain the screen UV of the display unit.
- 3. The method according to claim 1, wherein the method further comprises: And determining a preset mapping corresponding to the unit index according to the unit index corresponding to the display unit.
- 4. The method according to claim 1, wherein the method further comprises: determining random noise of the display units for each display unit, wherein the determined random noise is different for different display units; And applying the random noise to the display unit, and adjusting unit information of the display unit to update the display effect of the image, wherein the unit information at least comprises one or more of color, brightness and screen UV of the display unit.
- 5. The method of claim 4, wherein the step of determining random noise of the display unit for each of the display units comprises: Determining noise UV of the plurality of display units according to index information corresponding to the plurality of display units and current time information, wherein the index information corresponding to the plurality of display units is a first coordinate value of the noise UV, and the current time information is a second coordinate value of the noise UV; and sampling the noise map based on the noise UV to obtain random noise of each display unit.
- 6. The method of claim 5, further comprising controlling the noise UV update in response to an increase in time.
- 7. The method of claim 4, wherein the step of applying the random noise to the display unit and adjusting the unit information of the display unit to update the presentation effect of the image comprises: And applying the random noise to the color and/or brightness of the display units, and adjusting the color and/or brightness of the display units so that the colors and/or brightness of different display units are different, and the same display units have a flickering display effect with the increase of time.
- 8. The method of claim 4, wherein the step of applying the random noise to the display unit and adjusting the unit information of the display unit to update the presentation effect of the image comprises: and applying the random noise to a screen UV of the display unit, and adjusting the display position of the image so that the display unit displays the image with the floating display effect.
- 9. An image presentation apparatus in a virtual scene, the apparatus comprising: The system comprises a providing module, a display module and a display module, wherein the providing module is used for providing a virtual scene in a graphical user interface, the virtual scene comprises a virtual model for displaying images and a virtual camera corresponding to a virtual role, and the surface of the virtual model is divided into a plurality of display units; The offset module is used for responding to the rendering instruction, and determining an offset position of the center position of each display unit after being offset by a preset distance to a specified direction, wherein the specified direction is the direction of the virtual camera relative to the display unit; The processing module is used for processing the initial screen UV coordinates of each vertex in the display unit according to the screen UV coordinates of the offset position to obtain a screen UV of the display unit, wherein the screen UV of the display unit takes the offset position of the central position of the display unit as an origin; The display module is used for sampling a preset map corresponding to the display unit based on the screen UV of the display unit to obtain a map sampling result, and rendering the display unit based on the map sampling result.
- 10. An electronic device comprising a processor and a memory, the memory storing computer-executable instructions executable by the processor to implement the method of image presentation in a virtual scene of any of claims 1-8.
- 11. A computer readable storage medium storing computer executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of image presentation in a virtual scene as claimed in any one of claims 1 to 8.
Description
Image display method and device in virtual scene and electronic equipment Technical Field The disclosure relates to the technical field of computer graphics, in particular to an image display method, an image display device and electronic equipment in a virtual scene. Background There is a need for multiple image display in current virtual scenes. In the related art, the surface of a virtual object for displaying information is generally divided into a plurality of areas, and the display effect that an image always faces towards a camera is achieved through a screen sampling technology. However, the image is fixed on the surface of the model, and the display effect of the image does not have the real-world observation effect when the observation angle is changed, so that the user experience is affected. Disclosure of Invention Accordingly, an object of the present disclosure is to provide an image display method, apparatus and electronic device in a virtual scene, so that a single virtual model surface can display a plurality of different images, and meanwhile, the displayed images have a spatial sense display effect and a stereoscopic vision effect, thereby improving user experience. According to the embodiment of the disclosure, a virtual scene is provided in a graphical user interface, wherein the virtual scene comprises a virtual model for displaying an image and a virtual camera corresponding to a virtual role, the surface of the virtual model is divided into a plurality of display units, an offset position after the center position of the display unit is offset by a preset distance towards a specified direction is determined for each display unit in response to a rendering instruction, the specified direction is the direction of the virtual camera relative to the display unit, the initial screen UV coordinates of each vertex in the display unit are processed according to the screen UV coordinates of the offset position to obtain a screen UV of the display unit, the screen UV of the display unit takes the offset position of the center position of the display unit as an origin, the preset map corresponding to the display unit is sampled based on the screen UV of the display unit to obtain a map sampling result, and the display unit is rendered based on the map sampling result. The embodiment of the disclosure provides an image display device in a virtual scene, which comprises a providing module, a migration module and a processing module, wherein the providing module is used for providing a virtual scene in a graphical user interface, the virtual scene comprises a virtual model for displaying images and a virtual camera corresponding to a virtual role, the surface of the virtual model is divided into a plurality of display units, the migration module is used for responding to a rendering instruction, the migration module is used for controlling the central position of the display unit to be offset by a preset distance in a specified direction for each display unit, the specified direction is the direction of the virtual camera relative to the display unit, the processing module is used for processing the initial screen UV coordinates of each vertex in the display unit according to the screen UV coordinates of the migration position to obtain the screen UV of the display unit, the migration position of the central position of the display unit is taken as an origin, the display module is used for sampling a preset map corresponding to the display unit based on the screen UV of the display unit to obtain a map sampling result, and the display unit is rendered based on the map sampling result. In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the image presentation method in the virtual scene of any one of the first aspects. In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions that, when invoked and executed by a processor, cause the processor to implement a method of image presentation in a virtual scene of any one of the first aspects. The embodiment of the disclosure brings the following beneficial effects: The disclosure provides an image display method, device and electronic equipment in a virtual scene, wherein the virtual scene comprises a virtual model for displaying images and virtual cameras corresponding to virtual roles, the surface of the virtual model is divided into a plurality of display units, the center position of each display unit is controlled to deviate to a specified direction by a preset distance according to a rendering instruction, the specified direction is the direction of the virtual camera relative to the display unit, the initial screen UV coordinates of each ve