当前位置: 首页 > article >正文

Perlin Noise算法

ref

https://youtu.be/ZsEnnB2wrbI?si=ER9o5ccmvAKEzCen

Step Intro

 

噪声本质是随机性的表现


白噪声:像素点0-1之间随机赋值

 噪声的类型

 为了得到更平滑的噪声,有一种算法——Perlin noise:将随机的数字序列变为平滑连接的明暗板块

 步骤1 获得随机的数字序列,将地图分割为一系列方块

 步骤2 在网格每个顶点处放置一个随机数作为梯度向量值的参考

步骤3 计算网格内像素点得到的偏移向量和网格顶点对应的梯度向量的点积

步骤4 使用平滑函数将四个梯度得到的贴图叠加,得到柏林噪声的一个八度

步骤5 可以进一步细分网格,得到更高阶八度

步骤6 将各级八度混合,得到分形柏林噪声

Step Details 

1.generate a pseudo-random number generator(伪随机数生成器)

2.divide map up with a grid and each cell of the grid will be referred to as a chunk

 3.assign an influence vector to each corner of this grid

4.ensure one number will correspond to one angle

5.for games ,the direction can be easier for them to go in any direction they want

6.To solve the sharp jump along its borders, we can blend pairs of map in a particular sequence by horizontally then vertically

6.1 Lerping 

6.2 Smooth Stepping

PS 

3D perlin noise


http://www.kler.cn/a/472249.html

相关文章:

  • maven的pom.xml配置详解
  • 为什么ip属地一会河南一会江苏
  • Spring Boot项目中使用单一动态SQL方法可能带来的问题
  • 《Opencv》信用卡信息识别项目
  • 【NLP高频面题 - Transformer篇】Position encoding为什么选择相加而不是拼接呢?
  • 2. 模型和算法
  • thinkphp通过html生成pdf
  • C#设计模式(行为型模式):观察者模式
  • 国产编辑器EverEdit - 如何对汉字按笔划数排序?
  • 态势感知是自动化,势态知感是智能化
  • Excel表头/字段一致的表格拼接【python语言】
  • 【UE5 C++课程系列笔记】22——多线程基础——FRunnable和FRunnableThread
  • fmql裸跑编译过程记录
  • Allure 集成 pytest
  • 学习echarts折线图tooltip属性中formatter文字设置不同颜色的方法
  • 新型企业电站 源网荷储充一体化管理系统 EMS3.0具备哪些功能?
  • 太速科技-754-基于Agilex™ 7 FPGA F 系列的PCIe4.0X16 加速卡
  • 全新免押租赁系统打造便捷安全的租赁体验
  • Web3 游戏 2024:牛市下的缺席者?
  • 利用Spark实现WordCount(Scala语言)