BrokenSource / DepthFlow

🌊 Image to → 2.5D Parallax Effect Video. A Free and Open Source ImmersityAI alternative
https://brokensrc.dev
GNU Affero General Public License v3.0
323 stars 21 forks source link

(BUG) Worse quality when using cached depthmap #18

Closed agoralski closed 5 months ago

agoralski commented 5 months ago

Hi

Noticed a worse quality when using cached depthmap. Example video below, the left was generated when there was no depthmap yet, the right video is using the came cmd, but depthmap was loaded from cache. You can see jagged edges (ears, hands) compared to the first run.

My cmd: depthflow input -i https://img.bricklink.com/ItemImage/MN/0/ani004.original.png -b main --ssaa 2.0 -q 100 --render --output ani004.mp4 --format mp4 --open

https://github.com/BrokenSource/DepthFlow/assets/7045673/84307509-323b-42a6-9600-6fd7ae7cc092

Tremeschin commented 5 months ago

hm, right, we should increase the quality parameter when saving the grayscale low detail depth map image to disk

I'll do some quick research by plotting how close to the original image a compressed one is, alongside the file size. But I wonder if choosing some other format that's better with grayscale could be more ideal than sticking with jpeg?

Tremeschin commented 5 months ago

turns out png gives nice file sizes while still being lossless, changed it in https://github.com/BrokenSource/ShaderFlow/commit/8aaeb983419e769724a63b118125b1cac2fc29b5

you can try a git pull --recurse-submodules, might need a --rebase if you have any local modification, or git pull directly on Projects/ShaderFlow directory, the install scripts should have checked out the submodules to the default branch

let me know if this fixes it, I've got success here !

agoralski commented 5 months ago

@Tremeschin Whoa, that was fast! It works perfectly now, thanks!