Unity - Camera Shake / Object Shake (Random Offset vs. Perlin Noise Offset)

Subscribers:
2,250
Published on ● Video Link: https://www.youtube.com/watch?v=SxOI6b3Itu0



Duration: 0:27
564 views
6


Left = random offset (framerate dependent; 30Hz at 60fps, 72Hz at 144Hz, etc.)
Right = Perlin noise offset (framerate independent 15Hz at all fps)

Hanging with N163LPH03N1X (http://youtube.com/N163LPH03N1X) and talking about how to shake cameras or game objects.

The problem with random offsets, such as using Random.insideUnitSphere, is 1) they shake more with higher framerates and 2) they are not realistic. They tend to work with 60fps predefined framerate 2D games, however fail with multi-framerate 3D games. One reason is the framerate dependence, but I believe another reason is 3D objects are perceived to be more realistic and have more mass/weight and are not perceived to be able to shake -- compared to a 2D game which is more like a cartoon and the laws of physics can be broken easier without breaking the suspension of disbelief.

Unity's Perlin Noise:

Unity's implementation of Perlin noise appears to be a common naive implementation that is mostly likely VALUE NOISE. Perlin noise is actually a form of GRADIENT NOISE which is the interpolation of GRADIENTS (first derivative angles also measured as normals), whereas VALUE NOISE is the interpolation of VALUES (end values). Unity's implementation is a common misstep. It has strong (poor randomization detectable by human) artifacts, such as lots of zeroed out locations. In other words, it does not look good and is a misrepresentation of the quality of real Perlin noise!
- https://en.wikipedia.org/wiki/Perlin_noise
- https://mrl.nyu.edu/~perlin/noise/

--
Matthew Doucette (Xonatron)
http://matthewdoucette.com/




Other Videos By Matthew Doucette (Xonatron)


2021-01-28Carto (Xbox One) - Chapter 7
2021-01-27Carto (Xbox One) - Chapter 6
2021-01-26Super-C (NES) - 1CC / 2 Playthrus / No Powerups
2021-01-25Chess - Stockfish 12 Playout of Esipenko vs. Carlsen (Tata Steel 2021, Round 8) Before 16...Nc6
2021-01-25Carto (Xbox One) - Chapter 5
2021-01-24Carto (Xbox One) - Chapter 4
2021-01-23Carto (Xbox One) - Chapter 3
2021-01-22Manifold Garden (Xbox One) - Part 3
2021-01-21Geometry Wars 3 (Xbox One) - Ultimate - Unlocking 3 Stars
2021-01-20Gatling Gears (Xbox 360) - Revisiting Gatling Gear - Prologue (Medium Difficulty)
2021-01-19Unity - Camera Shake / Object Shake (Random Offset vs. Perlin Noise Offset)
2021-01-19Devastation II - Repatriation (PC) - Arcade - Training (First 1 Hour of Gameplay)
2021-01-18Forza Horizon 4 (Xbox One) - Horizon Life (w/HugeJuge) - Diablo SV, Track-Tor, & G 36 AMG 6x6.
2021-01-17Jocko Willink's Instagram of Early Mornings (iPhone 6)
2021-01-16The Wadden Falls - Victoria Park - Truro, Nova Scotia, Canada
2021-01-15Xeno Crisis (Xbox One) - Getting to Area 6 The Lab (w/HugeJuge)
2021-01-14Forza Horizon 4 (Xbox One) - Driving a 1994 Ferrari F355 Berlinetta w/Weight Reduction
2021-01-13Forza Horizon 4 (Xbox One) - Having Fun in a Maxed Out 1934 Alfa Romeo P3
2021-01-12Forza Horizon 4 (Xbox One) - Horizon Life w/HugeJuge
2021-01-11Forza Horizon 4 (Xbox One) - Horizon Life + The Marathon w/HugeJuge
2021-01-10Forza Horizon 4 (Xbox One) - Horizon Life - Off Road Races w/HugeJuge & LithiumBullet34