UE5.1_Niagara高級(jí)3.6_ Position Based Dynamics
3.6 Position Based Dynamics【基于位置的物理模擬】
This position based dynamics module finds and calculates interparticle collisions using a fully populated neighborgrid.
【此基于位置的物理模擬模組使用儲(chǔ)存了所有粒子索引數(shù)據(jù)的相鄰網(wǎng)格3D來(lái)找出并計(jì)算粒子間的碰撞】
The algorithm checks up to 27 neighboring grid cells to find particle collisions. Larger grid cells will capture more potential collisions but it requires that the max number of neighbors per cell be higher.
【算法檢查27個(gè)相鄰網(wǎng)格單元格(3x3x3)來(lái)找到粒子碰撞。更大的網(wǎng)格單元格會(huì)捕獲更多潛在碰撞,但這需要更高的單元格最大鄰居個(gè)數(shù)】
In addition to requiring neighbor grid this effect also requires that each particle contain several parameters:
【除了需要相鄰網(wǎng)格3D,此效果還需要每個(gè)粒子包含幾個(gè)參數(shù)】
Particles.CollisionRadius【粒子碰撞半徑】
Particles.Position【粒子位置】
Particles.Unyielding【粒子屈服】
Particles.Mass【粒子質(zhì)量】
Note that this emitter is in world space and that we're using the "World To Grid Unit" transformation matrix created by the "Initialize Neighbor Grid" module. This transforms the individual particle positions back to a 0-1 space that the PBD simulation can more easily process.
【注意此發(fā)射器是在世界空間的,和我們使用初始化相鄰網(wǎng)格模組創(chuàng)建的世界到網(wǎng)格單位變換矩陣。這將每個(gè)粒子位置轉(zhuǎn)換回0到1空間,使得PBD能更容易進(jìn)行】
Tip: Fewer collisions will go undetected, in larger simulations, when the number of simulation stage iterations increase. This, of course will increase the cost. Attempt to find the fewest grid cells needed, neighbors per cell and iteration stages to optimize your effect.
【提示:增加模擬階段的迭代次數(shù)能降低檢測(cè)不到碰撞的概率。這當(dāng)然會(huì)增加性能消耗。為了優(yōu)化效果請(qǐng)嘗試找到必需的最小的網(wǎng)格單元格,單元格最大鄰居個(gè)數(shù),和迭代次數(shù)】
Populate Neighbor Grid【輸入數(shù)據(jù)到相鄰網(wǎng)格】模組
注:與之前的保存粒子執(zhí)行索引到相鄰網(wǎng)格3D節(jié)點(diǎn)功能一樣,只是沒(méi)有AddedToGrid輸出
NeighborGrid【相鄰網(wǎng)格】:輸入相鄰網(wǎng)格3D變量
Position【位置】:輸入粒子位置
SimulationToGridUnitTransform【模擬到網(wǎng)格單位轉(zhuǎn)換】:輸入轉(zhuǎn)換矩陣
PBD Intra Particle Collision【基于位置的物理模擬實(shí)現(xiàn)內(nèi)部粒子碰撞】模組
注:PBD Particle Collision為舊名字
KineticFriction【動(dòng)摩察】
NeighborGrid【相鄰網(wǎng)格3D】
ParticleAttributeReader【粒子屬性讀取器】
RelaxationAmount【放松量】:數(shù)值越大,碰撞后修正距離和修正速度越小
Simulate【模擬】:是否啟用模組
SimulationToUnit【模擬到單位】:模擬空間到單位空間的變換矩陣
StaticFriction【靜摩擦】
CollisionRadius【碰撞半徑】
Mass【質(zhì)量】:輸入粒子質(zhì)量
Position【位置】:輸入粒子位置
Unyielding【不屈】:為T(mén)rue時(shí)碰撞后速度歸零,為False時(shí)碰撞后反彈速度
Unyielding Percentage【不屈百分比】:不屈不一致的粒子碰到時(shí)才有用
Velocity【速度】