About Store Forum Documentation Contact



Post Reply 
Sea/Water optimization suggestion needed
Author Message
GokUsama Offline
Member

Post: #1
Sea/Water optimization suggestion needed
Hello,

So I had a question regarding the water optimization for a big map. What would be the best way to add sea around the terrain?
I could just add a massive water square below terrain level which would do the trick, but would that have any impact on the game's overall performance?

thanks in advance
11-09-2020 03:09 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Sea/Water optimization suggestion needed
Why not use Ocean?

Water.draw=true;
11-09-2020 03:12 PM
Find all posts by this user Quote this message in a reply
GokUsama Offline
Member

Post: #3
RE: Sea/Water optimization suggestion needed
:o Didn't even realize... Thanks! and how can we implement beach "wave" effect on beach areas?
(This post was last modified: 11-09-2020 03:41 PM by GokUsama.)
11-09-2020 03:40 PM
Find all posts by this user Quote this message in a reply
Dwight Offline
Member

Post: #4
RE: Sea/Water optimization suggestion needed
(11-09-2020 03:40 PM)GokUsama Wrote:  :o Didn't even realize... Thanks! and how can we implement beach "wave" effect on beach areas?

Do you mean foam around the land? You should have a look at the water shader! There's a few excellent ocean shaders on the web that you can implement with Esenthel!
11-09-2020 05:57 PM
Find all posts by this user Quote this message in a reply
GokUsama Offline
Member

Post: #5
RE: Sea/Water optimization suggestion needed
Ah ok, thanks and yeah I noticed your project has them did you also get them same way?
11-09-2020 09:52 PM
Find all posts by this user Quote this message in a reply
Dwight Offline
Member

Post: #6
RE: Sea/Water optimization suggestion needed
(11-09-2020 09:52 PM)GokUsama Wrote:  Ah ok, thanks and yeah I noticed your project has them did you also get them same way?

I only used the standard EE options to get my ocean, without editing the shader. I do not have foam (yet).

For reference:
oceanColorMap and oceanBumpMap are of class ImagePtr.

Code:
//================================================================================​======
   // Ocean Class Methods
   //================================================================================​======
   void oceanInit()
   {
      oceanColorMap  = UID(2291834351, 1271046857, 1883521466, 3490944319);
      oceanBumpMap   = UID(885474919, 1081889234, 3922876086, 2801080255);
  
      Water.draw                                         = true;
      Water.plane.set(Vec(0, -0.2f, 0),Vec(0, -2.2f, 0));
      Water.colorMap(oceanColorMap);
      Water.reflection_allow                             = true;
      Water.bumpMap(oceanBumpMap);
      Water.color.set(0.02f, 0.12f, 0.15f);
      Water.smooth                                       = 3.9f;
      Water.reflect                                      = 0.1f;
      Water.normal                                       = 2.0f;
      Water.wave_scale                                   = 0.8f;             //
      Water.scale_color                                  = 0.01f;
      Water.scale_normal                                 = 0.01f;
      Water.scale_bump                                   = 0.05f;
      Water.density                                      = 0.226f;
      Water.refract                                      = 0.256f;
      
      Water.validate();
   }

   void oceanDel()
   {
      Water.draw     = false;
      oceanColorMap  = null;
      oceanBumpMap   = null;
   }
   //================================================================================​======
11-10-2020 08:28 AM
Find all posts by this user Quote this message in a reply
Post Reply