Author : ysalex


Reply
Reply
 
Thread Tools Display Modes
Habboi's Avatar
Old (#1)
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.
Habboi's Portfolio and Blog. - Looking for Work.
Currently working on A Hat in Time - Greenlight

"When in doubt, ask the polycount."
Offline , dedicated polycounter, 1,465 Posts, Join Date May 2010, Location England, a quaint little town just outside London. About 40 minutes away from Moorgate.  
   Reply With Quote

gilesruscoe's Avatar
Old (#2)
I think it's just a horizonal panner with a tiling wave texture on it layed over using another alpha plane. Vertical waves offset could be done with some kind of vert painting shader. Can't rememther the ins and outs of it, but it looks like this!:

Or it's just an angled alpha plane with another panner on it wedged into the edges.
Offline , dedicated polycounter, 1,670 Posts, Join Date Dec 2010,  
   Reply With Quote

bugo's Avatar
Old (#3)
Hey, this is just one tileable texture for the water flow, the edges on top and bottom are just probably animated textures with alpha. The corners also have animated white water alpha going on. I dont think there's much secret about it. Specially that this game is unlit the whole way, or just vertex painted. Still lovely game, I miss it.
Offline , dedicated polycounter, 1,479 Posts, Join Date Feb 2006, Location Redmond WA Send a message via MSN to bugo Send a message via Skype™ to bugo  
   Reply With Quote

JamesWild's Avatar
Old (#4)
How I'd do it:

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.
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

JamesWild's Avatar
Old (#5)
I was bored so I got out my laptop (which can barely run UDK) and roughed the edging and as a bonus the splash at the bottom.


It's not exact but not far off.

I'll upload the package in a bit.
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

JamesWild's Avatar
Old (#6)
http://www.smallfiles.org/download/3...kerFX.upk.html
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

Habboi's Avatar
Old (#7)
Thank you so much. You're going in the credits of my project when it's done.
Habboi's Portfolio and Blog. - Looking for Work.
Currently working on A Hat in Time - Greenlight

"When in doubt, ask the polycount."
Offline , dedicated polycounter, 1,465 Posts, Join Date May 2010, Location England, a quaint little town just outside London. About 40 minutes away from Moorgate.  
   Reply With Quote

D4V1DC's Avatar
Old (#8)
I just want to say man that the water fall you got going is still awesome, looks like a good and fun project can't wait to see more.
Offline , card carrying polycounter, 2,402 Posts, Join Date Jan 2005,  
   Reply With Quote

Lew's Avatar
Old (#9)
you could always just use a flipbook texture for that true .gif feel...
Looking for work

Portfolio: http://www.lewwilde.co.uk
Offline , vertex, 27 Posts, Join Date Apr 2012, Location Blackburn, England  
   Reply With Quote

Gannon's Avatar
Old (#10)
What is the bit of code in the custom node doing? I don't quiet understand. How is it bending the U and V into a radial?

Can you break down what each part of the equation is for? I'm mostly curious as to what the atan2 is.

Last edited by Gannon; 05-03-2012 at 10:09 PM..
Portfolio: 3DRebar.com
Offline , polygon, 727 Posts, Join Date Dec 2008, Location Montreal,Quebec Send a message via AIM to Gannon Send a message via MSN to Gannon  
   Reply With Quote

JamesWild's Avatar
Old (#11)
Atan2 takes a X and Y and returns the angle around 0 as -pi to pi. I'm also doing some addition/multiplication in there too just to get the scales/offsets right.
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

Slum's Avatar
Old (#12)
You guys are totally overthinking the Zelda water. Those "spikes" are just two copies of an alpha mask, scrolling in opposite directions. The mask image is low frequency waves, with a few larger "spikes" in it. As the two scroll, the "spike" waves cross over, causing the bigger spikes. You can really see it if you pick a spot in the scroll and follow it with your eyes as it pans - it will reveal the two layers.

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
Offline , veteran polycounter, 3,638 Posts, Join Date Jul 2005, Location Texas  
   Reply With Quote

JamesWild's Avatar
Old (#13)
You could quite easily work around the atan using a triangle fan. If you look at the slight segmentation on the ripple that's probably how they did it.
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

King Mango's Avatar
Old (#14)
Quote:
Originally Posted by Slum View Post
You guys are totally overthinking the Zelda water. Those "spikes" are just two copies of an alpha mask, scrolling in opposite directions. The mask image is low frequency waves, with a few larger "spikes" in it. As the two scroll, the "spike" waves cross over, causing the bigger spikes. You can really see it if you pick a spot in the scroll and follow it with your eyes as it pans - it will reveal the two layers.

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.

Last edited by King Mango; 05-04-2012 at 10:47 AM..
Best regards,
King Mango
Offline , spline, 184 Posts, Join Date Aug 2008, Location Los Angeles  
   Reply With Quote

JamesWild's Avatar
Old (#15)

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.
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

ZacD's Avatar
Old (#16)
This gives me an idea for contests, we should have mini shader comps on who can do a shader with the least instructions, and who can do the best looking one with a maximum limit.
Offline , polycounter, lvl. 13, 7,244 Posts, Join Date Jul 2009, Location Columbus Ohio Send a message via MSN to ZacD  
   Reply With Quote

ZacD's Avatar
Old (#17)
Hey guys, I did it.






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?

Last edited by ZacD; 05-04-2012 at 09:53 PM..
Offline , polycounter, lvl. 13, 7,244 Posts, Join Date Jul 2009, Location Columbus Ohio Send a message via MSN to ZacD  
   Reply With Quote

Joopson's Avatar
Old (#18)
It's nice ZacD, except for the parts at the top and bottom. I can notice the textures panning, where in the original, it's more "wavy" instead of "panny". If you could tweak it a bit, it would be awesome.
Andrew Leslie - Environment and Prop Artist
My Portfolio
Works In Progress
Looking for freelance work.
Offline , polycounter, 1,118 Posts, Join Date Dec 2006, Location Los Angeles  
   Reply With Quote

ZacD's Avatar
Old (#19)
I believe, in the original there is a separate mesh on top of the 2 meshes going opposite directions, that causes those big bouncy spikes, but there is also the 2 crisscrossing textures like I have. I could try to add a third layer to the spikes, and tone the 2 I have down a bit, and there's also some vertex offset going on in the actual game as well. Before doing anything more to the material I'd want to jump in game, and it'd also depend on the scene I was creating.
Offline , polycounter, lvl. 13, 7,244 Posts, Join Date Jul 2009, Location Columbus Ohio Send a message via MSN to ZacD  
   Reply With Quote

Habboi's Avatar
Old (#20)
Hah I never expected this to continue.

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.
Habboi's Portfolio and Blog. - Looking for Work.
Currently working on A Hat in Time - Greenlight

"When in doubt, ask the polycount."
Offline , dedicated polycounter, 1,465 Posts, Join Date May 2010, Location England, a quaint little town just outside London. About 40 minutes away from Moorgate.  
   Reply With Quote

JamesWild's Avatar
Old (#21)
I did play Wind Waker end to end a few years ago (actually the only Zelda game I like a LOT) and I think I know the one you're talking about. Could probably pull it off with a white emissive, and two multiplied very small images. Hang on...
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

JamesWild's Avatar
Old (#22)
http://www.smallfiles.org/download/4...ater2.upk.html
Offline , polygon, 661 Posts, Join Date Nov 2011,  
   Reply With Quote

Habboi's Avatar
Old (#23)
Thanks man! I look forward to sharing what I've applied your shader to but there's still a few things left to do before I can showcase it.
Habboi's Portfolio and Blog. - Looking for Work.
Currently working on A Hat in Time - Greenlight

"When in doubt, ask the polycount."
Offline , dedicated polycounter, 1,465 Posts, Join Date May 2010, Location England, a quaint little town just outside London. About 40 minutes away from Moorgate.  
   Reply With Quote

Habboi's Avatar
Old (#24)
Hey again, sorry to be a pain but your wind effect is almost there but not there. Well in regards to speed anyway. I've messed around with the numbers but I can't get the perfect speed, flow and fade.

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.


On the bright side you can scale the static mesh along the z axis to make it thin like in the vid.

Last edited by Habboi; 05-07-2012 at 01:29 PM..
Habboi's Portfolio and Blog. - Looking for Work.
Currently working on A Hat in Time - Greenlight

"When in doubt, ask the polycount."
Offline , dedicated polycounter, 1,465 Posts, Join Date May 2010, Location England, a quaint little town just outside London. About 40 minutes away from Moorgate.  
   Reply With Quote

King Mango's Avatar
Old (#25)
Also don't forget to oscillate the spikes in the light blue jaggies. Notice they are pulsing up and down which helps to hide the panning effect.
Best regards,
King Mango
Offline , spline, 184 Posts, Join Date Aug 2008, Location Los Angeles  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch