# Is there a way to get ONE random value as seed for Cyles per render?

I know, this question sounds old, but there is a twist.

If you want to use image stacking to reduce noise, you have to choose a different seed for every render.

To do that automatically I found the following methods so far:

• using #frame as driver in the seed field. This however only works if you have multiple frames (i.e. render an animation) - not for a single frame rendered repeatedly.
• using the small Python snippet noise.random() * 10000. This works fine for normal renders, but it screws up viewport rendering (at least in 2.71): the render never ends

Is there something, that can do both?

• Is there anything wrong with rendering an animation, even if you have no keyframes? You'd just be rendering the same thing over and over, which could be stacked. – ajwood Sep 11 '14 at 23:01
• – gandalf3 Sep 11 '14 at 23:05
• – gandalf3 Sep 12 '14 at 0:54
• @gandalf3 - I saw these already - thanks. – karamike Sep 12 '14 at 20:52
• @ajwood I'm using it in the following situation: I've an "autosave" addon running. Let's say I've completed a render after an hour and decide that it looks nice, except more samples are needed. Instead of re-rendering with more samples, I hit "render" again with the same sample settings. This way the first wait was not in vain. However I forget to increase the seed value sometimes and have to abort the second render. The Python snippet does exactly what I need, if it wouldn't make viewport rendering unusable. – karamike Sep 12 '14 at 21:10

Instead of using a driver, use that Python snippet to set the value in the render_pre application handler. This should stop it continuously restarting the viewport render.