Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Procedural
Generation at its
Elegance
Gregory Desrosiers
University ofWaterloo SE 2019
May 10, 2016 (Revision May 20 2016)
Outline
 What is procedural generation?
 Some technical aspects of procedural generation
 Why should we use it compared...
What is
procedural
generation?
 Definition:
Using software algorithms to
generate data at runtime
instead of data before
...
Example of
Procedural
Generation
4
Photo Copyright: © Gregory Desrosiers [6]
Original Source Code: © Dave Pagurek van Moss...
Why should
we use
procedural
generation
compared to
predefined
data?
 Number of possible outputs from one input set
 Sim...
Appropriate
Use of
Procedural
Generation
Example 1:
WolframTones
(Web
Application)
 Based off of Stephen
Wolfram’s 1980s
...
Appropriate
Use of
Procedural
Generation
Example 2:
Dave Pagurek
van Mossel’s
Website
 Uses Perlin noise to
give a natura...
Appropriate
Use of
Procedural
Generation
Example 3:
Elite:
Dangerous
(PCGame)
 Planets, asteroids, and
interstellar cloud...
When should
you not use
procedural
generation
and instead
use
predefined
data?
 The data representing objects or music do...
Predefined
Data instead
of Procedural
Generation
Example 1:
Splatoon
(NintendoWii
U)
 16 multiplayer
stages (from recent
...
Predefined
Data instead
of Procedural
Generation
Example 2:
Super Mario
Galaxy 2
(NintendoWii)
 Music composed by
Koji Ko...
Summary
Use procedural generation for:
 Creating textures, visual objects, and data objects such as
sound
 Outputting ma...
Bibliography
 [1] StackExchange.com, ‘What is “procedural generation”
and how is it done?,‘ May 1 2016.
http://gamedev.st...
Bibliography
 [7]Wolfram Research, ‘WolframTones: How
WolframTones Works,’ May 2 2016.
http://tones.wolfram.com/about/how...
Bibliography
 [12]Vox Media, Inc. (Polygon), ‘Elite: Dangerous
explores the limitless depths of space, and of human
cruel...
Bibliography
 [17] Nintendo. (n.d.).
“WUPP_AGM_3DbkgdCP04_R_ad.jpg,” in ‘What’s
New – Splatoon™ forWii U’ [Online].Availa...
Copyrights
This was originally a presentation conducted at the
University ofWaterloo. It has been created and
modified in ...
Upcoming SlideShare
Loading in …5
×

Procedural Generation at its Elegance (Software Development)

432 views

Published on

What is procedural generation? Why should we use procedural generation in software development? When is it practical to do so, and when it isn't?

This explores the answers to those questions in simple detail with several examples to demonstrate.

Recommended for view in full screen mode. Text you can use to follow along the presentation for more detail: https://medium.com/@gregdesMED100/procedural-generation-at-its-elegance-text-form-10bb4e098102#.gzitrnjn1

This was originally a presentation milestone requirement in my education at the University of Waterloo; this has been modified to tailor for business purposes.

All visuals, text, content, and any associated imagery are trademarks and / or copyrighted material of their respective owners.
© 2016 Gregory Desrosiers / University of Waterloo. All rights reserved.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Procedural Generation at its Elegance (Software Development)

  1. 1. Procedural Generation at its Elegance Gregory Desrosiers University ofWaterloo SE 2019 May 10, 2016 (Revision May 20 2016)
  2. 2. Outline  What is procedural generation?  Some technical aspects of procedural generation  Why should we use it compared to predefined data?  Three examples of appropriate procedural generation use:  Music generation  Texture / art generation  Data object generation  When not to use procedural generation?  Two examples of predefined data instead of procedural generation:  Video games with unique elements  Orchestrated music for quality purposes 2
  3. 3. What is procedural generation?  Definition: Using software algorithms to generate data at runtime instead of data before execution [1]  Different applications: Video games, audio synthesis, artwork / textures, simulations (such as city growth [2])  Different techniques can be used to generate data: [3]  Fractals  Special programs such as Terragen and SpeedTree  Perlin Noise  Psuedorandom number generators 3 Photo Copyrights: © 2015-2016 AOL Inc. (Provided by Engadget.com, programmed by AOL Tech) [4] Software Copyrights: Minecraft © 2009 – 2016 Mojang Synergies AB
  4. 4. Example of Procedural Generation 4 Photo Copyright: © Gregory Desrosiers [6] Original Source Code: © Dave Pagurek van Mossel JavaScript code for drawing a mountain range on an HTML 5 canvas with a function for Perlin Noise. [5]
  5. 5. Why should we use procedural generation compared to predefined data?  Number of possible outputs from one input set  Similarities between the different outputs generated by the same algorithm at a visual level  Using the same base resources to generate different outputs  In large projects, reduce secondary storage memory consumption  Student projects: simply expanding programming knowledge 5
  6. 6. Appropriate Use of Procedural Generation Example 1: WolframTones (Web Application)  Based off of Stephen Wolfram’s 1980s experiments involving his cellular automata patterns [7]  Uses a swath of the pattern turned on its side [7]  Mathematica algorithms are performed to create music notes out of the swath [7] 6 Before music conversion: After music conversion: Photo Copyrights: © Wolfram Research [8][9] Software Copyrights: © Wolfram Research
  7. 7. Appropriate Use of Procedural Generation Example 2: Dave Pagurek van Mossel’s Website  Uses Perlin noise to give a natural look and feel [5]  Uses native drawing algorithms to draw the different shapes [5]  Tailors the output to within defined parameters [5] 7 Photo Copyrights: © Dave Pagurek van Mossel [10] Software Copyrights: © 2015 Dave Pagurek van Mossel Image Size: 109 KB BackgroundGenerator Code Size (through Google Chrome): 4.5 KB [5]
  8. 8. Appropriate Use of Procedural Generation Example 3: Elite: Dangerous (PCGame)  Planets, asteroids, and interstellar clouds; all elements of each group have very similar properties [11]  Players can travel and explore over 400 billion star systems [12]  Used a procedural generation system called the Stellar Forge [12] 8 Photo Copyrights: © 2015 Control500.com / Control Magazine [13] Software Copyrights: © 1984 – 2016 Frontier Developments Plc
  9. 9. When should you not use procedural generation and instead use predefined data?  The data representing objects or music do not have similarities in between (uniqueness)  Quality over quantity  Time [14] and budget limits  Explicitly-defined elements in software design instead of creativity and possibilities  Concerns on software performance 9
  10. 10. Predefined Data instead of Procedural Generation Example 1: Splatoon (NintendoWii U)  16 multiplayer stages (from recent update), 27 single player stages, and one central environment as the main menu [15]  Only two properties are common: boundaries and land area  All environments mostly have unique elements  Defining the models explicitly ensures quality 10 Photo Copyrights: Right Top and Right Bottom - © Gregory Desrosiers [16][18], Middle - © Nintendo [17] Software Copyright: © 2015 Nintendo
  11. 11. Predefined Data instead of Procedural Generation Example 2: Super Mario Galaxy 2 (NintendoWii)  Music composed by Koji Kondo, Ryo Nagamatsu and MahitoYokota [19]  Music done manually instead of at runtime for quality purposes [20]  Music performed by an orchestra [20] 11 Photo Copyrights: © GameSpot (a division of CBS Interactive Inc.) [21] Software Copyright: © 2010 Nintendo
  12. 12. Summary Use procedural generation for:  Creating textures, visual objects, and data objects such as sound  Outputting many different outcomes  Learning more of a programming language Do not use procedural generation for:  Time sensitive, cost sensitive, or quality sensitive projects  Data elements that are unique and where quantity is no concern  Projects that require exceptional performance In the end, go out there and program an algorithm to generate the data you want! 12
  13. 13. Bibliography  [1] StackExchange.com, ‘What is “procedural generation” and how is it done?,‘ May 1 2016. http://gamedev.stackexchange.com/questions/756/what-is- procedural-generation-and-how-is-it-done  [2] Northwestern University, ‘Procedural Modeling of Cities,’ May 2 2016. http://ccl.northwestern.edu/rp/cities/index.shtml  [3] StackExchange.com, ‘How does one get started with procedural generation?,’ May 1 2016. http://stackoverflow.com/questions/155069/how-does-one- get-started-with-procedural-generation  [4] Fingas, Jon. (2015, Mar. 4). “minecraft-terrain-federico- flickr.jpg” in ‘Here’s how ‘Minecraft’ creates its gigantic worlds’ [Online]. Available: http://www.engadget.com/2015/03/04/how-minecraft- worlds-are-made/ [May 2 2016]  [5] Dave Pagurek, ‘Frontier: Programming Generative Art, ’ May 3 2016. http://www.davepagurek.com/programming/frontier  [6] Desrosiers, Gregory. “Example of Procedural Generation in Code.png” Waterloo: Software Eng. University of Waterloo, Waterloo, ON, May 4 2016. 13 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  14. 14. Bibliography  [7]Wolfram Research, ‘WolframTones: How WolframTones Works,’ May 2 2016. http://tones.wolfram.com/about/how.html  [8]Wolfram Research. (n.d.). “rule30slicesideways.gif” in ‘WolframTones: HowWolframTones works’ [Online].Available: http://tones.wolfram.com/about/how.html [May 2 2016]  [9]Wolfram Research. (n.d.). “/gen/GoqlMVIVFY45Zc042wLyelDEKbrXdeTdlM” in ‘WolframTones: How WolframTones works’ [Online]. Available: http://tones.wolfram.com/about/how.html [May 2 2016]  [10] Pagurek, Dave. (2015, Jun. 4). “night- medium.jpg” in ‘Frontier: Programming Generative Art’ [Online].Available: http://www.davepagurek.com/programming/frontier [May 2 2016]  [11] Elite Dangerous. (2012, Nov. 15). Elite: Dangerous – procedural generation. [YouTube video]. Available: https://www.youtube.com/watch?v=iTBvpd3_Vqk. Accessed May 1 2016. 14 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  15. 15. Bibliography  [12]Vox Media, Inc. (Polygon), ‘Elite: Dangerous explores the limitless depths of space, and of human cruelty (correction) | Polygon, ’May 2 2016. http://www.polygon.com/2014/12/4/7333709/elite- dangerous-milky-way-stellar-forge-human-cruelty  [13] Braben, David. (n.d.). “Explosion.jpg” in ‘Our Entire Galaxy Re-created In Elite:Dangerous – CONTROL500’ [Online].Available: http://ctrl500.com/tech/how-frontier-managed-to-re- create-our-entire-galaxy-in-elite-dangerous/ [May 2 2016]  [14] Richard Moss (Gamasutra), ‘Gamasutra – 7 uses of procedural generation that all developers should study,’ May 1 2016. http://www.gamasutra.com/view/news/262869/7_use s_of_procedural_generation_that_all_developers_sho uld_study.php  [15] Splatoon [Wii U Optical Disc]. USA: Nintendo, 2015  [16] Desrosiers,Gregory. (2016, Apr. 15). “Splatoon - Inkopolis Plaza.jpg” May 2 2016. 15 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  16. 16. Bibliography  [17] Nintendo. (n.d.). “WUPP_AGM_3DbkgdCP04_R_ad.jpg,” in ‘What’s New – Splatoon™ forWii U’ [Online].Available: http://splatoon.nintendo.com/whats-new/ [May 2 2016]  [18] Desrosiers,Gregory. (2016, Jan. 16). “Splatoon - OctoValley.jpg” May 2 2016.  [19] Blue Flame Labs, ‘Super Mario Galaxy 2 (2010) Wii credits - MobyGames’, May 3 2016. http://www.mobygames.com/game/wii/super-mario- galaxy-2/credits  [20] dudush31. (2010, Jul. 14). Super Mario Galaxy 2 OpeningTeam – Symphony Orchestra Recording. [YouTube video] Available: https://www.youtube.com/watch?v=iJMCaGyMHYs Accessed May 7, 2016.  [21] GameSpot. (2013, Aug. 30). “1509518- 960551_20100520_023.jpg” in ‘Super Mario Galaxy 2 Images - GameSpot’ [Online].Available: http://www.gamespot.com/super-mario-galaxy- 2/images/ [May 3 2016] 16 Reference & Citation Style used: IEEE Computer Society Style Guide 2015 (https://www.computer.org/web/publications/styleguide) Naval Postgraduate School - Dudley Knox Library: IEEE Citation (http://libguides.nps.edu/citation/ieee) University of Manitoba – Donald W. Craik Engineering Library: Citation Guide – IEEE Style (https://umanitoba.ca/faculties/engineering/departments/mechanical/pdf/NEW-Citing-IEEE-2013.pdf)
  17. 17. Copyrights This was originally a presentation conducted at the University ofWaterloo. It has been created and modified in compliance with the copyright guidelines shown here: https://uwaterloo.ca/copyright- guidelines/ All visuals, text, content, and any associated imagery are trademarks and / or copyrighted material of their respective owners. © 2016 Gregory Desrosiers / University ofWaterloo. All rights reserved. 17

×