Rendering method and apparatus, electronic device, and storage medium
By generating display grids and utilizing coordinate transformation relationships, the 3D visual effect of users viewing the display screen in virtual reality space is improved, solving the problem of poor 3D visual display of rectangular screens in virtual reality space and achieving personalized display effects.
Patent Information
- Application Number
- CN202311617716.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-11-29
AI Technical Summary
In some scenarios, rectangular screens in virtual reality spaces do not provide good 3D visual display, especially when displaying text in corners or flipping through pages.
The display grid is determined based on spline information and length information perpendicular to the spline direction. Virtual coordinates in virtual space are generated using coordinate transformation relationships. Combined with the display grid, a display image is generated.
It enhances the 3D visual effect of users viewing the display screen in virtual reality space, meeting users' personalized needs.
Smart Images

Figure CN117635792B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of virtual reality, and particularly relates to a rendering method and device, an electronic device and a storage medium. BACKGROUND
[0002] A display screen in a virtual reality (VR) space is usually a rectangular screen. For some scenarios in the VR space, such as corner text display and page turning display, the three-dimensional visual display effect of the rectangular screen is poor.
[0003] For some scenarios in the VR space, how to improve the three-dimensional visual effect when a user watches the display screen is a problem to be solved. SUMMARY
[0004] Embodiments of the present disclosure provide a rendering method and device, an electronic device and a storage medium to solve the above problems.
[0005] In a first aspect, a rendering method is provided, comprising:
[0006] determining a display grid based on selected spline line information and length information perpendicular to a direction of the spline line, wherein the spline line information comprises spline line length, spline line curvature, spline line vertex coordinates, and a coordinate conversion relationship between a virtual space coordinate system and a texture map uv coordinate system;
[0007] obtaining a uv coordinate set of to-be-displayed information in the uv coordinate system;
[0008] determining a virtual coordinate set of the to-be-displayed information in the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relationship;
[0009] rendering the to-be-displayed information in a virtual space based on the virtual coordinate set and the display grid, to obtain a rendering image.
[0010] In an embodiment of the present disclosure, the determining the display grid based on the selected spline line information and the length information perpendicular to the direction of the spline line comprises:
[0011] generating a first spline line in the virtual space coordinate system based on the spline line vertex coordinates, the spline line length and the spline line curvature, wherein the first spline line is one edge of the display grid;
[0012] translating the first spline line by a target length perpendicular to the direction of the spline line to obtain a second spline line, wherein the length information perpendicular to the direction of the spline line comprises the target length, and the second spline line is a counteredge of an edge corresponding to the first spline line in the display grid.
[0013] determine the display grid based on the first spline line and the second spline line.
[0014] In an embodiment of the present disclosure, the spline line information further comprises a spline line direction, wherein the spline line direction is one of a first preset direction and a second preset direction.
[0015] The first spline line is translated by a target length in a direction perpendicular to the spline line direction to obtain a second spline line.
[0016] In response to the spline line direction being the first preset direction, the first spline line is translated by the target length in a direction of a first coordinate axis of the virtual space coordinate system to obtain the second spline line.
[0017] In response to the spline line direction being the second preset direction, the first spline line is translated by the target length in a direction of a second coordinate axis of the virtual space coordinate system to obtain the second spline line.
[0018] In an embodiment of the present disclosure, the display grid is determined based on the first spline line and the second spline line, comprising:
[0019] A plurality of triangular facets are determined based on the first spline line and the second spline line.
[0020] The display grid is determined based on the plurality of triangular facets.
[0021] In an embodiment of the present disclosure, the rendering of the to-be-displayed information in the virtual space based on the virtual coordinate set and the display grid comprises:
[0022] A display screen in the virtual space is determined based on the display grid.
[0023] A display position of the to-be-displayed information in the display screen is determined based on the virtual coordinate set.
[0024] The to-be-displayed information is rendered in the display position based on a rendering color of the to-be-displayed information.
[0025] In an embodiment of the present disclosure, the virtual coordinate set of the to-be-displayed information in the virtual space coordinate system is determined based on the uv coordinate set and the coordinate conversion relationship, comprising:
[0026] The virtual coordinate set is determined based on the uv coordinate set, the coordinate conversion relationship, and first display adjustment information, wherein the first display adjustment information comprises at least one of display position adjustment information and display scale adjustment information.
[0027] In an embodiment of the present disclosure, after the rendering of the information to be displayed in the virtual space based on the set of virtual coordinates and the display grid to obtain a rendered image, the method further comprises:
[0028] adjusting the rendered image based on second display adjustment information, wherein the second display adjustment information comprises at least one of display position adjustment information, display scale adjustment information, and display color adjustment information.
[0029] In a second aspect of the embodiments of the present disclosure, a rendering device is provided, comprising:
[0030] a display grid determination module configured to determine a display grid based on selected spline line information and length information perpendicular to a direction of the spline line, wherein the spline line information comprises spline line length, spline line curvature, spline line vertex coordinates, and a coordinate conversion relationship between a virtual space coordinate system and a uv coordinate system;
[0031] a uv coordinate set acquisition module configured to acquire a set of uv coordinates of the information to be displayed in the uv coordinate system;
[0032] a virtual coordinate set determination module configured to determine a set of virtual coordinates of the information to be displayed in the virtual space coordinate system based on the set of uv coordinates and the coordinate conversion relationship;
[0033] a rendering module configured to render the information to be displayed in the virtual space based on the set of virtual coordinates and the display grid to obtain a rendered image.
[0034] In an embodiment of the present disclosure, the display grid determination module is configured to generate a first spline line in the virtual space coordinate system based on the spline line vertex coordinates, the spline line length, and the spline line curvature, wherein the first spline line is one edge of the display grid; the display grid determination module is further configured to translate the first spline line by a target length in the direction perpendicular to the spline line to obtain a second spline line, wherein the length information perpendicular to the direction of the spline line comprises the target length, and the second spline line is a counter edge corresponding to the first spline line in the display grid; and the display grid determination module is further configured to determine the display grid based on the first spline line and the second spline line.
[0035] In an embodiment of the present disclosure, the spline line information further comprises a spline line direction, wherein the spline line direction is one of a first preset direction and a second preset direction.
[0036] The display grid determination module is configured to, in response to the spline line direction being the first preset direction, translate the first spline line by the target length in a first coordinate axis direction of the virtual space coordinate system to obtain the second spline line; and the display grid determination module is further configured to, in response to the spline line direction being the second preset direction, translate the first spline line by the target length in a second coordinate axis direction of the virtual space coordinate system to obtain the second spline line.
[0037] In an embodiment of the present disclosure, the display grid determination module is configured to determine a plurality of triangular facets based on the first spline line and the second spline line; and the display grid determination module is further configured to determine the display grid based on the plurality of triangular facets.
[0038] In an embodiment of the present disclosure, the rendering module is configured to determine a display screen in the virtual space based on the display grid; the rendering module is further configured to determine a display position of the information to be displayed in the display screen based on the virtual coordinate set; and the rendering module is further configured to render the information to be displayed in the display position based on a rendering color of the information to be displayed.
[0039] In an embodiment of the present disclosure, the virtual coordinate set determination module is configured to determine the virtual coordinate set based on the uv coordinate set, the coordinate conversion relationship and first display adjustment information, wherein the first display adjustment information comprises at least one of display position adjustment information and display scale adjustment information.
[0040] In an embodiment of the present disclosure, the rendering module is further configured to adjust the rendered image based on second display adjustment information, wherein the second display adjustment information comprises at least one of display position adjustment information, display scale adjustment information and display color adjustment information.
[0041] A third aspect of the embodiments of the present disclosure provides an electronic device, comprising:
[0042] a memory configured to store a computer program;
[0043] a processor configured to execute the computer program stored in the memory, and the computer program, when executed, implements the method of the first aspect.
[0044] A fourth aspect of the embodiments of the present disclosure provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of the first aspect.
[0045] The rendering method and device, the electronic device and the storage medium provided by the embodiments of the present disclosure can generate a display grid according to the selected spline line information and the length information perpendicular to the direction of the spline line after providing the user with a set of spline lines, and can obtain a set of virtual coordinates of the to-be-displayed information in a virtual space coordinate system by using a coordinate conversion relationship, and can render the to-be-displayed information according to the set of virtual coordinates and the display grid, so as to obtain a rendering image meeting the personalized needs of the user.
[0046] The technical solutions of the present disclosure will be further described in detail below by means of the accompanying drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0047] The accompanying drawings, which form a part of the specification, illustrate the embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0048] With reference to the accompanying drawings, the present disclosure can be more clearly understood and appreciated based on the following detailed description, in which:
[0049] Figure 1 A flowchart of a rendering method in one embodiment of the present disclosure is shown in FIG. 1.
[0050] Figure 2 A schematic diagram of a display grid in a virtual space coordinate system in one example of the present disclosure is shown in FIG. 2.
[0051] Figure 3 A schematic diagram of a rendering image in one example of the present disclosure is shown in FIG. 3.
[0052] Figure 4 A structural block diagram of rendering in one embodiment of the present disclosure is shown in FIG. 4.
[0053] Figure 5 A structural block diagram of an electronic device in one embodiment of the present disclosure is shown in FIG. 5. DETAILED DESCRIPTION
[0054] Various exemplary embodiments of the present disclosure will now be described in detail below with reference to the accompanying drawings. Note that the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure, unless otherwise specifically stated.
[0055] Those skilled in the art can understand that the terms "first", "second", and the like in the embodiments of the present disclosure are only used to distinguish different steps, devices, or modules, and do not represent any specific technical meaning, nor do they represent a necessary logical sequence between them.
[0056] It should also be understood that in the embodiments of the present disclosure, "a plurality of" can mean two or more, and "at least one" can mean one, two, or more.
[0057] It should also be understood that, whenever used in the foregoing description or the following claims, the terms "comprise", "comprising", "include", "including", "has", "having" or the like are used in the sense of inclusion not of exclusion. That is, the use of these terms herein shall not be construed as excluding the presence of other elements or integers.
[0058] In addition, the term "and / or" in the present disclosure is merely an association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in the present disclosure generally represents an "or" relationship between the front and rear associated objects.
[0059] It should also be understood that the description of the present disclosure for various embodiments emphasizes the differences between various embodiments, and the same or similar parts can be referred to each other, and for the sake of brevity, will not be repeated.
[0060] The following description of at least one example embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application or uses.
[0061] Techniques, methods, and devices known to those of ordinary skill in the relevant art can not be discussed in detail herein, but should be considered part of the specification, where appropriate.
[0062] It should be noted that similar reference numerals and letters refer to similar items throughout the following drawings, and thus, once an item is defined in one drawing, it need not be discussed further in subsequent drawings.
[0063] Embodiments of the present disclosure can be applied to terminal devices, computer systems, servers, and other electronic devices, which can operate with many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with terminal devices, computer systems, servers, and other electronic devices include, but are not limited to, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing technology environments comprising any of the above systems, and the like.
[0064] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in distributed cloud computing environments, where tasks are executed by remote processing devices linked through communication networks. In distributed cloud computing environments, program modules can reside on local or remote computing system storage media, including storage devices.
[0065] Figure 1 This is a flowchart of a rendering method in one embodiment of this disclosure. Figure 1 As shown, the rendering method includes the following steps:
[0066] S1: Determine the display grid based on the selected spline information and the length information perpendicular to the spline direction.
[0067] The spline information includes spline length, spline curvature, spline vertex coordinates, and coordinate transformation relationship between the virtual space coordinate system and the uv coordinate system.
[0068] Multiple splines can be displayed to users in a virtual space, and users can select the spline that meets their personalized needs through the spline selection button in the virtual space.
[0069] Figure 2 This is a schematic diagram illustrating a mesh in a virtual space coordinate system, as shown in one example of this disclosure. Figure 2 As shown, the user selects spline S1. The spline information for S1 includes its coordinate length and curvature in virtual space, the coordinates of vertex A1 and vertex An, and the coordinate transformation relationship between the virtual space coordinate system and the uv coordinate system. In this example, the length information perpendicular to the spline direction is the distance Depth between spline S1 and spline S2.
[0070] Spline S2 can be obtained by translating spline S1 by Depth in a direction perpendicular to the spline, and then a display mesh can be formed based on spline S1 and spline S2. The vertices of the display mesh include A1, A2, An, and An+1.
[0071] It should be noted that the selected spline can also be spline S2, and spline S1 can be obtained by translating spline S2 in a direction perpendicular to the spline direction by Depth.
[0072] S2: Get the set of uv coordinates of the information to be displayed in the uv coordinate system.
[0073] The to-be-displayed information can include a to-be-displayed image provided by a user, and in this case, a set of uv coordinates of all pixel points of the to-be-displayed image in the uv coordinate system are acquired.
[0074] S3: determining a set of virtual coordinates of the to-be-displayed information in the virtual space coordinate system based on the set of uv coordinates and the coordinate conversion relationship.
[0075] For any uv coordinate in the set of uv coordinates, a virtual coordinate in the virtual space coordinate system is converted through the coordinate conversion relationship.
[0076] All virtual coordinates corresponding to the uv coordinates in the set of uv coordinates can be obtained through the above manner. The set of virtual coordinates of the to-be-displayed information in the virtual space coordinate system is composed of all virtual coordinates corresponding to the uv coordinates.
[0077] S4: rendering the to-be-displayed information in the virtual space based on the set of virtual coordinates and the display grid to obtain a rendered image.
[0078] The display grid is placed in the virtual space. An area of the display grid in the virtual space is set as a rendering area. A set of rendering coordinates in the rendering area is determined according to the set of virtual coordinates, and each coordinate point in the set of rendering coordinates is rendered based on a given rendering color to obtain the rendered image.
[0079] Figure 3 A schematic diagram of the rendered image in one example of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the rendering area is an area composed of a vertex A1, a vertex A2, a vertex An, and a vertex An+1. The to-be-displayed information is rendered in the rendering area to obtain a rendered image with a curved surface display effect. Figure 3
[0080] In the present embodiment, after the set of spline lines is provided to the user, the display grid can be generated according to the selected spline line information and the length information perpendicular to the direction of the spline line, the set of virtual coordinates of the to-be-displayed information in the virtual space coordinate system can be obtained through the coordinate conversion relationship, and the rendered image meeting the individual needs of the user can be obtained by rendering the to-be-displayed information according to the set of virtual coordinates and the display grid.
[0081] In one embodiment of the present disclosure, step S1 can include:
[0082] S1-1: generating a first spline line in the virtual space coordinate system based on the spline line vertex coordinates, the spline line length, and the spline line curvature. The first spline line is one side of the display grid.
[0083] Please refer to Figure 2 The first spline line can be one of the spline line S1 and the spline line S2.
[0084] S1-2: translating the first spline line by a target length in a direction perpendicular to the spline line direction to obtain a second spline line. The length information in the direction perpendicular to the spline line direction includes the target length, and the second spline line is a pair of edges corresponding to the first spline line in the display grid.
[0085] Please refer to Figure 2 The target length can be the height of the Depth. When the first spline line is the spline line S1, the second spline line is the spline line S2; when the first spline line is the spline line S2, the second spline line is the spline line S1.
[0086] S1-3: determining the display grid based on the first spline line and the second spline line.
[0087] Please refer to Figure 2 The display grid can be composed of the spline line S1, the spline line S2, an edge formed by the vertex A1 and the vertex A2, and an edge formed by the vertex An and the vertex An+1.
[0088] In this embodiment, the first spline line can be generated according to the spline line vertex coordinates, the spline line length and the spline line curvature, and the second spline line can be obtained by translating the first spline line. By connecting the vertices corresponding to the first spline line and the second spline line, a display network meeting the user's demand can be quickly generated, which helps to generate a display screen meeting the user's individual demand based on the display network, and further helps to display an image meeting the user's individual demand in the display screen.
[0089] In one embodiment of the present disclosure, the spline line information further includes a spline line direction. The spline line direction is one of a first preset direction and a second preset direction. Accordingly, step S1-2 can include:
[0090] S1-2-1: in response to the spline line direction being the first preset direction, translating the first spline line by the target length in a first coordinate axis direction of the virtual space coordinate system to obtain the second spline line.
[0091] Please refer to Figure 2 The spline line directions of the spline line S1 and the spline line S2 are the first preset direction, for example, the horizontal direction. The first coordinate axis direction can be a coordinate axis direction parallel to the Depth direction.
[0092] S1-2-2: in response to the spline line direction being the second preset direction, translating the first spline line by the target length in a second coordinate axis direction of the virtual space coordinate system to obtain the second spline line.
[0093] Please refer to Figure 2 When the spline S1 is rotated 90 degrees in the vertical direction with the vertex A1 as the rotation axis, the direction of the spline S1 at this time is the second preset direction, for example, the vertical direction. The second coordinate axis direction Figure 2 The horizontal and left-right direction coordinate axis direction is shown.
[0094] In this embodiment, the first spline can be translated in the corresponding direction to obtain the second spline according to different spline directions, which is helpful to quickly determine the display grid, and further helps to generate a display screen that meets the user's individual needs based on the display network, and further helps to display an image that meets the user's individual needs in the display screen.
[0095] In an embodiment of the present disclosure, step S1-3 can include:
[0096] S1-3-1: determining a plurality of triangular facets based on the first spline and the second spline.
[0097] S1-3-2: determining the display grid based on the plurality of triangular facets.
[0098] As Figure 2 shown, points A1 and A3 can be selected in the spline S2 first, and point S2 is selected in the spline S1, and a triangular facet is formed by points A1, S2 and A3, then points A2 and A4 are selected in the spline S1, and point S3 is selected in the spline S2, and a triangular facet is formed by points A2, S3 and A4, and so on. One or two points are selected in the spline S2 and the spline S1 alternately to form a triangular facet, and finally a display network is formed.
[0099] In this embodiment, points are selected alternately on the first spline and the second spline to form a plurality of triangular facets, and further a display grid that meets the user's individual needs can be formed by the plurality of triangular facets, and further helps to generate a display screen that meets the user's individual needs based on the display network, and further helps to display an image that meets the user's individual needs in the display screen.
[0100] In an embodiment of the present disclosure, step S4 can include:
[0101] S4-1: determining a display screen in the virtual space based on the display grid.
[0102] According to the relative position relationship between all points in the display network and the virtual space coordinates of at least one point in the virtual space, a set of virtual space coordinates of all points in the display grid in the virtual space can be determined. The display screen in the virtual space is determined according to the virtual space coordinates.
[0103] S4-2: Based on the set of virtual coordinates, the display position of the to-be-displayed information in the display screen is determined.
[0104] According to the virtual space coordinates of the display screen, it is determined whether the coordinate point corresponding to each virtual space coordinate in the set of virtual coordinates is located in the display screen. If the coordinate point is located in the display screen, the virtual space coordinates of the coordinate point are retained. If the coordinate point is located outside the display screen, the virtual space coordinates of the coordinate point are deleted from the set of virtual coordinates.
[0105] According to the virtual space coordinates of the display screen and the virtual space coordinates of the coordinate points finally retained in the set of virtual coordinates, the display position of the to-be-displayed information in the display screen is determined.
[0106] S4-3: Based on the rendering color of the to-be-displayed information, the to-be-displayed information is rendered in the display position.
[0107] According to the rendering color required for rendering the to-be-displayed information, the to-be-displayed information is rendered in the display position.
[0108] In this embodiment, according to the virtual space coordinates of the display screen, it is determined whether the coordinate point corresponding to each virtual space coordinate in the set of virtual coordinates is located in the display screen. The coordinate points located outside the display screen are deleted, and only the coordinate points located in the display screen are subjected to color rendering, which can improve the accuracy of the display position of the screen.
[0109] In an embodiment of the present disclosure, step S3 can include: determining the set of virtual coordinates based on the set of uv coordinates, the coordinate conversion relationship, and first display adjustment information.
[0110] The first display adjustment information includes at least one of display position adjustment information and display scale adjustment information.
[0111] After obtaining the set of uv coordinates and the coordinate conversion relationship, the display position and the image aspect ratio of the to-be-displayed information in the display screen can be adjusted according to user needs, further improving the display effect of user individual needs.
[0112] In an embodiment of the present disclosure, after step S4, it can further include:
[0113] S5: adjusting the rendering image based on the second display adjustment information. The second display adjustment information includes at least one of display position adjustment information, display proportion adjustment information, and display color adjustment information.
[0114] In this embodiment, when the user is not satisfied with the display effect of the rendering image, the display position of the rendering image in the display screen can be adjusted, the aspect ratio of the rendering image can be adjusted, and the display color of the rendering image can be adjusted, thereby further improving the display effect of the user's individual needs.
[0115] Figure 4 FIG. 1 is a structural block diagram of a rendering device according to an embodiment of the present disclosure. As shown in FIG. 1, the rendering device includes: Figure 4
[0116] The display grid determination module 100 is configured to determine a display grid based on selected spline line information and length information perpendicular to the direction of the spline line, wherein the spline line information includes spline line length, spline line curvature, spline line vertex coordinates, and a coordinate conversion relationship between a virtual space coordinate system and a texture map uv coordinate system.
[0117] The uv coordinate set acquisition module 200 is configured to acquire a uv coordinate set of the to-be-displayed information in the uv coordinate system.
[0118] The virtual coordinate set determination module 300 is configured to determine a virtual coordinate set of the to-be-displayed information in the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relationship.
[0119] The rendering module 400 is configured to render the to-be-displayed information in the virtual space based on the virtual coordinate set and the display grid, to obtain a rendering image.
[0120] In an embodiment of the present disclosure, the display grid determination module 100 is configured to generate a first spline line in the virtual space coordinate system based on the spline line vertex coordinates, the spline line length, and the spline line curvature, wherein the first spline line is one edge of the display grid; the display grid determination module 100 is further configured to translate the first spline line by a target length in a direction perpendicular to the direction of the spline line to obtain a second spline line, wherein the length information perpendicular to the direction of the spline line includes the target length, and the second spline line is a pair edge of the edge corresponding to the first spline line in the display grid; and the display grid determination module 100 is further configured to determine the display grid based on the first spline line and the second spline line.
[0121] In an embodiment of the present disclosure, the spline line information further comprises a spline line direction, wherein the spline line direction is one of a first preset direction and a second preset direction; the display grid determination module 100 is configured to, in response to the spline line direction being the first preset direction, translate the first spline line by a target length in a direction of a first coordinate axis of a virtual space coordinate system to obtain a second spline line; the display grid determination module 100 is further configured to, in response to the spline line direction being the second preset direction, translate the first spline line by the target length in a direction of a second coordinate axis of the virtual space coordinate system to obtain the second spline line.
[0122] In an embodiment of the present disclosure, the display grid determination module 100 is configured to determine a plurality of triangular facets based on the first spline line and the second spline line; the display grid determination module is further configured to determine a display grid based on the plurality of triangular facets.
[0123] In an embodiment of the present disclosure, the rendering module 400 is configured to determine a display screen in the virtual space based on the display grid; the rendering module 400 is further configured to determine a display position of the to-be-displayed information in the display screen based on the virtual coordinate set; the rendering module 400 is further configured to render the to-be-displayed information in the display position based on a rendering color of the to-be-displayed information.
[0124] In an embodiment of the present disclosure, the virtual coordinate set determination module 300 is configured to determine the virtual coordinate set based on the uv coordinate set, the coordinate conversion relationship and first display adjustment information, wherein the first display adjustment information comprises at least one of display position adjustment information and display scale adjustment information.
[0125] In an embodiment of the present disclosure, the rendering module 400 is further configured to adjust the rendered image based on second display adjustment information, wherein the second display adjustment information comprises at least one of display position adjustment information, display scale adjustment information and display color adjustment information.
[0126] It should be noted that the specific implementation of the rendering device of the embodiments of the present disclosure is similar to the specific implementation of the rendering method of the embodiments of the present disclosure. For details, refer to the description of the rendering method part. In order to reduce redundancy, no further description is made.
[0127] In addition, the embodiments of the present disclosure also provide an electronic device, comprising:
[0128] a memory configured to store a computer program;
[0129] a processor configured to execute the computer program stored in the memory, and when the computer program is executed, the rendering method of any one of the embodiments of the present disclosure is implemented.
[0130] Figure 5 The structure schematic diagram of an application embodiment of the electronic device of the present disclosure is shown in FIG. 1. As shown in FIG. 1, the electronic device comprises a display screen 100, a display grid determination module 200, a virtual coordinate set determination module 300 and a rendering module 400.Figure 4 As shown, the electronic device includes one or more processors and a memory.
[0131] The processor can be a central processing unit (CPU) or other form of processing unit having data processing and / or instruction execution capabilities and can control other components in the electronic device to perform desired functions.
[0132] The memory can include one or more computer program products that can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory, for example, can include random access memory (RAM), cache memory, and / or the like. The non-volatile memory, for example, can include read only memory (ROM), hard disk, flash memory, and / or the like. One or more computer program instructions can be stored on the computer-readable storage media, and the processor can execute the program instructions to implement the rendering method of various embodiments of the present disclosure described above and / or other desired functions.
[0133] In one example, the electronic device can further include an input device and an output device, which are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0134] In addition, the input device can further include, for example, a keyboard, a mouse, and / or the like.
[0135] The output device can output various information, including determined distance information, direction information, and / or the like, to the outside. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and / or the like.
[0136] Of course, in order to simplify, Figure 5 In FIG. 1, only some of the components related to the present disclosure among the electronic device are shown, and components such as a bus, an input / output interface, and / or the like are omitted. In addition, the electronic device can further include any other appropriate components according to a specific application.
[0137] In addition to the above-described method and device, embodiments of the present disclosure can be a computer program product including computer program instructions that, when executed by a processor, cause the processor to perform steps of the rendering method according to various embodiments of the present disclosure described in the above parts of the specification.
[0138] The computer program product can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. The embodiments of the present disclosure can be a computer program product, which can include a computer program tangibly embodied in a machine readable storage medium.
[0139] In addition, embodiments of the present disclosure can also be a computer readable storage medium, which stores computer program instructions, and the computer program instructions, when executed by a processor, cause the processor to perform the steps in the rendering method according to various embodiments of the present disclosure described in the above part of the specification.
[0140] The computer readable storage medium can take the form of one or more combinations of any type of computer readable medium. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable disc, 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 disc read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0141] Those skilled in the art can understand that all or part of the steps of the above method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps of the above method embodiments when executed; and the foregoing storage medium includes ROM, RAM, magnetic disc or optical disc and various storage medium that can store program code.
[0142] The above describes the basic principles of the present disclosure in combination with specific embodiments, but it should be noted that the advantages, advantages, effects and the like mentioned in the present disclosure are only examples and are not limited, and these advantages, advantages, effects and the like cannot be considered as the various embodiments of the present disclosure must have. In addition, the above specific details are only for the purpose of example and for the purpose of understanding, and are not limited to the above specific details, and the above specific details do not limit the present disclosure to be realized by the above specific details.
[0143] The various embodiments described in this specification are intended to be illustrative only and in no way limit the scope of the application. One skilled in the art will readily recognize from the disclosure herein, possible alternative techniques within the scope of the application. Accordingly, the examples are not to be regarded as limiting, but rather are to be understood to be illustrative of the possible aspects of the application. The various embodiments described in this specification are described in the context of a system. As such, the system embodiments are described in relatively greater detail than the method embodiments, with the understanding that the method embodiments are substantially analogous to the system embodiments.
[0144] The block diagrams of devices, apparatuses, equipment, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connection, arrangement, configuration must be as shown in the block diagrams. These devices, apparatuses, equipment, systems can be connected, arranged, configured in any manner as will be appreciated by those skilled in the art. Words such as "include," "contain," "have," etc. are open-ended words that are to be interpreted to mean "including but not limited to," and are to be interpreted not to exclude items that do not match the description of the word. The words "or" and "and" as used herein are to be interpreted as the word "and / or," and are to be interpreted not to exclude items that do not match the description of the word. The word "such as" as used herein is to be interpreted as the phrase "such as but not limited to," and is to be interpreted not to exclude items that do not match the description of the word.
[0145] The methods and apparatuses of this disclosure can be implemented in a number of ways. For example, the methods and apparatuses of this disclosure can be implemented using software, hardware, firmware, or any combination of these methods. The above described order of steps for the methods is merely illustrative, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, the disclosure can also be implemented as a program recorded in a recording medium, which includes machine readable instructions for implementing the methods according to the disclosure. Thus, the disclosure also covers the recording medium storing the program for performing the methods according to the disclosure.
[0146] It is also important to note that the devices, equipment and methods of this disclosure can be split and / or recombined into various components or steps. These splits and / or recombination are to be considered as equivalents of this disclosure.
[0147] The above description of the disclosed aspects is intended to be illustrative only and not limiting of the scope of the disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0148] The foregoing description has been presented for the purposes of illustration and description. Furthermore, the description is not intended to limit the embodiments of the disclosure to the forms disclosed herein. Although the various example aspects and embodiments have been described herein with regard to particular aspects and embodiments, those skilled in the art will recognize that certain modifications, changes, substitutions, additions and sub-combinations can be made without departing from the spirit of the disclosure.
Claims
1. A rendering method, characterized by, The method comprises: determining a display grid based on selected spline line information and length information perpendicular to the direction of the spline line, wherein the spline line information comprises spline line length, spline line curvature, spline line vertex coordinates, and a coordinate conversion relationship between a virtual space coordinate system and a texture map uv coordinate system; obtaining a set of uv coordinates of to-be-displayed information in the uv coordinate system; determining a set of virtual coordinates of the to-be-displayed information in the virtual space coordinate system based on the set of uv coordinates and the coordinate conversion relationship; rendering the to-be-displayed information in a virtual space based on the set of virtual coordinates and the display grid to obtain a rendered image; wherein the determining of the display grid based on the selected spline line information and the length information perpendicular to the direction of the spline line comprises: generating a first spline line in the virtual space coordinate system based on the spline line vertex coordinates, the spline line length, and the spline line curvature, wherein the first spline line is one side of the display grid; translating the first spline line by a target length perpendicular to the direction of the spline line to obtain a second spline line, wherein the length information perpendicular to the direction of the spline line comprises the target length, and the second spline line is a side opposite to the side corresponding to the first spline line in the display grid; determining a plurality of triangular facets based on the first spline line and the second spline line; determining the display grid based on the plurality of triangular facets.
2. The method of claim 1, wherein, The spline line information further comprises a spline line direction, wherein the spline line direction is one of a first preset direction and a second preset direction; the translating of the first spline line by the target length perpendicular to the direction of the spline line to obtain the second spline line comprises: in response to the spline line direction being the first preset direction, translating the first spline line by the target length in the direction of a first coordinate axis of the virtual space coordinate system to obtain the second spline line; in response to the spline line direction being the second preset direction, translating the first spline line by the target length in the direction of a second coordinate axis of the virtual space coordinate system to obtain the second spline line.
3. The method according to claim 1 or 2, characterized in that, The rendering of the to-be-displayed information in the virtual space based on the set of virtual coordinates and the display grid comprises: determining a display screen in the virtual space based on the display grid; determining a display position of the to-be-displayed information in the display screen based on the set of virtual coordinates; rendering the to-be-displayed information in the display position based on a rendering color of the to-be-displayed information.
4. The method according to claim 1 or 2, characterized in that, The determining of the set of virtual coordinates of the to-be-displayed information in the virtual space coordinate system based on the set of uv coordinates and the coordinate conversion relationship comprises: determining the set of virtual coordinates based on the set of uv coordinates, the coordinate conversion relationship, and first display adjustment information, wherein the first display adjustment information comprises at least one of display position adjustment information and display scale adjustment information.
5. The method according to claim 1 or 2, characterized in that, after the rendering of the to-be-displayed information in the virtual space based on the set of virtual coordinates and the display grid to obtain a rendered image, the method further comprises: Adjust the rendering image based on second display adjustment information, wherein the second display adjustment information comprises at least one of display position adjustment information, display scale adjustment information and display color adjustment information.
6. A rendering device, characterized in that Comprise: A display grid determination module is configured to determine a display grid based on selected spline line information and length information perpendicular to a spline line direction, wherein the spline line information comprises spline line length, spline line curvature, spline line vertex coordinates, and a coordinate conversion relationship between a virtual space coordinate system and a texture map uv coordinate system; An uv coordinate set acquisition module is configured to acquire a uv coordinate set of to-be-displayed information in a uv coordinate system; A virtual coordinate set determination module is configured to determine a virtual coordinate set of the to-be-displayed information in the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relationship; A rendering module is configured to render the to-be-displayed information in a virtual space based on the virtual coordinate set and the display grid, and obtain a rendering image; The display grid determination module is further configured to: generate a first spline line in the virtual space coordinate system based on the spline line vertex coordinates, the spline line length and the spline line curvature, wherein the first spline line is an edge of the display grid; translate the first spline line in the direction perpendicular to the spline line direction by a target length to obtain a second spline line, wherein the length information perpendicular to the spline line direction comprises the target length, and the second spline line is a counter edge corresponding to the edge of the display grid; determine a plurality of triangular facets based on the first spline line and the second spline line; and determine the display grid based on the plurality of triangular facets.
7. An electronic device, comprising: Comprise: A memory is configured to store a computer program; A processor is configured to execute the computer program stored in the memory, and when the computer program is executed, the method in any one of claims 1-5 is implemented.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor, and the method in any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Digital earth and panorama fusion display method and device
CN114140593A
VR display control method, electronic equipment and computer readable storage medium
CN114461057A