# How to use the Previous Frame Switch node?

**URL:** <https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081>\
**Category:** Rendering\
**Tags:** frame, Switch, unreal-engine, Rendering, question\
**Created:** [April 28, 2017, 1:27pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081 "2017-04-28T13:27:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [April 28, 2017, 1:27pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/1 "2017-04-28T13:27:42Z")

</div>

It’s a new node in 4.15, but I can’t find any info on how to use it. Here is a video that shows the effect (less blur caused by Temporal AA, when passing parameters from blueprints): [4.15 Features - Previous Frame Switch Node - YouTube](https://www.youtube.com/watch?v=YbjqiNZr4K4)

You can also read more about this in the 4.15 release notes: [Unreal Engine 4.15 Released! - Unreal Engine](https://www.unrealengine.com/blog/unreal-engine-4-15-released)

The node has two inputs. What should I plug into them, and where should I plug the output?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [May 4, 2017, 6:47pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/2 "2017-05-04T18:47:28Z")

</div>

Bumpy bump ^^

---

<div class="post-metadata">

**Author:** ![iscaru1988](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iscaru1988](https://forums.unrealengine.com/u/iscaru1988)\
**Post date:** [May 11, 2017, 8:45am UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/3 "2017-05-11T08:45:18Z")

</div>

I’m also interested, I’d like to know how to use this node.

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [May 11, 2017, 12:30pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/4 "2017-05-11T12:30:25Z")

</div>

In the essence, the node allows you separate node networks in material editor, depending on if it is being compiled for present or previous frame.

You would plug that into world position offset, and use your typical WPO animation for Current frame, while adding some compensatory value to the this animation for Previous frame. To get rid of temporal blurring, you might want WPO for previous frame to appear the same, as for Current frame. Thus if you are using something simple for WPO, like sin(Time)\*VertexNormal, for previous frame it should be sin(Time+FrameTime)\*VertexNormal, where frame time should be supplied as parameter from blueprints/code.

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [May 13, 2017, 4:25pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/5 "2017-05-13T16:25:39Z")

</div>

Thanks for the clarification. But what if I have a simple animation without Time node, something like that?:  
137824-

---

<div class="post-metadata">

**Author:** ![Deathrey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Deathrey](https://forums.unrealengine.com/u/Deathrey)\
**Post date:** [May 15, 2017, 4:47pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/6 "2017-05-15T16:47:35Z")

</div>

Add another scalar value, passed from blueprint. It should match anim phase for previous frame.

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [May 15, 2017, 6:10pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/7 "2017-05-15T18:10:52Z")

</div>

Oh, unfortunately I can’t add another parameter from collection because I’m hitting the limit (and it must be via parameter collection in my case), but I think I get it how it’s supposed to work now. So without additional parameter passed from blueprints it won’t fix the blurring - I thought that additional paramater won’t be needed. Thanks!

---

<div class="post-metadata">

**Author:** ![iscaru1988](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@iscaru1988](https://forums.unrealengine.com/u/iscaru1988)\
**Post date:** [May 15, 2017, 6:27pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/8 "2017-05-15T18:27:54Z")

</div>

Oh, it’s easier to use than what I thought.  
So if i have a blueprint or c++ class I must create 2 variables, 1 for the current frame time and a second variable for the previous frame time, this way that function in the material calculates the motion vectors correctly.  
Thanks!!

---

<div class="post-metadata">

**Author:** ![MatzeOGH](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MatzeOGH](https://forums.unrealengine.com/u/MatzeOGH)\
**Post date:** [May 16, 2017, 8:55pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/9 "2017-05-16T20:55:19Z")

</div>

Is it possible to get some fake motion blur going for a fx?  
I tried pretty much everything and I haven’t noticed any effect

---

<div class="post-metadata">

**Author:** ![CupMcCakers](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CupMcCakers](https://forums.unrealengine.com/u/CupMcCakers)\
**Post date:** [June 9, 2017, 7:12pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/10 "2017-06-09T19:12:53Z")

</div>

second this!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_46a83031](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_46a83031](https://forums.unrealengine.com/u/anonymous_user_46a83031)\
**Post date:** [November 14, 2017, 7:55pm UTC](https://forums.unrealengine.com/t/how-to-use-the-previous-frame-switch-node/392081/11 "2017-11-14T19:55:31Z")

</div>

I still do not know how to use it. What are the inputs? Not just the plain frame times I guess. Could you provide a screenshot, blueprint or C++?
