Hi! I am looking for a node which can do something similar to a Damper or Decay but for ShaderNode(Float32) or ShaderNode(Vector3). Not sure if there is another solution or if I do something wrong, but sometimes I have situations where I would like to have a smooth transition for ShaderNode-Values and can’t manage it “upwards”. In beta there was Decay(3DBuffer), for example, which did exactly this.
I could use Lerp in Gamma but this requires two sources which makes it very complicated and slow. Any help is very appreciated!
Interesting question, but how can you do this without compute shaders?
I think there is not enough context in your question. I’ve asked myself a similar question, but can’t think of an obvious answer. At the very least, the ShaderNode is very different from place to place. Ultimately it needs to be computed over time with some kind of backbuffer. I can imagine how to do this in very specific places, but I’m not sure how to generalize the solution.
Let’s try to think of examples and solve them.
Thanks for answering. I use an equation to modify (distort) a SDF. The equation is inside a Delegate(Region,Fuse,1->1). Degelate’s output (ShaderNode(Float32)) is added to the SDF output.
The equation uses a lot of variables from outside. These variables I would like to change manually from time to time, in order to get different pictures of distortions.
However, when changing these variables I want to have smooth transitions between the resulting distortions (let’s say between distortion1 with variables1 and distortion2 with variables2).
I could use Damper for variables1 → variables2 (or interpolate between them) but then I will get all the distortions between distortion1 and distortion2 during the transition. Unfortunately, this doesn’t look good. The transition looks very busy and not natural.
It would be better to simply “damp” or smoothen the final output (the ShaderNode(Float32)), instead of damping the equation’s variables.
I already did something similar by Lerp - where the first input is the Delegate1 with the equation with variables1, and the second input is the Delegate2 with the same equation but with variables2. The result looks much better and more natural than with damping the variables in one single Delegate node (like explained above). But therefore I need to double everything which makes it very heavy.
I hope it doesn’t sound too complicated and there is an easy way to solve this problem… Thanks.
Here is an example of what I meant. Hope it makes it a bit more clear.
The distortion equation for both SDF Boxes (left and right) is the same.
But in the left case the equation’s variables for different distortions are interpolated which causes a lot of movement during transition between distortions.
In the right case just the result (which is a ShaderNode Float32) is interpolated which makes the transition between several distortions look more smooth and natural.
Lerp for ShaderNode needs two inputs, that’s why you need to make the process twice.
Instead, it would be lovely to have a simple node which works like a ShaderNode Damper.
Damp ShaderNodeValue.vl (187.3 KB)