Hey,
I have another interesting challenge for you folks on Polycount. It helps if you're familiar with the the game in the title but I'll provide a gif of a waterfall below. I'm trying to recreate this flowing water effect and I'm wondering if you can help me nail the material network down. Obviously we have a panner for the middle section but it's the pointy bits at the top and bottom that have me puzzled.
I look forward to seeing the replies.
Replies
[ame="http://www.youtube.com/watch?v=tCbpX_lEQEU"]Beating Heart UDK - YouTube[/ame]
Or it's just an angled alpha plane with another panner on it wedged into the edges.
Panner->Rotator (or vice versa)->mask channel R->a noise/clouds texture->take one of the channels->use IF against the G channel of our UVs->white or blue.
It's not exact but not far off.
I'll upload the package in a bit.
Can you break down what each part of the equation is for? I'm mostly curious as to what the atan2 is.
Keep in mind, the Gamecube used very limited pixel shaders. It wasn't very fast. Computing arc tangents per pixel would likely be prohibitively expensive on an actual Gamecube.
While that doesn't apply as much to today's graphics processors, it's a good idea to keep up the same mindset. The more reuse you can get out of your shaders, the better off you'll be. You don't want infinite different shaders for every new object or effect, for the sake of batching, resources, etc.
If you can accomplish something with a simpler shader, do it
QFT
EDIT:
OK what I would do more specifically, is use a lerp to separate the flowing water texture, and constant3V for the solid color.
For the Alpha for the LERP, I would use an RGB texture, no alpha, and place my jagged masks in the R and G, and use the B for the edges. Pan those R and G channels into a multiply, then plug the multiply into the lerp alpha.
How about this? No ifs, no atans, just one texture sample and some scrolling with a multiply for falloff, the mapping to a "tunnel" shape done by a triangle fan.
[ame="http://www.youtube.com/watch?v=A07lyAzQ57o"]UDK - Wind Waker style waterfall material - YouTube[/ame]
Texture sources:
Waterfall BG
http://i.imgur.com/evAPk.png
Current 1
http://i.imgur.com/Gl1ZQ.png
Current 2
http://i.imgur.com/lGiUj.png
Splash
http://i.imgur.com/Jdv9M.png
Here's the whole material
He's the branch that repeats 5 times (I just copied it from JamesWild), 3 of them have different uv sets, the 2 current ones over lap and use the same UV, different speed, the top splash is 2 splashes going in opposite directions and mirrored.
And this is how it is all put together in the end
Any questions?
Hey James, could I be cheeky and ask how you would do the wind effects? It's a sort of single line with points at both ends. In other words it's a scrolling, fading white texture with points on each end. I'd get a video but there's not one that really shows it. You have to look up a video of gameplay.
Here's a video of the wind, check 5:16 in the background and I suggest you mute, loud mouth guy playing. Look behind her head for example, speed and fade.
[ame="http://www.youtube.com/watch?v=A3N679tG8uA"]Let's Play The Legend Of Zelda Wind Waker, Part 1: History In The Making - YouTube[/ame]
On the bright side you can scale the static mesh along the z axis to make it thin like in the vid.
[ame="http://www.youtube.com/watch?v=vMHSiYiB55s&list=UUJfNOH8nHXcs-tYZk6ZLo8w&index=1&feature=plcp"]The Magical Kingdom of Zeal (UDK) - YouTube[/ame]
http://kotaku.com/5914155/if-chrono-trigger-looked-like-wind-waker
[ame="http://www.youtube.com/watch?v=RA99Wduksu4"]Scrubs "I'm Not One To Toot My Own Horn" - YouTube[/ame]
the panner that scrolls left uses the same texture as the panner that goes right so far so good but the one that scrolls right needs to be inverted(*-1) and than subtracted (and possibly renormalized to 0-1) ! than you should get those dynamic emerging spikes that you desire !
I'm not sure if that link is still valid but I couldn't figure out how to get to the file lol
hi, can anyone help me with texture effects around the rock/grass thingy at the top of the waterfall(i.e the foam effects of the water going around it) in OP's post? i am trying to create a river scene with some rocks in it and i need this effect for it.
Links don't work. Could You James or someone else share JamesWild_ZeldaWater2.upk and JamesWild_WindWakerFX2.upk files again ?
Greetings
1) Heavily blurred "wave" alpha texture (not a pure sine wave or anything, just some random fluctuations)
2) Shader scrolls the alpha texture against itself in opposite directions and at 50% each to compose a new alpha texture
3) Result discards everything below a certain "brightness" and uses the remaining as an all-or-nothing mask with a static color
4) The result is used to render decal geometry which is placed at high slope angle to the corner of top of the waterfall. Actually, 2 of them, to create both "sides" of the ripples. Probably using the same shader result, but flipped vertically.
The semi-circular ripples are probably done in a similar way just with different geo and "stem" textures
First of all, many thanks to Jameswild and ZacD for their posts!
I managed to implement ZacD's version of the water stream in UE4:
It's still incomplete and I want to try and implement it differently from what I have now to make it look even more like the one in Wind Waker.
I will post a link to the material and textures used later on, and if I have time I'll also make a tutorial.
Nice beach material.
The waterfall material is a good copy of ZacD's but it has the same problem now that it did then.
The water ripples are obviously panning against each other, even in the gifs.
Look at Inkajoo's suggestion above. its much closer to what is likely happening.
Take your wave texture, add some blur to it so there is a LOT of grey area. Pan it against itself at differing rates, and add the result. Subtract some arbitrary amount (like 0.5 or .3 or something) from the result, then pass that into a ceiling node. You'll get a much more organic wave feeling out of it.
Edit:
I tried creating something similar using Shader Forge. I'm still really new to shader creation so this took me a while to figure out haha. I had no idea how to recreate those beautiful ripples though. Here's my Shader Forge setup if anyone's interested:
So the Panner speed goes between 1 and -1 as a Sine curve? Then multiply it or even clamp it go change the span between whatever speed you want it to go? And in the sine change the period aswell. Should work in theory.
May have misunderstood the question.
But yeah it's pretty much the same thing. Just easier to explain I guess
https://youtu.be/lAYIF0lwy60
You can get the spherified Cube in Maya by taking a default cube, selecting all the edges, beveling, pushing the fraction to 1 and then upping the segments btw. Just make sure you merge the verts afterwards.