fragmented Terragen rendering?


(stephen2002) #1

I am doing an animation with Terragen’s rendering system (I need to use it because it can generate such good, animatable skys) and I can’t just let my computer sit and render, it is a laptop that I take to work every day, so it needs to be turned off and turned back on, which means that I have to re-start the rendering. I delete the commands for the frames that are done from the script file.

The problem is that the frame counter re-starts at frame 1 when you start to render again, which generates files starting at 1. Which means that I will have to manually re-name each of the 3000+ frames!

Is there any way to preserve the frame counter? Is there any way to batch re-name a set of files into a numbered sequence?

Please HELP! Otherwise I will be forced to abandon the animation. :frowning:


(S68) #2

Install perl (For Windows www.activestate.com is nice)

render each batch in its own directory so you’ll have files from 0001.tga to 00##.tga

Then prepare a script like this.


@l = `ls *.tga` #Or whatever extension
foreach $f (@l) {
  $f=~/(.*?)\.(.*)/;
  $n = $1; $e = $2;
  $n = $n+$ARGV[0];
  $nf = sprintf("%04d",$n);
  $nf .= $e;
  $a = `mv $f $nf`
}

name it ‘renumber.pl’ or something like that and use it

perl renumber.pl ##

in the directory where images are. ## is the number to ADD
i.e., if ##=12
0001 -> 0013
0002 -> 0014
etc.
etc.

Please note that I wrote the code from scratch on the message, so it may be buggy.

Stefano


(Detritus) #3

NOOOO! Ignore S68´s solution! :stuck_out_tongue: But honestly, his solution is very complicated, compared to what I use to do in your situation: Just change the startnumber in the script! I think that In the beginning of the script there is some parameter called something like “Start frame: 0001” or something like that. Just change that to the name of the first frame in the script after deleting the ones you have already rendered.

Hope this makes sense to you, and helps you. Otherwise I´ll post the piece of the Terragen-script where the parameter you´ll have to change is.


(stephen2002) #4

Detritus, I think I know what number you are talking about.

I thought that the frame number was initated by the number next to the command by each frame (which would make more sence), but apparently it is in this line:

initanim,“c:\BBvideo”,1

I will try editing that line.

It worked! :smiley:


(Detritus) #5

Great! Good luck with Terragen and Blender!