什么是速度更快的3D?培林或单纯的噪音? [英] What's faster for 3D? Perlin or Simplex noise?

查看:169
本文介绍了什么是速度更快的3D?培林或单纯的噪音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,也有很多的柏林和单纯噪声之间的比较可以在网络上找到。但我真的无法找到一个在那里有两个之间进行简单的处理时间比较了三个维度,这是我最感兴趣的是我读过的是流行的PDF (甚至理解大部分 - 耶!),但我不能回答这个简单的问题:哪一个是更快的3D,假设一个最优实现?

Okay, there are a lot of comparisons between Perlin and Simplex noise to be found on the web. But I really couldn't find one where there was a simple processing time comparison between both for three dimensions, which is what I am mostly interested in. I've read that popular PDF (and even understood most of it - yay!) but I cannot answer the simple question: Which one is faster for 3D, assuming an optimal implementation?

这<一href="http://stackoverflow.com/questions/6963388/fastest-perlin-like-3d-noise-algorithm">stackoverflow问题答案表明,单是pretty的明显的赢家我的情况。当然,也有声称完全相反的其他资源。

This stackoverflow question answer suggests that Simplex is a pretty clear winner for my case. Of course, there are other resources claiming the exact opposite.

不过,一般的说法似乎是Perlin杂拥有的O(2 ^ N)的复杂性,而单纯为O(N ^ 2)。这对于3D将意味着8培林和9单。 但是,一些网站,我发现了声明,单实际上是O(N)。那么,什么真正的在这里,这究竟意味着速度3D?

However, the general statement seems to be that Perlin noise has a complexity of O(2^N), while Simplex has O(N^2). Which for 3D would mean 8 for Perlin and 9 for Simplex. But, on some site I found the statement that Simplex is actually O(N). So what is true here, and what does that really mean for speed in 3D?

我很茫然在这里,我真的很感兴趣的主要是3D应用程序(随机地形生成包括洞穴)的使用,我不能找到一个很好的回答这个问题哪一个,我应该使用,如果我希望它是尽可能快

I am at a loss here, I'm really mainly interested in 3D application (for random terrain generation including caves) usage, and I cannot find a good answer to the question which one I should use if I want it to be as fast as possible.

因此​​,也许有人可以帮助我在这里:)

So maybe someone can help me here :)

推荐答案

1)<一href="http://www.fundza.com/c4serious/noise/perlin/perlin.html">http://www.fundza.com/c4serious/noise/perlin/perlin.html
2)<一href="http://www.6by9.net/b/2012/02/03/simplex-noise-for-c-and-python">http://www.6by9.net/b/2012/02/03/simplex-noise-for-c-and-python

执行时间在我的电脑为8M样品使用这两种实现噪声: (G ++ -O6)

Execution times in "my laptop" for 8M samples of noise using these two implementation: (g++ -O6)

1)1.389s,即570万OPS 2)每秒0.607s即13.2M OPS

1) 1.389s i.e. 5.7M ops per second 2) 0.607s i.e. 13.2M ops per second

但是......

当真的,真的要为优化,应该学习

When really, really going for the optimizations, one should study

  • 在更高级别的优化(真正在每个阶段完成:?是否有替代品)
  • 分支
  • 内存模式
  • 依赖
  • 的LUT
  • 在个人运算需要,他们的延迟和吞吐量
  • 在使用SIMD利用的排比
  • 在现场变量的数量

这篇关于什么是速度更快的3D?培林或单纯的噪音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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