terra water plane animation

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Nickak2003
Goblin
Posts: 272
Joined: Thu Jun 10, 2004 4:19 am
x 26

terra water plane animation

Post by Nickak2003 »

I am going to add a water plane, I know how to do this. My question is how to animate it to look more lively and water like. I know older versions of ogre had animated textures, this could be an option. Another thing of course would be to use a ocean shader, any tutorials on this sort of thing around?

Lax
Gnoll
Posts: 667
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 64

Re: terra water plane animation

Post by Lax »

Hi,

does not xrgo's ocean do this kind of thing?
viewtopic.php?t=93592
I tried to use this, but without success, also the shader implementation was only for OpenGL.

Best Regards
Lax

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

Nucleartree
Kobold
Posts: 32
Joined: Tue Apr 04, 2017 9:10 pm
Location: Cardiff, UK
x 18

Re: terra water plane animation

Post by Nucleartree »

A simple but still quite effective technique is scrolling two textures in the pbs datablock. For instance this material using some of the textures from Ogre's provided texture samples:

Code: Select all

{
    "blendblocks" :
    {
        "waterBlend" :
        {
            "dst_blend_factor" : "one"
        }
    },

"pbs" :
{
    "waterMaterial" :
    {
        "blendblock": "waterBlend",
        "workflow" : "metallic",
        "diffuse" :
        {
            "value": [0.1, 0.1, 1]
        },
        "detail_normal0":{
            "value" : 1,
            "scale": [0.5, 0.5],
            "texture": "SeaPattern.tga"
        },
        "detail_normal1":{
            "value" : 1,
            "scale": [0.5, 0.5],
            "texture": "SmallWaves.tga"
        },
        "transparency" :
        {
            "value" : 2,
            "mode" : "Transparent"
        }
    }
}
}

I feel like a proper artist would want to tweak this a bit but you get the idea :lol: . I can then animate the offset for the detail layer in code, providing a nice animated effect, without having to write any hlms modifications. If you want to get the vertices to move you might need to look into that however.
You might be interested in this video about many of the water effects used in Mario Galaxy, and you might be surprised to find out that many of the effects were done with static geometry and scrolling displacement maps and textures https://www.youtube.com/watch?v=8rCRsOLiO7k

Nickak2003
Goblin
Posts: 272
Joined: Thu Jun 10, 2004 4:19 am
x 26

Re: terra water plane animation

Post by Nickak2003 »

Cool, I will have to look into this!