1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

SOCK-SOCK goes POP-POP (Best water graphics ever?!)

Discussion in 'Work in Progress' started by RujiK, Oct 23, 2017.

  1. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,605
    Good job!
    Those little tweaks you did in general made it even more awesome.
     
  2. Dogwithswords

    Dogwithswords Member

    Joined:
    Aug 4, 2016
    Posts:
    45
    I swear, when I play your game there will be many moments where I'll just sit there to enjoy the scenery. Still trying to wrap my head around how you made those waterfalls.
     
  3. kupo15

    kupo15 Member

    Joined:
    Jun 20, 2016
    Posts:
    925
    Holy ****, this is some amazing tech stuff you got going and the game looks really cute too! This is the type of stuff I like to see devs doing. Really pushing the envelope and raising the bar and expectations. Amazing stuff! My only thought would be to have the dotted ball line thing actually go from the ball instead of being hidden behind the character. I think it'll be more clear and visually appealing personally.

    Keep it up!
     
    RujiK and Red Phantom like this.
  4. RujiK

    RujiK Member

    Joined:
    Jun 21, 2016
    Posts:
    184
    @Bladestorm Games Thanks! Getting waterfalls to work from two angles was a real beast to tame. Also I didn't forget my water tech-post. Should be before 2020 I think.

    @Bentley I answered in your other thread but If anyone has the same question, feel free to check this post on transitions:
    https://forum.yoyogames.com/index.php?threads/solved-shader-q-looking-for-some-direction.68366/

    @nacho_chicken I remember that game! Do you remember the name? I don't. I remember it had pretty nice NES-like graphics. Thanks!

    @RangerX Glad you approve of my water. I remember getting similar feedback from you way back on the GMC in 2015:
    It only took me four years, but I have finished my splashy-water.

    @Dogwithswords Getting the waterfalls to work from two angles was probably the trickiest part of all the water. The water surface and the water-falls is all one shader. Glad it paid off :)

    @kupo15 The dotted line doesn't even work anymore since I switched to 3d and haven't fixed it. It needs a lot of tweaking now. Thanks for your kind words and feedback.


    ...


    It's time to make static scenes look more dynamic by adding MOTION. Wind seems like an obvious answer, so I tried to make a wind shader.

    Step 1: make some ripples on the ground:
    [​IMG]
    Step 2: Realize it looks like jelly and give up.
    Step 3: Pout.
    Step 4: Yell at my dog.
    Step 5: Try again.
    Step 6: Greatly reduce the up-and-down motion and apply highlights based on a noise texture:
    [​IMG]
    As far as I know, this is an original idea. I don't remember seeing anyone apply a grass-wind shader without any physical grass. While I think it's an original effect, I also think it's a mediocre effect. I ditched it and started over.

    SO, I decided to add some actual grass models to blow around instead of just faking it. I drew a bunch of grass and added a distance check in my grass shader. (Color and large radius is just for clarity)
    [​IMG]

    I thought a distance check would be kind of sluggish, but a stress test of 2,000 distance checks for 300 blades of grass still ran at 300 fps! That's more than half a million distance checks every frame! I plan on limiting distance checks to 4 or 8.

    Next, I add Push-Force based on distance. (Still Shader-code)
    [​IMG]
    That looks pretty cool! For the wind effect, I use a warped perlin noise texture that looks kinda like this
    [​IMG]
    I apply the texture as a push-force based on the grass sprites position like this:
    [​IMG]

    And with the correct colors it looks like this:
    [​IMG]
    That looks good to me! Best of all it's lightning fast. There's almost no performance chance between static grass and wind blown grass.

    That's all. And here is the first human sprite for the game. Gotta add some waifu's.
    [​IMG]
     
  5. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    5,043
    Impressive stuff!
    One of my favourite WIPs, keep up the great work.
     
    RujiK and kupo15 like this.
  6. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,518
    Very cool!
    I actually think the UV hack effect looks quite good. Perhaps of you slower it down a little and used larger waves?
    It might even look good beneath that actual grass you made! To add extra movement !

    If those distance checks become too much, you could offload them to the vertex shader. Tricky bit there is supporting multiple objects. (Oh wait,is that already what you are doing?)

    The Perlin noise wave is a really good idea!

    Keep those devlog entries coming! This is one of my favourite threads on the GMC!
     
    RujiK and kupo15 like this.
  7. kupo15

    kupo15 Member

    Joined:
    Jun 20, 2016
    Posts:
    925
    Wow even more amazing stuff! One day I would like to get this good at shaders and technical stuff. Keep it up!
     
    RujiK likes this.
  8. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,518
    Yep, Rujik is probably the best tech artist on the GMC!
     
    RujiK, SnotWaffle Studios and kupo15 like this.
  9. kupo15

    kupo15 Member

    Joined:
    Jun 20, 2016
    Posts:
    925
    I certainly believe it! I would say I'm a gameplay programmer first and foremost followed closely by technical programmer...but tech artist is my weakest. His skills as a tech artist is off the charts. This is a great thread!
     
    RujiK likes this.
  10. nacho_chicken

    nacho_chicken Member

    Joined:
    Jun 21, 2016
    Posts:
    463
    @RujiK I believe it was Hamachi, because people were suggesting name changes due to sharing its name with another program.
     
    RujiK likes this.
  11. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    2,101
    Looking very good! Technically just a sprite shear (I think that is called) but applied in a way that produces great results. That's what good design is all about.
     
    RujiK likes this.
  12. RujiK

    RujiK Member

    Joined:
    Jun 21, 2016
    Posts:
    184
    @nacho_chicken Ah, that's it! Looks like his devlog hasn't been updated in ages unfortunately.
    @NightFrost You make it sound so easy. :p There's a slight color shift too.
    @rIKmAN Thanks! Glad you like it!

    @kupo15 @GMWolf
    [​IMG]
    Thank you my good fellows. Your compliments are screenshotted and going into my ego folder. There are only 3 images there so it's no small feat. :D (Yes, I really have one)

    Also GMWolf, the distance check, as you said, is in the vertex shader. And I tried tweaking the fake wind effect A LOT, but I was never happy with the results. I'll have to try combining it with the tall grass at some point.

    Okay, @Bladestorm Games , here is the water explanation I promised:


    - HOW TO MAKE COOL WATER -
    Step 1: Draw a scrolling noise texture. (Perlin is cool)
    [​IMG]

    Step 2: Draw ANOTHER scrolling noise texture on top of the first one.
    [​IMG]

    Step 3: Use that yucky texture as your water surface.
    [​IMG]

    Step 4: Whip out your shaders! Adjust the contrast and tint it blue.
    [​IMG]

    Step 5: Add transparency and cull the darkest and/or the lightest colors:
    [​IMG]

    Step 6: Adjust the colors to your liking. Waterfalls use the same process but pull data from a separate texture/color channel.
    [​IMG]

    Step 7: Apply a sinusoidal distortion to everything underwater.
    [​IMG]


    Yuh Done!


    BUT! I know what some of you are thinking: "RujiK, you rapscallion, you didn't explain how the ripples work!!!"

    PSYCH! The ripples are a completely unintended visual glitch! Look what happens when you apply a sinusoidal distortion to an image:
    [​IMG]
    See that white stuff at the top of the distorted image??? That out-of-bounds emptiness is your shoreline! Ha ha ha ha!! You probably thought I did it on purpose. Nope.

    Here's the distortion effect with no surface texture:
    [​IMG]

    Thanks again for your EXTRA ego-boosting words!
     
  13. CMAllen

    CMAllen Member

    Joined:
    Mar 2, 2017
    Posts:
    863
    Mmm...I would tread carefully with that ripple effect. Something tells me that you should not expect consistent results across all systems. Out-of-bounds pixel data may not universally return back white pixels, and if that's what you're relying on, it will look strange when that's not the texture data it returns. I'd at least have it tested on a variety of systems before calling it good...which is sad, because it does look good for an accidental bonus.
     
    GMWolf and nacho_chicken like this.
  14. NightFrost

    NightFrost Member

    Joined:
    Jun 24, 2016
    Posts:
    2,101
    Very nice. And those people who don't want to wrap their heads around / experiment with perlin noise, can just use an edge-wrapping sprite as noise texture and displace its position every step. I think GLSL version GMS uses supports those texture wrap settings so the shader wouldn't even need to map draw position to position on texture to do the wrap? (I can't remember as I've only read about that feature somewere, never used it myself.)
     
  15. YanBG

    YanBG Member

    Joined:
    Jun 25, 2016
    Posts:
    607
    I'm liking the water animations! :)
     
  16. Deadly Serious Media

    Deadly Serious Media Member

    Joined:
    Jul 30, 2016
    Posts:
    66
    I'm continually impressed by this project! Well done!
     
  17. hogwater

    hogwater Member

    Joined:
    Jun 22, 2017
    Posts:
    641
    I am consistently annoyed at how cool the things you are doing are every time I read this thread.
     
    rIKmAN likes this.
  18. hogwater

    hogwater Member

    Joined:
    Jun 22, 2017
    Posts:
    641
    This is the only thing that makes me feel better.
     
  19. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    5,043
    I meant to ask you this a while ago but must have thought it in my head instead and not actually done it.

    Would you mind sharing / suggesting any and all resources you used to help you learn and transition from the old engine to the new "truly 3D" engine?
    Going from "never coded in 3D" to an engine rewrite of such quality in 2mths is pretty impressive!

    3D in GMS has never appealed to me at all - until this WIP - so any links or reading material that helped you would be appreciated so I can have a play around with it myself.
    That water gets better every time I see the gifs btw, so good!
     
    nacho_chicken likes this.
  20. Lance Klepp

    Lance Klepp Member

    Joined:
    Feb 9, 2020
    Posts:
    23
    You know this game is gonna be good when Will Ferrell is in it!

    Visually looks amazing. All these ideas and game mechanics are creative and innovative.

    What is the game about?
     
    SnotWaffle Studios and Morendral like this.

Share This Page