Smulaton and Anmaton Clouds Vsual smulaton of clouds - Cloud smulaton and renderng Stochastc fractals Book by Ebert et al. Texturng and Modelng Dobash et al. A Smple, Effcent Method for Realstc Anmaton of Clouds SIGGRAPH 00 www.vterran.org/atmosphere Atmosphere/Clouds/ Impostors Harrs, Lastra Real-Tme Cloud Renderng Eurographcs 0 Cloud smulaton - Two man approaches to cloud modelng - Physcs based technques - Smulaton of meterologcal processes - Number of dependent processes - Physcal characterstcs of gaseous/flud meda - Computatonally expensve - Ontogenetc approaches - Capture the vsual appearance (vsual smulaton) - Not necessarly physcally correct - Computatonally nexpensve - Smlar to both approaches: - Cloud s modeled as a densty functon ρ(x,y,z) n 3D - Quanttatvely defnes the amount of cloud matter Cloud smulaton - Physcs based smulaton - Cloud physcs - Atmospherc composton - Stablty - Thermodynamcs - Flud dynamcs - Wde range of scales - Global and local phenomenon - Cloud elements: ndvdual droplets from 0-00 00 mcrometers - Small scale processes nfluence larger scales Classfcaton of clouds - Accordng to vsual appearance - Internatonal classfcaton system (Howard 803) - Cumulus low level clouds wth vertcal development - Stratus low level clouds n flat appearng layers - Crrus hgh clouds, fbrous or har-lke structure - Nmbus ran clouds Cumulus Stratus Crrus Nmbostratus Cloud formaton - Sun radates earth and heats bottom ar layer - Dependng on surface structure mosture s generated - Mosture s a mxture of dry ar and water vapor - It s lghter than dry ar due to molecular mass of H 2 O - Lghter ar rses and surroundng ar follows - Rsng s due to the ar densty gradent - Ar densty s nversely proportonal to temperature - Eventually temperature drops below dew pont - Water vapor starts condensng and froms droplets - Droplets may grow untl they fall out as ran "Wnds of Change" educatonal CD-ROM, Copyrght Caltech and NASA/Jet Propulson Laboratory
Physcal phenomena and processes - Buoyancy - Warmer ar parcels move upwards due to temperature gradent - Dynamc turbulence - Due to frcton and when ar s flowng over uneven ground - Convecton - Ar s heated and rses upwards - Inverson - Hot ar layer prohbts buoyancy - Raylegh-Taylor nstablty - When a dense layer s on top of a lght layer bulbs appear at the boundary - Bulbs become atomc mushrooms and fnally rsng bubbles Physcal phenomena and processes Raylegh-Taylor nstablty Physcal phenomena and processes - Bubbles - Have upward velocty, expand and cool down due to mxture - Bubble chans - Multple rsng bubbles collde and merge nto chans - Temperature dew pont - After dew pont s reached water vapor starts condensng - Ths makes the bubble vsble - Latent hear s released and drves cumulus formaton Physcal phenomena and processes - Temperature decrease of bubbles - Untl dew pont 0 degrees per klometer - Then 6 degrees per klometer - Ar decreases by 6.4 degrees per klometer - Turrets - Bubbles are generated at cloud boundares - Move towards half-way between cloud normal and vertcal - Kelvn-Helmholtz nstablty - On boundares between flud wth dfferent drectons waves are generated - They turn nto vortces - Vortces - Break down nto smaller vortces - Dsspate energy by heat Physcal phenomena and processes - Needs equatons to mathematcally descrbe phenomena - State equatons - Thermodynamcs - Flud dynamcs - Molecular dynamcs - Physcal characterstcs of gases and fluds - Macroscopc and mcroscopc scale - Ontogenetc approaches - Musgrave: ontogenetc modelng s the modelng based on vsble morphologcal characters - Tres to generate models that vsually match the vewers expectaton - Technques nclude (but are not lmted to) - Ellpsodal representatons - Stochastc fractals - - Numercally complex and almost mpossble - Only coarse scale smulaton - Many phenomena not entrely understood 2
- Fractal nose based approaches: - Usually, cloud macrostucture s defned by unons of ellpsod-shaped shaped objects - Specfed by means of quadratc surfaces - Objects mght be hollow (Gardner`85) - Translucency s modulated by fractal nose - Objects mght be sold (Max 95, Ebert-Book Book) - Objects defned on a 3D grd - Stochastc 3D fractal wthn the object - Densty blendng functon to fade out the structures - Modelng the cloud densty functon - Defne macrostructure as unon of user-defned ellpsods - Defne cloud densty functon wthn ellpsods as follows: - ρ (p) ) = V H (p+c ) f V (p+c H ) > t - ρ (p) ) = 0 otherwse - p: p = at ellpsod boundary,, p =0 at ellpsod center c - t = t p n b, controls densty fall-off at boundary - For overlappng ellpsods - ρ(p) = ρ (p) - Tme varyng turbulence - Summaton of scaled and dlated nose functons k = n kμ kμ x y kμ z kμt VH ( x, y) S( r x, r y, r z, r t) kh r k = k0 - S: nose functon - N(0,) dstrbuted random numbers gven on nteger lattce - Band-lmted lmted, smooth, contnuous - Based on Frozen-Turbulence Hypothess : - Turbulence has same characterstcs n space and tme - Tme can be nterpreted as an addtonal dmenson - Implementaton - Assume regular grd - Compute stochastc fractal values at each grd pont - Eventually consder ansotropc structures - Realzed by dfferent fractal parameters n each dmenson - Interpret fractal values as densty/absorpton value - Render the volumetrc data set takng nto account physcal propertes - Absorpton - Scatterng - Color shfts - Examples from www.wzardnet.com/musgrave musgrave - What s a cellular automaton? - Dscrete dynamcal systems - Invented 940 s by John von Neuman and Stanslaw Ulam - Structure that conssts of connected cells - Cells have partcular current state out of fnte set of states - New states (state transtons) are determned n each tme step - Transton rules usually depend on current state and state of neghorng cells 3
- Well-known example: Conveys game of lfe - Cells are dead or alve - Cells survve or they are reborn dependng on current state and number of dead/alve alve neghbors For alve cells: - Each cell wth one or no neghbors des, as f by lonelness - Each cell wth four or more neghbors des, as f by overpopulaton - Each cell wth two or three neghbors survves For dead cells: - Each cell wth three lvng neghbors becomes populated - much more flexble than Conveys game of lve - More states and more complex transton rules can be specfed - Example: physcs based smulaton - Smulaton of thermo/flud dynamcs by means of cellular automata - Dscrete approxmatons to molecular dynamc - Restrcted to certan knds of physcal phenomena - Computatonally expensve due to complex transton rules - Cloud smulaton - On a dscrete lattce - Voxels represent cells - Intalzaton phase - cld s set to zero - hum and act are determned randomly - 3 boolean varables are assgned to each cell - cld cloud s exstng or not - hum enough vapor for cloud formaton - act phase transton to occur - Smulaton phase - Local transton rules are appled to update current state - Cloud formaton - Cloud advecton - Advecton by wnd - Transton rules - cloud formaton f act act(, j, k, hum(, j, k, t cld(, j, k, act(, j+ 2, k) t ) = act(, ) = hum(, t ) = cld(, act(, j-,k) act(, j, k -) j, k, j, k, j, k, t act( 2, j, k) act(, j 2, k) t ) hum(, t ) ) j, k, t act(, j, k, t ) act(, j, k, t (, j, k) = act( +, j, k) act(, j+, k) act(, j, k + ) act( -, j, k) act(, j, k 2) act( + 2, j, k) ) ) f act (, j, k) Ordered executon - Transton rules - cloud extncton and re- formaton cld(, j, k, t act(, j,k, ) = cld(, j,k, t ) IS(rnd > p (, j,k, t )) t ) = act(, j,k, t ) IS(rnd < p hum(, j,k, t ) = hum(, j, k, t ) IS(rnd < p (, j, k, (, j, k, t - IS(): returns true or false based on user specfed local probabltes ext act hum t )) )) 4
- Transton rules advecton by wnd act(, j, k, t hum(, j, k, t cld(, j, k, t act( - v(zk ), j, k, t ), - v(zk ) > 0 ) = 0, sonst hum( - v(zk ), j, k, t), - v(zk ) > 0 ) = 0, sonst cld( - v(zk ), j, k, t ), - v(zk ) > 0 ) = 0, sonst - Controllng cloud dynamcs - Anmator models ellpsods wth specfc probabltes and shape - p ext, p hum, p act - Towards the center: hgher p hum, p act but lower p ext - Ellpsods represent parcels of rsng ar - Become clouds after reachng the dew pont? - Move wth the wnd - v(z k ): functon of z-coordnate of each cell - returns nteger value - Post-Processng Processng of bnary results - Flterng to generate smooth densty dstrbuton q(, j,k,t) = (2 + )(2j + )(2k + )(2t + ) ' 0 = 0 j0 ' j = j0 ' k k0 = k0 ' t t0 0 = t0 0 0 ' ' ' ' ' ' ' ' w(, j,k,t ) cld(, j+ j,k + k,t + t ) 0 Dobash et al. A Smple, Effcent Method for Realstc Anmaton of Clouds SIGGRAPH 00 - w: arbtrary weghtng functon Move: Dobash et al. A A Smple, Effcent Method for Realstc Anmaton of Clouds, SIGGRAPH 00 Volume renderng - Drect volume renderng - Drectly get a 3D representaton of volumetrc data - The data s consdered to represent a sem-transparent (lght-emttng) medum - Approaches are based on the laws of physcs - Emsson, absorpton, scatterng - Interor structures can be seen 5
Volume renderng - Physcs based volume renderng - Interacton of lght wth matter - Descrbes the changes of specfc ntensty due to absorpton, emsson and scatterng - Expressed by equaton of transfer - Gven all materal propertes, the radaton can be computed from ths equaton Volume renderng - Drect volume renderng - Backward Ray-Castng (reverse drecton of photons) - Image space, mage order algorthms - Performed pxel by pxel Surface Scatterng Volume Scatterng Volume renderng - Map scalar values to optcal propertes (color, opacty) - Need optcal model - Solve volume renderng ntegral for vewng rays nto the volume Integraton What must be ntegrated? physcally correct: emsson and absorpton of lght I(s 0 ) s 0 Intal ntensty (Emsson) at s 0 Absorpton along the dstance s 0 -s s Optcal Depth τ Absorpton к Ray Integraton Optcal models What must be ntegrated? physcally correct: emsson and absorpton of lght I(s 0 ) s 0 ~ q(s) ~ s s Ray Emsson actve scatterng Actve Emsson at s ~ Absorpton along ~ the dstance s - s Absorpton actve scatterng 6
Optcal models Lght nteracton wth densty volume of partcles - Absorpton only - Emsson only - Absorpton + emsson - Scatterng + shadng/shadowng - Multple scatterng Optcal models - The absorpton term σ = σ a + σ s true absorpton + outscatterng α = σ s / (σ a + σ s ) : albedo Optcal models - The phase functon p(r;ω ω ω) - The probablty that a ray comng from ω that s scattered, s scattered away nto the drecton ω - The probablty that a scattered ray s scattered away n any drecton equals - The n-scatterng term - Collectng all ncomng radance over a sphere around r - Multplyng t wth σ s,.e. takng only the scattered part - Multplyng t wth the phase functon p, whch gves only the radance that goes nto the consdered drecton Ray Castng - Numercal approxmaton of volume renderng ntegral - Resample volume at equ-spaced ntervals along the ray - Tr-lnear nterpolaton Cloud renderng - Involves smulaton of scatterng effects - Clouds have no self emttance but only self attenuaton and scatterng - Cloud ntensty results from external lght sources - Lght s attenuated and scattererd - Sngle scatterng: scatterng once towards the vewer - Hgher order scatterng: : multple scatterng effects result n complex partcle paths - st and 2nd order scatterng events contrbute most Cloud renderng - Scatterng - Partcles n a medum of a dfferent ndex of refracton dffuse the ncdent radaton n all drectons - No energy transformaton - Change n the spatal dstrbuton of the energy - Dfferent types of scatterng exst - Raylegh scatterng - Me scatterng: large scatterng: small partcles up to 0.05λ : large partcles wth respect to wavelength of radaton (dust,, smoke, haze, droplets) 7
Cloud renderng - Raylegh scatterng 2 2 2 π ( n ) 2 β sc( λ, φ) ( + cos ( φ)) 4 2 λ N Cloud renderng - Me scatterng - No strong wavelength dependency - Scatter all wavelength of vsble lght whte clouds N: molecular number densty of atmosphere n: refractve ndex of ar λ: wavelength Cloud renderng - Scatterng Cloud renderng - Smulaton of sngle scatterng - Lght reachng the vewpont - Color of a voxel depends on - Scattered color of the sun - Transmtted color of the sky - Attenuaton due to cloud partcles Cloud renderng - Smulaton of sngle scatterng - Ray-tracng - Trace secondary rays towards the sun - Compute self attenuaton due to absorpton Cloud renderng - Partcles and Impostors (Harrs and Lastra) - Volume s represented as set of partcles - Based on vsblty (vewer,, lght source) orderng of llumnated partcles - Pre-process process: - For each partcle: compute attenuaton of sun lght store receved ntensty - Run-Tme Tme: - Compute ansotropc sngle scatterng - Splat partcles onto frame buffer - Optmzaton: - Use mpostors (bllboards) for renderng 8
Cloud renderng - Impostors - Replace objects wth sem-transparent polygon - Polygon s texture mapped wth the objects mage - Render textured quad approprately algned wth vewpont Cloud renderng - Impostors re-generaton - Depend on a) translaton and b) zoom error - A) deflecton from orgnal vew - B) relaton between mpostor and texture resoluton Physcs based renderng http://www.ofb.net/~eggplant eggplant/clouds/ 9