Rendering method and device

文档序号:1088281 发布日期:2020-10-20 浏览:25次 中文

阅读说明:本技术 渲染方法及装置 (Rendering method and device ) 是由 姜明余 于 2020-06-02 设计创作,主要内容包括:本申请实施例提供一种渲染方法方法及装置,涉及计算机应用技术领域。其中,收集视野内与目标物体产生交互的交互物体;从所述目标物体底部对所述交互物体进行拍摄,获得所述交互物体的深度纹理;利用所述目标物体的高度图对所述深度纹理进行裁剪,获得相对所述目标物体可变形区域的高度偏移纹理;利用所述高度偏移纹理,渲染获得所述交互物体与所述目标物体的交互效果画面。本申请实施例提供的技术方案解决了现有技术中得到的高度偏移纹理只支持平面上的目标物体渲染,而无法支持复杂表面上的目标物体渲染的问题。(The embodiment of the application provides a rendering method and device, and relates to the technical field of computer application. Collecting interactive objects which interact with the target object in the visual field; shooting the interactive object from the bottom of the target object to obtain the depth texture of the interactive object; cutting the depth texture by using the height map of the target object to obtain a height offset texture relative to the deformable region of the target object; and rendering to obtain an interactive effect picture of the interactive object and the target object by utilizing the height offset texture. The technical scheme provided by the embodiment of the application solves the problem that the height offset texture obtained in the prior art only supports the rendering of the target object on the plane but cannot support the rendering of the target object on the complex surface.)

1. A rendering method, comprising:

collecting interactive objects which interact with the target object in the visual field;

shooting the interactive object from the bottom of the target object to obtain the depth texture of the interactive object;

cutting the depth texture by using the height map of the target object to obtain a height offset texture relative to the deformable region of the target object;

and rendering to obtain an interactive effect picture of the interactive object and the target object by utilizing the height offset texture.

2. The method according to claim 1, wherein the rendering the interactive effect picture of the interactive object and the target object by using the height offset texture comprises:

performing height offset on the target object by using the height offset texture to obtain a deformed target object grid;

and rendering and obtaining an interactive effect picture of the interactive object and the target object based on the deformed target object grid.

3. The method of claim 1, wherein the clipping the depth texture using the height map of the target object to obtain a height offset texture with respect to the deformable region of the target object comprises:

and cutting the depth texture by using the thickness value of the deformable region of the target object and the minimum height value of the target object configured in the height map of the target object to obtain the height offset texture relative to the deformable region of the target object.

4. The method according to claim 2 or 3, wherein the rendering the interactive effect picture of the interactive object and the target object based on the deformed target object grid comprises:

calculating a tangent space normal of the deformed target object grid;

and rendering to obtain an interactive effect picture of the interactive object and the target object by utilizing the tangent space normal and the deformed target object grid.

5. The method according to claim 1 or 3, wherein the rendering the interactive effect picture of the interactive object and the target object by using the height offset texture comprises:

smoothing the height offset texture to obtain a smooth height offset texture;

and rendering and obtaining an interactive effect picture of the interactive object and the target object by utilizing the smooth height offset texture.

6. The method according to claim 1 or 3, wherein the rendering the interactive effect picture of the interactive object and the target object by using the height offset texture comprises:

extracting edge textures in the height offset textures;

increasing the height of the edge texture to obtain an enhanced height offset texture;

and rendering to obtain an interactive effect picture of the interactive object and the target object by utilizing the enhanced height offset texture.

7. The method according to claim 1, wherein the rendering the interactive effect picture of the interactive object and the target object by using the height offset texture comprises:

fusing the height offset texture with the accumulated height texture of the previous frame to obtain the accumulated height texture of the current frame;

and rendering to obtain an interactive effect picture of the interactive object and the target object by utilizing the accumulated height texture of the current frame.

8. The method of claim 7, wherein the fusing the height offset texture with the accumulated height texture of the previous frame to obtain the accumulated height texture of the current frame comprises:

and comparing the height offset texture with the accumulated height texture of the previous frame, and selecting a smaller value as the accumulated height texture of the current frame.

9. The method of claim 8, further comprising:

fusing the accumulated height texture of the current frame with a preset height value to obtain a recovered height value;

and rendering to obtain a deformation recovery picture of the target object by utilizing the recovery height value.

10. A rendering apparatus, characterized by comprising:

the collection module is used for collecting interactive objects which interact with the target object in the visual field;

the acquisition module is used for shooting the interactive object from the bottom of the target object to acquire the depth texture of the interactive object;

the cutting module is used for cutting the depth texture by utilizing the height map of the target object to obtain a height offset texture relative to the deformable region of the target object;

and the first rendering module is used for rendering and obtaining an interactive effect picture of the interactive object and the target object by utilizing the height offset texture.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于单目视觉的三角化测量深度的稠密点云重建方法及系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!