themaninthesuitcase / gimp-startrail-compositor

36 stars 12 forks source link

Feature request: fading out effect #9

Closed simonmysun closed 4 years ago

simonmysun commented 6 years ago

Thank you for the wonderful scripts.

I would like to suggest a feature that darken the previous frames when stacking new ones, which produces a fading out effect.

Another GIMP star trail script has this functionality but it cannot merge layers during the processing. This consumes too much resources to run on my laptop.

image

https://vimeo.com/31165959

http://registry.gimp.org/node/25638 (I cannot access it for unknown reason)

I was going to commit some code but unfortunately I couldn't find a complete document of pygimp. However, I implemented it by imitating your code and randomly adding some lines of code after this line:

        black_mask = gimp.Layer(image, "black_mask", image.width, image.height, RGBA_IMAGE, 75, NORMAL_MODE)
    image.add_layer(black_mask, 0)
        pdb.gimp_edit_fill(black_mask, BACKGROUND_FILL)
        black_mask.opacity = 5.0

I'm pretty sure it's not a good approach and I have to set the background color to black before running it. And it also has some known or unknown side effect. But it works for me so I put it here for your reference.

https://youtu.be/f8s06Zp9vy4

simonmysun commented 6 years ago

As comparison here I also provide stacking with no effect and no stacking version of the video:

themaninthesuitcase commented 6 years ago

Sorry it's taken so long to reply but I've been away.

I'm not in a position where I will have time to write this myself but I am happy to accept a PR once done.

I found the docs to be VERY lacking when I wrote this so it took a fair amount of guesswork and figuring out. Maybe the links below will help and are pretty much all of the docs I found.

https://www.gimp.org/docs/python/ http://oldhome.schmorp.de/marc/pdb/

themaninthesuitcase commented 5 years ago

10 is merged now. I am seeing an issue with "In" where I get a white image. Fade out works really nice though. I'm looking at what's up with In now.

frankenau commented 5 years ago

I think, I know what's the issue with the white image when using fade-in. It does occur when layers are created using ascending opacity. What I did is, to insert new layers at the end of the list, when using "Fade In".

themaninthesuitcase commented 5 years ago

There's 2 PRs pending which both fix this. I just haven't managed to find time to test them and pick one. I'll try this week.

frankenau commented 5 years ago

Sorry, I didn't notice that - I'm a Git-Newbe. I just wanted to give you a feedback, of how I'm using your plugin. Indeed, I like (and use) it a lot. So if you -or anybody else- finds something useful in my changes, it's yours. Btw, I'd suggest to put the skyglow reduction in a seperate procedure. Somebody might want to use this feature for pure timelapses only...

simonmysun commented 4 years ago

Hi, thank you and all the contributors for the updated. However, as far as I could understand, the new options are only targeting the final image. It cannot produce the result mentioned before (https://youtu.be/f8s06Zp9vy4). It would be great to have the fade in / out effect for the intermediate frames. So maybe this thread should remain open before that.

themaninthesuitcase commented 4 years ago

now merged.