Water Shader

Discussion in 'Track Modding' started by Mario Morais, Apr 27, 2012.

  1. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    I trying to use the "water" shader.

    What channels i must use?

    the test i do.

    t1 channel 1
    Specular map channel 1
    Bump map channel 1 (waves)
    Reflection map channel 2

    in game the water waves don't move.. and the Reflection map don't tile

    What kind of image is for Reflection? cube map?
     
    Last edited by a moderator: Apr 27, 2012
  2. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    no help from ISI??
     
  3. MaXyM

    MaXyM Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,774
    Likes Received:
    29
    I suggest to wait for some gfx updates.
    Current water shader looks like place-holder. I believe it will be improved so working with it would be waste of time and energy.
     
  4. toebee

    toebee Registered

    Joined:
    Oct 5, 2010
    Messages:
    380
    Likes Received:
    390
    I haven't tried it in rf2 yet but, did you set up the texture animation?
     
  5. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    ok i open the monaco maps now.
    i see lots of normal maps files for waves! is animation.

    I try pl_shaders in rf1 and the effect is great and only use 3 textures files!!

    I hope ISI remake the shaders.
     
  6. MaXyM

    MaXyM Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,774
    Likes Received:
    29
    Because shader from SRPL Shader pack is procedural one simulating light reflection from water surface as well as from ground under water (as far as I know). Also it uses Fresnel formula which makes look very realistic. In opposite to procedural shaders, looks like ISI shader is based on texture based animation: you can see tailing easily.
     
    Last edited by a moderator: Apr 30, 2012
  7. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Yes, this is one area where it would be so awesome to be able to animate the texture coordinates instead of animated textures themselves. It wouldn't really affect the tiling issue, but I would have to imagine that it would be a lot easier in terms of processing power.

    A lot of really nice water has been done with Unreal Engine (amongst others) using one or two normal maps with scaled and animated texture coordinates, a transmission color, and the reflection map. Of course, it would be awesome to have some sort of procedurally generated waves based on wind magnitude and direction :).
     
  8. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    ISI uses one animated texture to define shape of waves. That's why you se the same wave pattern repeated over and over again on water surface and animation is limited in frames.
    I'm using perlin noise, so I only need one texture as a base of my noise.

    Actually it would. I'm sampling one texture 4 times with different UV scale and motion. Tiling does not occur every time one UV set wraps around - all 4 UV sets must wrap around to get tiling, and that's not likely to happen very soon.

    You will have a hard time looking for tiling here :)



    Then there's shading. It's not that difficult actually but I constantly see game developers getting it completely wrong.

    They have no choice if they want their product to look good. So we may assume this will happen sooner or later.
    The only question is how good can they make it. I'm a bit concerned here, because I've seen some "weird ideas" from ISI in both rF1 and rF2. This could be because they didn't care much about graphics leaving it for later, but it could also be because they had no better idea for doing certain things. Who knows :)


    I know I will be watching features they add and keep providing feedback if I believe something should be done differently.
    What I usually don't like is when things are implemented using various blending, overlapping or multipass instead of being supported in shader or when things that could be done in just one, unified way, are implelented in various, incompatible ways, each feature "living it's own life" on screen.
     
    Last edited by a moderator: May 1, 2012
  9. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    I'd be curious to see the same thing with ISI's texture instead of the Perlin noise texture. I think it has more to do with the texture itself rather than using scaled/animated textures. A noise texture almost by its definition will not have a noticeable repeating pattern.

    That being said, I think one place that your water shader could be improved is with the texture itself. As-is, it kinda looks more like an orange peel-like texture rather than a water surface. I think the waves could be more directional and peak-y. "Natural" waves are caused by the wind, which is going to have a dominant direction--and they should look like waves rather than 'bumps'. Other waves, such as boat waves, are still going to have a dominant direction, but they will mix with the 'natural' waves. The same goes for reflected waves. Each set of waves will all look very similar, the only difference is that they each have their own direction, and will mix. Perlin noise as you have it might still work, but it probably just needs to be stretched perpendicular to the direction of its movement.

    [​IMG]
     
  10. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Using perlin noise does not exclude variety.
    You simply don't need to use the same parameters for perlin noise function on entire water surface - they can vary across water surface.

    I can't force any specific kind of waves on modders, because I never know if they will want to create a lake, a river, or a small basin. They can provide their own texture that serves as base for shape of waves and define some basic parameters, that's all.

    It's not like it's some kind of perlin noise limitation - it's just what I did in this case. I could do more, but this is as far as I've decided to go. gMotor is not my engine and GMT is not my file format.

    In the end, I don't even think many people would use it if I forced them to work on water shader parameters separately for each area. So I would have provide some more complex and automated tools that generate map of perlin noise parameters depending on various factore in given place.
    Too much work for game engine that isn't my own.
     
  11. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    Ahh...cool...yeah, thought you were saying before that the perlin noise was being procedurally generated, is all...
     

Share This Page