im trying to make a batch file that will run optical flow on multiple expressions and multiple faces.
for example. i have 3 heads and every set consists of 8 expressions.
wrap3 has a very limited cmd. it only consist of one command. Compute.
problem with that is that you can only set the start frame and end frame of your project.
but you cannot set the process count. this is also a feature request.
because with this you can basically choose how many cores of your cpu are working.
but there is no command for that so it runs very slow. My workaround was to run the command line multiple times and compute a different frame on each. the time computing one frame, and 8 frames simultaneously on 8 core cpu takes the same time.
so basicaly i want to create a batch file that will run these commands:
C:\Program Files\R3DS\Wrap 3.3>wrap3cmd compute “D:\Project.wrap” -s 0 -e 0
C:\Program Files\R3DS\Wrap 3.3>wrap3cmd compute “D:\Project.wrap” -s 1 -e 1
:
:
:
C:\Program Files\R3DS\Wrap 3.3>wrap3cmd compute “D:\Project.wrap” -s 7 -e 7
all at once. i dont know anything about coding but a simple batch file like this should be possible.
can anyone help?
I know this is late to the game but it seems like wrap has now implemented a process count so you can do -s0 -e7 and it will run from frame 0 to 7.
wrap3cmd compute “D:\Project.wrap” -s 0 -e 7
But for anyone curious here’s a batch example to open a new wrap session for x number of objs. I created a directory containing this batch script and a folder with all of the objs I wanted to batch. What this code is doing is looking in the folder I created containing the objs and counting them to run that many times. You could throw in a counter or a line for python file edit to add more functionality but this is just to give an example of batch functionality.
cd C:\Program Files\R3DS\Wrap 3.4
for /d %%A in (*) do(
for /r %%B in (%%A*.obj) do(
start wrap3.exe
wrap3cmd compute “D:\Project.wrap”
)
)
explained line by line:
go to the wrap exe directory (cd c:…)
for all subdirectories (/d) (we will call them each A) in all of the files in the current directory (*) [find folder in current directory containing objs]
for all files (/r) (we will call them each B) that are in the path of A and end in .obj [find all objs in the current folder containing objs]
run wrap (start wrap.exe)
compute wrap file