180 likes | 344 Views
Clouds and You (mostly clouds) a Summary of “A Simple, Efficient, Method for Realistic Animation of Clouds”. 4/24/01. Paper by Yoshinori Dobashi, Kazufumi Kaneda, Hideo Yamashita, Tsuyoshi Okita, Tomoyuki Presentation by Nomolas Nairb. Goal ?. Realtime? Realistic?.
E N D
Clouds and You(mostly clouds)a Summary of “A Simple, Efficient, Method for Realistic Animation of Clouds” 4/24/01 Paper by Yoshinori Dobashi, Kazufumi Kaneda, Hideo Yamashita, Tsuyoshi Okita, Tomoyuki Presentation by Nomolas Nairb
Goal ? • Realtime? • Realistic? No, but no need for render farms. DUFF No, but you wont know the difference.
Previous Work Eat at Joe’s
Previous Work • Good ole Stam • Foster and Metaxas • Nagel, Nagel, Nagel Goodyear
Approach • Extend Nagel’s method. • Cellular Automaton • 0/1 variables per voxel • Allow clouds to go away. • Add shafts of light. • Use clever rendering techniques (OpenGL). Go Cavs!
Cellular AutomatonNagel Style • Voxels have 3 state variables and transition functions. • Hum - Does the voxel contain enough H20? • Cld - Is there cloud in the voxel? • Act - Is the transition from vapor to cloud ready to commence? All your base
Cellular AutomatonNagel Style Rules hum(i,j,k,t+1) = hum(i,j,k,t) && !act(i,j,k,t) cld(i,j,k,t+1) = cld(i,j,k,t) || act(i,j,k,t) act(i,j,k,t+1) = !act(i,j,k,t) && hum(i,j,k,t) && f(i,j,k,t) Brian Rules
Cellular AutomatonNagel Style f(i,j,k) = act(i+1,j,k,t) || act(i,j+1,k,t) || act(i,j,k+1,t) || act(i-1,j,k,t) || act(i,j-1,k,t) || act(i,j,k-1,t) || act(i-2,j,k,t) || act(i+2,j,k,t) || act(i,j-2,k,t) || act(i,j+2,k,t) || act(i,j,k-2,t)
Additional Rules Cloud extinction facilitated by: cld(i,j,k,t+1) = cld(i,j,k,t) && (rnd > pext(i,j,k,t)) hum(i,j,k,t+1) = hum(i,j,k,t) || (rnd < phum(i,j,k,t)) act(i,j,k,t+1) = act(i,j,k,t) || (rnd < pact(i,j,k,t)) Wang Chung Tonight
Wind v(z) gives wind velocity for each level of voxels. state(i,j,k,t + 1) = state(i-v(zk),j,k,t) Zzzzzz…..
Ellipsoids for Motion Control • Use ellipsoids to represent “parcels” of air. • Distribute the probabilities throughout the ellipsoids. • Move the ellipsoids to move the clouds. • How big? How many? Led Zeppelin
Rendering • Create metaball textures • Create the lightmap texture • Render the clouds Rusty’s Burgers
Metaballs • Smooth the voxels q(i,j,k,t) = Q* w(i’,j’,k’,y’) * cld(i+i’,j+j’,k+k’,t+t’) (x,t) = q(i,j,k,t)f(|x - xi,j,k|) j0 t0 k0 i0 k’=-k0 j’=-j0 t’=-t0 i’=-i0 N i,j,k (x,R)
Metaball Colors and Light Maps • Turn off depth test. • Sort the metaballs by distance from the sun. • Render using parallel projection from the sun. • Create a color for each metaball by multiplying the color at the center pixel by the sun color. • Store the image as a light map for the terrain.
Rendering the Clouds • Render everything else first • Turn off the depth test • Set each ball’s billboard to the color from the last step • Render the billboards back to front. Hindenburg
Shafts of Light T I = Ic(T)+ (s)Is(s)(s)ds Ic - the cloud color Is - scattered light - atmospheric attenuation - attenuation due to clouds discretized as: I = Ic(T)+(ks)Is(ks)(ks)s 0 ns k=0
Light Shafts I = Ic(T)+(ks)Is(ks)(ks)s Ic - the metaball color - fog like calculation Is - get this “analytically” - the light map
Results 256x256x20 cells 80kb storage 10-20 seconds per image Looking Good