Hey, so I have this curve:
I wish to get the output of the Y over time (x) for use in various stuff in my materials.
So I did this:
The way I understand it, Time->Sine gives me a value of -1 to 1 over a second. I can then input this as my X to move back and forth between my graph’s -1 to 1 values.
I then use a clamp to cut out everything below 0 as I only want the positive output.
However, I don’t get the result I expect. I see the big bounce, but the smaller one never appears, so something is amiss here.
I see how that works, but can I generate the curve map from a mathematical curve? Other than trying to handmake a close texture in photoshop.
Ran into this exact problem a while back, the hint to the issue is in the tooltip for the Power node:
Interestingly, when I encountered this and was trying to troubleshoot the issue I discovered that if you use the HLSL pow() function inside of a custom node… it works correctly. I still have no idea why this is the case. Here’s your function with custom pow()'s instead of power nodes:
Thanks to @midgunner66 for originally pointing me in the right direction on this.
Aha, that explains a lot!
While I do not have much experience with custom nodes and HLSL, I was able to get it to work.
Thanks for also showing me the PlotFunctionOnGraph node, which I’ve never seen before.
On a bit of a side tangent, how would you implement it if you want your graph to go from -1 to 1 repeatedly, without also going from 1 to -1, as you get with sine over time.