Skip to content

Commit

Permalink
Add basic batch exporting ps1 script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tremeschin committed Oct 4, 2024
1 parent 794517b commit 1d4aa26
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions Examples/Batch.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env pwsh
# (c) MIT License, Tremeschin
#
# This PowerShell script runs depthflow for all images on a "input" folder
# in the current directory, and batch renders videos to "output"

if (-not (Test-Path "output")) {
New-Item -ItemType Directory -Path "output"
}

Get-ChildItem -Path "inputs" | ForEach-Object {
$filename = $_.BaseName

# Change or add variations and parameters here!
depthflow.exe input -i $_.FullName
main -o "./output/$filename.mp4"

# depthflow.exe input -i $_.FullName
# dolly --intensity 0.5
# main -o "./outputs/$filename-orbital.mp4"
}

Write-Host "Finished! Press any key to continue..."
2 changes: 1 addition & 1 deletion Website/learn/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ This section is about the **core parameters** of DepthFlow.
1. That would simply move the image around without changing the perspective, which is what the [**`center`**](#center) parameter does.
2. The camera always _"looks"_ to the image (`origin` parameter) by adding an opposite bias to the ray's projection on how much the image is displaced.

As you might expect, setting $x=cos(t)$ and $y=cos(t)$ parameter to follow a circular motion, will create a _"orbiting"_ effect around the center of the image.
As you might expect, setting $x=cos(t)$ and $y=sin(t)$ parameter to follow a circular motion, will create a _"orbiting"_ effect around the center of the image.

<video loop autoplay controls src="https://assets.brokensrc.dev/depthflow/learn/parameters/offset-xy-varying.mp4"></video>

Expand Down

0 comments on commit 1d4aa26

Please sign in to comment.