Use Case Study: Journey - Effects and Terrain Presented by Madis - - PowerPoint PPT Presentation

use case study journey effects and terrain
SMART_READER_LITE
LIVE PREVIEW

Use Case Study: Journey - Effects and Terrain Presented by Madis - - PowerPoint PPT Presentation

Use Case Study: Journey - Effects and Terrain Presented by Madis Janno Use Case Study: Journey - Effects and Terrain Presented by Madis Janno Use Case Study: Journey - Sand Presented by Madis Janno Journey Released in 2012 Journey


slide-1
SLIDE 1

Use Case Study: Journey - Effects and Terrain

Presented by Madis Janno

slide-2
SLIDE 2

Use Case Study: Journey - Effects and Terrain

Presented by Madis Janno

slide-3
SLIDE 3

Use Case Study: Journey - Sand

Presented by Madis Janno

slide-4
SLIDE 4
slide-5
SLIDE 5

Journey

Released in 2012

slide-6
SLIDE 6

Journey

Released in 2012 Playstation exclusive (until this year)

slide-7
SLIDE 7

Journey

Released in 2012 Playstation exclusive (until this year) Fastest selling game on PlayStation Store on release in North America and Europe

slide-8
SLIDE 8

Journey

Released in 2012 Playstation exclusive (until this year) Fastest selling game on PlayStation Store on release in North America and Europe Looks really pretty

slide-9
SLIDE 9
slide-10
SLIDE 10

This seminar based on:

Really short talk (22 min) by John Edwards Overview of how their sand rendering system works Mentions a lot of things I will try to explain in more detail, make some observations, point out stuff that might have other uses

slide-11
SLIDE 11

Why talk about Journey?

Stylized graphics means more “weirdness”

slide-12
SLIDE 12

Why talk about Journey?

Stylized graphics means more “weirdness” Thought an open-world game in a desert is a cool idea, so a decent excuse to consider how to make a desert environment look interesting

slide-13
SLIDE 13

Why talk about Journey?

Stylized graphics means more “weirdness” Thought an open-world game in a desert is a cool idea, so a decent excuse to consider how to make a desert environment look interesting Example of how you can do some strange “hacks” to get good looking results

slide-14
SLIDE 14

Why talk about Journey?

Stylized graphics means more “weirdness” Thought an open-world game in a desert is a cool idea, so a decent excuse to consider how to make a desert environment look interesting Example of how you can do some strange “hacks” to get good looking results “To be a graphics programmer, you need neither intelligence nor competence.”

  • John Edwards
slide-15
SLIDE 15

Some things I will talk about in Journey

Making a desert without using reference photos Mipmaps: “sharp” mipmaps Specular shader that ignores light source location (is it technically still a specular?) Anisotropic filtering: when it still isn’t good enough Having two specular shaders at the same time Weird diffuse shader Terrain geometry

slide-16
SLIDE 16

Making a desert without using reference photos

(they did use them at the end and added more detail because of it) Started making the game by having an actual trip to a desert

slide-17
SLIDE 17

Making a desert without using reference photos

(they did use them at the end and added more detail because of it) Started making the game by having an actual trip to a desert Made the shaders and rendering system based on the impression that left on them

slide-18
SLIDE 18

Making a desert without using reference photos

(they did use them at the end and added more detail because of it) Started making the game by having an actual trip to a desert Made the shaders and rendering system based on the impression that left on them Not something you could do with more realistic graphics

slide-19
SLIDE 19

Making a desert without using reference photos

(they did use them at the end and added more detail because of it) Started making the game by having an actual trip to a desert Made the shaders and rendering system based on the impression that left on them Not something you could do with more realistic graphics Were more concerned with making it feel like a desert than actually looking like

  • ne
slide-20
SLIDE 20
slide-21
SLIDE 21

Graininess and sharp mipmaps

slide-22
SLIDE 22

Mipmaps

What are mipmaps?

slide-23
SLIDE 23

Mipmaps

What are mipmaps? Why are mipmaps? If the texture is bigger than the polygon being drawn, you end up with aliasing and flickering, because it keeps switching between different parts of the texture that correspond to the pixel (https://www.shadertoy.com/view/3dVSDR)

slide-24
SLIDE 24

Mipmaps

What are mipmaps? Why are mipmaps? If the texture is bigger than the polygon being drawn, you end up with aliasing and flickering, because it keeps switching between different parts of the texture that correspond to the pixel (https://www.shadertoy.com/view/3dVSDR) Solution is multisampling. If several texels of the texture are in a pixel, just sample and average them all. This is very slow.

slide-25
SLIDE 25

Mipmaps

This is very slow. Instead we precalculate this as a mipmap by averaging groups

  • f 4 at a time.

Images from MTAT.03.015 Computer Graphics materials

slide-26
SLIDE 26

Mipmaps

This is very slow. Instead we precalculate this as a mipmap by averaging groups

  • f 4 at a time.

This is in essence a box blur. Which means each step is slightly more towards the mean (pure white + pure black -> gray)

slide-27
SLIDE 27

Graininess and sharp mipmaps

Journey uses noisy bump/normal maps on sand to add graininess Essentially normals will be pointing in fairly random directions causing it look like it’s composed of individual particles

slide-28
SLIDE 28

Graininess and sharp mipmaps

Journey uses noisy bump/normal maps on sand to add graininess Essentially normals will be pointing in fairly random directions causing it look like it’s composed of individual particles Effect breaks down with terrain further from the camera because of mipmaps removing details and causing areas where each pixel has a similar normal

slide-29
SLIDE 29

Aliasing, mipmaps and blur

Can’t just disable mipmaps, because of aliasing and flickering.

slide-30
SLIDE 30

Aliasing, mipmaps and blur

Can’t just disable mipmaps, because of aliasing and flickering. Solution is a less uniform mipmap. Just multiply the mipmap by 2 to exaggerate differences and break up blobs

slide-31
SLIDE 31
slide-32
SLIDE 32

Sharp Regular

slide-33
SLIDE 33

Glittery sand -> glitter specular

Sand has a glittery quality in sunlight, some sand particles reflect light at just the right angle and seem to shine

slide-34
SLIDE 34

Glittery sand -> glitter specular

Sand has a glittery quality in sunlight, some sand particles reflect light at just the right angle and seem to shine Pretty much just a specular. Normals already noisy, so use that

slide-35
SLIDE 35

Glittery sand -> glitter specular

Sand has a glittery quality in sunlight, some sand particles reflect light at just the right angle and seem to shine Pretty much just a specular. Normals already noisy, so use that But disaster, sand now too sparkly. As you move the camera, lots of flashing pixels

slide-36
SLIDE 36

Glittery sand -> glitter specular

Sand has a glittery quality in sunlight, some sand particles reflect light at just the right angle and seem to shine Pretty much just a specular. Normals already noisy, so use that But disaster, sand now too sparkly. As you move the camera, lots of flashing pixels Weird solution, use a slightly different formula

slide-37
SLIDE 37

Glittery sand -> glitter specular

(H is the half-way vector between light source and viewer, V is the viewer) Was kinda confused by this, until I realized, yeah, they completely removed the light source portion from the calculation

slide-38
SLIDE 38

Glittery sand -> glitter specular conclusions

Apparently the normals are noisy enough that this works Apparently this causes less flashing Really confused why they even tried that

slide-39
SLIDE 39

Glittery sand -> glitter specular conclusions

Apparently the normals are noisy enough that this works Apparently this causes less flashing Really confused why they even tried that Guy giving talk does not know why this works better. Image on right might or might not explain it.

slide-40
SLIDE 40

Glitter specular

Tried out a bit with shadertoy. Flat surface with normals pointing up but should be

  • kay for testing. Green channel is N*H, red is N*V. Just random (3d) locations for

light source and viewer. Green quite regularly dominated red, and also responded a lot more to changes in relative locations.

slide-41
SLIDE 41

Too much glittery goop AKA failure of texture filtering

Problem now: mipmaps not giving good enough results

slide-42
SLIDE 42

Too much glittery goop AKA failure of texture filtering

Problem now: mipmaps not giving good enough results Worse problem: Anisotropic filtering also does not help

slide-43
SLIDE 43

Too much glittery goop AKA failure of texture filtering

Essentially graininess breaks down in particular spots, causing large patches of pixels which glitter and look more like goop than individual particles

slide-44
SLIDE 44

Too much glittery goop AKA failure of texture filtering

Essentially graininess breaks down in particular spots, causing large patches of pixels which glitter and look more like goop than individual particles Simple solution: Just turn the glitter off where it breaks

slide-45
SLIDE 45

Too little glitter

New problem: Have to turn glitter off on most of the screen.

slide-46
SLIDE 46

Too little glitter

New solution: More glitter

slide-47
SLIDE 47

Too little glitter

New solution: More glitter New specular highlights taken from shaders generally used for water

slide-48
SLIDE 48

Diffuse

Regular Lambert:

slide-49
SLIDE 49

Diffuse

Regular Lambert: Their Lambert:

slide-50
SLIDE 50

Diffuse

Regular Lambert: Their Lambert: Essentially: 4 times as bright, vertical component 3.33 times less important. Apparently higher contrast.

slide-51
SLIDE 51
slide-52
SLIDE 52

Normalized

slide-53
SLIDE 53

Terrain geometry

Actually a low resolution 512x256 texture

slide-54
SLIDE 54

Terrain geometry

Actually a low resolution 512x256 texture Turned to actual geometry through b-splines, really really

  • smooth. 2nd derivative continuous.
slide-55
SLIDE 55

Terrain geometry

Actually a low resolution 512x256 texture Turned to actual geometry through b-splines, really really

  • smooth. 2nd derivative continuous.

Interestingly 2nd derivative can be used to estimate ambient occlusion.

slide-56
SLIDE 56

Ambient occlusion

Not all places get exactly as much ambient light. For example corners and small spaces

slide-57
SLIDE 57

Ambient occlusion

Not all spots get exactly as much ambient light. For example corners and small spaces This depends on how much the surface is “occluded”, meaning how much stuff is in the way of light reaching the spots

slide-58
SLIDE 58

Ambient occlusion

Not all spots get exactly as much ambient light. For example corners and small spaces This depends on how much the surface is “occluded”, meaning how much stuff is in the way of light reaching the spots Generally done with screen-space ambient occlusion

slide-59
SLIDE 59

Ambient occlusion

Not all spots get exactly as much ambient light. For example corners and small spaces This depends on how much the surface is “occluded”, meaning how much stuff is in the way of light reaching the spots Generally done with screen-space ambient occlusion Can also be estimated if you know the second derivative of a surface.

slide-60
SLIDE 60

Ambient occlusion

Can also be estimated if you know the second derivative of a surface.

slide-61
SLIDE 61

Ambient occlusion

Can also be estimated if you know the second derivative of a surface.

brighter darker

slide-62
SLIDE 62

Ambient occlusion

Can also be estimated if you know the second derivative of a surface. “Simple” way is that you have an imaginary half-sphere where light is coming from, and based

  • n the second derivative you can calculate how

much of that sphere is covered up by the curve

slide-63
SLIDE 63

Back to geometry

Journey makes heavy use of tessellation and height-maps.

slide-64
SLIDE 64

Back to geometry

Journey makes heavy use of tessellation and height-maps. The detailed heights are based on tiling textures applied depending on the angle

  • f the surface
slide-65
SLIDE 65

Back to geometry

Journey makes heavy use of tessellation and height-maps. The detailed heights are based on tiling textures applied depending on the angle

  • f the surface

Lots of triangles to make it look good

slide-66
SLIDE 66

Back to geometry

Journey makes heavy use of tessellation and height-maps. The detailed heights are based on tiling textures applied depending on the angle

  • f the surface

Lots of triangles to make it look good Task well suited to the PS3 SPU’s

slide-67
SLIDE 67

Sand flow

There is actually a particle system in the game for the sand which the grain texture is based on.

slide-68
SLIDE 68

Sand flow

There is actually a particle system in the game for the sand which the grain texture is based on. ~10000 32x32 particles with a sand texture. With a physics simulation run on the SPU’s

slide-69
SLIDE 69

Sand flow

There is actually a particle system in the game for the sand which the grain texture is based on. ~10000 32x32 particles with a sand texture. With a physics simulation run on the SPU’s Does not elaborate on this further.

slide-70
SLIDE 70

That’s it for now. Any questions/thoughts?

slide-71
SLIDE 71

Thanks for listening!