Shadowing Practice: How I Learned Procedural Generation - Learn English Speaking with Video

Les maken...
1
So I finished learning how to make an FPS controller,
2
but if I want to make a more polished looking game,
3
I will need to work on my environment.
4
And since I'm more of a coder than an artist,
5
I think there's no better way than with procedural generation.
6
So let's begin by starting a new project.
7
Next it's time to go on my usual YouTube grind and figure out how to do mesh generation.
8
Thankfully Bracchus has three videos on this topic.
9
Three days later.
10
After watching Brackey's videos, I'm now able to generate meshes of any size that I need,
11
and all it took is the code you see on the left.
12
Now to make this look like terrain,
13
use something called Perlin Noise,
14
which is an algorithm created by Ken Perlin to help make more natural looking textures and terrain on the movie Tron.
15
What I'm using here is the 2D version which generates values between 0 and 1.
16
To represent this, I map the numbers closer to 0 as black and numbers closer to 1 as white.
17
The power of this algorithm comes when you multiply that Perlin value by a number.
18
For instance, I can use Perlin noise multiplied by an amplitude to procedurally generate the height of my terrain.
19
This is all fine and dandy,
20
but I wanted a little bit more control over my environment.
21
Thankfully I found this tutorial series by Sebastian Legg,
22
and it covered everything I wanted to know and more.
23
It seriously was so good that I gave it a watch a few times over.
24
The problem is, it goes into so much depth that it is too comprehensive for my puny brain to handle.
25
So I took two of the simpler concepts to add to my generator.
26
One was the ability to finely tune the noise,
27
and two was this concept of multiplying the the Perlin noise with the falloff map to create islands.
28
I actually wrote my own version of Sebastian's falloff map so that I could set where the falloff begins and ends.
29
Here's a preview of that code for those of you who are interested.
30
I also fixed Sebastian's noise generator because I think he broke it around episode 6 and then never fixed it.
31
When you change the scale you're supposed to be able to zoom in
32
and out of the Perlin map but right now it almost seems like you're generating a new map.
33
I narrowed down the problem to these lines here.
34
Changing this also fixed the parallax effect Sebastian had when changing the offset.
35
Now that we have more control over our environment,
36
it's time to move on to my favorite topic from elementary school,
37
and that is coloring.
38
So for coloring, I spent about a week or two trying to recreate the style Sebastian had for his intro.
39
He shows that he's generating a texture with these nicely rounded edges,
40
but in the tutorials, he only teaches us how to make a pixelated texture.
41
One solution I had was to increase the number of sample points we use in the texture,
42
but if you zoom in,
43
we still have the problem of seeing each individual pixel.
44
Then I remembered watching a video by Sebastian where he used marching cubes,
45
and I was almost certain this is the approach he used for generating his texture.
46
So I watched this video by the coding train and converted his marching squares algorithm from JavaScript into C-sharp.
47
I got pretty close to the results I wanted,
48
but when you view this on the terrain,
49
you could still see each individual pixel.
50
So I gave up on using a texture approach.
51
I really tried to avoid this as much as I could,
52
but I was left with no other choice but to dive into shaders.
53
After messing with shader graph for a few hours,
54
I came up with this decent shader here.
55
I surprisingly had a lot of fun making this and it turns out shaders aren't too hard after all.
56
With my new love for shaders,
57
I looked up a bunch of more tutorials on YouTube.
58
I found this tutorial for creating a gradient skybox with stars,
59
but I noticed there's a little bit of distortion near the edges.
60
So I found this article that taught me how to do proper UV sphere projection,
61
and yay, no more distortion.
62
But I wasn't quite satisfied yet.
63
I also found this awesome cloud shader that I needed to use as well.
64
And now our skies are looking not too bad.
65
Then to top it all off I used these two videos to make a stylized water.
66
Alright let's finish off this last bit here.
67
So to finish off this project let's add some vegetation.
68
I hopped in the blender and made this very beginner friendly tree
69
but I don't want to manually place hundreds of trees on the terrain because that would take forever.
70
And we are going for a complete procedural generation.
71
Thankfully, I remember watching this video from Jonas Tyroller a
72
while back where he talked about creating random levels for his game Islander.
73
Basically, if you shoot a raycast onto a random point on the island,
74
you can check if it's a valid spawn point for a tree.
75
If so, spawn the tree.
76
Then you can do this for as many times as you want trees,
77
or whatever object you want to randomly place.
78
So I created this simple prefab spawner script where I can select a prefab to spawn.
79
Then to determine if a spot is valid to place a prefab,
80
I just check if the the hit location is above the sea level.
81
I also have the script randomly change the scale
82
and rotation of the prefab we are spawning so that we have a bit of variation.
83
Lastly, let's add some grass.
84
I found this video to create a quick grass texture,
85
then I put together a bunch of planes in blender to display it.
86
Back in Unity, I just reused my prefab spawner script to spawn my grass around the island.
87
Although, to really bring this grass to life,
88
I watched this video from Bracuse.
89
And now, we have Sway in our grass.
90
So I brought over my FPS controller from the last video so that we can explore the island.
91
And after working on this for so long,
92
it's super cool to see this from the first person view.
93
With what we have here,
94
it's really starting to feel like a really polished game.
95
The sky, the water, with the FPS movements,
96
everything ties nicely together to really bring that GAME FEW.
97
To be honest, I could keep on going and continue to add things to my procedure generator,
98
but then this video will never end.
99
I definitely will be working on this tool in future videos
100
and I am just so pleased with how much I was able to figure out.
101
This is definitely going to help me out in any future game that I make,
102
and even just this island already feels like a cool spot to do 1v1 deathmatches on.
103
I can imagine doing some sick multiplayer battles on here,
104
finding good angles to pick off people on the island.
105
But anyways, if you stuck around this long,
106
thank you so much for watching,
107
and I hope to see you in the next one.
108
Peace.

Woordenschat en spreektips bij deze les

Deze spreekles op niveau C1 is gebaseerd op de video “How I Learned Procedural Generation”. Deze woorden komen het vaakst terug: texture, Perlin, shader, island, prefab. Deze video bevat 108 zinnen en 1236 woorden om na te spreken. Het gesproken deel duurt 5:35. De spreker praat snel, ongeveer 221 woorden per minuut, dus reken op verbonden en ingeslikte klanken. Slechts 77% van de woorden hoort bij de 3.000 meest gebruikte Engelse woorden, dus de woordenschat is pittig.

Belangrijke woorden in deze video

De 15 moeilijkste woorden uit de video, met uitspraak en betekenis:

WoordUitspraakBetekenis
texture zelfstandig naamwoord/ˈtɛkst͡ʃə(ɹ)/textuur
spawn werkwoord/spɔn/kuitschieten, paaien
terrain zelfstandig naamwoord/təˈɹeɪn/terrein, reliëf
tutorial zelfstandig naamwoord/ˌtjuːˈtɔːɹɪəl/snelcursus, tutorial
multiply werkwoord/ˈmʌltɪplaɪ/vermenigvuldigen
thankfully bijwoordgelukkig
generator zelfstandig naamwoord/ˈdʒɛnəɹeɪtə(ɹ)/generator
algorithm zelfstandig naamwoord/ˈælɡəɹɪðm̩/algoritme
spawner zelfstandig naamwoord/ˈspɔnɚ/kuiter
pixel zelfstandig naamwoord/ˈpɪk.səl/pixel
mesh zelfstandig naamwoord/mɛʃ/net
zoom werkwoord/zuːm/zoeven
amplitude zelfstandig naamwoord/ˈæm.plɪ.tud/omvang
gradient zelfstandig naamwoord/ˈɡɹeɪdiənt/richtingscoëfficiënt
recreate werkwoord/ˈɹɛk.ɹi.eɪt/recreëren

Phrasal verbs die je zult horen

WoordUitspraakBetekenis
figure out werkwoorduitvogelen, er achter komen
come up with werkwoordbedenken, verzinnen
look up werkwoord/ˌlʊk ˈʌp/opkijken
turn out werkwoorduitvallen, resulteren

Uitspraak om op te letten

De spreker gebruikt 8 samentrekkingen en verkorte vormen, zoals I'm, you're, aren't. Spreek ze kort uit, zoals je ze hoort.

  • De “th”-klanken: algorithm /ˈælɡəɹɪðm̩/, deathmatch /ˈdɛθ.mæt͡ʃ/
  • De klanken “sh” en “zh”: shader /ˈʃeɪdɚ/, distortion /dɪsˈtɔːʃən/, mesh /mɛʃ/, vegetation /ˌvɛd͡ʒəˈteɪʃən/, projection /pɹəˈd͡ʒɛkʃən/
  • Lange woorden — let op de klemtoon: generator /ˈdʒɛnəɹeɪtə(ɹ)/, procedural /pɹəˈsiːd͡ʒ(ə)ɹəl/, procedurally /prəˈsiː.d͡ʒər.ə.li/, multiplayer /ˌmʌl.tiˈpleɪ.əɹ/, manually /ˈmænj(u)əliː/

Klanken die Nederlandstaligen lastig vinden:

  • Stemhebbende eindmedeklinker — /b/, /d/, /g/, /z/, /v/ niet verscherpen: amplitude /ˈæm.plɪ.tud/, stylize /ˈstaɪlaɪz/, cube /kjub/, grind /ˈɡɹaɪnd/, anyways /ˈɛn.iˌweɪz/
  • /æ/ — opener dan de Nederlandse “e”: algorithm /ˈælɡəɹɪðm̩/, randomly /ˈɹændm̩li/, amplitude /ˈæm.plɪ.tud/, deathmatch /ˈdɛθ.mæt͡ʃ/, parallax /ˈpæɹ.əˌlæks/
  • /g/ — een harde plofklank, geen Nederlandse “g”: algorithm /ˈælɡəɹɪðm̩/, gradient /ˈɡɹeɪdiənt/, beginner /bəˈɡɪnɚ/, grind /ˈɡɹaɪnd/, graph /ɡɹæf/

Zo oefen je met deze video

  1. Luister de hele video één keer zonder te spreken en noteer de woorden die je niet kent.
  2. Begin op 0,75× snelheid, spreek zin voor zin na en ga terug naar normale snelheid zodra het makkelijk gaat.
  3. Neem jezelf op en vergelijk met het origineel; let daarbij op woorden als texture, spawn, terrain.

Wat is de Shadowing-techniek?

Shadowing is een wetenschappelijk onderbouwde taalleermethode die oorspronkelijk is ontwikkeld voor professionele tolkentraining en gepopulariseerd door polyglot Dr. Alexander Arguelles. De methode is eenvoudig maar krachtig: je luistert naar native Engelse audio en herhaalt het onmiddellijk hardop — als een schaduw die de spreker volgt met slechts 1–2 seconden vertraging. In tegenstelling tot passief luisteren of grammaticadrills, dwingt shadowing je hersenen en mondspieren om echte spraakpatronen tegelijkertijd te verwerken en te reproduceren. Onderzoek toont aan dat het de uitspraaknauwkeurigheid, intonatie, ritme, verbonden spraak, luisterbegrip en spreekvaardigheid aanzienlijk verbetert — waardoor het een van de meest effectieve methoden is voor IELTS Speaking-voorbereiding en echte Engelse communicatie.

Shadowing-techniek: lees de volledige stap-voor-stap-gids →