[Unity] Procedural Planets (E01 the sphere)

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024

ความคิดเห็น • 598

  • @SebastianLague
    @SebastianLague  6 ปีที่แล้ว +178

    Hi everyone, welcome to this new series on procedural planet generation.
    Episode two is out on early access for patrons here: www.patreon.com/posts/20806385, and will be publicly available sometime next week.
    As a rough guide of what to expect from this series, the current episode plan is as follows:
    1: Generating a sphere
    2: Creating a settings editor for planet properties
    3: Combining multiple layers of simplex noise to create terrain
    4: Creating mountain ridges with a different noise filter
    5: Combining different noise types for more varied terrain
    6: Using shadergraph to create a terrain shader
    7+ Some extra stuff maybe, not fully planned yet.

    • @IndieMarkus
      @IndieMarkus 6 ปีที่แล้ว +4

      I really love the idea, however, I have a suggestion on an interesting twist to this tutorial:
      Let's suppose you have a planet system an fly through it in a spaceship. If there are hundreds of planets like this around, wouldn't it make the game really, really slow? Wouldn't it be better to assign some material with height and normal maps to the four faces instead of generating the actual geometry? You could make it so that the geometry is generated and then baked onto some textures and use those textures instead at runtime!

    • @MortyrSC2
      @MortyrSC2 6 ปีที่แล้ว +2

      +Sebastian Lague
      Aha! I have just started working on implementing planets in my game using the very method of "spherical cubes" and this guide: catlikecoding.com/unity/tutorials/cube-sphere/ . I couldn't believe my eyes when you added this video just a few days later. Absolutely love it! THANKS!!! :D
      +IndieMarkus
      I'm not sure whether it solves your problem, but my approach was to store planets as simple data types in arrays (terrain type, height etc) and only re-constructing a GameObject and a mesh when a planet is visible. Then you can have practically unlimited number of planets and rebuilding a single mesh occasionally isn't intensive enough to noticeably slow down a framerate.
      I couldn't use static assets since my planets can actually change during the game due to terraforming/bombardment etc.

    • @piranha1337
      @piranha1337 6 ปีที่แล้ว +2

      Hey , when you talk about a more even distribution, you will use this mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html right?
      Looking forward to the normal calculation. I've making procedural planet approaches since 2012 and the normal seams are always a headache especially when using LOD patches. It will be very interesting to see how you will solve that your way.

    • @HurriO4
      @HurriO4 6 ปีที่แล้ว +2

      @IndieMarkus
      unless you're targeting mobile, modern hardware will usually be able to handle a few million polygons just fine. the trick would be to implement a level-of-detail system to reduce the number of polygons on planets as their distance to the camera increases. bump maps could be used on the normally used textures anyway to simulate even finer detail between the vertices.

    • @HurriO4
      @HurriO4 6 ปีที่แล้ว +2

      @Sebastian Lague
      for the 7+ part(s): how about some rings (like Saturn) and/or an atmosphere (with a shader for nice lighting effects)?

  • @judgenitsuj4402
    @judgenitsuj4402 5 ปีที่แล้ว +261

    Would it be possible to mix this with your hydraulic erosion coding

    • @G4merSylver
      @G4merSylver 5 ปีที่แล้ว +31

      with some tuning it could be done. You would have to change from tricking downwards to trickling to the planet middle. It would however completely mess up the already existing formula, so while you can use hyraulic erosion it would require a specifically written one for spheres.

    • @olivertressler633
      @olivertressler633 5 ปีที่แล้ว +13

      @@G4merSylver I think, one could leverage that the sphere is actually just a stretched cube. If you apply the generation first for each face of the cube and afterwards stretch out the terrain, the old function could theoretically work.

    • @OrangeC7
      @OrangeC7 5 ปีที่แล้ว +7

      @@olivertressler633 Perhaps, maybe you could apply the algorithm as if the mesh was already stretched? I mean stretching out or squashing the forces in certain directions depending on where the force is being applied, and doing so in a way that counteracts the bulging out of the cube later on.

    • @KnightoftheSorryFace
      @KnightoftheSorryFace 4 ปีที่แล้ว +1

      Oh someone already said this

    • @pentaxtp7527
      @pentaxtp7527 4 ปีที่แล้ว +4

      Reading all this comments is just making me feel dumb

  • @thatperson9478
    @thatperson9478 3 ปีที่แล้ว +23

    Most of the time, I don't need to learn from these tutorials, I just watch them while I do my physics homework. Your voice is just so soothing.

  • @SpaceflightSimulator_Official
    @SpaceflightSimulator_Official 6 ปีที่แล้ว +222

    This is something I would need in my next game.

    • @ceddyd
      @ceddyd 3 ปีที่แล้ว +12

      Lol I just find a 2 years old comment from you with only 3 likes.

    • @SpaceflightSimulator_Official
      @SpaceflightSimulator_Official 3 ปีที่แล้ว +7

      @@ceddyd Heh

    • @ceddyd
      @ceddyd 3 ปีที่แล้ว +2

      Wow I didn’t think you’d respond. Kudos for that.

    • @TheEarlPH
      @TheEarlPH 3 ปีที่แล้ว +4

      Hi stef! I love your game btw.

    • @animationspace8550
      @animationspace8550 3 ปีที่แล้ว +6

      WAIT IS THIS WHO I THINK IT IS?! I LOVE SFS!

  • @cameron.t
    @cameron.t 3 ปีที่แล้ว +4

    One of the few channels where it's wise to slow the video down instead of speeding it up. 🤯

  • @mfreel2112
    @mfreel2112 6 ปีที่แล้ว +86

    Nice video. Thanks.
    To get rid of the seam, I added: Vector3[] normals = new Vector3[resolution * resolution];
    then normals[i] = vertices[i].normalized; after you added the vertex.
    then mesh.normals = normals; and comment out //mesh.RecalculateNormals();
    It's a sphere so the smooth normals will all be pointing along the vertex vector.
    Hope you add to the series.

    • @BlackwoodHDEnglish
      @BlackwoodHDEnglish 5 ปีที่แล้ว +19

      You can also just add the line "mesh.normals = vertices;" since the vertices are already normalized.

    • @DutchDinosaur
      @DutchDinosaur 5 ปีที่แล้ว +1

      Thanks! this helped

    • @goomiac
      @goomiac 5 ปีที่แล้ว +5

      it doesn't work for me...I get a very strange lighting instead and the shapes are no longer clearly visible...

    • @jamiecovell6991
      @jamiecovell6991 4 ปีที่แล้ว +1

      Thanks this is exactly what I was looking for in the comments :D

    • @triangle4studios
      @triangle4studios 4 ปีที่แล้ว +1

      @@BlackwoodHDEnglish Yup

  • @abdelrahmanmohammed9405
    @abdelrahmanmohammed9405 6 ปีที่แล้ว +503

    Finally how to make No man's sky

    • @vilmarjunior3481
      @vilmarjunior3481 6 ปีที่แล้ว +3

      Abd ElRahman Mohammed lol

    • @johnjackson9767
      @johnjackson9767 6 ปีที่แล้ว +9

      Not quite, unless he'll cover implementing a voxel system with Dual Contouring.

    • @snownebula2541
      @snownebula2541 6 ปีที่แล้ว +7

      MapMagic and Voxeland can be added to this to do just this.

    • @wylie2835
      @wylie2835 6 ปีที่แล้ว +2

      No where near

    • @JohnsontheFly
      @JohnsontheFly 5 ปีที่แล้ว +19

      More like Spore

  • @AlcatrazIsland5
    @AlcatrazIsland5 5 ปีที่แล้ว +948

    Seeing this just reminds me how terrible I am at coding.

    • @danielridge6000
      @danielridge6000 5 ปีที่แล้ว +70

      Takes a lot of practice, you will get there! Just keep on learning.

    • @zaraf
      @zaraf 5 ปีที่แล้ว +64

      Every time I want to start a project all I end up doing is printing hello world

    • @danielridge6000
      @danielridge6000 5 ปีที่แล้ว +61

      ​@@zaraf Try setting scope for a project you want. Make a google doc or write in a notebook what you want to do. So if you print hello world, remove it from the main and build a function that takes and prints a string. Just keep going from there and add options for adding numbers. One simple program I wrote was just rock paper scissors with a simple AI. Don't give up if you get stuck or lose motivation. If you need to, just step away for a while and let your mind refresh.

    • @johnvonhorn2942
      @johnvonhorn2942 5 ปีที่แล้ว +2

      ditto

    • @haxel96
      @haxel96 4 ปีที่แล้ว +22

      @@zaraf Dont feel bad just straight up copying the code from turials such as these, get it working, then just play around with the code and see what changes what and see if you can understand it. Doing that for a month teaches you more than you'll learn in a comp sci uni.

  • @mmanfrin
    @mmanfrin 5 ปีที่แล้ว +276

    Man, this is an odd feeling: I fully understand your code, but I am 100% lost with what its doing.

    • @BlueGrovyle
      @BlueGrovyle 5 ปีที่แล้ว +21

      Then how do you _fully_ understand it?

    • @marshmellominiapple
      @marshmellominiapple 5 ปีที่แล้ว +58

      @@BlueGrovyle he knows what the methods and loops do but not how they effect the world

    • @Shadowsphere1
      @Shadowsphere1 3 ปีที่แล้ว +16

      Yeah, that's the difference between code and logic. It's like reading an academic research paper on chromodynamics or something. You know the words on the page, but don't understand the concepts they are presenting.
      This is why almost every accredited software program and almost any decent university will always have a dedicated "Algorithms" course between Junior and Senior years. It's hard stuff. Half the battle is knowing how to code. The other half is knowing how to translate logic into code, let alone geometric logic, and later in these tutorials, real life physics phenomenon.

    • @spinix3744
      @spinix3744 2 ปีที่แล้ว +3

      Sebastian codes like a Yogi approaching nirvana, you need to muster all the calmness you can in your spirit body and soul before you pay attention.

  • @abhranildas6560
    @abhranildas6560 2 ปีที่แล้ว +9

    I am a physics PhD and love your videos, but sometimes I watch them just to hear your calming voice.

  • @MrRafabro
    @MrRafabro 5 ปีที่แล้ว +6

    These videos are by far the best and most interesting coding videos on youtube imo, can't stop watching

  • @decelerisgames8276
    @decelerisgames8276 6 ปีที่แล้ว +19

    I've waited so mush time for a tutorial like this, and then in addition, by sebastion lague. IT'S TOO MUCH COOL

  • @taicanium
    @taicanium 4 ปีที่แล้ว +2

    Until recently, the procedural planet and country simulator I've been working on in pure Lua used an inefficient method for generating its planets that involved looping through a cube and calculating whether each and every point lied on the surface of a sphere. I just got through implementing this distortion algorithm you showed, and it's reduced my generation times by a quarter on average. You rock, man! :D

  • @zix2421
    @zix2421 2 หลายเดือนก่อน

    Years passed, and this video is still useful and interesting, cool

  • @ЕвгенийШ-з2з
    @ЕвгенийШ-з2з ปีที่แล้ว +8

    Dear man, you saved me a huge amount of time and nerves. Thank you endlessly!

  • @organicos5834
    @organicos5834 4 ปีที่แล้ว +1

    Sebastian is the best teacher i found so far on TH-cam, thank you for your content

  • @dinoeebastian
    @dinoeebastian 9 หลายเดือนก่อน

    I've been looking for a tutorial like this in Unreal, and eventually I decided that I should just go back to your videos and figure out how to get them to work in Unreal since none of the other tutorials seem to do it quite as well as you

  • @tranceemerson8325
    @tranceemerson8325 2 ปีที่แล้ว +3

    every time you go back in the code to write something in, it would be nice if you would compile it and show us why it needs to be written in. just my 2 cents. love this tut series and can't wait to see you do more.

  • @doongi2001
    @doongi2001 6 ปีที่แล้ว +92

    Love the idea of this new series, but what’s going on with the neural network series? Is it over? Will it continue alongside this series? Will it continue after this series? Really want some info of what’s going on there

  • @isaacryu
    @isaacryu 6 ปีที่แล้ว +11

    Ohhhh it’s sooooo coooooool, sooooo cooooooool, my computer can’t handle the rendering.

  • @khhs
    @khhs 3 ปีที่แล้ว

    Great tutorial, explains a lot, and the voice makes me calm and able to focus.

  • @jordilagaresroset8396
    @jordilagaresroset8396 6 ปีที่แล้ว +1

    I've been looking for these during ages. Now, that I already completly forgotten this times, I found it in a random youtube channel.
    You won a new subscriber! Amzing!!! :)

  • @g4ble
    @g4ble 6 ปีที่แล้ว

    Just finished my own inplementation of a system like this based on your landmass tutorial.
    I'm glad you do this series so i can see what i can improve in my own.
    Thx for all your awesome series and i hope you will continue to make more interesting tutorials.

  • @ironfoot1938
    @ironfoot1938 2 ปีที่แล้ว

    small mistake: the max resoluion needs to be < 256 because the max number of vertices is 2^16-1 (65535)
    Thanks for this amazing series though!

  • @caffiend81
    @caffiend81 3 ปีที่แล้ว

    I had so much fun following along. Excited to learn procedural mesh generation and this video is my starting point. Thank you so much.
    Interesting note! The issue with the seams is gone in the current version of Unity 2020.3.17f1. I got a beautifully smooth sphere when I turned wireframe off.

    • @caffiend81
      @caffiend81 3 ปีที่แล้ว

      On second look the seams are there but only at very low resolutions. Weird.

  • @newton3010
    @newton3010 2 ปีที่แล้ว

    Recently subbed. A very excellent tutorial. I always wanted to do something like this but never seen a good way to do it. This method is spectacular!!

  • @KaletheQuick
    @KaletheQuick 6 ปีที่แล้ว +1

    I am excited for this series! I have wanted to make an RTS that takes place on the INSIDE of a sphere for awhile now. I was hoping to use an icosphere, but everything here will still be wonderful and useful :]

  • @aaronedvalson104
    @aaronedvalson104 5 ปีที่แล้ว

    I'm really looking forward to finishing this series, but I don't know Unity coding very well yet. You did a great and quick job at instructing the steps, but I wish you would've explained things more so that I could make better comments as I followed along. That's all.

  • @N3V3L
    @N3V3L 3 ปีที่แล้ว

    Many thanks for all your work and priceless knowledge.
    I feel a little like I haven't really earned this progress.
    Without you laying it out for me ; I would have never gotten past a simple cube or sphere.
    Very grateful nonetheless...

  • @misterfister15
    @misterfister15 4 ปีที่แล้ว +32

    just love how this beautifully explained. really makes me want to start coding.

    • @prod.immortalized
      @prod.immortalized 4 ปีที่แล้ว +1

      th-cam.com/video/GhQdlIFylQ8/w-d-xo.html is probably the best free tutorial out there that i've came across. this'll get you started in c# if your still interested to learn.

  • @frey6549
    @frey6549 6 ปีที่แล้ว +1

    Yes! Thank you so much for this. I hope you never stop making these awesome advanced tutorials

  • @monmonstartv5159
    @monmonstartv5159 6 ปีที่แล้ว +8

    I wanted a series on this for ages! Thanks Seb!

  • @Luminous0
    @Luminous0 4 ปีที่แล้ว

    This might be something that doesn't happen in unity, but when drawing triangles from an origin like this, you need to take into account that when you're drawing triangles left-to-right like this, you're drawing them as if you're facing the sphere from the inside.
    This makes the normals face inside if you wind the triangles clockwise. Thus in order to make this work in pure opengl you need to technically wind these triangles counter-clockwise because you'll be looking at this thing from the outside.

  • @HurriO4
    @HurriO4 6 ปีที่แล้ว +16

    I'm very excited for this series and since a friend and I once had an idea about a small space game I'll probably follow along and implement this stuff myself for once!
    0:14 Is that a Code Geass reference? :P
    0:30 would the cube-based approach later not use power-of-2 detail steps again (like in your infinite terrain series), meaning that the control over detail would be roughly the same? would then not be the fact that the vertices on this sphere can't be unwrapped in a simple way to get nice UV coordinates on a single flat texture be the bigger problem? or would that not be an issue with the shader later on? if there are textures involved I'd imagine it to be easier with the inflated cube approach. unless you're using triplanar mapping...
    0:44 gotta say I love that you put in the extra amount of work to animate this stuff just to explain things, even if it doesn't land in the final project! same with the other spheres!
    1:03 I'm guessing this will be resolved the same way you did with the infinite terrain where you added an extra ring of vertices which were not connected via triangles, right?
    2:22 might as well call them "localRight" and "localForward", no? or "localX", "localY" and "localZ"? :P
    4:09 actually writing "2 * 3" instead of "6" could maybe help as a step of documentation I think.
    5:22 if the center is at (0,0,0) and the corners have a y value of 1 then the cube will have a "radius" of 1 instead of a diameter of 1, making it not a "unit cube" though, right?
    7:04 why not use this version then? it's simpler in both reading and number of math operations used (though it probably won't matter much performance-wise). if you feel fancy you could even write "vertices[i++] = pointOnUnitCube;" ^^
    7:35 you could also use 0,1,5 and 5,4,0. that way they'd actually go clockwise and not zig-zag and around again :D
    10:00 good call!
    Keep 'em coming!

    • @lucascorey3475
      @lucascorey3475 ปีที่แล้ว

      When referring to a "unit" object, most often the measurement of 1 unit in that context is the radius, giving a diameter of 2. A unit circle also has a radius of 1. :)

  • @anonymousmisnomer5443
    @anonymousmisnomer5443 4 ปีที่แล้ว +10

    "Error: Cannot implicitly convert type" on the "directions" index. Mine looks just like the demonstration though.
    EDIT: I used parentheses instead of curly brackets. whoops

  • @TheForbiddenLOL
    @TheForbiddenLOL 6 ปีที่แล้ว +12

    A quadtree LOD system would be great.

    • @triangle4studios
      @triangle4studios 3 ปีที่แล้ว +1

      Yup. Not a lot of good info out there. I will post a quad-tree LOD when I finish mine. Programming is a scientific endeavour, yet many horde their knowledge to prevent the masses from profiting from it. That needs to end.

  • @Chayat0freak
    @Chayat0freak 6 ปีที่แล้ว +11

    WHA THE BALLS?! I SPENT ALL YESTERDAY DOING EXACTLY THIS!

  • @JJDSG
    @JJDSG 6 ปีที่แล้ว

    Finally something to get exited. But I was hoping for it to be the successor for the procedural landmass generation series. But no worries. Lets see how it goes. Cheers

  • @davidhearnden6095
    @davidhearnden6095 5 ปีที่แล้ว

    Watched your coding adventures series, decided to take a crack at this. Love your content.

  • @Makingblah71
    @Makingblah71 6 ปีที่แล้ว +1

    Haha, I used your previous procedural generation tutorials to generate a procedural planet much like this for my final year thesis (with LOD algorithm though). It will be nice to see how I could have improved it by watching this.
    It would be great to know how a system for LOD could be implemented efficiently. Mine wasn't very efficient.
    Thanks btw.

  • @TheBorgey
    @TheBorgey 6 ปีที่แล้ว

    Always good watching the way you tackle these

  • @RugbugRedfern
    @RugbugRedfern 6 ปีที่แล้ว +2

    Have been looking for a series like this for a long time! Thanks :D

  • @Nimiauredhel
    @Nimiauredhel 6 ปีที่แล้ว

    Yes! I have been waiting for this.
    Literally abandoned a personal project because I couldn't figure this out.

  • @davidfrancesch988
    @davidfrancesch988 3 ปีที่แล้ว

    2021 and this videos still amazing

  • @rafa_guitar
    @rafa_guitar 6 ปีที่แล้ว +1

    I follow you long time ago, you are an awesome developer and you have very creative/awesome ideas! Thanks for all!

  • @michaellasota3315
    @michaellasota3315 6 ปีที่แล้ว +1

    Thank you, Sabastion Lague, you have no idea how long i've been wating for this seires.

  • @tothespace2122
    @tothespace2122 4 ปีที่แล้ว +3

    Hello everyone!
    To smooth out the seams between meshes, normal vectors of each vertex along the seam need to be averaged out with normals of neighbouring triangles. While this algorithm would probbably give the most precise lighting, it' is very hard for a beginner to design, so let me know if you designed such algorithm. On the other hand, a simple solution is to set the normal vector of each vertex to the vector of it's position normalized. This way, normals along the seams have the same direction and thus give smooth lighting.
    Vector3[] SphereNormals(Vector3[] vertices)
    {
    Vector3[] normals = new Vector3[vertices.Length];
    for(int i = 0; i < vertices.Length; i++)
    {
    normals[i] = vertices[i].normalized;
    }
    return normals;
    }
    The solution is very simple, but many people don't notice it right away. I hope it helped.

    • @thecakeredux
      @thecakeredux 3 ปีที่แล้ว

      The vertices are already normalized, aren't they? Couldn't you just assign normals = vertices and be done with it? It's all type Vector3 right? I have no experience with unity and its internal data structure, but it seems reasonable to me.

  • @appliedskater
    @appliedskater 6 ปีที่แล้ว

    I'm really looking forward to this series, it seems to have come out at the perfect time for me, thanks.

  • @pliniomourao
    @pliniomourao 6 ปีที่แล้ว +4

    Love the idea! I'll be waitting for the next episode.
    Thank you for the content!

  • @LordOfFlies
    @LordOfFlies 2 ปีที่แล้ว +1

    Amazing! Didn't know you made in depth videos like this!

  • @WannabeCanadianDev
    @WannabeCanadianDev 4 ปีที่แล้ว +18

    Does anyone else get spammed by the warning of "SendMessage cannot be called during Awake"?

    • @moonman3658
      @moonman3658 4 ปีที่แล้ว +1

      I have what should I do?

    • @WannabeCanadianDev
      @WannabeCanadianDev 4 ปีที่แล้ว +3

      @@moonman3658 So far I think whats happening here is that we can't use GameObject functions like SetActive(true) in OnValidate because Unity developers are a little dumb and it potentially leads to "undefined behavior". You need to reorganize OnValidate so it doesn't call any sequence of functions ending up with a GameObject method being called?

    • @shrubsong437
      @shrubsong437 4 ปีที่แล้ว

      my cube just turns black when i turn the res really high then turn it back down... and i get spammed with that warning

    • @embergamedev
      @embergamedev 3 ปีที่แล้ว +5

      For anyone getting this message and their planet looks pink:
      In the "Planet" script, line that looks like this:
      meshObj.AddComponent().sharedMaterial = new Material(Shader.Find("Standard"));
      change "Standard" to "Universal Render Pipeline/Lit"
      Explanation: The material name "Standard" is a shader that the Universal Render Pipeline doesn't like to use, so it turns the material shader pink since it isn't compatible. The default material shader normally used is in the Universal Render Pipeline has the name "Universal Render Pipeline/Lit". I'm guessing that this video used an older version of Unity that uses the Legacy shaders.

    • @SOEP6969
      @SOEP6969 2 หลายเดือนก่อน +1

      You are a hero

  • @finnbuhse4775
    @finnbuhse4775 5 ปีที่แล้ว +1

    btw axisA is the same as localRight and axisB is the same as localForward

  • @Zumito
    @Zumito 4 ปีที่แล้ว +5

    After correcting errors in the code and writing lines that I skipped I have made some scripts that do absolutely nothing but hey, at least I made some scripts xD

    • @tapester7409
      @tapester7409 4 ปีที่แล้ว

      Make sure that your == arnt =

  • @BinaryLynx
    @BinaryLynx 5 ปีที่แล้ว

    If you have a problem of "flipped normals" just change order of triangle vertecies from clockwise to anticlockwise in TerrainFace.ConstructMesh like this: triangles[triIndex]=i, then =i+resolution, then i+resolution+1.

  • @xtz2100
    @xtz2100 5 ปีที่แล้ว +3

    i didnt understand anything, but you helpd me sleep.

  • @NStripleseven
    @NStripleseven 4 ปีที่แล้ว

    Cool how you just keep building and building on this, and eventually you have what it is now, an entire solar system with atmosphere and gravity and things

  • @johngrey5806
    @johngrey5806 5 ปีที่แล้ว

    Absolutely great, looking forward to the next installment. Excellently presented.

  • @maythesciencebewithyou
    @maythesciencebewithyou 4 ปีที่แล้ว

    Damn, I really respect people like you. Great work.

  • @davawen9938
    @davawen9938 5 ปีที่แล้ว +7

    0:16 Thaaaat's spherist !

  • @lietajucemaciatko383
    @lietajucemaciatko383 4 ปีที่แล้ว

    Try adding more realistic gravity, so gravity on the moon is weaker than gravity on the planet, it currently feels a little bit off.
    Btw, the planets look beatiful!

  • @gakebagiannama4401
    @gakebagiannama4401 ปีที่แล้ว +1

    Looking for procedural planets tutorial, ended on questioning my programming skill.

  • @frodoloop7691
    @frodoloop7691 5 ปีที่แล้ว

    I totally agree in learning how to create an sphere out of a Cubr. It's super useful, but I don't understand why you choose to work with a triangle face sphere and not a quad one.

    • @AxisAngles
      @AxisAngles 5 ปีที่แล้ว

      I don't understand why he thinks you have to increase the detail of an icosahedron 4 fold each time. You can turn each of the initial triangles into any value of n^2 smaller triangles, just like he does with the initial faces of the cube, turning it into any number of n^2 smaller squares.

  • @TomiHipHop
    @TomiHipHop 4 ปีที่แล้ว

    just some advice on this tutorials, when you make a drawing, don't delete it straight away. If you made it to explain a piece of code, wait until you have written that piece of code, and then delete de drawing. It's a really small detail, but I think it's kind of nicer to do it that way, so you can look at the code and at the drawing at the same time.

  • @erdemozverenn
    @erdemozverenn 4 ปีที่แล้ว +2

    I do not know 3d game things (not a master at 2d too :D) Im finally made a sphere with resolution setting as you describe in 1 week from zero mesh knowladge and in Godot game engine.I just want to say Thank you please keep up with good work as usual. (Sorry for any mistakes. English is not my native language)

    • @Chevifier
      @Chevifier 2 ปีที่แล้ว

      I just did the same but my normals are inverted Did you fix that? (EDIT) Fixed all I has to do was flip the loop x the iterate y

  • @thecoldlemonade3532
    @thecoldlemonade3532 3 ปีที่แล้ว

    i learned python, and im learning unity and i like totorials for ideas

  • @foxdieEU
    @foxdieEU 6 ปีที่แล้ว

    Thank you for this. Looking forward to follow up episodes.

  • @Ortagonation
    @Ortagonation 6 ปีที่แล้ว

    There should be more chanels like you rather than mainstream chanel which only talk about basic stuff without thinking so much...

  • @MujjMujj
    @MujjMujj 4 ปีที่แล้ว +1

    SebstianLangue makes me spend 30-60 mins coding this, me afterwards goes onto blender, takes cube, add subdivision modifier, done!

  • @caspera3193
    @caspera3193 6 ปีที่แล้ว

    I am so glad that you are making this tutorial series! Thank you so much!

  • @VegasVolt3ya9a
    @VegasVolt3ya9a 6 ปีที่แล้ว +3

    First of all, THANK YOU for your gorgeous detailed and informative tutorials! I, and we, really appreciate that!
    I have a question about the Noise-Pattern. Is it possible to have a more "roughly" gradient, so we can form some voxel-inspired world creation? E.g. Cube World's engine (which has been coded in C++, as the Developer, who ran away in 2013 from further developing his game, says...), I love the voxel design and world creation, but think that the noise colorrange won't really fit from the very deep see up to the highest mountain (not the structural objects like actually mountains attached to the surface-mask).
    Can you make a small tutorial about that part how to achieve a voxel terrain?
    Thank you!

  • @boggers
    @boggers 5 ปีที่แล้ว

    This is useful, thanks. I'm going to look at using this method with an icosahedron base, using 10 bent diamond shapes instead of 6 squares. Should be able to achieve the same flexibility of resolution.

    • @chriscamarata2564
      @chriscamarata2564 5 ปีที่แล้ว

      I know it's been a few months but how has this gone for you? I was looking for a tutorial on how to do it this way as well.

  • @mcrafterzz2447
    @mcrafterzz2447 6 ปีที่แล้ว +8

    Could you place take this series longer than the "basic" stuff. I would love to see a river system that sinks the terrain on it's way to the nearest lake/sea.

    • @burgerlx8871
      @burgerlx8871 6 ปีที่แล้ว

      like using the unity Standart assets water?

  • @nicholaspriester4704
    @nicholaspriester4704 ปีที่แล้ว

    Wow you are so smart and helpful, you rock!

  • @SaiakuShunshin
    @SaiakuShunshin 5 ปีที่แล้ว +2

    Great vid and narration. I just wanted to ask, I can see that this case with a cube sphere works for small planets that you possibly look on from afar, but what if you want to create a space game with large planets you can fly between and land on. In that case, wouldn't the hexagon approach with a high resolution be easier to work with and look nicer? Just wondering.

  • @rikkcarey
    @rikkcarey 5 ปีที่แล้ว +5

    Hi Sebastian! Fantastic tutorials and code. Any chance you will update to 2019 versions of Unity. I tried and got lots of problems.

    • @stratusgeret3794
      @stratusgeret3794 2 ปีที่แล้ว

      Did you found out how to be able to resize the sphere in the newer Unity version?

  • @dukmadueno3793
    @dukmadueno3793 6 ปีที่แล้ว

    yes, YES YESSSSSS, FINALLY, YEARS OF WAITING

  • @captain_walker
    @captain_walker 5 ปีที่แล้ว

    How could people downvote this :) Most helpful

  • @humbledcomposer
    @humbledcomposer 10 หลายเดือนก่อน +1

    Hey Sebastian, For clarity and understanding:
    Would axis A be the same as Local Forward and Axis B be the same as Local Right? Would this be always true, sometimes true or never true?

  • @tarents222
    @tarents222 6 ปีที่แล้ว

    He is back

  • @weckar
    @weckar 4 ปีที่แล้ว +1

    Why is this not the standard method to mesh a sphere? It looks so much better!

  • @burgerlx8871
    @burgerlx8871 6 ปีที่แล้ว

    FINALY A TUTORIAL

  • @pas0003
    @pas0003 5 ปีที่แล้ว

    Fantastic! This was a pleasure to watch! Thanks for putting in the effort into making this!

  • @NaughtyDuck
    @NaughtyDuck 6 ปีที่แล้ว +1

    Welcome back Sebastian :)

  • @happyfarang
    @happyfarang 6 ปีที่แล้ว

    great - as always seb :) and this looks to be a nice framework we can go off on a tangent on. Very very useful. Thanks :)

  • @bruninhohenrri
    @bruninhohenrri 6 ปีที่แล้ว

    Thanks for the tutorial, i've wanted to do this for months ago

  • @HansLemurson
    @HansLemurson 5 ปีที่แล้ว +1

    The argument for using Cubic rather than Icosahedral symmetry doesn't make sense. You can subdivide Triangles with exactly the same freedom that you can subdivide Squares, there is no reason that you would be limited to powers of 2. That's like saying you can only divide squares into quarters and sub-quarters.

  • @troyna77
    @troyna77 ปีที่แล้ว

    This is one spicy MESH ball!!! 😂😅😂 Your like a human chatGPT 😊

  • @BoundfoxStudios
    @BoundfoxStudios 6 ปีที่แล้ว

    very nice tutorial series, i'll be looking forward to this :)

  • @JP-gs3jw
    @JP-gs3jw 6 ปีที่แล้ว

    FUCK THIS IS COOL
    You upload the best videos man, and explain with enough detail

  • @FWolfUrban
    @FWolfUrban 3 ปีที่แล้ว

    THANK YOU, I have been trying to figure out how to make procedural planets for a while, and boom, your videos and tutorials pop up.... Now two questions, both with a basic premise, do you cover rotation of planets for a day/night cycle and with your solar system for calculation of a year in a game? or can we do this in Unity? Additionally add in weather effects with the planet solar year. like if the position of the planet to its sun and its axis, where we would have summer in the northern hemisphere and winter in the southern hemisphere and vice versa...it would be nice to explore such ideas...

  • @Bemmu
    @Bemmu 6 ปีที่แล้ว

    Expected the difficult part to be turning the surfaces spherical, amazed it was just one line of code.

  • @lucasberhends1141
    @lucasberhends1141 2 ปีที่แล้ว +3

    can someone explain me something?. can i create big planets with this method? big enough to don't see the planet curve while walking with the character, build houses, farms and other things?

    • @westbjumpin4859
      @westbjumpin4859 ปีที่แล้ว

      Yes you can, but it will be very, very, very, very, very laggy if you attempt to do so.

  • @semowae
    @semowae 6 ปีที่แล้ว

    Finally!
    Looking forward to this series :)

  • @TheOGKKush
    @TheOGKKush 5 ปีที่แล้ว

    Nice tutorials man. Thanks alot! Grate start for learning how to work with bigger projects!

  • @t2hk_
    @t2hk_ 4 ปีที่แล้ว

    Finally, how to make Spore

  • @ixwix
    @ixwix 3 ปีที่แล้ว +2

    I'm confused by line 19. Shouldn't axisA be orthogonal to normal vector? Simply swapping the coordinates won't do that though.

    • @bestcreations4703
      @bestcreations4703 2 ปีที่แล้ว

      If I recall correctly from somewhere that escapes me atm, after some lin alg and simplification, the matrix that rotates the axis by 90 can be simplified down to just swapping the coords of the vector. I think that the trade off is you dont know which direction the line is facing or something like that, but for the purpose of this series, that does not matter.

  • @KerboOnYT
    @KerboOnYT 6 ปีที่แล้ว

    Very clear explanation, thank you

  • @MQNGameDev
    @MQNGameDev 5 ปีที่แล้ว

    Very cool. Thanks for this series

  • @TheCorrectionTroll
    @TheCorrectionTroll 7 หลายเดือนก่อน

    Super late to the party, I know.
    How easy is it to scale this up? as in, break each face down into smaller 256x256 chunks?
    my coding adventure is getting this up and running on a bigger scale, and creating a full planet with logical landforms one day.
    Also, thanks for all of your work! you really inspired me to finally delve into programming!

  • @austin-multicellular
    @austin-multicellular 4 ปีที่แล้ว

    I am terrible with C sharp, I am just following along so I can hopefully learn something.

    • @καλαμ
      @καλαμ 4 ปีที่แล้ว +1

      This might be a bit too much if you are just starting out. But good luck