How I Made The World with SINE

Поделиться
HTML-код
  • Опубликовано: 29 ноя 2022
  • 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

Комментарии • 235

  • @user-ni7sp1cp2b
    @user-ni7sp1cp2b Год назад +448

    Next video: Making minecraft in python

    • @TheLatrax
      @TheLatrax Год назад +6

      Yes please!

    • @LocalBurglar
      @LocalBurglar Год назад +17

      It should have been in java

    • @user-ni7sp1cp2b
      @user-ni7sp1cp2b Год назад +14

      This is can made with ursina

    • @FXUNDPLXGG
      @FXUNDPLXGG Год назад +12

      @@user-ni7sp1cp2b PyOpenGL никто не отменял, будет сложнее, но зато работать будет быстрее

    • @bingusiswatching6335
      @bingusiswatching6335 Год назад +31

      oh God it'll be even slower

  • @christopherquigley5468
    @christopherquigley5468 Год назад +65

    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.

  • @redredrxd8451
    @redredrxd8451 Год назад +17

    this is terrifyingly beautiful

  • @TheTruthIsGonnaHurt
    @TheTruthIsGonnaHurt Год назад +44

    *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 Год назад +3

      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 Год назад +36

    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!

  • @jeffcummings3842
    @jeffcummings3842 Год назад +29

    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 Год назад +10

    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.

  • @simondev758
    @simondev758 Год назад +3

    I love the overall atmosphere here.

  • @bitpilot79
    @bitpilot79 Год назад +1

    Really nice result. Thanks for sharing!

  • @darkabstergo5838
    @darkabstergo5838 Год назад +4

    Super nice implementation of the concept of the Fourier series!

  • @cybernit3
    @cybernit3 6 месяцев назад +3

    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...

  • @thedreamingtraveller8550
    @thedreamingtraveller8550 Год назад +137

    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  Год назад +18

      Yes, from time to time I will release a video on this topic

    • @thedreamingtraveller8550
      @thedreamingtraveller8550 Год назад +7

      @@CoderSpaceChannel Thanks a lot. Looking forward to it

    • @marcoantonioalonso482
      @marcoantonioalonso482 Год назад +1

      @@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  Год назад +4

      @@marcoantonioalonso482 yes it is an interesting topic

  • @aiksi5605
    @aiksi5605 Год назад

    This channel was like, hand-picked specifically for me lol.
    Thanks for your work!

  • @nextwave319
    @nextwave319 Год назад +2

    hey man, just checked your github, your coding style is Genius! - clarity and organisation.

  • @Selbstzensur
    @Selbstzensur Год назад +4

    Awesome Work!!!!

  • @Auios
    @Auios Год назад +3

    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!

  • @halite4116
    @halite4116 Год назад

    Nice video, very impressive ! Really like your videos.

  • @engineeredarmy1152
    @engineeredarmy1152 Год назад

    Awesome work!

  • @AJ-et3vf
    @AJ-et3vf Год назад

    Awesome video! Thank you!

  • @suicraft8395
    @suicraft8395 Год назад +1

    What a great video, really interesting

  • @kech-agmaio8620
    @kech-agmaio8620 Год назад +1

    Hauntingly beautiful

  • @user-yx5wd5yy6h
    @user-yx5wd5yy6h Год назад +2

    Beautiful!

  • @o-manthehuman7867
    @o-manthehuman7867 Год назад +14

    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

  • @abd-yq2up
    @abd-yq2up Год назад +1

    very cool brother !!

  • @Alannnn14
    @Alannnn14 Год назад +1

    Astronaut: Wait, its all sine?
    Astronaut with a gun: It always has been.

  • @alexandrohdez3982
    @alexandrohdez3982 Год назад

    what a great video congrat 👏👏👏

  • @walidslimani
    @walidslimani Год назад +1

    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

  • @dineshvyas
    @dineshvyas Год назад +1

    Subscribed instantly.

  • @stcpimus
    @stcpimus 3 месяца назад

    Hi from colombia: Tnx for this you are awesome.

  • @meetpatel7683
    @meetpatel7683 Год назад +2

    You are underrated!!

  • @APotatoWT
    @APotatoWT Год назад +1

    That's pretty insane

  • @vayunandanakishore6652
    @vayunandanakishore6652 Год назад

    Wow.....awesome.....

  • @slavsquatsuperstar
    @slavsquatsuperstar Год назад +1

    “It’s all sine?”
    “Always has been.”

  • @viniciusleandrodeloi1582
    @viniciusleandrodeloi1582 Год назад +1

    -Wait it's all sine?
    - Always has been

  • @SkyFly19853
    @SkyFly19853 Год назад

    New video!
    Nice!

  • @0x4849
    @0x4849 Год назад +3

    *laughs in fourier transform* (great vid though ;))

  • @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.

  • @vialomur__vialomur5682
    @vialomur__vialomur5682 Год назад

    wow! love it

  • @ThankYouESM
    @ThankYouESM 3 месяца назад

    There's also a way to use PIL filter blend (plus Image rotate) to get any such results incredibly fast.

  • @JustAPokemonCommentingOnVideos

    good job 👍

  • @electrictrojan6719
    @electrictrojan6719 Год назад +5

    I can't believe you give this away for free

  • @kylebarvel
    @kylebarvel Год назад

    You made planet 9. Good job on this one this inspired me

  • @LowLevelLemmy
    @LowLevelLemmy Год назад +2

    Wait, it’s all sine function?
    🔫 Always has been

  • @Clepy
    @Clepy 7 месяцев назад

    Man u deserve a sub

  • @swag_designs5470
    @swag_designs5470 Год назад

    Amazing

  • @md.mizanurrahmanxendpdc.369
    @md.mizanurrahmanxendpdc.369 Год назад

    I want to see this 100 times after my exam

  • @quinnsine1650
    @quinnsine1650 Год назад

    Nice!

  • @7guitarlover
    @7guitarlover Год назад

    This is awesome ! Subscribed ! Can you suggest some resources / books to read more about such stuff. Looking fwd for more such videos.

  • @ogedeh
    @ogedeh Год назад

    I mean all of reality is wave functions, so it should be possible. but holy cow what a great job, looks amazing

  • @blitzwolf4052
    @blitzwolf4052 Год назад +1

    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

  • @cheersqweate4232
    @cheersqweate4232 Год назад +2

    You're cool
    You can tell you how to make mountains colored (using a gradient). PLEASE

  • @Jera2271
    @Jera2271 Год назад +1

    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?

  • @user-zb5ey8qy8o
    @user-zb5ey8qy8o Год назад +5

    Круто! Продолжай ❤

  • @rupajchowdhury1877
    @rupajchowdhury1877 Год назад +1

    Minecraft: Hold my cubes

  • @McSwey
    @McSwey Год назад +1

    And you can actually shape it to your liking with the Fourier transform

  • @ciyrotix6240
    @ciyrotix6240 Год назад +2

    Wait, it's all sine?
    Always has been.

  • @skyneon-8500
    @skyneon-8500 Год назад +2

    I like you videos

  • @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.

  • @dickheadrecs
    @dickheadrecs Год назад

    reminds me of that bonus mode in microsoft excel

  • @NighthawkRPL
    @NighthawkRPL Год назад +2

    how to scare a pre calc or trignometry student:

  • @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.

  • @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.

  • @currentlynull337
    @currentlynull337 Год назад

    Epic

  • @mohamedhamdi366
    @mohamedhamdi366 Год назад +1

    man you are cool

  • @LeiffNathanAMendoza
    @LeiffNathanAMendoza 5 месяцев назад

    GREAT 🫣🥳

  • @BombasticTom492
    @BombasticTom492 Год назад +1

    planet cos next

  • @asenvelkov301
    @asenvelkov301 Год назад +4

    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 Год назад +2

      It's not immediate. He actually solves these and researched prior to recording. It actually may have taken him a month

  • @user-xv6ig2yp3z
    @user-xv6ig2yp3z Год назад +1

    Next episode of "trigger your imposter syndrome in less than 10 minutes"

  • @CaptianTitan
    @CaptianTitan Год назад +2

    If the terrain was a bit smooth you could navigate it easily In-game

  • @DarryanDhanpat
    @DarryanDhanpat Год назад +1

    Fourier is quaking

  • @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.

  • @linux_devs
    @linux_devs Год назад +1

    Next video making sinecraft

  • @ENRGguy
    @ENRGguy Год назад

    Who didn't understand: he made the sea waves from sine wave, and rocks generation with sine wave.

  • @tonym5857
    @tonym5857 Год назад

    👏👏👏👏👏

  • @WeyardWiz
    @WeyardWiz Год назад

    4:04 not hashicorp terraforming of course 😉

  • @diegohiroshiysusvideos2909
    @diegohiroshiysusvideos2909 Год назад

    These Pipeline rendering GPU system are beautiful. uwu
    Currently, I'm working in the Lumen illumination system.

  • @Kapcpa
    @Kapcpa Год назад

    Idea for next video: 2d line of sight using py opengl?

  • @samriddhsinha6492
    @samriddhsinha6492 Год назад +2

    When a coder gets a Math Project ..

  • @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?

  • @Bizarro69
    @Bizarro69 Год назад +1

    So we're living in a sinelation 😏

  • @Alexander-lg2yo
    @Alexander-lg2yo Год назад

    Damn Ezreal

  • @c14662
    @c14662 Год назад

    if you press 1,2,3 or 4 on your keyboard he always initializes those timestamps with the word "function"

  • @skahrnunend9232
    @skahrnunend9232 Год назад +8

    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  Год назад +3

      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

  • @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?

  • @user-lo2qv8wz8f
    @user-lo2qv8wz8f Год назад

    like first watch after

  • @lucian6172
    @lucian6172 Год назад

    Is this like an FM synthesizer for graphics ? Using only sine waves to produce all graphical sounds ?

  • @kungfooman
    @kungfooman Год назад +1

    "How I Wrote This Comment with SINE"... somewhere in some computer system

  • @rustamtermenusmack7165
    @rustamtermenusmack7165 Год назад

    Voxel Cone Tracing + Ray Marching in python

  • @theokenric
    @theokenric Год назад

    Born in Sine

  • @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  Год назад +1

      170 fps rtx 3070 mobile. Only two triangles are used for rendering (4 vertices)

  • @BurrritoYT
    @BurrritoYT Год назад +1

    Wait, it's all a sine?
    Always has been.

  • @mainframeomega3154
    @mainframeomega3154 Год назад

    Now imagine if you integrated it with cosine and tangent

  • @Gangstar-nd9fm
    @Gangstar-nd9fm Год назад +4

    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  Год назад +1

      maybe this will help:
      ruclips.net/video/eJDIsFJN4OQ/видео.html

    • @Gangstar-nd9fm
      @Gangstar-nd9fm Год назад +1

      @@CoderSpaceChannel Thanks for the quick response! Yes, I think that's what i need! Thanks a lot!

  • @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 🙏🙏

  • @fench1234567
    @fench1234567 Год назад +1

    So is using sine in modern imagery and tech just a "sine of the times"?

  • @Jachii9
    @Jachii9 Год назад

    omg this guy made the world?

  • @pvic6959
    @pvic6959 Год назад +4

    If you make a planet based the Sine function, is it a Sin?

    • @CoderSpaceChannel
      @CoderSpaceChannel  Год назад +3

      To the music: Pet Shop Boys - It's A Sin

    • @SENTRY456123
      @SENTRY456123 Год назад

      @@CoderSpaceChannel everywhere I'm going to, it's a sin

  • @yxngboypolo
    @yxngboypolo Год назад +1

    What would happen if you collectively switched every sine function to tangent?

  • @user-bi2ph9hi3v
    @user-bi2ph9hi3v Год назад +1

    牛逼

  • @VishalKumar-nv3pi
    @VishalKumar-nv3pi Год назад

    Bro, how do you get this type of skill? Share your tips to us.