UV mapping method based on rasterization rendering and cloud equipment

文档序号:1923238 发布日期:2021-12-03 浏览:10次 中文

阅读说明:本技术 一种基于光栅化渲染的uv映射方法及云端设备 (UV mapping method based on rasterization rendering and cloud equipment ) 是由 赵俊杰 陈健豪 于 2021-08-02 设计创作,主要内容包括:本申请属于计算机技术领域,特别是涉及一种基于光栅化渲染的UV映射方法及云端设备,方法包括:获取规则网格;依据所述规则网格的类型生成多个UV点,每个所述UV点包括UV信息和纹理信息;依据所述规则网格的类型,将每个所述UV点的UV信息映射为实际网格的位置信息;依据所述位置信息与该UV点的所述纹理信息对所述实际网格进行渲染。本申请的有益效果是:与传统的映射方法相比,本申请的方法不但可以减少UV映射方法的计算量,还有利于通过GPU加速运算该方法,充分利用计算机资源,达到实时对UV点进行修改和调整的效果;本申请还提供一种云端设备,以执行本申请的基于光栅化渲染的UV映射方法,以实现利用规则网格的纹理信息对实际网格进行渲染的效果。(The application belongs to the technical field of computers, and particularly relates to a UV mapping method and cloud equipment based on rasterization rendering, wherein the method comprises the following steps: acquiring a regular grid; generating a plurality of UV points according to the type of the regular grid, wherein each UV point comprises UV information and texture information; mapping the UV information of each UV point into position information of an actual grid according to the type of the regular grid; and rendering the actual grid according to the position information and the texture information of the UV point. The beneficial effect of this application is: compared with the traditional mapping method, the method can reduce the calculation amount of the UV mapping method, is favorable for accelerating the calculation through the GPU, fully utilizes computer resources and achieves the effect of modifying and adjusting the UV points in real time; the application also provides cloud equipment for executing the UV mapping method based on the rasterization rendering, so that the effect of rendering the actual grid by using the texture information of the regular grid is realized.)

1. A UV mapping method based on rasterization rendering is characterized by comprising the following steps:

acquiring a regular grid;

generating a plurality of UV points according to the type of the regular grid, wherein each UV point comprises UV information and texture information;

mapping the UV information of each UV point into position information of an actual grid according to the type of the regular grid;

and rendering the actual grid according to the position information and the texture information of the UV point.

2. The UV mapping method based on rasterization rendering of claim 1, comprising:

the type of the regular grid is a sphere, and the radius of the sphere is r;

the generating of the UV points according to the type of the regular grid specifically includes:

establishing a coordinate system with the sphere center of the sphere as an origin;

taking one point of the surface of the sphere as a first starting point, wherein the UV information of the first starting point is (u ', v'), and u 'and v' are scalars;

updating scalar u 'for a first preset number of times m, and generating a first UV point in each updating, wherein scalar u' of the first UV point generated in the ith 'updating'i’I' is more than or equal to 1 and less than or equal to m, and the calculation formula is as follows:

scalar of the first UV point generated by the ith 'update is v'i’,v′i’=v’;

Taking another point on the surface of the sphere as a second starting point, wherein the UV information of the second starting point is (u ', v'), and u 'and v' are scalar quantities;

updating the scalar v '' for a second preset number of times n, each time generating a second UV point, wherein the ith '' updates the scalar of the generated second UV pointI is more than or equal to 1 '' and less than or equal to n, and the calculation formula is as follows:

scalar quantity of the second UV point generated by the i '' th update is

The location information includes first location information and second location information, wherein,

the first position information is (x ', y', z '), and x', y ', and z' are scalars, and a formula of the first UV point mapped to the real grid is:

x’i’,=r cos 2πu′i’

y’i’=r sin 2πu′i’,cos 2πv′i’

z’i’=r sin 2πu′i’sin 2πv′i’

wherein, x'i’Mapping a first UV point generated for the i 'th update to a scalar x', y 'obtained for the real grid'i’Mapping a first UV point generated for the i 'th update to scalar y', z 'obtained for the real grid'i’Mapping a first UV point generated for the ith 'update to a scalar z' obtained by the actual grid;

the second location information is (x ", y", z "), x", y ", and z" are scalars, and the formula for mapping the second UV point to the real grid is:

wherein the content of the first and second substances,the second UV point generated for the ith "update maps to the scalar x" obtained for the real grid,a second UV point generated for the ith '' update is mapped to a scalar y '' obtained for the real grid,the second UV point generated for the i '' th update maps to the scalar z '' obtained for the real grid.

3. The UV mapping method based on rasterization rendering of claim 2,

the first preset number m meets the following condition:

wherein, theta is a first increment of each update of the scalar u';

the second preset number n meets the following condition:

where Φ is the second increment of each update of scalar v ".

4. The UV mapping method based on rasterization rendering of claim 1, comprising:

the type of the regular grid is a cylinder, the radius of the cylinder is r', and the height of the cylinder is h;

the generating of the UV points according to the type of the regular grid specifically includes:

establishing a coordinate system by taking the circle center of the bottom surface of the cylinder as an origin;

taking one point on the surface of the cylinder as a third starting point, wherein the UV information of the third starting point is (u ', v'), and u ', v' are scalars;

updating the scalar u 'for a third preset time l, and generating a third UV point for each updating, wherein the scalar of the third UV point generated by the ith' updatingThe calculation formula of (2) is as follows:

scalar quantity of the third UV point generated by the ith' update is

The position information is (x ', y', z '), and x', y ', and z' are scalars;

the formula for mapping the third UV point to the actual grid is:

wherein the content of the first and second substances,a third UV point generated for the i '"th update is mapped to the scalar x'" obtained for the real grid,the third UV point generated for the i "'th update is mapped to the scalar y'" obtained for the real grid,the third UV point generated for the i '' 'th update maps to the scalar z' '' obtained for the real grid.

5. The UV mapping method based on rasterization rendering of claim 4, wherein the third preset number of times 1 satisfies the following condition:

wherein θ' is a scalar quantityA third increment for each update.

6. The UV mapping method based on rasterization rendering of claim 1, comprising:

the type of the regular grid is a cube;

the generating of the UV points according to the type of the regular grid specifically includes:

establishing a coordinate system by taking the center of the actual grid as an origin, wherein the origin is also the center of the cube;

acquiring 8 vertexes of the cube to serve as fourth UV points, wherein UV information of the fourth UV points is respectivelyWherein p is 1, 2, 3 … … 8,andis a scalar;

the position information is (u "", v ""), and u "" and v "" are scalars;

dividing the smaller two scalars in the UV information by the scalars with the largest absolute values respectively to obtain a first result and a second result;

and mapping the first result and the second result to a [0, 1] interval, wherein the mapped first result is a scalar u ', and the mapped second result is a scalar v'.

7. The UV mapping method based on rasterization rendering of claim 6 wherein said actual grid is a sphere.

8. A cloud device, comprising:

an acquisition module for acquiring a regular grid;

the generation module is used for generating UV points containing UV information and texture information according to the type of the regular grid;

a mapping module for mapping the UV points to position information of an actual grid;

and the rendering module is used for rendering the actual grid according to the position information and the corresponding texture information.

Technical Field

The application belongs to the technical field of computers, and particularly relates to a UV mapping method based on rasterization rendering and cloud equipment.

Background

The traditional texture UV mapping operation is realized by means of ray tracing, based on the ideas of recursion and search, rays are shot to a surface point of an actual mesh, the vertex of the surface of an intermediate mesh is searched according to the information pointed by the point, and then UV information is generated.

Under the traditional texture UV operation, a user needs to edit UV information of model mesh vertexes in off-line software from 3D art, and then the UV information is delivered to a 3D art engineer, and if the UV information has problems, the UV information needs to be returned. From the process of making-acceptance-modification, considerable time and labor costs are required.

As the volume of 3D art becomes larger, more practitioners want to be able to modify and adjust the UV points in real time within the 3D editor or 3D presenter.

Disclosure of Invention

In order to solve the defects of the prior art to a certain extent, the application provides a UV mapping method based on rasterization rendering and cloud equipment.

The application provides a UV mapping method based on rasterization rendering, which comprises the following steps: acquiring a regular grid; generating a plurality of UV points according to the type of the regular grid, wherein each UV point comprises UV information and texture information; mapping the UV information of each UV point into position information of an actual grid according to the type of the regular grid; and rendering the actual grid according to the position information and the texture information of the UV point.

In the technical scheme, different UV points are generated according to the type of the grid, and the UV information of the UV points is mapped so as to realize the effect of rendering the actual grid by the texture information on the UV points.

In the above technical solution, the type of the regular grid is a sphere, and the radius of the sphere is r; the generating of the UV points according to the type of the regular grid specifically includes: establishing a coordinate system with the sphere center of the sphere as an origin; taking one point of the surface of the sphere as a first starting point, wherein the UV information of the first starting point is (u ', v'), and u 'and v' are scalars; updating the scalar u' for a first preset number of times m, and generating a first time for each updateA UV point, wherein the scalar u ' of the first UV point generated is updated the ith ' time 'i’I' is more than or equal to 1 and less than or equal to m, and the calculation formula is as follows:scalar of the first UV point generated by the ith 'update is v'i’,v′i’V'; taking another point on the surface of the sphere as a second starting point, wherein the UV information of the second starting point is (u ', v'), and u 'and v' are scalar quantities; updating the scalar v 'for a second preset number of times n, and generating a second UV point in each updating, wherein the scalar of the second UV point generated by the ith' updatingI is more than or equal to 1 and is less than or equal to n, and the calculation formula is as follows:scalar quantity of the second UV point generated by the ith' update isThe position information includes first position information and second position information, wherein the first position information is (x ', y', z '), x', y 'and z' are scalars, and a formula of the first UV point mapped to the real grid is: x'i’=r cos 2πu′i’;y’i’=r sin 2πu′i’cos 2πv′i’;z’i’=r sin 2πu′i’sin 2πv′i’(ii) a Wherein, x'i’Mapping a first UV point generated for the i 'th update to a scalar x', y 'obtained for the real grid'i’Mapping a first UV point generated for the i 'th update to scalar y', z 'obtained for the real grid'i’Mapping a first UV point generated for the ith 'update to a scalar z' obtained by the actual grid; the second location information is (x ", y", z "), x", y ", and z" are scalars, and the formula for mapping the second UV point to the real grid is: wherein the content of the first and second substances,a second UV point generated for the ith '' update is mapped to a scalar x '' obtained for the real grid,a second UV point generated for the ith '' update is mapped to a scalar y '' obtained for the real grid,the second UV point generated for the i '' th update maps to the scalar z '' obtained for the real grid.

In the technical scheme, the first UV point and the second UV point are generated on the regular grid of the sphere type, the two UV points are mapped by using the mapping formula, and the actual grid is rendered by depending on texture information on the UV points.

In the above technical solution, the first preset number m satisfies the following condition:wherein, theta is a first increment of each update of the scalar u'; the second preset number n meets the following condition:where Φ is the second increment of each update of scalar v ".

In the technical scheme, the increment and the preset times are in a certain relation, so that repeated UV points can be prevented from being generated, the calculated amount of the method in the mapping process is reduced, and the effect of modifying and adjusting the UV points in real time is achieved.

In the above technical solution, the type of the regular grid is a cylinder, the radius of the cylinder is r', and the height is h; the generating of the UV points according to the type of the regular grid specifically includes: establishing a coordinate system by taking the circle center of the bottom surface of the cylinder as an origin; taking one point on the surface of the cylinder as a third starting point, wherein the UV information of the third starting point is (u ', v'), and u ', v' are scalars; updating the scalar u 'for a third preset time l, and generating a third UV point for each updating, wherein the scalar of the third UV point generated by the ith' updatingThe calculation formula of (2) is as follows:scalar quantity of the third UV point generated by the ith' update isThe position information is (x ', y', z '), and x', y ', and z' are scalars; the formula for mapping the third UV point to the actual grid is: wherein the content of the first and second substances,a third UV point generated for the i '"th update is mapped to the scalar x'" obtained for the real grid,a third UV point generated for the ith update maps to scalar y' "obtained for the real grid,for the i' ″ updateThe generated third UV point is mapped to scalar z "' obtained for the real grid.

In the technical scheme, a third UV point is generated on a regular grid of a cylinder type, and the third UV point is mapped by using a mapping formula, so that the effect of rendering the actual grid by texture information carried on the third UV point is realized.

In the above technical solution, the third preset number of times 1 satisfies the following condition:wherein θ' is a scalar quantityA third increment for each update.

In the technical scheme, the third increment and the third preset times are in a certain relation, so that repeated UV points can be avoided from being generated, the calculated amount of the method in the mapping process is reduced, and the effect of modifying and adjusting the UV points in real time is achieved.

In the above technical solution, the type of the regular grid is a cube; the generating of the UV points according to the type of the regular grid specifically includes: establishing a coordinate system by taking the center of the actual grid as an origin, wherein the origin is also the center of the cube; acquiring 8 vertexes of the cube to serve as fourth UV points, wherein UV information of the fourth UV points is respectivelyWherein p is 1, 2, 3 … … 8,andis a scalar; the position information is (u "", v ""), and u "" and v "" are scalars; dividing the smaller two scalars in the UV information by the scalars with the largest absolute values respectively to obtain a first result and a second result; comparing the first result with the first resultThe second result is mapped to [0, 1]]And in the interval, the first result after mapping is scalar u ', and the second result after mapping is scalar v'.

In the technical scheme, 8 vertexes on the cube are used as the fourth UV point, and the method maps the fourth UV point so as to realize the effect of rendering the actual grid by the texture information carried on the fourth UV point.

In the above technical solution, the actual grid is a sphere.

This application on the other hand still provides a high in the clouds equipment, includes: an acquisition module for acquiring a regular grid; the generation module is used for generating UV points containing UV information and texture information according to the type of the regular grid; a mapping module for mapping the UV points to position information of an actual grid; and the rendering module is used for rendering the actual grid according to the position information and the corresponding texture information.

Through the cloud equipment, the UV mapping method based on the rasterization rendering can be executed, so that the effect of rendering the actual grid by using the texture information of the regular grid is realized.

The beneficial effect of this application is: the method comprises the steps that different UV points are generated according to the types of grids, and UV information of the UV points is mapped to achieve the effect of rendering the actual grids by texture information on the UV points; another aspect of the present application provides a cloud device, through which the UV mapping method based on rasterization rendering of the present application can be executed to achieve an effect of rendering an actual mesh using texture information of a regular mesh.

Drawings

FIG. 1 shows a flow diagram of a UV mapping method based on rasterization rendering according to one embodiment of the present application;

fig. 2 shows a schematic structural diagram of a cloud device according to an embodiment of the present application.

Detailed Description

In order that the above objects, features and advantages of the present application may be more clearly understood, a more particular description of the present application will be rendered by reference to the appended drawings and detailed description. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.

In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways than those specifically described herein, and thus the scope of the present application is not limited by the specific embodiments disclosed below.

Some embodiments of the present application are described below with reference to the accompanying drawings.

As shown in fig. 1, the present application provides a UV mapping method based on rasterization rendering, including: 101: acquiring a regular grid; 102: generating a plurality of UV points according to the type of the regular grid, wherein each UV point comprises UV information and texture information; 103: mapping the UV information of each UV point into position information of an actual grid according to the type of the regular grid; 104: and rendering the actual grid according to the position information and the texture information of the UV point.

In the method, rasterization describes a process of mapping UV information to position information of an actual grid, and because the UV information and the position information have a corresponding relation, UV points can be mapped to the actual grid through rasterization so as to render and color the actual grid by using texture information of the UV points.

The texture information may be color information of UV points on a regular grid.

Different UV points are generated according to the type of the grid, and the UV information of the UV points is mapped to achieve the effect that texture information on the UV points performs rendering on the actual grid.

Specifically, in mathematics, a mapping refers to the relationship of elements "corresponding" to each other between two sets of elements. Since the UV information of the regular grid and the position information of the actual grid have a corresponding relationship, the position information in the actual grid is obtained from the UV information by a mapping method to render the actual grid with the corresponding texture information. Modern GPUs are implemented based on the principle of rasterization rendering, and the UV mapping method is proposed on rasterization rendering, so that the operation can be accelerated directly by the GPU.

For the method, the number of UV points on the regular grid can be preset, and the remaining points can be converted into UV points by a triangular interpolation method for subsequent mapping processes.

Taking a sphere as an example, the rendering process of the method is introduced. The radius of the sphere is r, and a coordinate system with the sphere center of the sphere as an origin is established; taking one point on the surface of the sphere as a first starting point, wherein the UV information of the first starting point is (u ', v'), and u 'and v' are scalars; updating scalar u 'for a first preset number of times m, and generating a first UV point in each updating, wherein scalar u' of the first UV point generated in the ith 'updating'i’I' is more than or equal to 1 and less than or equal to m, and the calculation formula is as follows:scalar of the first UV point generated by the ith 'update is v'i’,v′i’V'; taking another point on the surface of the sphere as a second starting point, wherein the UV information of the second starting point is (u ', v'), and u 'and v' are scalars; updating the scalar v 'for a second preset number of times n, and generating a second UV point in each updating, wherein the scalar of the second UV point generated by the ith' updatingI is more than or equal to 1 and n is more than or equal to n, and the calculation formula is as follows:the ith' timeScalar quantity of newly generated second UV point is The position information includes first position information and second position information, wherein the first position information is (x ', y', z '), x', y 'and z' are scalars, and the formula for mapping the first UV point to the real grid is: x'i’=r cos 2πu′i’;y’i’=r sin 2πu′i’ cos 2πv′i’;z’i’=r sin2πu′i’ sin2πv′i’(ii) a Wherein, x'i’Mapping the first UV point generated for the ith' update to actual

Scalar x ', y ' obtained from grid 'i’Scalar y ', z' obtained by mapping the first UV point generated for the ith 'update to the actual grid'i’Mapping a first UV point generated for the ith 'update to a scalar z' obtained by the actual grid; the second location information is (x ", y", z "), x", y ", and z" are scalars, and the formula for the second UV point to map to the real grid is: wherein the content of the first and second substances,the second UV point generated for the ith "update is mapped to the scalar x" obtained for the real grid,the second UV point generated for the ith "update is mapped to the scalar y" obtained for the real grid,generating for the i '' th updateIs mapped to the scalar z "obtained for the actual grid.

In the above embodiment, the UV information of the first start point and the UV information of the second start point may be obtained in a manner that: establishing a polar coordinate system with the sphere center as an origin, wherein the polar coordinate of the first starting point is (r, u ', v'), u 'is azimuth information of the first starting point in the polar coordinate system, v' is elevation information of the first starting point in the polar coordinate system, and r is a known quantity and is omitted, so that UV information of the first starting point is obtained; the polar coordinates of the second starting point are (r, u ", v"), where u "is the azimuth information of the first starting point in the polar coordinate system, and v" is the elevation information of the first starting point in the polar coordinate system, and since r is a known quantity, it is omitted, thereby obtaining the UV information of the second starting point.

By setting the first preset times m, the generation number of the first UV points is controlled, the generation of the first UV points at the same position is avoided, and the calculation amount is reduced. Further, the first preset number m satisfies the following condition:where θ is the first increment of each update of scalar u'. The first preset times m meeting the conditions enable the generation number of the first UV points to be a reasonable value, and the calculation amount during the execution of the method is effectively reduced.

The second preset times n are set, so that the generation number of the second UV points is controlled, the generation of the second UV points at the same position is avoided, and the calculation amount is reduced. Further, the second preset number n satisfies the following condition:where Φ is the second increment of each update of scalar v ". The second preset number n meeting the above conditions makes the generation number of the second UV points a reasonable value, which can effectively reduce the amount of calculation in the execution of the method.

By the above generation and mapping of the first UV point and the second UV point, the UV information (u ', v ') of the first UV point on the regular grid can be mapped to the position information (x ', y ', z ') on the actual grid. Mapping the UV information (u ', v ') of the second UV point on the regular grid to the position information (x ', y ', z ') on the actual grid, thereby enabling rendering of the actual grid with the corresponding texture information. The number of the first UV point and the second UV point can be increased by a triangle interpolation method, so that the rendering effect is improved. The principle of triangular interpolation is as follows: and knowing the UV information of the three vertexes of the triangle, taking the gravity center coordinate component of the point to be interpolated as a weight, multiplying the three weights by the UV information of the three vertexes respectively, and finally adding the weights together to obtain the UV information of the new UV point.

The rendering process of the method is described by taking a cylinder as an example. The radius of the cylinder is r' and the height is h; establishing a coordinate system by taking the center of the circle of the bottom surface of the cylinder as an origin; taking one point on the surface of the cylinder as a third starting point, wherein the UV information of the third starting point is (u ', v'), and u ', v' are scalars; updating the scalar u 'for a third preset time l, and generating a third UV point for each updating, wherein the scalar of the third UV point generated by the ith' updatingThe calculation formula of (2) is as follows:scalar quantity of the third UV point generated by the ith' update isThe position information is (x ', y', z '), and x', y ', and z' are scalars; the formula for mapping the third UV point to the actual grid is: wherein the content of the first and second substances,the third UV point generated for the ith "update is mapped to the scalar x" obtained for the actual grid,the third UV point generated for the ith "update maps to the scalar y" obtained for the actual grid,the third UV point generated for the ith '"update maps to the scalar z'" obtained for the actual grid.

In the above embodiment, the UV information of the third starting point may be obtained by: and establishing a cylindrical coordinate system with the center of the bottom surface of the cylinder as an origin, wherein the coordinates of the first starting point are (r ', u', v '), u' is azimuth information of the first starting point in the coordinate system, v 'is height information of the first starting point in the coordinate system, and r' is a known quantity, so that the UV information of a third starting point is obtained.

By setting the third preset times l, the generation number of the third UV points is controlled, the generation of the third UV points at the same position is avoided, and the calculation amount is reduced. Further, the third preset number n satisfies the following condition:where Φ is the third increment of each update of scalar v ".

By the generation and mapping of the third UV point, the UV information (u ' ", v '") of the third UV point on the regular grid can be mapped to the position information (x ' ", y '", z ' ") on the actual grid, thereby rendering the actual grid using the corresponding texture information.

Taking a cube as an example, the execution flow of the method is described. Establishing a coordinate system by taking the center of the actual grid as an original point, wherein the original point is also the center of the cube; 8 vertexes of the cube are obtained as fourth UV points, and UV information of the fourth UV points is respectivelyWherein, i "" ═ 1, 2, 3 … … 8,andis a scalar; the position information is (u "", v ""), and u "" and v "" are scalars; dividing two smaller scalars in the UV information by the scalars with the largest absolute values respectively to obtain a first result and a second result; mapping the first result and the second result to [0, 1]]In the interval, the first result after mapping is scalar u "", and the second result after mapping is scalar v "".

Scalar quantityMay be asWherein the content of the first and second substances,is the i' fourth UV point, ki″″A first result corresponding to the ith "" fourth UV spot; scalar quantityMay be asWherein the content of the first and second substances,is the j' fourth UV point, ji″″Second result corresponding to the ith "" fourth UV spot.

As shown in fig. 2, another aspect of the present application provides a cloud device, including: an obtaining module 201, wherein the obtaining module 201 is configured to obtain a regular grid; the generating module 202, the generating module 202 is configured to generate UV points including UV information and texture information according to the type of the regular grid; the mapping module 203, the mapping module 203 is used for mapping the UV points to the position information of the actual grid; and the rendering module 204, wherein the rendering module 204 is configured to render the actual mesh according to the position information and the corresponding texture information.

The UV mapping method based on rasterization rendering can be executed through the cloud equipment, so that the effect of rendering an actual grid by using texture information of a regular grid is achieved.

Further, when the obtaining module 201 obtains the regular grid of the sphere, the generating module 202 may obtain the UV information (u ', v') of the first starting point and the UV information (u ", v") of the second starting point by using a point on the surface of the sphere as the first starting point, update the first starting point m times, generate one first UV point each time, and generate the first UV point through a formulaObtaining scalar u 'of first UV point'i’Taking scalar v ' of the first initial point as scalar v ' of the first UV point 'i’(ii) a Updating the second initial point n times, generating a second UV point for each update, and calculating the second UV point according to the formulaScalar quantity for obtaining second UV pointTaking the scalar u' of the second starting point as the scalar of the second UV point

After obtaining the UV information and the texture information of the UV point, the mapping module 203 passes through the formula x'i’=r cos 2πu′i’、y’i’=r sin 2πu′i’ cos 2πv′i’And z'i’=r sin 2πu′i’ sin 2πv′i’Converting the first UV point into corresponding position information (x ') in the real grid'i’,y’i’,z’i’)。x’i’Scalar x ', y' obtained by mapping the first UV point generated for the ith 'update to the real grid'i’Scalar y ', z' obtained by mapping the first UV point generated for the ith 'update to the actual grid'i’The first UV point generated for the ith 'update maps to the scalar z' obtained for the real grid.

The mapping module 203 passes the formula Andconverting the second UV point into corresponding position information in the real gridWherein the content of the first and second substances,the second UV point generated for the ith "update is mapped to the scalar x" obtained for the real grid,the second UV point generated for the ith "update is mapped to the scalar y" obtained for the real grid,the second UV point generated for the ith "update maps to the scalar z" obtained for the real grid.

Finally, the rendering module 204 colors the actual mesh with texture information on each UV point.

Accordingly, the generating module 202 may further generate more first UV points and second UV points on the regular grid according to the principle of triangular interpolation, so as to improve the coloring effect of the rendering module 204.

Rule net for acquiring sphere by acquisition module 201During the grid generation, the generation module 202 establishes a coordinate system with the center of the circle of the bottom surface of the cylinder as an origin; taking one point on the surface of the cylinder as a third starting point, wherein the UV information of the third starting point is (u ', v'), and u ', v' are scalars; updating the scalar u 'for a third preset time l, and generating a third UV point for each updating, wherein the scalar of the third UV point generated by the ith' updatingThe calculation formula of (2) is as follows:scalar quantity of the third UV point generated by the ith' update isThe mapping module 203 passes the formulaMapping UV information on a third UV point to position information of an actual gridWherein the content of the first and second substances,the third UV point generated for the ith "update is mapped to the scalar x" obtained for the actual grid,the third UV point generated for the ith "update maps to the scalar y" obtained for the actual grid,the third UV point generated for the ith '"update maps to the scalar z'" obtained for the actual grid.

When the obtaining module 201 obtains the regular grid of the cube, the generating module 202 establishes a coordinate system with the center of the actual grid as an origin, and the origin is also the center of the cube; obtaining cubeThe 8 vertexes of the body are used as fourth UV points, and the UV information of the fourth UV points is respectivelyWherein p is 1, 2, 3 … … 8,andis a scalar; the position information is (u "", v ""), and u "" and v "" are scalars; dividing two smaller scalars in the UV information by the scalars with the largest absolute values respectively to obtain a first result and a second result; the mapping module 203 maps the first result and the second result to [0, 1]]In the interval, the first result after mapping is scalar u "", and the second result after mapping is scalar v "".

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems and units may refer to the corresponding processes in the foregoing application embodiments, and are not described herein again.

Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present disclosure, and the present disclosure should be construed as being covered by the claims and the specification.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种3D图纸生成系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!