当前位置:网站首页>FFT wave simulation
FFT wave simulation
2022-07-28 13:24:00 【Freak587】
The derivation of this formula 、FFT The principle implementation and the quotation of a picture on Zhihu come from this 【 Learning notes 】Unity be based on GPU FFT The realization of the ocean - Theory Chapter - You know (zhihu.com)
According to the study notes above ,FFT The implementation of has gone through three stages , Namely :
Generate spectrum --->IDFT( inverse discrete Fourier transform ), Get the offset map ---> normal 、 Foam texture , Rendering
The main process is as follows : so , The first thing is to generate a high spectrum .
The first stage of generating spectrum :
The formula for generating the height spectrum is as follows :

so , To get a high spectrum , We need not only Gaussian random numbers , It also needs to be phillips spectrum ( Directional spectrum ), In the formula k The arrow is the wavelength vector ,k Is the mode of the wavelength vector . Last , We can generate the corresponding x\z Displacement spectrum .
Two Gaussian random numbers are independent of each other and obey a mean of 0, The standard deviation is 1 The random number .
The following figure shows Gaussian random numbers and phillips The process of generating high frequency spectrum .

The following is based on the height spectrum FFT The whole process of wave simulation .
Use of the second stage IDFT:
utilize IDFT The process of generating an offset map from a spectrum diagram . among dx\dz\dy It's the offset graph ,displacement Is the offset texture synthesized by the offset map .

FFT The derivation of




According to the derivation, it is known that , We need butterfly operations , And sampling points ( Or wave number ) yes 2 Omega to an integer power . At the same time, it should be noted that , Butterfly operation will be input in sequence 、 Output in reverse order , Reverse input 、 Sequential output . So use Stockham Algorithm to achieve sequential input and output .
The third stage is the generation of foam and sea surface rendering :


边栏推荐
- Android engineers, how to use kotlin to provide productivity?
- 【C语言易错点】第4篇:结构体在内存中存储规则详讲
- Table list filter results remain unchanged
- Redis —— 基础篇
- Getderivedstatefromprops lifecycle
- Chapter 6 提升
- nport串口服务器配置网址(串口服务器是不是网口转串口)
- Margin calculation
- Complete set of SSM framework online bookstore
- 黑猫带你学UFS协议第2篇:UFS相关名词释义
猜你喜欢

Margin calculation

【嵌入式C基础】第5篇:原码/反码/补码

Automatic light sensing arm lamp touch chip-dlt8sa15b-jericho

JVM 内存管理 你知道多少

Black Scholes Merton European option pricing formula
![[embedded C foundation] Part 1: basic data types](/img/45/b0bc9e90b0582f0f2624ce27b5a76c.png)
[embedded C foundation] Part 1: basic data types

Low code: reduce technical capability requirements and improve software development efficiency

Analysis of Andriod low on memory printing principle

Aragon creates Dao polygon BSC test network

Comments are not allowed in JSON
随机推荐
With 433 remote control UV lamp touch chip-dlt8sa20a-jericho
[embedded C foundation] Part 8: explanation of C language array
SSH port forwarding (Tunneling Technology)
10、 Kubernetes scheduling principle
[error] after logging in to another machine using SSH, you find that the hostname is still yourself | unable to access yarn8088
Black Scholes Merton European option pricing formula
Storage model: big end and small end
Protobuf data exchange format
[matlab]: FFT related problems
功率放大器和匹配网络学习
Vditor 渲染器如何做到服务端渲染(SSR)?
【嵌入式C基础】第9篇:C语言指针的基本用法
Fast classification of array.group() in ES6
Interview must ask, focus! Tell me about the Android application startup process and its source code?
Original juice multifunctional Juicer touch chip-dlt8t02s-jericho
Resolve browser password echo
Redis - Basics
Using auto.js to realize the function of fifaol3 mobile terminal card interceptor
Have a part of the game, after NFT is disabled in my world
Margin calculation