Simple Grass Simulation

Sdílet
Vložit
  • čas přidán 3. 07. 2020
  • C++ grass simulation using SFML for Graphics. It is an experimental code which is not optimized nor beautiful, I just wanted my grass.
    Github github.com/johnBuffer/GrassSi...
    Music used freepd.com/music/Spring%20Chi...
  • Věda a technologie

Komentáře • 155

  • @duffman7674
    @duffman7674 Před 3 lety +173

    The deterioration is pretty much my haircut after 3 months of quarantine.

    • @victorrandall5088
      @victorrandall5088 Před 3 lety +1

      What

    • @duffman7674
      @duffman7674 Před 3 lety +21

      @@victorrandall5088 THE DETERIORATION IS PRETTY MUCH MY HAIRCUT AFTER 3 MONTHS OF QUARANTINE

    • @Exc4Iibur
      @Exc4Iibur Před 3 lety

      @@duffman7674 I can see what quarantine has done to your head

  • @lucasanddre
    @lucasanddre Před 3 lety +224

    amazing! How long have you been programming with C++?

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +150

      ~7 years I would say

    • @blackburnmichelson6189
      @blackburnmichelson6189 Před 3 lety +77

      @@PezzzasWork holly c++

    • @blackburnmichelson6189
      @blackburnmichelson6189 Před 3 lety +12

      @@PezzzasWork hed dude can you show us how do you do this i learn c++ a little bit but i can not do this type of things

    • @beetmacol2126
      @beetmacol2126 Před 3 lety +17

      @@blackburnmichelson6189 well I would say that's what programming is about. You need to find solutions to the problems you want to solve. You simply need to train and at some point things such as this will be easily accessible to you.

    • @JinskuKripta
      @JinskuKripta Před 3 lety

      @Animese7en holy fucker

  • @vb0t429
    @vb0t429 Před 3 lety +11

    I love the music - it somehow feels perfect for this

  • @rodakdev
    @rodakdev Před 3 lety +16

    Your video showed up in my recomendations and i can't stop being amazed by your work

  • @dacolib
    @dacolib Před 3 lety +78

    the deterioration part just seemed cruel :(. Very good looking tho

  • @GiacomoFurlan
    @GiacomoFurlan Před 3 lety +87

    They seem to be a little bit too elastic (returning to their rest position). If you want to create a simulator I think you should make them a little bit less too elastic. Also in the part where you ake them mostly plastic, they should slowly return to the rest position, at least mostly. Don't get it wrong, I really like this kind of anime-like grass, but you called it "simulator" :)
    Keep up the good work!

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +37

      Yes that's true. I am currently trying to find the right parameters to better fit reality. The initial aim wasn't to create a very realistic result but I can't find a better word than "simulation" :/

    • @GiacomoFurlan
      @GiacomoFurlan Před 3 lety +9

      @@PezzzasWork of you want to go further in the study I'd recommend you to observe a real grass. Otherwise, it's already a good result, from a stylistic point of view :)

    • @Some_Random_O_O
      @Some_Random_O_O Před 3 lety +1

      @@PezzzasWork add another less elastic node in-between each existing node, this will simulate real grass better.

    • @angelo.strand
      @angelo.strand Před rokem +4

      @@GiacomoFurlan bro told him to touch grass

  • @johnlime1469
    @johnlime1469 Před 3 lety +116

    That's really cool. More games need to have this.
    Does the physics/morphology work like springs or something, where you would have the damping coefficient and stuff?

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +48

      It's torque based, each join tries to maintain a certain angle :)

    • @iCore7Gaming
      @iCore7Gaming Před 3 lety +9

      looks like the grass is made of rubber in my opinion..

    • @johnlime1469
      @johnlime1469 Před 3 lety +21

      @@iCore7Gaming Do you think it's too stiff?
      Now that you mention it, maybe each strand might need more joints to let them have more degrees of freedom. But that might cost a lot of computational power.

    • @CatastropheCatalyst
      @CatastropheCatalyst Před 3 lety +17

      @@johnlime1469 I think it would look better if the base of the stalks moved, since currently as It looks, the base is entirely stiff and you only have the top two segments moving. I think the Base should have alot less play than the other parts, but it not moving at all is something I noticed.

    • @tvwatch9669
      @tvwatch9669 Před 3 lety +4

      Games probably don't have it because it is way too expensive to be computing for these blades of grass vs a mesh that contains many stalks in one and doesn't majorly sacrifice the visual quality. It still is very cool.

  • @RelaxingGamingAmbience
    @RelaxingGamingAmbience Před 3 lety +74

    I'm stoned rn and this is so entertaning right now xD
    Btw: good job, that's incredible xD

  • @codingwithelhacen990
    @codingwithelhacen990 Před 3 lety +16

    That’s Mind blowing!

  • @dmitrym3757
    @dmitrym3757 Před 3 lety +26

    This is amazing!

  • @saimanohara6399
    @saimanohara6399 Před 3 lety +5

    Haha description makes it even better.

  • @bobingstern4448
    @bobingstern4448 Před 3 lety +4

    Any tips on starting with physics and simulation? A book you can reference or something?

  • @krccmsitp2884
    @krccmsitp2884 Před rokem

    I am convinced that this is actually the grass "on the other side".

  • @Ragnarok3542
    @Ragnarok3542 Před 3 lety +21

    boys playing with their little friend for the first time be like: 0:06

    • @strevortni
      @strevortni Před 3 lety +2

      omg

    • @c5h835
      @c5h835 Před 3 lety +1

      ohhhhhh no no no no no no I hope this isn’t what I’m imagining

  • @Avisheknandi12
    @Avisheknandi12 Před 3 lety +2

    Its a visual treat.❤️

  • @lordzockt1853
    @lordzockt1853 Před 3 lety

    You alway have these amazing things wow

  • @veggiet2009
    @veggiet2009 Před 3 lety +2

    Does the deterioration correct itself eventually? Like through growth grass will eventually return to shape

  • @alansmithee419
    @alansmithee419 Před 3 lety

    Honestly the video's great but it's outshined by the music.
    It's just so happy :)

  • @tomokosan469
    @tomokosan469 Před 3 lety +1

    this is really cool, i would love to see this being used on a game like zelda

  • @Infarlock
    @Infarlock Před 3 lety

    Mr Krabs: So... You've brought an army of grass?

  • @AidenJooMV
    @AidenJooMV Před 3 lety

    Nice simulation Great work!

  • @2k7u
    @2k7u Před 3 lety

    Now that is some epic grass

  • @rmt3589
    @rmt3589 Před 3 lety +1

    This should work with fur as well!

  • @KeiTheTrap
    @KeiTheTrap Před 2 lety +1

    finally i can touch some grass

  • @marco4570
    @marco4570 Před 4 měsíci

    It's soo fluffy!! ^-^

  • @paolograsso5085
    @paolograsso5085 Před 3 lety +1

    Ahahahaha, well chosen background music!

  • @migojolo2933
    @migojolo2933 Před 3 lety +2

    Lovely song

  • @flameofthephoenix8395

    The grass correcting itself should be more like a pendulum under gravity, with the only difference being that the gravity is upwards.

  • @ghilesdjebara8066
    @ghilesdjebara8066 Před 3 lety

    Awesome, i love it !

  • @rodakdev
    @rodakdev Před 3 lety

    @Pezzza's Work what kind of connection is between parts of the grass blade, I can't figure out way how to simulate something similar. Please someone help

  • @mage443
    @mage443 Před 3 lety +1

    Very cool, man

  • @DDMT_Development
    @DDMT_Development Před 3 lety

    I just kept thinking "Crop circle!!!". Nice sim.

  • @andreiiaz2097
    @andreiiaz2097 Před 3 lety +2

    Absolutely glamorous!
    I still wonder...how do you do graphics in C++? I can't find stuff past the console and I'm bored of it.

    • @SirusStarTV
      @SirusStarTV Před 3 lety +2

      basic non-gui stuff is supported from standard library ("std") in c/c++ and other programming languages (printing to a console etc)
      Other things that are varying on different operating systems is provided via libraries (.dll, .so)
      If you're on windows you can draw simple stuff with "GDI api" or you need to learn hard stuff like "open gl" to draw 2D or 3D graphics. There's libraries that simplify complex "open gl" and provide easy to use functions.

    • @andreiiaz2097
      @andreiiaz2097 Před 3 lety

      @@SirusStarTV Thank you!
      All the "Beginner to expert" C++ courses I took just went variables, arrays, OOP, pointers and stop. All of it was just black and white, and I just couldn't believe that all games were just very very detailed consoles.

    • @rrestoring_faith
      @rrestoring_faith Před 3 lety

      @@andreiiaz2097
      If you're interested in game development try an engine.
      Engines will manage the rendering process for you so its less of a concern, and have lots of visual representations for things like what the player will see to make things easier.
      If you just want to learn how things like rendering work, then yea OpenGL is fine but will be quite challenging if you're still learning the basics. Can also check the description for the library used in the video, which is much easier to use.

  • @spiikesan
    @spiikesan Před 3 lety

    Amazing. Now you can make a Crop Circle Simulator :D

  • @vecto8695
    @vecto8695 Před 3 lety +1

    pretty cool. one thing i would do is add more joints and make it so the base can also move

  • @AB-bp9fi
    @AB-bp9fi Před 3 lety

    Interesting and inspiring

  • @gta5onlineshorts
    @gta5onlineshorts Před 3 lety

    thank you for sharing 🎊

  • @Povilaz
    @Povilaz Před 3 lety

    Pure gold.

  • @rafaeu292
    @rafaeu292 Před 3 lety +1

    The only thing that bothered me is that the upper parts don't effect the parts below, but it looks really good

  • @antekelektronik8788
    @antekelektronik8788 Před 3 lety

    Programming power is amazing

  • @rabe7763
    @rabe7763 Před 3 lety

    A thousand green spider legs, the Arachnophobics worst nightmare!

  • @yashwanth8269
    @yashwanth8269 Před 2 lety

    that's a good music :)

  • @shubhsharma150
    @shubhsharma150 Před 3 lety +1

    pretty cool

  • @alejandrorosales2863
    @alejandrorosales2863 Před 3 lety +2

    Hi ur simulation is so cool! I’m wondering, and this is a noob question, how do u go about programming this? What libraries do u use for the visuals. Like colors. How do u display the image? I’m used to python and c# so forgive my question. Again awesome video!

  • @sayochikun3288
    @sayochikun3288 Před 3 lety +1

    very cool

  • @ianlateur1234
    @ianlateur1234 Před 3 lety

    Looks more like green blades of metal than grass, but still very cool

  • @RealityWizard
    @RealityWizard Před 3 lety +1

    I like it.

  • @zerozeronine5461
    @zerozeronine5461 Před 3 lety

    impressive!

  • @blizzy78
    @blizzy78 Před 3 lety

    Finally, virtual grass so I can stay inside forever. Fuck real life, who needs that.

  • @davidchopin6583
    @davidchopin6583 Před 3 lety

    Splendid

  • @theonewhowill4903
    @theonewhowill4903 Před 3 lety

    I am watching Grass Grow and its quite entertaining. Next do wet paint on a white wall

  • @syrathdouglas1244
    @syrathdouglas1244 Před 3 lety

    Awesome!

  • @yahia1355
    @yahia1355 Před 3 lety +1

    Man , could you help with giving sources you read / got the formulas from , I really would like to make something similar with javaFX!

  • @berbseedle8286
    @berbseedle8286 Před 3 lety +2

    i like grass

  • @0Bennyman
    @0Bennyman Před 2 lety

    Finally I can touch grass

  • @iwbmo
    @iwbmo Před 2 lety

    An easy alternative would be to go touch some grass, but who does that?! This would be way more fun!!!

  • @l.chappo8161
    @l.chappo8161 Před 3 lety

    It’s so sick when people go bit by bit. I think the number of joints needs to equal to number of segments where each segment begins with a node. Then the bottom half can move and be all slick

  • @A-Random-Guy
    @A-Random-Guy Před 3 lety

    Wow just wow

  • @3Daytman
    @3Daytman Před 3 lety

    u just wanted ur grass and u get it. +respec

  • @pneumaofficial9581
    @pneumaofficial9581 Před 3 lety +1

    now they just need to interact with each other.

  • @kadnify
    @kadnify Před 3 lety

    Uncontrollable urge to shave.

  • @ondrae7528
    @ondrae7528 Před 3 lety +3

    Awesome, but it looks a lot more like green hair than grass, the movement of the blades are very violent and the blades are kind of thin. It's a good simulation but that ain't no grass.

  • @froquede
    @froquede Před 3 lety +1

    this episode of it's always sunny is a little confusing

  • @anirudh7455
    @anirudh7455 Před 2 lety +1

    You should have some rigidity in blades joints so that they don't just rotate infinitely while their joints stand still. It kinda takes away the effect

  • @forabbycookie699
    @forabbycookie699 Před 3 lety +7

  • @ewaldlatreider5127
    @ewaldlatreider5127 Před rokem +1

    When's the last time you touched grass?

  • @hubertk7363
    @hubertk7363 Před 3 lety +1

    cool

  • @JoseGamingGD
    @JoseGamingGD Před 3 lety

    POV: this is in your recommended
    and you don't even know how to write Hello World

  • @strevortni
    @strevortni Před 3 lety

    This is awesome but it feels more like hair than grass, especially when you let it go and it waves around, grass is more stiff

  • @sreekashuppari1882
    @sreekashuppari1882 Před 3 lety

    Wow 😮

  • @blackburnmichelson6189
    @blackburnmichelson6189 Před 3 lety +1

    make c++ tutorial and teach us how you do this simulations

  • @papua5560
    @papua5560 Před 3 lety

    noice

  • @battlefora3dscollab
    @battlefora3dscollab Před 3 lety

    There they touched grass

  • @affyne
    @affyne Před 3 lety

    "i just wanted my grass" xD

  • @ashleyk.9408
    @ashleyk.9408 Před 3 lety

    "touch some grass"
    Me:

  • @azteriaaa
    @azteriaaa Před 3 lety

    so one blade is just a springy triple penudlum?

  • @FactoryGuille
    @FactoryGuille Před 3 lety +1

    Its nice, but don't you think that real grass moves less? Not so "bouncy"...
    However its pretty cool !!

  • @NepNepYT
    @NepNepYT Před 3 lety

    another thing i found that i'll never be good at

  • @mucahitkabaday1555
    @mucahitkabaday1555 Před 2 lety

    Hey admin, I would like to advice you a song. 'order from chaos' from max cooper. I wish I could watch the clip from your eyes.

  • @rohanbandaru
    @rohanbandaru Před 2 lety +1

    The grass is too springy, increase the dampening and it'll look better.

  • @vincentvoncarnap2473
    @vincentvoncarnap2473 Před 2 lety

    “go touch some grass”

  • @wokafish249
    @wokafish249 Před 3 lety

    Why are my eyes hurting

  • @OE-yu9co
    @OE-yu9co Před 3 lety

    maybe i can eat *blades of grass*

  • @user-iu6yx2kk6z
    @user-iu6yx2kk6z Před 3 lety

    jelly grass

  • @youtubeviewer5198
    @youtubeviewer5198 Před 3 lety

    needs a bit of variation on blade length

  • @kevinbarbour7649
    @kevinbarbour7649 Před 3 lety +1

    reminds me of dan-bal

  • @VestigialHead
    @VestigialHead Před 2 lety

    The grass is always greener on the other channel.

  • @StormZap
    @StormZap Před 3 lety

    This is definitely gonna be recommended to everyone in 8 years

  • @ruantristancarlinsky3851

    How the heck do you do this?

  • @vanillakeksik
    @vanillakeksik Před 3 lety

    w

  • @dvoemi
    @dvoemi Před 3 lety +1

    grass

  • @NoName-yr2bk
    @NoName-yr2bk Před 3 lety

    Looks like a wool. Not a grass. But it's very nice

  • @JohnWick-hp8wn
    @JohnWick-hp8wn Před 3 lety

    What C++ I have to learn to be able to do these graphical things lol

  • @elitistllama4992
    @elitistllama4992 Před 3 lety

    this is more like a toothbrush

  • @yeebus
    @yeebus Před 3 lety

    sure but grass isnt that bouncy. pretty good tho, if the bounciness was toned down it'd be more realistic

  • @terrasolaris5104
    @terrasolaris5104 Před 3 lety

    Bro why don't we see these physics in games? How much ram does it need alone to work? If the load is laughable, this should be used universally in games.

    • @vonakakkola
      @vonakakkola Před 2 lety

      maybe because it's too heavy for a computer running this (with more grass) with other stuff in a game

  • @playbyan1453
    @playbyan1453 Před 3 lety

    Grass look more like hair simulation

  • @doru3376
    @doru3376 Před 2 lety

    How am i supposed to touch this?

  • @weegee3785
    @weegee3785 Před 3 lety

    Maybe i could eat these