Skip to content

kanawish/NVScene2014.ProcGenContent

Repository files navigation

README / Presentation Research Notes

Presentation Goals

We'll explore a gammut of procedural content generation techniques, and see how to use GPGPU techniques to turbocharge their performance.

The plan

  • Theory: PCG History, concepts and applications
    • Use in games
      • Conway's Game of Life. (1970)
      • Elite, Seven Cities of Gold, The Sentinel.
      • from Rogue to Diab.. Minecraft and Dwarf Fortress. (1980s->2010s)
    • High level concepts Ontogenetic and Teleological.
      • Perlin and Simplex noise.
      • Fractals, L-Systems
      • Cell Automata, Genetic algorithms
  • Approach: a Small Mobile GPGPU Prototyping Framework
    • Mobile technology landscape
      • OpenGL ES 2.0, 3.0 and 3.1
      • Renderscript
      • Tegra 4, Tegra K1
    • Github project
      • Modern Android App toolchain
        • Android Studio / IntelliJ
        • Gradle
        • Genymotion
      • Framwork architecture
        • Cooperating with the OS: using GLSurfaceView
        • Loading and running simple Shader gadgets
        • GPGPU gadgets
      • TODOs
        • Browsing the shader repository
        • Raspberry Pie support
        • OpenGL ES 3.1
    • Quick demonstration
      • Simplex (?Might not have time to port to C99)
      • Shader (Plasma/Fractal)
      • REST repo
      • Cell Automaton
  • Hello world: Worldgen examples
    • Terrain and rivers
    • Temperature + Precipitation = Biomes
    • Forests, Dungeons and Politics

The research

Framework: Technology

OpenGL ES 2.0 includes OpenGL ES Shading Language 1.0.17, not to be confused with it's non-ES counterpart, OpenGL Shading Language 1.10.

OpenGL ES 3.0 includes OpenGL ES Shading Language 3.00.4.

OpenGL ES 3.1 upgrades OpenGL ES Shading Language to version 3.10. More relevant to today's talk, a great deal of the new feature set relates to general computing tasks.

The Tegra 4 does not support OpenGL ES 3.0, since it is missing a few features. (FP32 pixel shaders, EAC/ETC2 texture compression format, etc.)

The Tegra K1 will reportedly support both OpenGL ES 3.0 and the full OpenGL 4.4 feature set, CUDA 6.0, as well as Tessellation and Compute shaders.

Note: This is interesting. How will this be made available to Android developpers? Special libraries and drivers seem to be in order. Big problem then becomes writing very NVidia specific code, developpers for now would have little incentive to do this for the large scale public. Might be interest for application specific, custom-made business projects? A K1 Ouya could be intringing...

One focus of this talk is on General-purpose computing on GPU, a.k.a. GPGPU. As per Wikipedia: "OpenCL is the currently dominant open general-purpose GPU computing language. The dominant proprietary framework is Nvidia's CUDA."

Sadly, neither of these are standardly available to the Android developper. There are technical reasons and compatibility reasons behind this, perhaps some historical ones as well.

All in all, we do have two frameworks to our disposal. OpenGL ES Shading Language and RenderScript. Of the two, GLSL will result in code that will be more easily re-usable on other platforms. Renderscript, being specifically designed for GPGPU has interesting features that could make our job easier, but will result in less portable code in some ways.

If you're aiming to do cross-platform projects (iOS/Android), you might be better served by the GLSL approach. If you're hoping to support a significant portion of the Android landscape (4000+ types of devices configurations at time of writing), you should probably give consideration to Renderscript.

Renderscript is now very much dedicated to computing tasks on large buffers of data, and should bring speed improvements on a wide variety of Android hardware. Wikipedia has a streamlined history.

Framework: The github project

Framework: Architecture

Hello world: Terrain and rivers

Hello world: Temperature + Precipitation = Biomes

Hello world: Forests, Dungeons and Politics

Random scattering for landscapes

About

NVScene 2014 Talk notes and code examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published