It is currently Sun Jun 30, 2024 4:04 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Creating specific layer / visualisation filter
PostPosted: Wed Sep 26, 2018 9:46 am  (#1) 
Offline
New Member

Joined: Sep 26, 2018
Posts: 1
Hello,
I am making a game. And I am trying to implement an interesting animation method using a bitmap created in Gimp and a shader program. The way it works is that each pixel of the bitmap can be either fully white or fully black in a specific moment. I have up to 256 frames of animation. And the pixel will be rendered white if pixel.r <= frame < pixel.g. So red channel tells us the frame in which the pixel becomes visible and green channel tells us when the pixel becomes invisible again. So each pixel can be visible only once during the animation.

So what I need to do is to have a plugin for Gimp that lets me view specific animation frame. But I want that view to update automaticaly whenever I change the image. So it could work somewhat like a layer mode or an attached layer effect. The effect needs to receive frame number from 0 to 255. If it were something like a layer effect, I would expect it to be given in a dialog box. If it were something like extra layer mode, the frame number could be taken from layer color (or brightness).

Could you give me some advice how to best approach this intent of mine? Compatibility of the saved xcf file with vanilla Gimp is not important to me. I just would like your oppinions on how this could be done the easiest. Of course the hardest part of this will be the fact that I need it to update every time the image changes.

Thank you,
Ivorne


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Creating specific layer / visualisation filter
PostPosted: Wed Sep 26, 2018 10:18 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4752
Threshold the green and blue channels with the frame index (one is threshold above, one is threshold below), and compose them (lighten only mode). This gives you a map of the visible pixels for the frame. Apply as a layer mask to an image restricted to the red channel.

_________________
Image


Top
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Creating text (layer?) presets/profile?

15

No new posts Attachment(s) GEGL Layer Effects and Text Styling filter

189

No new posts Attachment(s) GEGL selection modification filter to apply on layer mask

8

No new posts Attachment(s) Darkening specific parts of a photo

10

No new posts Attachment(s) Quick Tutorial on Brush Dynamics: Specific Settings

11



* Login  



Powered by phpBB3 © phpBB Group