CN110703963B - 3D character display method, medium, equipment and device - Google Patents

3D character display method, medium, equipment and device Download PDF

Info

Publication number
CN110703963B
CN110703963B CN201910846361.0A CN201910846361A CN110703963B CN 110703963 B CN110703963 B CN 110703963B CN 201910846361 A CN201910846361 A CN 201910846361A CN 110703963 B CN110703963 B CN 110703963B
Authority
CN
China
Prior art keywords
camera
sphere
distance
center
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910846361.0A
Other languages
Chinese (zh)
Other versions
CN110703963A (en
Inventor
曹达宏
王译锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoding Xiamen Technology Co Ltd
Original Assignee
Gaoding Xiamen Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gaoding Xiamen Technology Co Ltd filed Critical Gaoding Xiamen Technology Co Ltd
Priority to CN201910846361.0A priority Critical patent/CN110703963B/en
Publication of CN110703963A publication Critical patent/CN110703963A/en
Application granted granted Critical
Publication of CN110703963B publication Critical patent/CN110703963B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/30Image reproducers
    • H04N13/363Image reproducers using image projection screens
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3141Constructional details thereof

Abstract

The invention discloses a 3D character display method, medium, equipment and device, wherein the method comprises the following steps: acquiring an input instruction of a user so as to generate corresponding 3D character three-dimensional vertex data according to the input instruction; calculating the farthest distance between the vertex of the 3D character and the rotation center according to the three-dimensional vertex data of the 3D character; constructing a sphere with the rotation center as a sphere center and the farthest distance as a radius; calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent to the square conical visual space of the camera according to the radius of the sphere and the camera visual angle; setting the camera according to the distance between the center of sphere and the viewpoint of the camera, and projecting the 3D characters onto canvas through the set camera to display the 3D characters; can prevent that the 3D characters from being cut off when showing, guarantee the complete demonstration of 3D characters, improve user experience, and no matter how many characters, all can the maximize utilize canvas.

Description

3D character display method, medium, equipment and device
Technical Field
The invention relates to the technical field of 3D word processing, in particular to a 3D word display method, a computer readable storage medium, computer equipment and a 3D word display device.
Background
The 3D characters are a character display form which presents characters in a three-dimensional and more powerful mode, and have a prominent visual effect compared with common two-dimensional characters, so that the three-dimensional and more powerful character display form is accepted by more and more people.
In the related art, in the process of displaying the 3D text, when the number of the text input by the user is large, the generated 3D text part is often easily cut off, or the 3D text can be completely displayed during generation, and when the user performs a rotation operation on the 3D text, the part in the 3D text is cut off, so that the user experience is greatly influenced.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide a 3D text display method, which can prevent a 3D text from being cut off during a display process, ensure a complete display of the 3D text, improve user experience, and maximize the use of a canvas no matter how many texts are.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a computer device.
The fourth purpose of the invention is to provide a 3D character display device.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a 3D text display method, including the following steps: acquiring an input instruction of a user so as to generate corresponding 3D character three-dimensional vertex data according to the input instruction; calculating the farthest distance between the vertex of the 3D character and the rotation center according to the three-dimensional vertex data of the 3D character; constructing a sphere with the rotation center as a sphere center and the farthest distance as a radius; calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent to the square conical visual space of the camera according to the radius of the sphere and the camera visual angle; and setting the camera according to the distance between the center of sphere and the viewpoint of the camera, and projecting the 3D characters onto canvas through the set camera so as to display the 3D characters.
According to the 3D character display method provided by the embodiment of the invention, firstly, an input instruction of a user is obtained so as to generate 3D character three-dimensional vertex data corresponding to the input instruction, wherein the 3D character three-dimensional vertex data comprises coordinate values of all vertexes in a 3D character, so that the farthest distance between the vertexes of the 3D character and a rotation center can be calculated according to the 3D character three-dimensional vertex data; then, constructing a sphere with the rotation center as the sphere center and the farthest distance between the vertex of the 3D character and the rotation center as the radius, wherein the vertex of the 3D character cannot exceed the boundary of the sphere when the 3D character rotates randomly with the rotation center, and then calculating the distance between the sphere center and the viewpoint of the camera when the sphere is tangent to the square conical visual space of the camera according to the radius of the sphere and the visual angle of the camera, namely, the sphere is tangent to the square conical visual space of the camera, and the distance between the sphere center and the viewpoint of the camera is the minimum distance between the viewpoint of the camera and the sphere center which ensures that the 3D character is not cut off; then, set up the camera according to this distance to on projecting the canvas with the 3D characters through the camera after setting up, show the 3D characters, thereby realize preventing that the 3D characters from being cut at the in-process that shows, guarantee the complete demonstration of 3D characters, improve user experience, and, no matter how many characters, all can the maximize utilize the canvas.
In addition, the 3D text display method proposed according to the above embodiment of the present invention may further have the following additional technical features:
optionally, after calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent to the quadrangular pyramid-shaped visual space of the camera, the method further includes: calculating the size of the canvas according to the sphere radius and the camera view angle so as to control the size of the 3D text projection by adjusting the size of the canvas.
Optionally, the method further comprises: acquiring a rotation operation of a user, and acquiring a rotation angle of the viewpoint of the camera according to the rotation operation; and calculating the coordinates of the rotated camera viewpoint according to the rotation angle and the distance between the camera viewpoint and the rotation center so as to rotate the camera through the coordinates.
In order to achieve the above object, a second aspect of the present invention provides a computer-readable storage medium, on which a 3D text presentation program is stored, wherein the 3D text presentation program, when executed by a processor, implements the 3D text presentation method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the 3D character display program is stored through the memory, so that the processor can realize the 3D character display method when executing the 3D character display program, the 3D characters are prevented from being cut off in the display process, the complete display of the 3D characters is ensured, the user experience is improved, and the canvas can be maximally utilized no matter how many characters are.
In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the 3D text display method as described above.
According to the computer equipment provided by the embodiment of the invention, the computer program is stored through the memory, so that the 3D character display method is realized when the processor executes the computer program stored on the memory, the 3D characters are prevented from being cut off in the display process, the complete display of the 3D characters is ensured, the user experience is improved, and the canvas can be maximally utilized no matter how many characters are.
In order to achieve the above object, a fourth aspect of the present invention provides a 3D text display device, including: the acquisition module is used for acquiring an input instruction of a user; the generating module is used for generating corresponding 3D character three-dimensional vertex data according to the input instruction; the calculation module is used for calculating the farthest distance between the vertex of the 3D character and the rotation center according to the three-dimensional vertex data of the 3D character; the building module is used for building a sphere with the rotation center as a sphere center and the farthest distance as a radius; the calculation module is further used for calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent with the square conical visual space of the camera according to the radius of the sphere and the camera view angle; and the display module is used for setting the camera according to the distance between the center of sphere and the viewpoint of the camera, and projecting the 3D characters onto canvas through the set camera so as to display the 3D characters.
According to the 3D character display device provided by the embodiment of the invention, the input instruction of the user is obtained through the setting and obtaining module, so that after the input instruction of the user is obtained, the 3D character three-dimensional vertex data corresponding to the input instruction is generated through the generating module, wherein the 3D character three-dimensional vertex data comprises coordinate values of all vertexes of the 3D character, and further, the setting and calculating module calculates the farthest distance between the vertex of the 3D character and the rotation center according to the 3D character three-dimensional vertex data; setting a construction module to construct a sphere with the rotation center as a sphere center and the farthest distance as a radius; the calculation module is also used for calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent with the square conical visual space of the camera according to the radius of the sphere and the camera visual angle; finally, the setting and displaying module sets the camera according to the distance between the center of sphere and the viewpoint of the camera, and projects the 3D characters onto canvas through the set camera so as to display the 3D characters; thereby realize preventing that the 3D characters from being cut at the in-process that shows, guarantee the complete demonstration of 3D characters, improve user experience to, no matter how many characters, all can the maximize utilize the canvas.
In addition, the 3D text display device proposed according to the above embodiment of the present invention may further have the following additional technical features:
optionally, the calculation module is further configured to, after calculating the distance between the center of the sphere and the viewpoint of the camera when the sphere is tangent to the quadrangular pyramid viewing space of the camera, calculate the size of the canvas according to the radius of the sphere and the angle of view of the camera, so as to control the size of the 3D text projection by adjusting the size of the canvas.
Optionally, the obtaining module is further configured to obtain a rotation operation of a user, and obtain a rotation angle of the viewpoint of the camera according to the rotation operation; the calculation module is further configured to calculate coordinates of the rotated camera viewpoint according to the rotation angle and the distance between the camera viewpoint and the rotation center, so as to rotate the camera through the coordinates.
Drawings
FIG. 1 is a flow chart of a 3D text display method according to an embodiment of the invention;
FIG. 2 is a schematic diagram illustrating a tangent state of a sphere to a rectangular conical viewing space of a camera according to an embodiment of the present invention;
FIG. 3 is a schematic view of a camera rotation flow according to an embodiment of the present invention;
fig. 4 is a block diagram of a 3D text display device according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
According to the 3D character display method, firstly, an input instruction of a user is obtained so as to generate 3D character three-dimensional vertex data corresponding to the input instruction, wherein the 3D character three-dimensional vertex data comprises coordinate values of all vertexes in the 3D character, and therefore the farthest distance between the vertex of the 3D character and the rotation center can be calculated according to the 3D character three-dimensional vertex data; then, constructing a sphere with the rotation center as the sphere center and the farthest distance between the vertex of the 3D character and the rotation center as the radius, wherein the vertex of the 3D character cannot exceed the boundary of the sphere when the 3D character rotates randomly with the rotation center, and then calculating the distance between the sphere center and the viewpoint of the camera when the sphere is tangent to the square conical visual space of the camera according to the radius of the sphere and the visual angle of the camera, namely, the sphere is tangent to the square conical visual space of the camera, and the distance between the sphere center and the viewpoint of the camera is the minimum distance between the viewpoint of the camera and the sphere center which ensures that the 3D character is not cut off; then, set up the camera according to this distance to on projecting the canvas with the 3D characters through the camera after setting up, show the 3D characters, thereby realize preventing that the 3D characters from being cut at the in-process that shows, guarantee the complete demonstration of 3D characters, improve user experience, and, no matter how many characters, all can the maximize utilize the canvas.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a 3D text display method according to an embodiment of the invention, and as shown in fig. 1, the 3D text display method includes the following steps:
s101, acquiring an input instruction of a user so as to generate corresponding 3D character three-dimensional vertex data according to the input instruction.
That is to say, the input instruction of the user is obtained to obtain the parameter of the 3D text to be made, and then the three-dimensional vertex data of the 3D text corresponding to the input instruction can be generated according to the parameter of the 3D text, where the three-dimensional vertex data of the 3D text includes coordinate information of each vertex in the 3D text.
The input command may include various information, such as the text content of the 3D text to be created, the text font size of the 3D text to be created, and the font and color of the 3D text to be created.
And S102, calculating the farthest distance between the vertex of the 3D character and the rotation center according to the three-dimensional vertex data of the 3D character.
That is, after coordinate information of each vertex in the 3D text is acquired, the farthest distance between the vertex of the 3D text and the rotation center is calculated from the coordinate information of each vertex.
As an example, after the three-dimensional vertex data of the 3D character is obtained, first, an extreme value in coordinate values of each vertex in the 3D character is extracted, and the farthest distance between the vertex of the 3D character and the rotation center is calculated according to the extreme value and the coordinate value of the rotation center.
And S103, constructing a sphere with the rotation center as the sphere center and the farthest distance as the radius.
That is, after the farthest distance between each vertex of the 3D text and the rotation center is calculated, a sphere is constructed by using the rotation center as a sphere and using the farthest distance as a radius, so that when the 3D text rotates by any angle around the rotation center, any vertex in the 3D text does not exceed the range of the sphere.
S104, calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent with the square conical visual space of the camera according to the radius of the sphere and the camera visual angle; and the camera is set according to the distance between the center of sphere and the viewpoint of the camera, and the 3D characters are projected onto the canvas through the set camera so as to display the 3D characters.
That is, make the spheroid tangent with the square pyramid visual space of camera, at this moment, calculate the distance between camera viewpoint and the centre of sphere according to spheroid radius and camera visual angle, can know, this distance is the minimum distance that the camera can carry out complete show to the 3D characters according to current visual angle under the arbitrary rotation of 3D characters promptly, thereby, set up the camera according to this distance, and project the 3D characters to the canvas through the camera after setting up, can prevent that the 3D characters from being truncated and leading to incomplete demonstration at the in-process that shows, and no matter how many characters, all the maximize utilizes the canvas, can not lead to the waste of camera square pyramid visual space because the stadia sets up too big, and then extravagant computational resource.
As an example, as shown in fig. 2, when the rotation center is used as the origin, and the maximum distance between each vertex of the 3D character and the rotation center is determined as R, a sphere having the rotation center as the center and R as the radius is constructed, and the distance between the viewpoint and the rotation center at that time can be determined from the angle of view θ and the radius of the sphere
Figure BDA0002195371180000051
Thus, according to the distanceAfter the camera is arranged, the sphere can be ensured to be positioned in the square conical visible space of the camera, and no matter how the 3D characters rotate, the phenomenon that parts of the sphere are cut off can not occur.
In some embodiments, in order to improve the final display effect of the 3D text, the 3D text display method provided in the embodiments of the present invention further includes, after calculating a distance between a center of a sphere and a viewpoint of the camera when the sphere is tangent to a square conical visual space of the camera, the method further includes: the canvas is sized according to the sphere radius and the camera view angle so that the size of the 3D text projection is controlled by adjusting the size of the canvas.
It can be understood that when the canvas is set to be too large, the 3D text projection may be too large, which may lead to poor experience for the user, and when the canvas is set to be too small, the 3D text projection may be too small, which may lead to unclear display; therefore, the canvas size is calculated by the sphere radius and the camera view angle to control the size of the 3D text projection by adjusting the size of the canvas.
As an example, as shown in FIG. 2, when the distance between the viewpoint and the rotation center is D, the canvas is set to be square, and the side length of the canvas is
Figure BDA0002195371180000052
Thus, when the side length of the canvas is set to
Figure BDA0002195371180000053
In the process, the size of the 3D character projection is equivalent to that of the two-dimensional characters with the same character size, so that the final display effect of the 3D characters is better.
In some embodiments, as shown in fig. 3, the 3D text display method provided in the embodiments of the present invention further includes:
s201, acquiring the rotation operation of the user, and acquiring the rotation angle of the camera viewpoint according to the rotation operation.
That is, a rotation operation of the 3D text by the user is acquired, for example, the user continuously holds the mouse to drag the 3D text to acquire the rotation operation of the user, or a rotation angle input by the user is acquired to acquire the rotation operation of the user, and then a rotation angle of the viewpoint of the camera is acquired according to the rotation operation.
And S202, calculating coordinates of the rotated camera viewpoint according to the rotation angle and the distance between the camera viewpoint and the rotation center so as to rotate the camera through the coordinates.
That is, the coordinate value of the camera viewpoint after being rotated according to the rotation operation of the user is calculated according to the rotation angle of the camera viewpoint and the distance between the camera viewpoint and the rotation center, and the camera is rotated by the coordinate value, so that the rotated camera projects the 3D text to display the 3D text.
In summary, according to the 3D text display method of the embodiment of the present invention, first, an input instruction of a user is obtained, so as to generate 3D text three-dimensional vertex data corresponding to the input instruction, where the 3D text three-dimensional vertex data includes coordinate values of vertices in a 3D text, and thus, a farthest distance between a vertex of the 3D text and a rotation center can be calculated according to the 3D text three-dimensional vertex data; then, constructing a sphere with the rotation center as the sphere center and the farthest distance between the vertex of the 3D character and the rotation center as the radius, wherein the vertex of the 3D character cannot exceed the boundary of the sphere when the 3D character rotates randomly with the rotation center, and then calculating the distance between the sphere center and the viewpoint of the camera when the sphere is tangent to the square conical visual space of the camera according to the radius of the sphere and the visual angle of the camera, namely, the sphere is tangent to the square conical visual space of the camera, and the distance between the sphere center and the viewpoint of the camera is the minimum distance between the viewpoint of the camera and the sphere center which ensures that the 3D character is not cut off; then, set up the camera according to this distance to on projecting the canvas with the 3D characters through the camera after setting up, show the 3D characters, thereby realize preventing that the 3D characters from being cut at the in-process that shows, guarantee the complete demonstration of 3D characters, improve user experience, and, no matter how many characters, all can the maximize utilize the canvas.
In order to implement the foregoing embodiments, an embodiment of the present invention provides a computer-readable storage medium, on which a 3D text display program is stored, where the 3D text display program, when executed by a processor, implements the 3D text display method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the 3D character display program is stored through the memory, so that the processor can realize the 3D character display method when executing the 3D character display program, thereby preventing the 3D characters from being cut off in the display process, ensuring the complete display of the 3D characters and improving the user experience.
In order to implement the foregoing embodiments, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the 3D text display method is implemented.
According to the computer equipment provided by the embodiment of the invention, the computer program is stored through the memory, so that the processor realizes the 3D character display method when executing the computer program stored in the memory, the 3D characters are prevented from being truncated in the display process, the complete display of the 3D characters is ensured, and the user experience is improved.
In order to implement the foregoing embodiment, an embodiment of the present invention provides a 3D text display device, as shown in fig. 3, the 3D text display device includes: an acquisition module 10, a generation module 20, a calculation module 30, a construction module 40 and a presentation module 50.
The acquiring module 10 is used for acquiring an input instruction of a user;
the generating module 20 is configured to generate corresponding 3D text three-dimensional vertex data according to the input instruction;
the calculation module 30 is configured to calculate a maximum distance between a vertex of the 3D text and the rotation center according to the three-dimensional vertex data of the 3D text;
the building module 40 is used for building a sphere with the rotation center as the sphere center and the farthest distance as the radius;
the calculation module 30 is further configured to calculate a distance between the center of the sphere and the viewpoint of the camera when the sphere is tangent to the quadrangular pyramid-shaped visual space of the camera according to the radius of the sphere and the angle of view of the camera;
the display module 50 is configured to set the camera according to a distance between the center of sphere and a viewpoint of the camera, and project the 3D text onto the canvas through the set camera to display the 3D text.
In some embodiments, in order to make the 3D text presentation apparatus proposed in the embodiment of the present invention more suitable for users, the calculation module 30 is further configured to calculate the size of the canvas according to the radius of the sphere and the viewing angle of the camera after calculating the distance between the center of the sphere and the viewpoint of the camera when the sphere is tangent to the quadrangular pyramid-shaped viewing space of the camera, so as to control the size of the 3D text projection by adjusting the size of the canvas.
In some embodiments, in the 3D text display device provided in the embodiments of the present invention, the obtaining module 10 is further configured to obtain a rotation operation of a user, and obtain a rotation angle of a viewpoint of a camera according to the rotation operation;
the calculation module 30 is further configured to calculate coordinates of the rotated camera viewpoint according to the rotation angle and the distance between the camera viewpoint and the rotation center, so as to rotate the camera through the coordinates.
It should be noted that the above description about the 3D text display method in fig. 1 is also applicable to the 3D text display device, and is not repeated herein.
In summary, according to the 3D text display device in the embodiment of the present invention, the obtaining module is configured to obtain the input instruction of the user, so that after the input instruction of the user is obtained, the generating module generates the 3D text three-dimensional vertex data corresponding to the input instruction, where the 3D text three-dimensional vertex data includes coordinate values of vertices of the 3D text, and further, the calculating module is configured to calculate the farthest distance between the vertex of the 3D text and the rotation center according to the 3D text three-dimensional vertex data; setting a construction module to construct a sphere with the rotation center as a sphere center and the farthest distance as a radius; the calculation module is also used for calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent with the square conical visual space of the camera according to the radius of the sphere and the camera visual angle; finally, the setting and displaying module sets the camera according to the distance between the center of sphere and the viewpoint of the camera, and projects the 3D characters onto canvas through the set camera so as to display the 3D characters; thereby realize preventing that the 3D characters from being cut at the in-process that shows, guarantee the complete demonstration of 3D characters, improve user experience to, no matter how many characters, all can the maximize utilize the canvas.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (4)

1. A3D character display method is characterized by comprising the following steps:
acquiring an input instruction of a user so as to generate corresponding 3D character three-dimensional vertex data according to the input instruction;
calculating the farthest distance between the vertex of the 3D character and the rotation center according to the three-dimensional vertex data of the 3D character;
constructing a sphere with the rotation center as a sphere center and the farthest distance as a radius;
calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent to the square conical visual space of the camera according to the radius of the sphere and the camera visual angle; setting the camera according to the distance between the center of sphere and the viewpoint of the camera, and projecting the 3D characters onto canvas through the set camera to display the 3D characters;
after calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent to the quadrangular pyramid-shaped visual space of the camera, the method further comprises the following steps:
calculating the size of the canvas according to the sphere radius and the camera view angle so as to control the size of the 3D text projection by adjusting the size of the canvas;
further comprising:
acquiring a rotation operation of a user, and acquiring a rotation angle of the viewpoint of the camera according to the rotation operation;
and calculating the coordinates of the rotated camera viewpoint according to the rotation angle and the distance between the camera viewpoint and the rotation center so as to rotate the camera through the coordinates.
2. A computer-readable storage medium, on which a 3D text presentation program is stored, the 3D text presentation program, when executed by a processor, implementing the 3D text presentation method according to claim 1.
3. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the 3D text presentation method of claim 1.
4. A3D characters display device, comprising:
the acquisition module is used for acquiring an input instruction of a user;
the generating module is used for generating corresponding 3D character three-dimensional vertex data according to the input instruction;
the calculation module is used for calculating the farthest distance between the vertex of the 3D character and the rotation center according to the three-dimensional vertex data of the 3D character;
the building module is used for building a sphere with the rotation center as a sphere center and the farthest distance as a radius;
the calculation module is further used for calculating the distance between the sphere center and the camera viewpoint when the sphere is tangent with the square conical visual space of the camera according to the radius of the sphere and the camera view angle;
the display module is used for setting the camera according to the distance between the center of sphere and the viewpoint of the camera, and projecting the 3D characters onto canvas through the set camera so as to display the 3D characters;
the calculation module is further used for calculating the size of the canvas according to the radius of the sphere and the visual angle of the camera after calculating the distance between the sphere center and the visual point of the camera when the sphere is tangent to the square pyramid visual space of the camera, so that the size of the 3D text projection can be controlled by adjusting the size of the canvas;
the acquisition module is further used for acquiring the rotation operation of a user and acquiring the rotation angle of the viewpoint of the camera according to the rotation operation;
the calculation module is further configured to calculate coordinates of the rotated camera viewpoint according to the rotation angle and the distance between the camera viewpoint and the rotation center, so as to rotate the camera through the coordinates.
CN201910846361.0A 2019-09-09 2019-09-09 3D character display method, medium, equipment and device Active CN110703963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910846361.0A CN110703963B (en) 2019-09-09 2019-09-09 3D character display method, medium, equipment and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910846361.0A CN110703963B (en) 2019-09-09 2019-09-09 3D character display method, medium, equipment and device

Publications (2)

Publication Number Publication Date
CN110703963A CN110703963A (en) 2020-01-17
CN110703963B true CN110703963B (en) 2021-07-06

Family

ID=69195137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910846361.0A Active CN110703963B (en) 2019-09-09 2019-09-09 3D character display method, medium, equipment and device

Country Status (1)

Country Link
CN (1) CN110703963B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103562675A (en) * 2011-05-19 2014-02-05 赫克斯冈技术中心 Optical measurement method and measurement system for determining 3d coordinates on a measurement object surface
CN103646391A (en) * 2013-09-30 2014-03-19 浙江大学 Real-time camera tracking method for dynamically-changed scene
CN104349094A (en) * 2013-08-09 2015-02-11 联想(北京)有限公司 Projection method and equipment
CN104794758A (en) * 2015-04-17 2015-07-22 青岛海信医疗设备股份有限公司 Three-dimensional image cutting method
CN106454297A (en) * 2016-11-15 2017-02-22 深圳Tcl数字技术有限公司 Method and apparatus of debugging and installing projector
CN106997616A (en) * 2017-03-01 2017-08-01 天津大学 A kind of three-D imaging method and pyramid three-dimensional image forming apparatus
CN107180406A (en) * 2016-03-09 2017-09-19 腾讯科技(深圳)有限公司 Image processing method and equipment
CN107367895A (en) * 2017-08-22 2017-11-21 深圳市乐视环球科技有限公司 A kind of apparatus and method for automatically adjusting stereo projection apparatus position

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6382850B2 (en) * 2013-02-22 2018-08-29 フィンナクゴール・リミテッド Interactive entertainment device and system and method for interacting with water to provide an auditory, visual, olfactory, gustatory or tactile effect
DE102018130770A1 (en) * 2017-12-13 2019-06-13 Apple Inc. Stereoscopic rendering of virtual 3D objects
CN108665525B (en) * 2018-05-15 2022-04-01 福建天晴数码有限公司 Method for calculating virtual camera field angle based on engine and storage medium
CN110120014A (en) * 2019-04-04 2019-08-13 贝壳技术有限公司 The words identification method, apparatus and electronic equipment of object in three-dimensional objects displaying

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103562675A (en) * 2011-05-19 2014-02-05 赫克斯冈技术中心 Optical measurement method and measurement system for determining 3d coordinates on a measurement object surface
CN104349094A (en) * 2013-08-09 2015-02-11 联想(北京)有限公司 Projection method and equipment
CN103646391A (en) * 2013-09-30 2014-03-19 浙江大学 Real-time camera tracking method for dynamically-changed scene
CN104794758A (en) * 2015-04-17 2015-07-22 青岛海信医疗设备股份有限公司 Three-dimensional image cutting method
CN107180406A (en) * 2016-03-09 2017-09-19 腾讯科技(深圳)有限公司 Image processing method and equipment
CN106454297A (en) * 2016-11-15 2017-02-22 深圳Tcl数字技术有限公司 Method and apparatus of debugging and installing projector
CN106997616A (en) * 2017-03-01 2017-08-01 天津大学 A kind of three-D imaging method and pyramid three-dimensional image forming apparatus
CN107367895A (en) * 2017-08-22 2017-11-21 深圳市乐视环球科技有限公司 A kind of apparatus and method for automatically adjusting stereo projection apparatus position

Also Published As

Publication number Publication date
CN110703963A (en) 2020-01-17

Similar Documents

Publication Publication Date Title
CN108470379B (en) Three-dimensional image fusion method and device
US9135750B2 (en) Technique for filling holes in a three-dimensional model
US20170186219A1 (en) Method for 360-degree panoramic display, display module and mobile terminal
US20160117858A1 (en) Computing device and method for simplifying point cloud of object
KR20080090671A (en) Apparatus and method for mapping textures to object model
US9754398B1 (en) Animation curve reduction for mobile application user interface objects
CN103970518A (en) 3D rendering method and device for logic window
KR101591427B1 (en) Method for Adaptive LOD Rendering in 3-D Terrain Visualization System
CN110782534B (en) 3D character color gradient method, medium, equipment and device
CN111382618A (en) Illumination detection method, device, equipment and storage medium for face image
CN112365572B (en) Rendering method based on surface subdivision and related products thereof
CN110703963B (en) 3D character display method, medium, equipment and device
CN113282741A (en) Knowledge graph visualization method, device, equipment and computer readable medium
CN110751026B (en) Video processing method and related device
US11288774B2 (en) Image processing method and apparatus, storage medium, and electronic apparatus
JP2007108202A (en) Ground image display system
JPWO2015186284A1 (en) Image processing apparatus, image processing method, and program
CN108986228B (en) Method and device for displaying interface in virtual reality
KR20160143936A (en) Method for increasing 3D rendering performance and system thereof
CN114820980A (en) Three-dimensional reconstruction method and device, electronic equipment and readable storage medium
CN110766807B (en) 3D graph rotation method, medium, device and apparatus
CN114452646A (en) Virtual object perspective processing method and device and computer equipment
CN113936084B (en) Generation method of target elements in virtual sky and related equipment
US11941499B2 (en) Training using rendered images
CN117252974A (en) Mapping method and device for three-dimensional image, electronic equipment and storage medium

Legal Events

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