Menu

Ocean water implementation

Help
Daniel
2017-07-05
2017-07-06
  • Daniel

    Daniel - 2017-07-05

    Hi again everyone!
    Does anyone of you have any experience in creating ocean water in GLScene?
    Currently min looks like this, a TGLHeightField with some four sine waves applied on it and a cubemap texture:
    https://www.youtube.com/watch?v=Wy7JH7-RErQ

    I would like something closer to this, using FFT and shaders:
    https://www.youtube.com/watch?v=lIHR-Hh6QA0

    Does anyone have an example or any tips on how to do it with GLScene?
    Cheers!

     
  • Jerome.D (BeanzMaster)

    Hi Daniel, have you seen and readed http://www.keithlantz.net/2011/10/ocean-simulation-part-one-using-the-discrete-fourier-transform/

    Very interesting.
    I think if you want to implement this wiith shaders . The best is play with TGLMesh (FreeForm) make the ocean "Grids", then for movement apply it thrue Geometry Shader.( you can also manipulate mesh direcly, but it will less speed (Sorry i don't say if this sentence is in a "good" english) with the defined equations described in the article.
    And finally Apply Fragment Shader for texturing (compute normals)

    EDIT : You have also a Ocean demo with shader in the Samples folder

     

    Last edit: Jerome.D (BeanzMaster) 2017-07-05
  • Daniel

    Daniel - 2017-07-06

    Hi Jerome!
    Thank you for the answer! Yes, very interesting indeed!!
    Yes, I have been reading that page. It is much too advanced for me, and written in a syntax I don't understand...
    But I will start to work with the TGLMesh and see if I can get it to animate.
    I will let you know how it goes!

     
  • Jerome.D (BeanzMaster)

    In Examples Branch you have severals samples with Heightmap/Heightfield threy're can help you

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.