双轮廓 - 一个噪声函数的法向量 [英] Dual Contouring - Normal Vectors of a Noise Function

查看:232
本文介绍了双轮廓 - 一个噪声函数的法向量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发的利用双轮廓给地形更加有机/现实生活中的样子体素引擎。

I'm currently working on a voxel engine that utilizes dual contouring to give the terrain a more organic/real-life look.

如果你不熟悉的双轮廓,基本上我需要提供一个密度函数来表示一个特定的点是否是空气或固体(在我的情况,我利用3D单噪声),我需要能够以提供对3D降噪功能,任何一点的法向量。

If you're not familiar with dual contouring, basically I need to supply a density function to denote whether a specific point is air or solid (in my case, I'm utilizing 3D Simplex Noise) and I need to be able to provide the normal vector at any point on the 3D noise function.

一般情况下,计算法线一个三角形时,我采取两种构成三角形的向量的叉积;在这种情况下,我应该只是申请一个小三角洲噪声功能来达到同样的效果?

Normally, when calculating normals for a triangle, I take the cross product of two of the vectors that constitute the triangle; in this case, should I just apply a small delta to the noise function to achieve the same effect?

感谢您的帮助!

推荐答案

我发现一个的 采用梯度移动立方体算法(我工作的一个体素引擎太)简单的方法,但因为你仍然在三角形运行在一个三维网格,而不是直接与您能给试试看。

I've found a simple approach using gradient for marching cubes algorithm (I'm working on a voxel engine too), but since you're still operating on a 3D grid and not directly on the triangles you could give it a try.

这篇关于双轮廓 - 一个噪声函数的法向量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆