Using noise in shaders (texture blending)

  Рет қаралды 12,075

Barney Codes

Barney Codes

Күн бұрын

Пікірлер: 18
@BarneyCodes
@BarneyCodes Жыл бұрын
If you'd like to see what else I'm working on, it would be great if you could wishlist my game Star Mining Co. on Steam! s.team/a/2584800/ What shader effect would you like to see next?
@theman7050
@theman7050 Жыл бұрын
Is there a way to contact you man?
@BarneyCodes
@BarneyCodes Жыл бұрын
My username is barneycodes on discord, feel free to reach out there! Otherwise you can email me at barney@barneycodes.com
@Tritoon710
@Tritoon710 11 ай бұрын
Facing Ratio & Dot Product Thanks
@BarneyCodes
@BarneyCodes 11 ай бұрын
I'm planning on looking at some basic lighting in an upcoming video so should cover this then! Thanks for the comment!
@openlink9958
@openlink9958 9 ай бұрын
0:08 it looks like a shader that replicates how cells look like. Every "cell" (circle) is separated from adjacent circles but all of them are together, on a similar way how skin cells would be (or any kind of large cell structure really)
@BarneyCodes
@BarneyCodes 9 ай бұрын
That's voronoi noise! It pops up in nature quite a lot which is really cool! The basic idea behind it is that each pixel is coloured based on the distance to the nearest "seed" point, which is why you get those shaded blob regions!
@DeniseNepraunig
@DeniseNepraunig Жыл бұрын
Really great explanation. I love the way you go through this, showing all the code changes and variants! Top notch editing. Thanks man!
@BarneyCodes
@BarneyCodes Жыл бұрын
Thank you so much! Glad you liked it!
@theman7050
@theman7050 Жыл бұрын
Barney at it again!!! 🎉 Wow I used to think generating noise in code is more efficient. But using a texture for it comes as a surprise man. Thanks :)
@BarneyCodes
@BarneyCodes Жыл бұрын
It's probably slightly more nuanced then "it's always better to use a texture", but things like Perlin and Worley noise can be a bit expensive to calculate every frame. On the other hand, white noise can be really quick because you can just take a hash of the position vector to get a "random" value. Thanks for your comment!
@number3boo
@number3boo Жыл бұрын
So that's how they do it
@tepiku
@tepiku 11 ай бұрын
Thanks for the video. Really well explained. 3:38 The thing with p5.js is that the coordinates 0,0 are located in the top left corner instead of the bottom left.
@BarneyCodes
@BarneyCodes 11 ай бұрын
Thanks! I sort of assumed that the underlying image data wouldn't be affected by that but I guess I was wrong!
@literallyaperson7125
@literallyaperson7125 Жыл бұрын
nice
@BarneyCodes
@BarneyCodes Жыл бұрын
Thanks!
@Veptis
@Veptis Ай бұрын
Here is a question: how to sample seamless gradient noise on the surface of a sphere? Do we have 2 or 3 values for the location? I tried to come up with something but it's quite difficult. I intentionally didn't look at references and solutions - so maybe that helps to think creatively
@BarneyCodes
@BarneyCodes Ай бұрын
I've not actually tried to do this myself, but I believe there are methods of "unwrapping" the surface of a sphere into 2D coordinates. You can either map it to the full rectangle (like a how a map is a rectangular version of the surface of the earth), which will have some distortion to it, or you can probably do a more accurate version, that would have gaps, which might make it difficult to do seamlessly. If you've got a noise generation function you could probably do it seamlessly by using the 3D point on the surface to sample 3D noise and guarantee that it's seamless? Might be worth playing around with a few different solutions and seeing what they look like!
Fixing the REALTIME terrain shadows using YOUR suggestions!
8:40
Barney Codes
Рет қаралды 71 М.
Beginner's Guide to Shader Distortion Techniques
17:03
Barney Codes
Рет қаралды 7 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 30 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 5 МЛН
Introduction to shaders: Learn the basics!
34:50
Barney Codes
Рет қаралды 360 М.
7 Examples Proving Shaders are Amazing
8:09
DesignCourse
Рет қаралды 40 М.
ASTR1V0X / full dome #shaders #glsl
5:00
Nicu P
Рет қаралды 44
Easy Perlin Noise Flow Fields
10:22
Barney Codes
Рет қаралды 35 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 1 МЛН
Better Mountain Generators That Aren't Perlin Noise or Erosion
18:09
Josh's Channel
Рет қаралды 416 М.
What Are Shaders?
6:24
TheHappieCat
Рет қаралды 208 М.
The Beauty of Code: Flow Fields
7:17
Chris Courses
Рет қаралды 152 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
Introduction to Signed Distance Fields
9:00
Suboptimal Engineer
Рет қаралды 28 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 30 МЛН