1 / 61

Procedural Texturing and Modeling

Procedural Texturing and Modeling. Advanced Animation and Motion Capture (AA&MC). Topics covered: Fractals & Noise a. Random b. Pseudo-random c. Perlin Noise d. Iterated functions e. Spiral Phyllotaxis

paulakirby
Download Presentation

Procedural Texturing and Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Procedural Texturing andModeling Advanced Animation andMotion Capture (AA&MC)

  2. Topics covered: • Fractals & Noise • a. Random b. Pseudo-random c. Perlin Noise • d. Iterated functions e. Spiral Phyllotaxis • 2D and 3D Textures a. Surface textures b. Cellular textures c. 3D Textures d. Hypertextures Grammars a. Recursion b. L-SystemsProcedural Modeling a. Instancing b. Replication c. Placement

  3. Noise What is randomness?

  4. Randomness: Some definitions… “Having no definite aim or purpose; not sent or guided in a particular direction..” Oxford English Directionary“Free will is limited to low-level decision making.” Martin Luther“God does not play dice with the universe.” Albert Einstein“Don’t tell God what to do.” Neils Bohr“[God] gave humans free will. He gave them free will because aworld of mere automata could never love..” C.S. LewisRandomness in the universe implies free will.

  5. Michael Noll, 1962. Computer Composition with LinesBased on Piet Mondrian’s Composition with Lines

  6. Bela Julesz, Hungarian psychologistRandom-dot stereograms. 3D object hidden in random images.

  7. Is it random? What makes it random?

  8. How do we get true randomnesss? Which of these are random?a. Throwing diceb. Roulette wheelc. Temparature of a specific point in natured. The next number I saye. Digits of PI

  9. Roulette wheelThe Eudaemonic Pie, 1985. Thomas A. Bass.Describe a group of physics graduates from University of Santa Cruz whoknew that roulette wheels obey Newtonian physics, but is justvery sensitive to initial conditions. Using miniaturized computers, hidden in special shoes, they could capture the state of the ball and the wheel, and could increasetheir odds by 44%.

  10. Hardware Random Number GenaratorsBest sources of physical randomness so far:- Nuclear decay of atoms.- Photos traveling through a partial mirror SSL Accelerator card Applications to cryptography.Many security systems are based on a random key.If the key is not really random, system is not safe.

  11. How do computers generate random numbers? ? Tn Tn+1 Numbers are generated as a sequence, starting from some seed point.Problem is finding the next number so that it has nothing to do with the last.Why is this hard? Because computers are deterministic. The computer program to get Tn+1 is an exact sequence of steps. So if youfigure out what is Tn, my program will give you Tn+1.Computer has no free will to choose a different number.

  12. Plot of the rand() function in C. int r = rand();

  13. When your computer really needs something random, how does it do it? srand ( time() ); // check the second hand on the clock int r = rand(); // get random numberThis says the seed of the random number generator is based on the when you tell the program to run.All numbers after that will look random.If you start the program over, a different clock timeis used for the sequence.These are called pseudo-random sequences.

  14. Randomness in Computer Graphics We actually like pseudo-random sequences in graphics.Why?1. Results can be reproduced, while still appearing random. Useful for testing.2. Randomness that depends on time will not jump around from one frame to the next. e.g. Random placement of trees in a game.3. Faster to compute

  15. Computer GraphicsPatterns in nature are semi-random. Wood chips.

  16. Natural and Man-Made Patternsoften have a grain.Wood – due to process of growthMetal – due to process of cleaning Sheet metal Random noiseScaled on one axis

  17. FractalsNature often exhibits pattens of a fractal structure.“Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth..” Benoit Mandelbrot, French-American (b. 1924)The Fractal Geometry of Nature, 1982 - Exhibit scale invariance. Same structure at different scales.- Exhibit self-similarity. - Exhibit Fractal dimensionality.

  18. Perlin NoiseFractal noise. Simple idea: Generate random noise at different scales (frequencies) and add them together.Ken Perlin, New York University.Invented in 1982. Academy award for Tron.

  19. Chaos The property of a non-linear system to be stable at times, but occasionally enter into a chaotic, seemingly-random state.Exhibited by many physical systems:

  20. Simple Example – Logistic MapBased on the logistic map, developed to study population dynamics. x = r x ( 1 – x )Creates a number sequence. Where: 0 < Xn < 1 Ratio of existing populaton to maximum possible population. % population r Combined rate for reproduction and starvation.So we have two competing factors: r Xn Says that population will increase based on the previous population. r (1-Xn) Says that population will decrease based due to starvation based on how close we are to maximum. n+1 n n Biologist Robert May, 1976. Mathematics first from Pierre Francois Verhulst (1804)

  21. Bifurcation Diagram

  22. Iterated Functions All these systems share a common feature: How to Generate a sequence Tn+1 from Tn. - Noise Generator is pseudo-random sequence - Roulette Generator is the law of Newtonian physics - Chaos Generator is a non-linear system /w feedback - Logistic Map Generator is competition between population factorsIterative functions describe many basic processes in nature.The previous state of the system determines the next state.See the chaos game, Michael Barnsley. Method of making geometric fractals.

  23. Spiral Phyllotaxis Many patterns in nature can be understood withvery simple iterated functions. Two leaves appear on opposite sides. A third appears between them.The first two push the 3rd away. The result is the golden angle.Iteration, adding new leaves, settles into the minimization of energy,which results in the golden ratio (angle). Wilhelm Hofmeister, 1868.

  24. Fermat’s Spiral Phyllotaxis pattern found in sunflowers. o

  25. A Collision-based Model of Spiral Phyllotaxis, 1992Deborah Fowler, Przemyslaw Prusinkiewicz, Johannes Battjes

  26. “The Algorithmic Beauty of Plants”Przemyslaw PrusinkiewiczEntire book available online: http://algorithmicbotany.org/papers/#abop

  27. Procedural Textures – 2D and 3D f ( x, y ) = imagef ( x, y, z) = volume Deals specifically with generated images and volumes and their application to graphics.

  28. Procedural Textures – 2D and 3D f ( x, y ) defines an image, or surface texture. Image f ( x, y ) Object Polygon World space Texture space Texture mapping. Two-dimensional function is mapped onto thethree dimensional geometry. Process is usually done withinverse sampling, where you look up the desired value in f.

  29. Texture mappingTexture appears on surface, and follows surface distortions of the object.

  30. Volumetric Textures f ( x, y, z ) defines a volume texture Volume f ( x, y, z ) Object Polygon World space Volume Texture space f ( x, y, z) Texture is defined at every point in space. Texture color is selected directly from the 3D volume location.

  31. Wood and marble are naturallydescribed as volumetric textures.

  32. Modeling and Rendering of Weathered StoneJulie Dorsey, Alan Edelman, Henrik Jensen, Justin Legakis, Hans Pedersen Combine Perlin noise with other simluated physical processes, such as rain or rust, and layer them together.

  33. Texture mapping: - Faster to compute - Less memory to store (only if you need to save) - Texture appears on the surface of object - Texture distorts with changes in the object.Volume textures: - Slower to compute - More memory to store (only if you need to save) - Texture remains rigid relative to object. - Object changes in shape will move throughthe texture. - Good for rigid objects with cracks or breaks.

  34. Cellular Textures There are other ways to generate the texture function f ( x, y )aside from using random noise. Generate a set of polygonsin the plane (2D).Compute the distance tothe nearest edge.

  35. Crocodile skin

  36. Procedural Texturing – Types of mappings Texture mapping assigns a function f to the color of a point on an object. Different features of an object can be modified by procedural textures.

  37. Procedural Texturing – Types of mappings Bump mapping modifies the surface normal based on the function f.The surface normal determines the visible orientation of the surface for lighting calculations. Notice the silouette doesnot look bumpy.The geometry is not changed, only the surface direction relativeto the light source.

  38. Procedural Texturing – Types of mappings Environment mapping modifies the reflected ray color based on function f. Useful for reflective surfaces. Notice that the geometry of the surface is still not changed.The sphere is still smooth.

  39. Procedural Texturing – Types of mappings Displacement mapping modifies the actual surface position based on function f. Most realistic for any rough surface.Notice silouette is also bumpy. Can be expensive to compute. May need to increase the geometricdetail of the object in order to give a good appearance.

  40. Grammars and L-Systems How can we change the structure of something? With procedural textures there is essentially one object, the function or system, which can change over time. Differences are between points in space or sequences in time.What if we want to modify the objectitself, change its change or add new shapes?

  41. Example:

  42. L-Systems Process of replacement can be formalized using a grammar, or parallel rewriting system, called an L-system. An L-system is a tuple (set of three things): G = ( V, w, P )V = Alphabet. Set of symbols that can be replaced.w = Start or axiom.P = Set of production rules. Aristid Lindenmayer, 1968. Hungarian biologist and botanist.

  43. Variables: A BStart: ARules: A -> B B -> AB Process:1. Take the Start (w) as the current string2. Apply the production rule to every symbol in the current string.3. When finished, call this the new string.4. Repeat start: Aiteration 1: B (rule A->B)iteration 2: AB (rule B->AB)iteration 3: BAB (rules A->B, B->AB)iteration 4: ABBAB (rules B->AB, A->B, B->AB)

  44. L-Systems can have a physical interpretation, if we assign meaning to letters.

  45. L-System Plants

  46. L-system Weeds

More Related