March 23rd, 2010, 09:39
David and Ruediger worked up the ultimate water at the GDC, which included a bottom, depth and steepness controls, waves, reflections, distortions of the bottom mimicking refraction, specularity, an edge, etc., which I would like to work up to. We were also pursuing other ideas as the conference ended, which I thought were very promising too. So I am starting this thread with the goal of building up to their network, trying to learn along the way. I am sure they will eventually post something much better than what I am making, but the point for me is to learn along the way by building it up in pieces.
The first thing I would like to do is to generate animated waves based on the Generator_noise node, which I am going to use as my initial wave pattern. I hope to add something more interesting later, but for now what I would like to do is offset the noise pattern by a value of one over a period of time. I suspect that I have to use a State_animation_frame or State_animation_time node to define the time or frame over which the noise travels from 0 to 1. But I am not sure how to do that.
March 23rd, 2010, 15:53
In mental mill it is best to use the "State_Animation_time". If you want it to oscillate back and forth, put the result into a "Math_float_sin" or "Math_float_cos"node.
If you turn on animation time in mental milll you will see that the result is a value that is oscillating between -1 and 1. To bring it into the range between 0...1 you can plut the result into a "Math_float_add" node and set the second parameter to 1.
Now the result is oscillating between 0 and 2.
Finally divide it by 2 using a "Math_float_divide" node (or multiply it by 0.5 using a "Math_float_multiply" node, the result will be the same)
Your final result will be a value oscillating between 0 and 1!
In the attached workspace you can see the workflow. I also created a Phenomenon called "Oscillator" on that workspace which allows you to adjust the speed of the Oscillation.
March 24th, 2010, 06:03
I see how the oscillator works by normalizing the cosine to between 0 and 1. I am going to save this one in my back pocket for later.
When I first read your post I thought you were saying that State_animation_time itself was cyclic. But the debugger shows that when I start the animation, time just marches on… When you feed that into the cosine node, that makes it cyclic, and then adding 1 to the result and dividing by 2 normalizes the output of the cycle from the intial range of -1 to +1 (the cosine function) to 0 to 1 with a sinusoidal (is there such a word as “cosinusoidal” ?) pattern. I think I might use this node to eventually add in another wave pattern, so like I said, I am going to save that one in my back pocket. Thanks.
I was originally thinking of using wave inputs, more like the oscillator you made. And what I would really like to get going is something that radiates outward from a point, sort of like the effect of a pebble falling in water, and where the wave energy is distributed over distance, so the amplitude decreases over distance and time… But you had something simpler going at the GDC using noise, which seemed to work great, and that is what I am trying to understand now. I think what you had at the GDC was something like State_animation_time and converting that to an offset value to change the noise position. Since the noise pattern tiles, a gradually increasing offset just causes it to cycle its position. I have copied what you had, but have some questions about it.
Attached is a screen shot of this part of the network, which I have put within a phenomena. Verbally, the State_animation_time (where time just marches on) is converted to a vector with the Conversion floats to float3 node. This is the vector that drives the offset of the noise node’s position. But we want to control its offset speed, so you used a Math float3 multiply node, which I have relabeled Velocity and Frequency controller. Someone might want different offsets (velocities) in different directions, so I have added the Velocity and Frequency controls to a phenomena called Noise animation test 1. The X and Y offsets are what I am calling velocity, as they affect the rate at which the offsets occur in the X and Y directions. So someone making a stream where water is flowing might want to crank up either the X and/or Y direction, depending on the stream direction. When I played with the Z value, it seemed to affect the frequency of the noise oscillations. So someone making the water inside of a sonic jewelry cleaner might want to crank up the Z value to increase the frequency of the oscillations. For now though I am leaving them all at 0.1, which is making an oscillation pattern that you might see in a small pond. But relating to these three parameters, is there a way to expose them one at a time instead of all three through the same label? That way I could give them separate shorter labels.
My other question relates to the noise nodes. I have set up three of them, although only one is currently connected to the output of the Noise animation test1 phenomena. When the Generator noise 1 is not connected to anything it doesn't move, which shows that noise isn’t animated all by itself. The second one labeled Generator noise 2 Effect of Noise Scale shows the effect of changing the noise scale parameter within the noise node. I have set the noise scale in this node to 1 (versus the default 5 in the Generator noise 1 node), which shows how the Noise Scale affects the size of the pattern. I could imagine using this one say for a gently oscillating pond. But if you crank the Noise Scale of that one up to say 10, you can see that you end up with an effect sort of like higher harmonics on a drum, which doesn’t look very natural for water, unless you are doing the sonic cleaner, where it would look great. My guess is that you will want to keep the Noise Scale less than about 7 or it starts not looking right. If you want bigger waves, then they will end up moving and propagating in a direction, and should be added in using the oscillator Ruediger made, or something like it.
My main question is about the Generator noise 4d node, which has more variables than the simpler Generate noise node. I looked it up in the Shader Library, and the reference material describing them is exactly the same. Are they indeed the same, but with more variables exposed in the Generator noise 4d node?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.