2011/03/18

Building demolition建築物爆破流程


整理一下建築物爆破(Building demolition)的製作心得. 就像所有的視覺特效一樣, 想像很容易但實際製作上卻會遇到很多愈想不到的問題, 這邊把建模->拆UV->碎模型->碎裂的物理模擬->添加煙霧->算圖 這一整個流程的細節重點做簡單的說明.

首先是建模. 因為之後要做實體碎裂, 不是只有單純的算圖表現而已, 所以模型要很嚴格的要求1.不能有重疊面 2.所有相接的vertex要焊接起來 3.不可以有開口的面 這是最基本的要求. 如果模型做得太細緻的話之後在做切割的時候會有問題.

拆UV. 因為建築物本身是經過好幾的布林操作合併而成的, 所以每個原件再合併以前就要先拆好UV, 如果是合併後再拆的話會變得很麻煩. 因為Rayfire或是VolumeBreaker在切碎的時候, 會自動在截斷面給予新的material ID, 所以那部份的UV就不必擔心了.

材質, 因為建築本身會分好幾個區塊, 所以要分好Material ID. 材質會建議用程序性材質會比較好掌控. max 2012的Substance Texture會是不錯的選擇.


用Rayfire的Voronoi的切割算法, 結果如箭頭所示建築物內部(凹面)出現計算錯誤.

利用Cebas VolumeBreaker切割出來的效果. 可以用Pivot為中心做不同密度的切割效果. "幾乎"沒有計算錯誤. 但是如果你分割的碎片過細的話 還是有可能產生具有重疊面, 破面的模型. 所以要適度的調整參數.

如果像是雕像這種的凸面模型, 切割就容易得多了.

碎裂, 如果你是一簡單的Box要切碎的話, 其實很單純. 用Rayfire, SplitItUP, Voroni maxscript這些都可以做得很好. 但是如建築物模型這種有凹面(concave)的幾合體, 狀況就變得很複雜. 因為碎裂涉及到切割, 還有把切割截面補洞(Caphole). 這個動作往往會計算錯誤.

VolumeBreaker的參數非常不直覺. 建議參考上面的數值調整到適合您的大小.

物理模擬使用的是Rayfire的PhysX即時物理運算. 基本上是先讓所有的碎片inactivate (不計算物理), 等到移動的box碰觸到碎片的時候才讓碎片計算物理模擬, 因此會有由上往下的碎裂效果. 細節上會把一大片的碎片先做成group, Rayfire有功能可以讓group內的碎片先黏在一起, 再根據衝撞的強度來讓這些碎片再分離開. 參數設定如下:







碎裂的物理動態好了以後, 接下來就是要處理煙塵的部分了. 我們要用碎片當做煙霧產生的來源. 所以用Particle Flow的speed test, 在選取內的碎片當作Position Object, 如此只有當碎片達到某個速度的時候, 才會產生煙霧所要使用的粒子.


PF也可以用來產生更細小的碎片. 所以沒有必要把所有的碎片利用Rayfire來產生, 畢竟用物理算的東西需要很高的效能與精確性. 極小的碎片用PF反而更有效率.

以PF做為來源

以Cylinder做為來源

接下來, 進入到Phoenix的階段, 請參考之前的教學設定. 主要差別是場景中有兩個PHXSource, 一個是用PF當作來源, 另外一個是圓柱擺放在建築物底部, 做為建築物垮下地面揚起的煙塵的來源.

Displacement是增加細節的好方法

Truc的Sampler Type可以表現極高的細節, 效果很寫實

Phoenix FD製作細節表現的煙有兩種方式: 一種是用displacement來增加細節; 另外一種是把Sampler Type由spherical改為Truc, 同時把cell size調到很低. 後者可以做出極寫實的細節但是會耗費大量cache. 所以這裡我們用的是前者的方法.

增加了煙霧的倒塌效果也增加了寫實度.




以上是爆破的流程, 打好基礎後接下來就是要製作更細緻的效果了 ; )

[相關教學]

2011/03/17

Phoenix FD Tutorial: Large Scale Smoke


Tutorial results
Large scale smoke with Phoenix FD 03 (1920X1080 HD video)


Large scale smoke with Phoenix FD 04 (1920X1080 HD video)

This continue my previous two tutorial: explosion, nuke cloud. Please read those tutorials first if you are not familiar Phoenix FD.

Though this tutorial is for advanced user, it actually no much different than previous tutorials. We will show you some tips/tricks when creating large scale smoke with PhoenixFD.

First of all, upgrade your OS to 64-bit Windows 7 and get as much memory (RAM) as possible. Since large scale smoke means lot of cache generate during simulation. So if you want to create high detailed smoke like this, be sure to get a powerful machine, total 8GB system RAM at least.

Scene setup:
The main different than previous tutorial is, we have a 3dsmax std gravity force here, point to left to make our smoke moving from left to right. Otherwise, the smoke will moving upward.

For the PHXSource, we want to it emit smoke continuously, so set the discharge to 100, temp to 2000 and smoke to 10. Add the plane as source.

For the dynamic simulation part. Quality, Maximum step and cell size---those there parameters are the must important. Set cell size as lower as possible (if you have enough system memory), here I use 0.6 cell size, this will generate roughly 5GB of cache after total 300 frames simulation. The default Maximum step is 8 which is not enough to generate detail. I set it to 30.

Uncheck the std Gravity. This will force the simulation system to use other force in the scene (you should create a Gravity point to left in the scene, strength=1)

Sampler type the Truc, this will force it to render each voxel withous bluring it

Image above showing when not using enough Maximum step (=8) will generate bad resuls.

For the Colors and Transparency, change the color to dark gray. Set the Multiplier to 2 (enhance the light scattering effect)

For the target Direct Light, make shadow a VRayShadow. Multiplier to 5 and color to orange to mimic sun color/intensity. Check the Atmosphere Shadows.


Finally, for the rendering setup, set Vray as screenshots above. Do not set the Irradiance Map presets too high, since we set the Sampler to Truc which will render each voxels, too high sampling will render voxel over sharp.

For those who want to render the fire, in the PhoenixFD Render Parameters/Emission, make the source type to Temperature.

OK, that's it. Have fun with PhoenixFD and good luck ; )

[Related Topics]

2011/03/11

Chaos Group Phoenix FD 教學影片



教學影片結果:

PhoenixFD是流體模擬市場上的新產品, 不免有拿它跟FumeFX比較. 這邊以核爆蕈狀雲為例, 分享使用PhoenixFD的使用技巧. 希望增加大家對PhoenixFD的信心 ; )

場景設置
以Cylinder做為煙霧來源, 場景中放PHSource, Target Direct light用來模擬太陽光, PHSimulator做為模擬範圍.

因為要製作蕈狀雲, 所以必須要讓流體發射量突然大量增加, 然後慢慢減低. 所以我們把Discharge由300-->降到5. Temperature由2000調高為3000. Smoke煙霧量設定為5.0. 這邊分享一下製作心得, 持續的Discharge會提供模擬煙霧的細節, 所以不建議讓Discharge最後跑到0, 煙霧的部分也是, 如果太少的話, 該有的細節也會不見. 溫度的話也是, 高一點的溫度它會有自然的noise動態. 總之, 這個步驟對寫實的模擬效果很重要!

這邊是對模擬寫實度影響最大的地方了. Cell size就是Voxel的大小, 當然, cell size越小解析度就越高. 那是否越小效果越好呢? 其是不是, 如果cell size降低時它整個模擬效果也會改變, 這時候Maximal step數值也應該隨之調高. Gravity的部分會影響煙往上飄的速度, 如果希望煙緩緩上升, 那建議把Gravity由1降為0.8; Sample Type的部分後面會提. 這個地方就是整個模擬寫實度的關鍵, 沒有絕對的參數, 需要多次的嚐試才能得到最好的結果.

Color and Transparency這邊是控制煙霧的顏色, 透明度與散射. 把顏色由純白改為深灰色. Multiper改為2.0 如此光線曾才呈現通透過煙霧的感覺(Scattering).

打一盞Target Directional Light. 這邊重點在於要打逆光, 刻意讓光線穿透過厚重的煙霧. Multipler設為5 可以模擬出高動態範圍的光線效果. 顏色改為橘黃色模擬光線, 讓環境光(天光)的藍色與橘紅色做出對比色, 因此可以在算圖的時候達到最寫實個光線效果. 陰影類型使用VRayShadow, 記得要勾選Atmosphere Shdaow.

這邊也是另外一個關鍵參數. 一般使用PhoenixFD常常會抱怨它的算圖效果很糊或是不寫實. 其實在PHSimulator裡面, 預設的Sampler 類型是Spherical, 也就是說在算圖後它會套用一個模糊的濾淨, 所以最後結果會看起來糊糊的(如左圖); 如果你希望它直接把每個Voxel直接算出來而不要做模糊化處理, 可以選Truc的類型, 可以把該有的細節表現出來.

算圖的部分, 因為都是ChaosGroup公司同一家的產品, 所以我們採用Vray 2.0做為算圖引擎. 環境光由1改為0.5 這樣畫面的對比度會比較高. Gamma校正必須設定Gamma 2.2 等參數, 有些人不願意設定Gamma, 當然這是看個人喜好, 畢竟每個人的審美觀點不同,不過必須要強調如果你一開始就沒有把Gamma設定好, 事後用後製軟體再怎樣調整也無法調整出正確的效果, 尤其是色階表現會因為你沒有設定Gamma而品質降低.

勾選GI算圖. Irradiance Map我們用Very Low的預設值就夠了. 其它不必管它.

以下是實際的教學影片(片長約15分鐘, 有1080P的HD解析度可供播放)


靜態圖片




[相關教學]

2011/03/10

Phoenix FD Tutorial: nuke cloud


Tutorial results:

In this short video tutorial I will show you how to create a realistic mushroom-cloud with ChaosGroup PhoenixFD. Here are some of the important steps:

Scene setup:
One directinal light, PHSource, a cylinder and PHSimulator will be enough.

Key your Discharger from 300 to 5. (From frame 0 to 11). Higher Temp will make your cloud looks more noisy and chaos. Higher Smoke value bring more detail of cloud.

Here are must important parameters that contribute simulation results. Cell size means voxel size but lower the cell size doesn't guaranty a realistic results. Increase the Maximal step when you lower your cell size. Play around with your smoke/temperature amounts to get the best results.

Cloud should in dark gray color. More scatter multiplier makes cloud more transparent.
A directional light with higher Mutiplier value will make your rendering looks much contrast and dynamic. Here I use vaule of 5 and orange color (the color of sun). Don't forget to turn on Atmosphere Shadow.

Sampler Type is one of the key parameter to make your cloud looks sharper and realistic. (The default is set to Spherical)

Turn on your GI, a very low preset of Irradiance Map will be enough.

Make your Sky light half bright. Gamma to 2.2.

Tutorial link (running time is about 15mins):
PhoenixFD mushroom cloud (Youtube video)



Some random rendernings



[Related Topics]

Recent Comments