Тёмный

How I Made The World with SINE 

Coder Space
Подписаться 55 тыс.
Просмотров 182 тыс.
50% 1

Procedural Terrain Generation using Sine as noise function. Sphere Tracing technique (raymarching) was applied using OpenGL. Python and GLSL were used for this project (modules Pygame, ModernGL)
Code:
github.com/StanislavPetrovV/T...
#coderspace #opengl #raymarching

Опубликовано:

 

29 ноя 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 235   
@user-ni7sp1cp2b
@user-ni7sp1cp2b Год назад
Next video: Making minecraft in python
@TheLatrax
@TheLatrax Год назад
Yes please!
@LocalBurglar
@LocalBurglar Год назад
It should have been in java
@user-ni7sp1cp2b
@user-ni7sp1cp2b Год назад
This is can made with ursina
@FXUNDPLXGG
@FXUNDPLXGG Год назад
@@user-ni7sp1cp2b PyOpenGL никто не отменял, будет сложнее, но зато работать будет быстрее
@bingusiswatching6335
@bingusiswatching6335 Год назад
oh God it'll be even slower
@TheTruthIsGonnaHurt
@TheTruthIsGonnaHurt Год назад
*Great Work!* I once heard that the very foundation of our entire universe / multiverse is built by frequency. That everything is created by the harmonics.
@pimposki6232
@pimposki6232 Год назад
this is true i suppose. i mean, fourier's theorem breaks all complex sound waves as a sum of sine waves and i see no reason for that not to extend to things like radio waves and even the complex movements of matter itself, like the excitation of particles themselves. do note though that i am just an audio engineer and my education in physics at university was mostly regarding acoustics and electronics, and was only a part of the coursework
@jarvis612
@jarvis612 Год назад
Good job is done! For me, the main reason water looks unusual lies in fact it ignores terrain. Waves do not change direction colliding with obstacles, which makes them look totally unrealistic. I ask author to try to consider some solution (of course, not to make physical simulation of water, but to investigate some trick to add water natural look), if it is interesting for them. Anyway, thank's author for what is already done!
@christopherquigley5468
@christopherquigley5468 Год назад
Given that everything we see around us is because of light, which travels as a wave, it doesn’t surprise me. But, the fact you decided to create a world out of sine waves is amazing. Really cool stuff!
@Simien.0
@Simien.0 Год назад
Matter is light/mind/sinusoids. Light has and will synthesize matter via the fourier transform. Breit-wheeler synthesis. Look into ontological mathematics.
@jeffcummings3842
@jeffcummings3842 Год назад
Beautiful, and yes some kind of TTS or voice filter, haha, love the videos, keep em coming! I'm definitely going to try something like this with terrain generation soon.
@lyte69
@lyte69 Год назад
great video, I've always liked to create different worlds using generative techniques by random choice and see the exciting results and play with it, would love to see more.
@redredrxd8451
@redredrxd8451 Год назад
this is terrifyingly beautiful
@simondev758
@simondev758 Год назад
I love the overall atmosphere here.
@darkabstergo5838
@darkabstergo5838 Год назад
Super nice implementation of the concept of the Fourier series!
@bitpilot79
@bitpilot79 Год назад
Really nice result. Thanks for sharing!
@cybernit3
@cybernit3 6 месяцев назад
I believe when the VOID (SPACE) was first created the Tone "OH" was used before the big bang. If you look at the formula for volume of a spheroid (V = 4/3 * pi * r^3); pi = irrational constant which shows KAOS exist from that alone. I guess it is like GOD breath the Tone "OH" and the radii of the void space got larger (like blowing up a balloon)... then eventually there was a big bang. I sound crazy and it is metaphysical; but I feel satisfied with this answer to understand the universe. Thanks for the video showing the power of GPUs... and for teaching me about Vertex and Fragment shaders. take care...
@nextwave319
@nextwave319 Год назад
hey man, just checked your github, your coding style is Genius! - clarity and organisation.
@thedreamingtraveller8550
@thedreamingtraveller8550 Год назад
I really love your videos. You do a great job everytime. However, I happen to prefer the procedural graphics videos quite a lot. Do you think you could do something similar for your next video
@CoderSpaceChannel
@CoderSpaceChannel Год назад
Yes, from time to time I will release a video on this topic
@thedreamingtraveller8550
@thedreamingtraveller8550 Год назад
@@CoderSpaceChannel Thanks a lot. Looking forward to it
@marcoantonioalonso482
@marcoantonioalonso482 Год назад
@@CoderSpaceChannel I've seen a video showing a procedural 2D water animation, but the person only shared the source file and didn't explain anything. Could you make a video about it?
@CoderSpaceChannel
@CoderSpaceChannel Год назад
@@marcoantonioalonso482 yes it is an interesting topic
@Auios
@Auios Год назад
Awesome work! Off topic but I have been interested in map generation using Wave Function Collapse. I like your video format and I think it could be a cool topic for your channel!
@aiksi5605
@aiksi5605 Год назад
This channel was like, hand-picked specifically for me lol. Thanks for your work!
@Selbstzensur
@Selbstzensur Год назад
Awesome Work!!!!
@engineeredarmy1152
@engineeredarmy1152 Год назад
Awesome work!
@AJ-et3vf
@AJ-et3vf Год назад
Awesome video! Thank you!
@halite4116
@halite4116 Год назад
Nice video, very impressive ! Really like your videos.
@user-yx5wd5yy6h
@user-yx5wd5yy6h Год назад
Beautiful!
@kech-agmaio8620
@kech-agmaio8620 Год назад
Hauntingly beautiful
@o-manthehuman7867
@o-manthehuman7867 Год назад
You could probably add in some smoothing, and maybe layer in some cosine with smoothmin to make the terrain less noisy and a bit more realistic
@o-manthehuman7867
@o-manthehuman7867 Год назад
Or even just blur the heightmap
@suicraft8395
@suicraft8395 Год назад
What a great video, really interesting
@abd-yq2up
@abd-yq2up Год назад
very cool brother !!
@Alannnn14
@Alannnn14 Год назад
Astronaut: Wait, its all sine? Astronaut with a gun: It always has been.
@slavsquatsuperstar
@slavsquatsuperstar Год назад
“It’s all sine?” “Always has been.”
@alexandrohdez3982
@alexandrohdez3982 Год назад
what a great video congrat 👏👏👏
@dineshvyas
@dineshvyas Год назад
Subscribed instantly.
@vayunandanakishore6652
@vayunandanakishore6652 Год назад
Wow.....awesome.....
@APotatoWT
@APotatoWT Год назад
That's pretty insane
@stcpimus
@stcpimus 3 месяца назад
Hi from colombia: Tnx for this you are awesome.
@ThankYouESM
@ThankYouESM 3 месяца назад
There's also a way to use PIL filter blend (plus Image rotate) to get any such results incredibly fast.
@vialomur__vialomur5682
@vialomur__vialomur5682 Год назад
wow! love it
@walidslimani
@walidslimani Год назад
AS a math student this is just a little use of the vaste mysterious world of mathematics , there A lot of secrets in this math world , good vid keep up
@0x4849
@0x4849 Год назад
*laughs in fourier transform* (great vid though ;))
@meetpatel7683
@meetpatel7683 Год назад
You are underrated!!
@viniciusleandrodeloi1582
@viniciusleandrodeloi1582 Год назад
-Wait it's all sine? - Always has been
@wzafar7099
@wzafar7099 Год назад
Good video about Law of creativity. Sine wave with Random Noise. Same wave can generate Living beings. Also add distance function to generate more planets, stars and galaxies.
@SkyFly19853
@SkyFly19853 Год назад
New video! Nice!
@swag_designs5470
@swag_designs5470 Год назад
Amazing
@JustAPokemonCommentingOnVideos
good job 👍
@quinnsine1650
@quinnsine1650 Год назад
Nice!
@Clepy
@Clepy 7 месяцев назад
Man u deserve a sub
@kylebarvel
@kylebarvel Год назад
You made planet 9. Good job on this one this inspired me
@md.mizanurrahmanxendpdc.369
I want to see this 100 times after my exam
@Jera2271
@Jera2271 Год назад
This is a very interesting video to watch even if I don't know anything about coding Out of curiousity, is it possible to build a planet using cosecant, arcsine, and hyperbolic sine?
@electrictrojan6719
@electrictrojan6719 Год назад
I can't believe you give this away for free
@CoderSpaceChannel
@CoderSpaceChannel Год назад
it's my hobby to share knowledge for free
@7guitarlover
@7guitarlover Год назад
This is awesome ! Subscribed ! Can you suggest some resources / books to read more about such stuff. Looking fwd for more such videos.
@CoderSpaceChannel
@CoderSpaceChannel Год назад
I guess this is the best resource: iquilezles.org/
@7guitarlover
@7guitarlover Год назад
@@CoderSpaceChannel Thankyou !
@ogedeh
@ogedeh Год назад
I mean all of reality is wave functions, so it should be possible. but holy cow what a great job, looks amazing
@LowLevelLemmy
@LowLevelLemmy Год назад
Wait, it’s all sine function? 🔫 Always has been
@user-zb5ey8qy8o
@user-zb5ey8qy8o Год назад
Круто! Продолжай ❤
@Veptis
@Veptis 11 месяцев назад
I am learning shadercode by working in language model evaluation for shader code. And I have seen various implementations for noise. But never reall understood the real semantics behind it. Evaluating if the model can generate the fitting type of noise for a specific program might be a good benchmark task.
@astrah982
@astrah982 Год назад
I would generate and hold the values on the CPU side as then you have access to physics. If you have a shader do it you’re only displaying graphics.
@rupajchowdhury1877
@rupajchowdhury1877 Год назад
Minecraft: Hold my cubes
@skyneon-8500
@skyneon-8500 Год назад
I like you videos
@McSwey
@McSwey Год назад
And you can actually shape it to your liking with the Fourier transform
@cheersqweate4232
@cheersqweate4232 Год назад
You're cool You can tell you how to make mountains colored (using a gradient). PLEASE
@mohamedhamdi366
@mohamedhamdi366 Год назад
man you are cool
@lucian6172
@lucian6172 Год назад
Is this like an FM synthesizer for graphics ? Using only sine waves to produce all graphical sounds ?
@currentlynull337
@currentlynull337 Год назад
Epic
@dickheadrecs
@dickheadrecs Год назад
reminds me of that bonus mode in microsoft excel
@Gangstar-nd9fm
@Gangstar-nd9fm Год назад
Hello. Can you please tell me how to master moderngl as well? I usually use it for my game. With grief in half I learned to draw textures in 2D. Now I want to learn how to do 3D and draw graphics. Before that, there were no cases with OpenGL. Maybe i need to start somewhere else. Can you provide links to sources on your subjects?
@CoderSpaceChannel
@CoderSpaceChannel Год назад
maybe this will help: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-eJDIsFJN4OQ.html
@Gangstar-nd9fm
@Gangstar-nd9fm Год назад
@@CoderSpaceChannel Thanks for the quick response! Yes, I think that's what i need! Thanks a lot!
@blitzwolf4052
@blitzwolf4052 Год назад
I’ve never realized how much python looks like c++. Thankful I could understand this at all, great work!
@CoderSpaceChannel
@CoderSpaceChannel Год назад
Python was used to initialize the OpenGL context, but the rest is C-like language GLSL
@XENON2028
@XENON2028 Год назад
most of the code was in GLSL not in python
@Simien.0
@Simien.0 Год назад
When you accidently uncover the secrets of pythagorean illuminism and demonstrate the fourier transform as a generative of space and time values.
@NighthawkRPL
@NighthawkRPL Год назад
how to scare a pre calc or trignometry student:
@user-xv6ig2yp3z
@user-xv6ig2yp3z Год назад
Next episode of "trigger your imposter syndrome in less than 10 minutes"
@markusmiekk-oja3717
@markusmiekk-oja3717 Год назад
One thing I wonder about with the use of octaves in terrain generation: wouldn't using a stretched or compressed octave (something like 2.01 or 1.997 somesuch) give a slightly less predictable "waveform"? How about adding a second, stretched harmonic beyond that? (3.02 or somesuch)? Everywhere I've seen this, it's always been octaves, but ... from a world-generating perspective, it seems to me that just fudging that factor of two a bit would improve the outcome. Is there any particular reason exactly 2 is favored?
@coolbrotherf127
@coolbrotherf127 Год назад
What kind of real time performance does this project get? Does it only render screen space geometry or culling hidden polygons?
@CoderSpaceChannel
@CoderSpaceChannel Год назад
170 fps rtx 3070 mobile. Only two triangles are used for rendering (4 vertices)
@tonym5857
@tonym5857 Год назад
👏👏👏👏👏
@doltramir
@doltramir Год назад
Why not also use noise to shift coordinates a bit, so that the pattern would be even less visible, or just disappear entirely?
@LeiffNathanAMendoza
@LeiffNathanAMendoza 5 месяцев назад
GREAT 🫣🥳
@CaptianTitan
@CaptianTitan Год назад
If the terrain was a bit smooth you could navigate it easily In-game
@Kapcpa
@Kapcpa Год назад
Idea for next video: 2d line of sight using py opengl?
@diegohiroshiysusvideos2909
@diegohiroshiysusvideos2909 Год назад
These Pipeline rendering GPU system are beautiful. uwu Currently, I'm working in the Lumen illumination system.
@ciyrotix6240
@ciyrotix6240 Год назад
Wait, it's all sine? Always has been.
@BombasticTom492
@BombasticTom492 Год назад
planet cos next
@basicallybrand
@basicallybrand Год назад
how does it run so smooth for you? python is so slow for me
@asenvelkov301
@asenvelkov301 Год назад
I saw your github, uhm, any chance you're bulgarian? After seeing most of ur vids i believe you're some sort of a genius, like how u just know when to apply all algorithmic logic and math, im mindblown
@WeyardWiz
@WeyardWiz Год назад
It's not immediate. He actually solves these and researched prior to recording. It actually may have taken him a month
@fench1234567
@fench1234567 Год назад
So is using sine in modern imagery and tech just a "sine of the times"?
@linux_devs
@linux_devs Год назад
Next video making sinecraft
@skahrnunend9232
@skahrnunend9232 Год назад
Could u do it in the Godot engine with the python-like GDscript :), I could donate a little bit for it, I really don’t know what to do with it yet, and I am a poor game dev student now. But would be really exiting and thrilling to learn from your tutorial in Godot and see the result and be able to populate this SINE planet with Npcs and so on. You are the John Avon of python. Best regards :)
@CoderSpaceChannel
@CoderSpaceChannel Год назад
I'm not a Godot expert but try just applying this fragment shader to the Viewport (and don't forget the uniform variables)
@algodude8713
@algodude8713 Год назад
Godot currently does not support using GLSL shaders so you would have to rewrite it in the Godot shader language. It's very similar to GLSL so it shouldn't be too difficult.
@nocturne6320
@nocturne6320 Год назад
The entire terrain is rendered in a shader, you shouldn't need to write a single line with GDScript, only port the shader over to Godot's shading language
@DarryanDhanpat
@DarryanDhanpat Год назад
Fourier is quaking
@ENRGguy
@ENRGguy Год назад
Who didn't understand: he made the sea waves from sine wave, and rocks generation with sine wave.
@pvic6959
@pvic6959 Год назад
If you make a planet based the Sine function, is it a Sin?
@CoderSpaceChannel
@CoderSpaceChannel Год назад
To the music: Pet Shop Boys - It's A Sin
@SENTRY456123
@SENTRY456123 Год назад
@@CoderSpaceChannel everywhere I'm going to, it's a sin
@yxngboypolo
@yxngboypolo Год назад
What would happen if you collectively switched every sine function to tangent?
@suhadayunus2965
@suhadayunus2965 7 месяцев назад
ask for the script, min🙏🙏
@WeyardWiz
@WeyardWiz Год назад
4:04 not hashicorp terraforming of course 😉
@mainframeomega3154
@mainframeomega3154 Год назад
Now imagine if you integrated it with cosine and tangent
@zoravarbajwa2266
@zoravarbajwa2266 Год назад
What would the world look like if you replace all of the sine functions with cosine functions, without changing any of the other code? And the same thing, but with the tangent function
@CPep
@CPep Год назад
I would love to see the totally different result when using cosine functions 🙏🙏
@Alexander-lg2yo
@Alexander-lg2yo Год назад
Damn Ezreal
@VishalKumar-nv3pi
@VishalKumar-nv3pi Год назад
Bro, how do you get this type of skill? Share your tips to us.
@rustamtermenusmack7165
@rustamtermenusmack7165 Год назад
Voxel Cone Tracing + Ray Marching in python
@cookiepolice2086
@cookiepolice2086 Год назад
Where do you find how to use moderngl I tried to google but none of the results were helpful
@c14662
@c14662 Год назад
if you press 1,2,3 or 4 on your keyboard he always initializes those timestamps with the word "function"
@jennycotan7080
@jennycotan7080 Год назад
Just like some mad modern Taoist (and maybe some of those Lady Gaga's Chromatica fans) thinks, a world where Sine is the god-dess which made up everything! Maybe on the water, we can have travelling sinusoids, on different freq's and travelling in their different speed? And, I think that the textures of the "rolling hills" seem to be a bit too... unnatural. Can we use just 2-4 rather low freq's of sinusoids, and a bit more rather high freq's, with no annoying, less important middle-freq ones? Maybe that'll be throretically easy, for splitting the terrain wave function (Pun intended!) into two of them, one for the basic terrain shape, the another one makes the texture? (Fun fact: Weierstrass function, that fractal-like one, is also based on sinusoids and resembles mountains better than those you displayed here! ) Maybe that can help you create a more realistic and wild sinusoidal land! Sadly I'm not an experienced programmer who can just do some impractical simple programming on Python and Mathematica scripts.
@theokenric
@theokenric Год назад
Born in Sine
@user-lo2qv8wz8f
@user-lo2qv8wz8f Год назад
like first watch after
@Bizarro69
@Bizarro69 Год назад
So we're living in a sinelation 😏
@kungfooman
@kungfooman Год назад
"How I Wrote This Comment with SINE"... somewhere in some computer system
@samriddhsinha6492
@samriddhsinha6492 Год назад
When a coder gets a Math Project ..
@bezimiennygrzes5593
@bezimiennygrzes5593 Год назад
whats difference between this and perlin funciton
Далее
What is Mode 7? Let's code it!
8:03
Просмотров 39 тыс.
Let's code 3D Engine in Python. OpenGL Pygame Tutorial
33:31
HUMAN BASKETBALL! 👀🏀🤣 | Triple Charm #Shorts
00:15
When You Get Ran Over By A Car...
00:15
Просмотров 3 млн
Giving Personality to Procedural Animations using Math
15:30
Exploring the Menger Sponge Fractal
9:34
Просмотров 9 тыс.
The Beauty of Prime Numbers
10:54
Просмотров 37 тыс.
Tetris in Windows Terminal with Python
1:36
I Made A Blob Shooting Game With Ray Marching
13:33
Просмотров 37 тыс.
I Made a Graphics Engine
6:42
Просмотров 242 тыс.
How to Make 3D Fractals
7:48
Просмотров 1,6 млн
Coding Adventure: Ray Marching
5:06
Просмотров 1 млн
I coded one project EVERY WEEK for a YEAR
13:13
Просмотров 526 тыс.