CN117635792A - Rendering method and device, electronic equipment and storage medium - Google Patents

Rendering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117635792A
CN117635792A CN202311617716.1A CN202311617716A CN117635792A CN 117635792 A CN117635792 A CN 117635792A CN 202311617716 A CN202311617716 A CN 202311617716A CN 117635792 A CN117635792 A CN 117635792A
Authority
CN
China
Prior art keywords
spline
information
display
coordinate
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311617716.1A
Other languages
Chinese (zh)
Inventor
王怡丁
李沛伦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
You Can See Beijing Technology Co ltd AS
Original Assignee
You Can See Beijing Technology Co ltd AS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by You Can See Beijing Technology Co ltd AS filed Critical You Can See Beijing Technology Co ltd AS
Priority to CN202311617716.1A priority Critical patent/CN117635792A/en
Publication of CN117635792A publication Critical patent/CN117635792A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

The embodiment of the disclosure discloses a rendering method and device, an electronic device and a storage medium, wherein the method comprises the following steps: determining a display grid based on the selected spline information and length information perpendicular to the spline direction; acquiring a uv coordinate set of information to be displayed under a uv coordinate system; determining a virtual coordinate set of the information to be displayed under the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relation; and rendering the information to be displayed in a virtual space based on the virtual coordinate set and the display grid to obtain a rendered image. The embodiment of the disclosure can obtain the rendered image meeting the personalized requirements of the user.

Description

Rendering method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of virtual reality, in particular to a rendering method and device, electronic equipment and a storage medium.
Background
The display screen in a Virtual Reality (VR) space is typically a rectangular screen, and the three-dimensional visual display effect of the rectangular screen is poor for some scenes such as corner text display and page flip display in the VR space.
Aiming at some scenes in the VR space, how to improve the three-dimensional visual effect when a user views a display screen is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the disclosure provides a rendering method and device, electronic equipment and a storage medium, so as to solve the problems.
In a first aspect of an embodiment of the present disclosure, there is provided a rendering method, including:
determining a display grid based on the selected spline information and length information perpendicular to the spline direction, wherein the spline information comprises spline length, spline curvature, spline vertex coordinates and coordinate conversion relations between a virtual space coordinate system and a texture map uv coordinate system;
acquiring a uv coordinate set of information to be displayed under a uv coordinate system;
determining a virtual coordinate set of the information to be displayed under the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relation;
and rendering the information to be displayed in a virtual space based on the virtual coordinate set and the display grid to obtain a rendered image.
In one embodiment of the present disclosure, the determining a display grid based on the selected spline information and length information perpendicular to the spline direction includes:
generating a first spline in the virtual space coordinate system based on the spline vertex coordinates, the spline length and the spline curvature, wherein the first spline is one edge of the display grid;
translating the first spline to a target length in the direction perpendicular to the spline to obtain a second spline, wherein the length information in the direction perpendicular to the spline comprises the target length, and the second spline is the opposite side of the display grid to the side corresponding to the first spline;
the display grid is determined based on the first spline and the second spline.
In one embodiment of the present disclosure, the spline line information further includes a spline line direction, wherein the spline line direction is one of a first preset direction and a second preset direction;
the translating the target length to the direction perpendicular to the spline line to the first spline line to obtain a second spline line, including:
responding to the spline direction as the first preset direction, and translating the first spline to the first coordinate axis direction of the virtual space coordinate system by the target length to obtain the second spline;
and responding to the spline line direction as the second preset direction, and translating the first spline line to the second coordinate axis direction of the virtual space coordinate system by the target length to obtain the second spline line.
In one embodiment of the present disclosure, the determining the display grid based on the first spline and the second spline includes:
determining a plurality of triangular facets based on the first spline and the second spline;
the display grid is determined based on the plurality of triangular patches.
In one embodiment of the disclosure, the rendering the information to be displayed in a virtual space based on the virtual coordinate set and the display grid includes:
determining a display screen in the virtual space based on the display grid;
determining a display position of the information to be displayed in the display screen based on the virtual coordinate set;
and rendering the information to be displayed in the display position based on the rendering color of the information to be displayed.
In one embodiment of the present disclosure, the determining, based on the uv coordinate set and the coordinate conversion relationship, a virtual coordinate set of the information to be displayed in the virtual space coordinate system includes:
and determining the virtual coordinate set based on the uv coordinate set, the coordinate conversion relation and first display adjustment information, wherein the first display adjustment information comprises at least one of display position adjustment information and display proportion adjustment information.
In one embodiment of the disclosure, after the rendering the information to be displayed in the virtual space based on the virtual coordinate set and the display grid, a rendered image is obtained, the method further includes:
and 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.
In a second aspect of embodiments of the present disclosure, there is provided a rendering apparatus including:
a display grid determining module, configured to determine a display grid based on selected spline information and length information perpendicular to a spline direction, where the spline information includes spline length, spline curvature, spline vertex coordinates, and coordinate conversion relations between a virtual space coordinate system and a uv coordinate system;
the uv coordinate set acquisition module is used for acquiring a uv coordinate set of the information to be displayed under a uv coordinate system;
the virtual coordinate set determining module is used for determining a virtual coordinate set of the information to be displayed under the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relation;
and the rendering module is used for rendering the information to be displayed in the virtual space based on the virtual coordinate set and the display grid to obtain a rendered image.
In one embodiment of the disclosure, the display grid determination module is to generate a first spline in the virtual space coordinate system based on the spline vertex coordinates, the spline length, and the spline curvature, wherein the first spline is one edge of the display grid; the display grid determining module is further configured to translate a target length toward the direction perpendicular to the spline line with respect to the first spline line to obtain a second spline line, where the length information perpendicular to the spline line direction includes the target length, and the second spline line is an opposite side of the display grid to an edge corresponding to the first spline line; the display grid determination module is further to determine the display grid based on the first spline and the second spline.
In one embodiment of the present disclosure, the spline line information further includes a spline line direction, wherein the spline line direction is one of a first preset direction and a second preset direction;
the display grid determining module is used for responding to the spline direction as the first preset direction, translating the target length towards the first coordinate axis direction of the virtual space coordinate system to obtain the second spline; the display grid determining module is further configured to translate the target length toward a second coordinate axis direction of the virtual space coordinate system for the first spline in response to the spline direction being the second preset direction, to obtain the second spline.
In one embodiment of the present disclosure, the display grid determination module is to determine a plurality of triangle facets based on the first spline and the second spline; the display grid determination module is further configured to determine the display grid based on the plurality of triangular patches.
In one embodiment of the 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 used for determining the display position of the information to be displayed in the display screen based on the virtual coordinate set; the rendering module is further used for rendering the information to be displayed in the display position based on the rendering color of the information to be displayed.
In one embodiment of the disclosure, the virtual coordinate set determining module is configured to determine the virtual coordinate set based on the uv coordinate set, the coordinate conversion relationship, and first display adjustment information, where the first display adjustment information includes at least one of display position adjustment information and display scale adjustment information.
In one embodiment of the disclosure, the rendering module is further configured to adjust the rendered image based on second display adjustment information, wherein the second display adjustment information includes at least one of display position adjustment information, display scale adjustment information, and display color adjustment information.
A third aspect of the disclosed embodiments provides an electronic device, comprising:
a memory for storing a computer program;
a processor for executing a computer program stored in the memory, and when the computer program is executed, implementing the method according to the first aspect.
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 according to the first aspect.
After the spline set is provided for the user, the display grid can be generated according to the spline information selected by the user and the length information perpendicular to the spline direction, the virtual coordinate set of the information to be displayed under the virtual space coordinate system can be obtained by utilizing the coordinate conversion relation, the information to be displayed is rendered according to the virtual coordinate set and the display grid, and the rendering image meeting the personalized requirements of the user can be obtained.
The technical scheme of the present disclosure is described in further detail below through the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The disclosure may be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings in which:
FIG. 1 is a flow chart of a rendering method in one embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a display grid in a virtual space coordinate system in one example of the present disclosure;
FIG. 3 is a schematic diagram of rendering an image in one example of the present disclosure;
FIG. 4 is a block diagram of a structure rendered in one embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device in one embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
It will be appreciated by those of skill in the art that the terms "first," "second," etc. in embodiments of the present disclosure are used merely to distinguish between different steps, devices or modules, etc., and do not represent any particular technical meaning nor necessarily logical order between them.
It should also be understood that in embodiments of the present disclosure, "plurality" may refer to two or more, and "at least one" may refer to one, two or more.
It should also be appreciated that any component, data, or structure referred to in the presently disclosed embodiments may be generally understood as one or more without explicit limitation or the contrary in the context.
In addition, the term "and/or" in this disclosure is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the front and rear association objects are an or relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and that the same or similar features may be referred to each other, and for brevity, will not be described in detail.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
Embodiments of the present disclosure may be applicable to electronic devices such as terminal devices, computer systems, servers, etc., which may operate with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with the terminal device, computer system, server, or other electronic device include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, mainframe computer systems, and distributed cloud computing technology environments that include any of the foregoing, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks or implement particular abstract data types. The computer system/server may be implemented in a distributed cloud computing environment in which tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including memory storage devices.
Fig. 1 is a flow chart of a rendering method in one embodiment of the present disclosure. As shown in fig. 1, the rendering method includes the steps of:
s1: a display grid is determined based on the selected spline information and length information perpendicular to the spline direction.
The spline information comprises spline length, spline curvature, spline vertex coordinates and coordinate conversion relations between a virtual space coordinate system and a uv coordinate system.
The user may be presented with a plurality of spline lines in the virtual space for selection by the user, and the user may select spline lines meeting the user's personalized needs via spline line selection buttons present in the virtual space.
Fig. 2 is a schematic diagram of a display grid in a virtual space coordinate system in one example of the present disclosure. As shown in fig. 2, the user selects spline S1. The spline information of the spline S1 includes the coordinate length, curvature, coordinates of the vertex A1 and coordinates of the vertex An of the spline S1 in the virtual space, and coordinate conversion relation of the virtual space coordinate system and uv coordinate system. In this example, the length information perpendicular to the spline line direction is the pitch Depth between the spline lines S1 and S2.
Spline S2 may be obtained by translating Depth to spline S1 in a direction perpendicular to spline S, and then forming a display grid from spline S1 and spline S2. Wherein the vertices of the display mesh include A1, A2, an, and an+1.
The spline S2 may be selected, and spline S1 may be obtained by translating Depth in the direction perpendicular to spline S2.
S2: and acquiring a uv coordinate set of the information to be displayed under a uv coordinate system.
The information to be displayed may include an image to be displayed provided by a user, and a uv coordinate set of all pixels of the image to be displayed in a uv coordinate system is acquired at this time.
S3: and determining a virtual coordinate set of the information to be displayed under the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relation.
Any uv coordinate in the uv coordinate set is converted into a virtual coordinate under a virtual space coordinate system through a coordinate conversion relation.
And traversing all the uv coordinates in the uv coordinate set, and obtaining virtual coordinates corresponding to all the uv coordinates in the above way. And forming a virtual coordinate set of the information to be displayed under the virtual space coordinate system by virtual coordinates corresponding to all uv coordinates.
S4: and rendering the information to be displayed in the virtual space based on the virtual coordinate set and the display grid to obtain a rendered image.
The display grid is placed in a virtual space. An area of the display mesh in the virtual space is set as a rendering area. And determining a rendering coordinate set in the rendering area according to the virtual coordinate set, and rendering each coordinate point in the rendering coordinate set at the rendering position based on a given rendering color to obtain a rendering image.
FIG. 3 is a schematic diagram of rendering an image in one example of the present disclosure. As shown in fig. 3, the rendering area is An area composed of vertex A1, vertex A2, vertex An, and vertex an+1. Rendering the information to be displayed in the rendering area can obtain a rendering image with a curved surface display effect.
In this embodiment, after the spline set is provided for the user, a display grid can be generated according to the spline information selected by the user and the length information perpendicular to the spline direction, a virtual coordinate set of the information to be displayed in the virtual space coordinate system can be obtained by using the coordinate conversion relationship, and the information to be displayed is rendered according to the virtual coordinate set and the display grid, so that a rendered image meeting the personalized requirements of the user can be obtained.
In one embodiment of the present disclosure, step S1 may include:
s1-1: a first spline is generated in the virtual space coordinate system based on the spline vertex coordinates, the spline length, and the spline curvature. Wherein the first spline is an edge of the display grid.
Referring to fig. 2, the first spline may be one of spline S1 and spline S2.
S1-2: and translating the first spline to the target length in the direction perpendicular to the spline to obtain a second spline. The length information perpendicular to the spline line direction comprises the target length, and the second spline line is the opposite side of the display grid corresponding to the first spline line.
Referring to fig. 2, the target length may be the height of Depth. When the first spline is spline S1, the second spline is spline S2; when the first spline is spline S2, the second spline is spline S1.
S1-3: the display grid is determined based on the first spline and the second spline.
Referring to FIG. 2, the mesh may be composed of spline S1, spline S2, edges formed by vertices A1 and A2, and edges formed by vertices An and an+1.
In this embodiment, a first spline may be generated according to the spline vertex coordinates, the spline length and the spline curvature, a second spline may be obtained by translating the first spline, and vertices corresponding to the first spline and the second spline are connected to quickly generate a display network meeting the user requirement, so that a display screen meeting the user personalized requirement is generated based on the display network, and further, a display image obviously meeting the user personalized requirement is facilitated to be displayed on information to be displayed in the display screen.
In one embodiment of the present disclosure, the spline information further includes spline directions. The spline line direction is one of a first preset direction and a second preset direction. Accordingly, step S1-2 may include:
s1-2-1: and responding to the spline direction as the first preset direction, and translating the first spline to the first coordinate axis direction of the virtual space coordinate system by the target length to obtain the second spline.
Referring to fig. 2, spline directions of the spline S1 and the spline S2 are a first predetermined direction, such as a horizontal direction. The first coordinate axis direction may be a coordinate axis direction parallel to the Depth direction.
S1-2-2: and responding to the spline line direction as the second preset direction, and translating the first spline line to the second coordinate axis direction of the virtual space coordinate system by the target length to obtain the second spline line.
Referring to fig. 2, when the vertex A1 is taken as the rotation axis and the spline S1 is rotated 90 degrees in the vertical direction, the spline S1 is in a second predetermined direction, such as the vertical direction. The second axis direction is the axis direction in the horizontal left-right direction shown in fig. 2.
In this embodiment, the second spline line may be obtained by translating the first spline line in a corresponding direction according to different spline line directions, which is conducive to quickly determining the display grid, and further is conducive to generating a display screen meeting the personalized requirements of the user based on the display network, and further is conducive to performing obvious display images meeting the personalized requirements of the user on information to be displayed in the display screen.
In one embodiment of the present disclosure, step S1-3 may include:
s1-3-1: a plurality of triangular facets is determined based on the first spline and the second spline.
S1-3-2: the display grid is determined based on the plurality of triangular patches.
As shown in fig. 2, a point A1 and a point A3 may be selected in the spline S2, a point S2 may be selected in the spline S1, a triangular patch may be formed by the point A1, the point S2 and the point A3, then a point A2 and a point A4 may be selected in the spline S1, a triangular patch may be formed by the point A2, the point S3 and the point A4, and so on, and a triangular patch may be formed by alternately selecting one or two points in the spline S2 and the spline S1, and finally forming the display network.
In this embodiment, the points selected on the first spline and the second spline are staggered to form a plurality of triangular patches, so that a display grid meeting the personalized requirements of the user can be formed by the plurality of triangular patches, thereby being beneficial to generating a display screen meeting the personalized requirements of the user based on the display network, and further being beneficial to obviously obtaining a display image meeting the personalized requirements of the user for the information to be displayed in the display screen.
In one embodiment of the present disclosure, step S4 may include:
s4-1: based on the display grid, a display screen in the virtual space is determined.
According to the relative position relation among all points in the display network and the virtual space coordinates of at least one point in the virtual space, a virtual space coordinate set of all points in the display grid in the virtual space can be determined. A display screen in the virtual space is determined from the virtual space coordinates.
S4-2: and determining the display position of the information to be displayed in the display screen based on the virtual coordinate set.
Judging whether a coordinate point corresponding to each virtual space coordinate in the virtual coordinate set is positioned in the display screen or not according to the virtual space coordinates of the display screen, and if the coordinate point is positioned in the display screen, reserving the virtual space coordinates of the coordinate point; and deleting the virtual space coordinates of the coordinate point from the virtual coordinate set if the coordinate point is positioned outside the display screen.
And determining the display position of the information to be displayed in the display screen according to the virtual space coordinates of the display screen and the virtual space coordinates of the coordinate points finally reserved in the virtual coordinate set.
S4-3: and rendering the information to be displayed in the display position based on the rendering color of the information to be displayed.
And rendering the information to be displayed in the display position according to the rendering color required to be rendered for the information to be displayed.
In this embodiment, according to the virtual space coordinates of the display screen, whether the coordinate point corresponding to each virtual space coordinate in the virtual coordinate set is located in the display screen is determined, the coordinate point located outside the display screen is deleted, and only the coordinate point located in the display screen is subjected to color rendering, so that the accuracy of the display position of the screen can be improved.
In one embodiment of the present disclosure, step S3 may include: and determining the virtual coordinate set based on the uv coordinate set, the coordinate conversion relation and the first display adjustment information.
Wherein the first display adjustment information includes at least one of display position adjustment information and display scale adjustment information.
After the uv coordinate set and the coordinate conversion relation are obtained, the display position and the image length-width ratio of the information to be displayed in the display screen can be adjusted according to the user requirement, and the display effect of the personalized requirement of the user is further improved.
In one embodiment of the present disclosure, after step S4, it may further include:
s5: and adjusting the rendered image based on the second display adjustment information. Wherein the second display adjustment information includes at least one of display position adjustment information, display scale adjustment information, and display color adjustment information.
In this embodiment, when the user is not satisfied with the display effect of the rendered image, the display position of the rendered image in the display screen may be adjusted, the aspect ratio of the rendered image may also be adjusted, and the display color of the rendered image may also be adjusted, so as to further improve the display effect of the personalized requirement of the user.
Fig. 4 is a block diagram of a rendering apparatus in one embodiment of the present disclosure. As shown in fig. 4, the rendering apparatus includes:
a display grid determining module 100, configured to determine a display grid based on the selected spline information and length information perpendicular to the spline direction, where the spline information includes spline length, spline curvature, spline vertex coordinates, and coordinate conversion relations between the virtual space coordinate system and the texture map uv coordinate system;
the uv coordinate set acquisition module 200 is configured to acquire a uv coordinate set of information to be displayed in a uv coordinate system;
the virtual coordinate set determining module 300 is configured to determine a virtual coordinate set of information to be displayed in a virtual space coordinate system based on the uv coordinate set and the coordinate conversion relationship;
the rendering module 400 is configured to render information to be displayed in a virtual space based on the virtual coordinate set and the display grid, so as to obtain a rendered image.
In one embodiment of the present disclosure, the display grid determination module 100 is configured to generate a first spline in a virtual space coordinate system based on spline vertex coordinates, spline length, and spline curvature, wherein the first spline is one edge of the display grid; the display grid determining module 100 is further configured to translate the target length to the direction perpendicular to the spline line for the first spline line to obtain a second spline line, where the length information perpendicular to the spline line direction includes the target length, and the second spline line is an opposite side of the display grid to the side corresponding to the first spline line; the display grid determination module 100 is further configured to determine a display grid based on the first spline and the second spline.
In one embodiment of the present disclosure, the spline line information further includes a spline line direction, wherein the spline line direction is one of a first preset direction and a second preset direction; the display grid determining module 100 is configured to translate the target length toward the first coordinate axis direction of the virtual space coordinate system for the first spline line in response to the spline line direction being a first preset direction, to obtain a second spline line; the display grid determining module 100 is further configured to translate the target length toward the second coordinate axis of the virtual space coordinate system for the first spline in response to the spline direction being a second preset direction, to obtain a second spline.
In one embodiment of the present disclosure, the display mesh determination module 100 is configured to determine a plurality of triangle facets based on the first spline and the second spline; the display grid determination module is further configured to determine a display grid based on the plurality of triangular patches.
In one embodiment of the present disclosure, rendering module 400 is configured to determine a display screen in a virtual space based on a display grid; the rendering module 400 is further configured to determine a display position of the information to be displayed in the display screen based on the virtual coordinate set; the rendering module 400 is further configured to render the information to be displayed in the display position based on the rendering color of the information to be displayed.
In one embodiment of the present disclosure, the virtual coordinate set determining module 300 is configured to determine a virtual coordinate set based on a uv coordinate set, a coordinate conversion relationship, and first display adjustment information, where the first display adjustment information includes at least one of display position adjustment information and display scale adjustment information.
In one embodiment of the present disclosure, the rendering module 400 is further configured to adjust the rendered image based on second display adjustment information, where the second display adjustment information includes at least one of display position adjustment information, display scale adjustment information, and display color adjustment information.
It should be noted that, the specific implementation of the rendering device in the embodiment of the present disclosure is similar to the specific implementation of the rendering method in the embodiment of the present disclosure, and specific reference is made to the description of the rendering method section, so that redundancy is reduced and redundant description is omitted.
In addition, the embodiment of the disclosure also provides an electronic device, which comprises:
a memory for storing a computer program;
and a processor, configured to execute the computer program stored in the memory, and when the computer program is executed, implement the rendering method according to any one of the embodiments of the disclosure.
Fig. 5 is a schematic structural diagram of an application embodiment of the electronic device of the present disclosure. As shown in fig. 4, the electronic device includes one or more processors and memory.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform the desired functions.
The memory may include one or more computer program products that 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, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by a processor to implement the rendering methods and/or other desired functions of the various embodiments of the present disclosure described above.
In one example, the electronic device may further include: input devices and output devices, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
In addition, the input device may include, for example, a keyboard, a mouse, and the like.
The output device may output various information including the determined distance information, direction information, etc., to the outside. The output devices may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
Of course, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 5 for simplicity, components such as buses, input/output interfaces, etc. being omitted. In addition, the electronic device may include any other suitable components depending on the particular application.
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be computer program products comprising computer program instructions which, when executed by a processor, cause the processor to perform steps in a rendering method according to various embodiments of the present disclosure described in the above section of the specification.
The computer program product may write program code for performing the operations of embodiments of the present disclosure 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 may 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, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium, having stored thereon computer program instructions, which when executed by a processor, cause the processor to perform steps in a rendering method according to various embodiments of the present disclosure described in the above section of the present disclosure.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
The basic principles of the present disclosure have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present disclosure. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, since the disclosure is not necessarily limited to practice with the specific details described.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, so that the same or similar parts between the embodiments are mutually referred to. For system embodiments, the description is relatively simple as it essentially corresponds to method embodiments, and reference should be made to the description of method embodiments for relevant points.
The block diagrams of the devices, apparatuses, devices, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above-described sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the apparatus, devices and methods of the present disclosure, components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered equivalent to the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may 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.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the disclosure to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (10)

1. A rendering method, comprising:
determining a display grid based on the selected spline information and length information perpendicular to the spline direction, wherein the spline information comprises spline length, spline curvature, spline vertex coordinates and coordinate conversion relations between a virtual space coordinate system and a texture map uv coordinate system;
acquiring a uv coordinate set of information to be displayed under a uv coordinate system;
determining a virtual coordinate set of the information to be displayed under the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relation;
and rendering the information to be displayed in a virtual space based on the virtual coordinate set and the display grid to obtain a rendered image.
2. The method of claim 1, wherein determining a display grid based on the selected spline information and length information perpendicular to the spline direction comprises:
generating a first spline in the virtual space coordinate system based on the spline vertex coordinates, the spline length and the spline curvature, wherein the first spline is one edge of the display grid;
translating the first spline to a target length in the direction perpendicular to the spline to obtain a second spline, wherein the length information in the direction perpendicular to the spline comprises the target length, and the second spline is the opposite side of the display grid to the side corresponding to the first spline;
the display grid is determined based on the first spline and the second spline.
3. The method of claim 2, wherein the spline information further comprises a spline direction, wherein the spline direction is one of a first preset direction and a second preset direction;
the translating the target length to the direction perpendicular to the spline line to the first spline line to obtain a second spline line, including:
responding to the spline direction as the first preset direction, and translating the first spline to the first coordinate axis direction of the virtual space coordinate system by the target length to obtain the second spline;
and responding to the spline line direction as the second preset direction, and translating the first spline line to the second coordinate axis direction of the virtual space coordinate system by the target length to obtain the second spline line.
4. The method of claim 2, wherein the determining the display grid based on the first spline and the second spline comprises:
determining a plurality of triangular facets based on the first spline and the second spline;
the display grid is determined based on the plurality of triangular patches.
5. The method of any of claims 1-4, wherein the rendering the information to be displayed in 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 information to be displayed in the display screen based on the virtual coordinate set;
and rendering the information to be displayed in the display position based on the rendering color of the information to be displayed.
6. The method according to any one of claims 1-4, wherein the determining a virtual coordinate set of the information to be displayed in the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relation includes:
and determining the virtual coordinate set based on the uv coordinate set, the coordinate conversion relation and first display adjustment information, wherein the first display adjustment information comprises at least one of display position adjustment information and display proportion adjustment information.
7. The method of any of claims 1-4, further comprising, after said rendering the information to be displayed in virtual space based on the set of virtual coordinates and the display grid, obtaining a rendered image:
and 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.
8. A rendering apparatus, comprising:
a display grid determining module, configured to determine a display grid based on selected spline information and length information perpendicular to a spline direction, where the spline information includes spline length, spline curvature, spline vertex coordinates, and coordinate conversion relations between a virtual space coordinate system and a texture map uv coordinate system;
the uv coordinate set acquisition module is used for acquiring a uv coordinate set of the information to be displayed under a uv coordinate system;
the virtual coordinate set determining module is used for determining a virtual coordinate set of the information to be displayed under the virtual space coordinate system based on the uv coordinate set and the coordinate conversion relation;
and the rendering module is used for rendering the information to be displayed in the virtual space based on the virtual coordinate set and the display grid to obtain a rendered image.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing a computer program stored in said memory, and which, when executed, implements the method of any of the preceding claims 1-7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of the preceding claims 1-7.
CN202311617716.1A 2023-11-29 2023-11-29 Rendering method and device, electronic equipment and storage medium Pending CN117635792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311617716.1A CN117635792A (en) 2023-11-29 2023-11-29 Rendering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311617716.1A CN117635792A (en) 2023-11-29 2023-11-29 Rendering method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117635792A true CN117635792A (en) 2024-03-01

Family

ID=90031673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311617716.1A Pending CN117635792A (en) 2023-11-29 2023-11-29 Rendering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117635792A (en)

Similar Documents

Publication Publication Date Title
CN109771951B (en) Game map generation method, device, storage medium and electronic equipment
KR20120009564A (en) Apparatus and method for generating 3 dimentional mouse pointer
CN112771573A (en) Depth estimation method and device based on speckle images and face recognition system
CN114399597B (en) Method and device for constructing scene space model and storage medium
JPH07181951A (en) Picture display method and picture display as well as picture scaling method
CN111985036A (en) House type frame line drawing method and device, storage medium and electronic equipment
CN111681320B (en) Model display method and device in three-dimensional house model
CN111383355B (en) Three-dimensional point cloud completion method, device and computer readable storage medium
CN114827711B (en) Image information display method and device
CN110286906B (en) User interface display method and device, storage medium and mobile terminal
US10403040B2 (en) Vector graphics rendering techniques
CN113689508A (en) Point cloud marking method and device, storage medium and electronic equipment
CN115512046B (en) Panorama display method and device for points outside model, equipment and medium
CN111080792B (en) Model simplification processing method and device, electronic equipment and storage medium
CN113920282B (en) Image processing method and device, computer readable storage medium, and electronic device
US10754498B2 (en) Hybrid image rendering system
CN115063564B (en) Method, device and medium for displaying object label in two-dimensional display image
CN117635792A (en) Rendering method and device, electronic equipment and storage medium
CN114170381A (en) Three-dimensional path display method and device, readable storage medium and electronic equipment
CN113724332B (en) Method for determining relative pose of camera, electronic device and storage medium
CN115965519A (en) Model processing method, device, equipment and medium
WO2020192212A1 (en) Picture processing method, picture set processing method, computer device, and storage medium
CN111986300A (en) Rendering point determination method and device for house decoration, storage medium and electronic equipment
CN112465692A (en) Image processing method, device, equipment and storage medium
CN115761114B (en) Video generation method, device and computer readable storage medium

Legal Events

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