Control a Transform Shader from external input?

Started by digitalis99, November 24, 2011, 04:14:35 PM

Previous topic - Next topic

digitalis99

#15
Thanks Hetzen.  I originally did a lot of work using PF's instead of the water shaders, but could never get anything I liked.  I tried all the different Perlin flavors, different scales, and a few other things I don't understand just for the heck of it...it only resulted in stuff that didn't look right.  After I put water shaders in place of all the PF's I had, it looked much better (probably mostly because I didn't understand how to manipulate the PF's to get things to look just right).  Render times didn't seem to take any hit at all, at least with a scene containing only a view of water edge to edge.  Maybe the render times would be worse once atmosphere and objects were added?

If you have any PF's that you've used that you liked the result of in comparison to actual waves, I'd love to see them.   ;D

BTW, I found, for the animation to look somewhat reasonable, whatever was used for the displacement shader had to contain relatively little noise.  Noise moving in a constant direction on the surface just looked fake.  Smooth undulations moving in the same direction were much more passable.
Pixel Plow :: Render Endlessly :: http://www.pixelplow.net

Hetzen

#16
Quote from: Matt on December 01, 2011, 05:48:55 PM
Hetzen, the Warp Shader warps both colour and displacement.

I didn't know that. I thought the warp shader only affected colour space. And redirect affected only displacement.

My appologies.

digitalis99

Just to illustrate my point a little regarding using moving PF's as the wave generators, go to this Vimeo video to watch the output.  Far away from the camera, it's somewhat convincing.  Close up, though, it's definitely not.

http://vimeo.com/33034544
Pixel Plow :: Render Endlessly :: http://www.pixelplow.net

Hetzen

It would look a lot better if you put a small value in the Y of your constant vector, instead of 0. This will make your wave peaks move up and down, as the fractal noise passes through the water plane.

digitalis99

#19
I never thought of that....which is why you're here!  Thanks!

"Captain, his pattern suggests 2 dimensional thinking..."
Pixel Plow :: Render Endlessly :: http://www.pixelplow.net

digitalis99

In messing with Hetzen's idea, I realize I'd like to do something but don't know how.  What's new, right?  The ridges formed by the noise are far too sharp, seemingly no matter what the noise flavor.  How does one go about rounding off the ridges to make the waves more sine like rather than curved triangles?
Pixel Plow :: Render Endlessly :: http://www.pixelplow.net

Dune

Maybe just some large a bit stretched and warped perlins would be best as main waves, perhaps play a little with buoyancy, noise variation and clumping (even negative or quite high values sometimes have interesting effects). Then have the some smaller waves only raise in height when the big wave is highest, but keep their movement small or none. The smallest may be ridges.
I studied your setup, and changed according to Jon's ideas. I'm not (yet) really into animation, but it looks interesting enough to have a go at it some day. Thanks for sharing anyway.


digitalis99

I actually figured it out last night.  The key was to use "unclamped multifractal" as the noise variation method.  That smoothed out the transitions perfectly.  I've started a thread over in image sharing to continue development of this process, since my initial question(s) have been answered here.

http://forums.planetside.co.uk/index.php?topic=13608.0
Pixel Plow :: Render Endlessly :: http://www.pixelplow.net

dandelO

#23
Haven't had a look at your clip, digitalis99, but you seem to have got things sorted out now by the looks of things.
I've been doing much the same thing in the last couple of weeks with the noise constantly moving over the plane, as Hetzen mentioned.

Two transform shaders and a single fractal have proved quite useful. An initial wavy-type fractal which is moving along on all 3 planes, with a constantly rising, or falling, Y motion so that there will never be a repeat of the wave pattern. The second transform shader simply moves/shrinks/shifts the initial fractal in the opposite direction, giving more octaves to the surface and a mask for foam to follow(a secondary fractal but blended by the first set's colour output), and also means there's less to control, instead of lots of fractals shifting over time. If I get any decent sequence rendered I'll post to the forums, I have literally 10's of different wavy water .tgd's(as I'm sure a lot of us do here), each have their own merits and downfalls, the trick is to find that one magic setting in the easiest manner and then we'll be cooking! Who'd have thought such a seemingly simple looking effect would prove this hard. Proper animated water, with foam, breakers and constant random motion is probably the TG2 Holy Grail. Well, one of them at least! We have many grails to find in here!

I'll have a look at your clip later on, cheers for posting! :)

* Something I've found that might be of help. I've found it a little easier to use the colour output of the water's wave fractal to drive a separate displacement function, as the displacement(from the displacement tab of the same fractal) can differ greatly to what you expect from the colour output. When you can see that your colour preview is working as expected to give a decent result for a surface, only to find that the displacements from itself don't match that pattern, it can make a lot more work than is required to bring them together. At least, I've found it more useful to simply use the fractal for colour only, anyway. *