It is currently Fri Jul 19, 2024 6:23 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: New Filter for MM ? post here
PostPosted: Mon Jun 25, 2012 5:15 am  (#21) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
Arghh can't get Bluefish 2.2.1 or 2.2.2 to work, it just crashes with "Program Stopped Working" when I try and run it in Windows Vista - massive shame as it looks like ideal tool to be scripting MM expressions with.

Any suggestions (switching OS is not an option)?


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Mon Jun 25, 2012 6:48 am  (#22) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
i believe notepad ++ has similar option but i don't feel to read the guide it is so bulky
---------------------------------------------
i tried another combination ...Absolute Tweaker

maybe bit hard to control, not sure if may be of some use anyway
here it is
stretched
filter bilin_int (stretched image in,
                  float a0: -1-1 (0), float a1: -1-1 (0), float a2: -1-1 (1), float a3: -1-1 (0),
                  float b0: -1-1 (0), float b1: -1-1 (1),  float b2: -1-1 (0), float b3: -1-1 (0))
    u=x*y*a3+x*a2+y*a1+a0;
    v=x*y*b3+x*b2+y*b1+b0;
    in(xy:[u,v])
end


filter eqr_pan_ts (

image in,

float FoV: 15-320 (150),

float eye: 0-1.5 (1),

float pan: -180-180 (0),

float vsh: -1-1 (0))

#

# equirectangular to panini per Tom Sharpless's interpretation

# of the projection implemented in his OpenGL program "Panini",

# namely a rectilinear projection of a 3D cylindrical image.

# Gives images identical to Panini version 0.7, except without

# the black holes at zenith & nadir, smaller range of eye point

# positions, and slightly different limit on fov vs. eye pos.

#

# angular scale factors

Sppr = W / (2*pi); # source pixels/radian

d = eye + 1;

wfov = pi * min( FoV, 160 * d ) / 180; # radians

Drpp = 2*d*tan(wfov/(2*d)) / W;

# destination coordinates in radians

xr = x * Drpp; yr = (y - Y * vsh) * Drpp;

# project from dest to source

azi = d * atan( xr, d);

alt = atan( yr * (eye + cos(azi)), d );

# source coordinates in pixels

sx = Sppr*azi; sy = Sppr*alt;

# pan & interpolate

sx = sx + W*pan/360;

if sx > X then sx = sx - W end;

if sx < -X then sx = sx + W end;

in(xy:[sx, sy])

end




filter __composer_filter__ (float eqr_pan_ts_FoV : 15.000000 - 320.000000 (150.000000), float eqr_pan_ts_eye : 0.000000 - 1.500000 (1.000000), float eqr_pan_ts_pan : -180.000000 - 180.000000 (0.000000), float eqr_pan_ts_vsh : -1.000000 - 1.000000 (0.000000), image bilin_int_in, float bilin_int_a0 : -1.000000 - 1.000000 (0.000000), float bilin_int_a1 : -1.000000 - 1.000000 (0.000000), float bilin_int_a2 : -1.000000 - 1.000000 (1.000000), float bilin_int_a3 : -1.000000 - 1.000000 (0.000000), float bilin_int_b0 : -1.000000 - 1.000000 (0.000000), float bilin_int_b1 : -1.000000 - 1.000000 (1.000000), float bilin_int_b2 : -1.000000 - 1.000000 (0.000000), float bilin_int_b3 : -1.000000 - 1.000000 (0.000000))
    bilin_int_out = bilin_int(bilin_int_in, bilin_int_a0, bilin_int_a1, bilin_int_a2, bilin_int_a3, bilin_int_b0, bilin_int_b1, bilin_int_b2, bilin_int_b3);
    eqr_pan_ts_out = eqr_pan_ts(bilin_int_out, eqr_pan_ts_FoV, eqr_pan_ts_eye, eqr_pan_ts_pan, eqr_pan_ts_vsh);
    eqr_pan_ts_out(xy)
end


well i did another a animated filter that i found more fun ,( posting now a short animation test) but i had problem to save the code, i must try again

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Mon Jun 25, 2012 2:33 pm  (#23) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
New filter for you to check out http://www.gimpchat.com/viewtopic.php?f=9&t=4594

Sorry it's not some new exciting lens or animation but it does come in handy for debugging and documenting filter compositions.


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Mon Jun 25, 2012 6:01 pm  (#24) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
nice utility may come very handy
Btw by chance you know if would be possible offset the effect of filters as pond, enhanced pond and radial mosaic ?

as now the focal point of the effect coincide with the image center i would love allow to offset that focal point along the xy axis

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Mon Jun 25, 2012 6:59 pm  (#25) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
Do us a pic showing what is wrong, maybe with a few arrows on what you want moved where and I'll see what I can do :)


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Mon Jun 25, 2012 8:19 pm  (#26) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Nothing is wrong with your filter

Just try mathmap "Enhanced Pond" (should be in Distort ) or if you are patient and not with dial up connection (it is almost 20MB ) ,look here http://fc08.deviantart.net/fs71/f/2012/ ... 54xa33.gif ,and you will see what i mean:

the effect is centered , it is a vortex in the very center of the image
i would like add 2 sliders to modify the position of the vortex

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Tue Jun 26, 2012 2:47 am  (#27) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
I know there's nothing wrong with my filter, I meant show me what's wrong with yours :)

OK checked your .gif out , pretty cool and I see what you mean.

Have you tried wiring a "translate" filter or two into the filter chain, this will allow you to make X/Y shifts - this would be more in keeping with Mathmap methodology too, rather than hacking in more and more sliders (chances are you'll want further transforms later).

The idea would be to shift your image centre, apply your effect then shift it back before rendering an output frame.

So in composer it will look something like this:

(Image In -->) Translate Left --> Amazing Lens --> Translate Right.

Let me know if you're still struggling to get the effect you desire, I'll have time to have a more detailed look later.


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Tue Jun 26, 2012 8:34 am  (#28) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
it seems a good idea, i will try...well i hope to find the time i am going to have a very busy week

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Tue Jun 26, 2012 1:30 pm  (#29) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
I had no trouble copying Mollys code area to Notepad ++ and naming it as a mm extension.
It works fine.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Tue Jun 26, 2012 1:38 pm  (#30) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
What did you name that filter Rod? ?????.mm

_________________
Image


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Tue Jun 26, 2012 3:58 pm  (#31) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
Rod wrote:
I had no trouble copying Mollys code area to Notepad ++ and naming it as a mm extension.
It works fine.


almost surprised that works fine :
it should be saved as .mmc, not as mm :cool

mm are the basic filters, mmc the filter created assembling more "nodes" (more filters )

It would be amazing a Composer in gmic...Alas the idea seems to not raise much interest in David...maybe because somehow
he consider the gmic command line version the real thing, and the command line doesn't need any composer

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Tue Jun 26, 2012 7:02 pm  (#32) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
step7 wrote:
I know there's nothing wrong with my filter, I meant show me what's wrong with yours :)

OK checked your .gif out , pretty cool and I see what you mean.

Have you tried wiring a "translate" filter or two into the filter chain, this will allow you to make X/Y shifts - this would be more in keeping with Mathmap methodology too, rather than hacking in more and more sliders (chances are you'll want further transforms later).

The idea would be to shift your image centre, apply your effect then shift it back before rendering an output frame.

So in composer it will look something like this:

(Image In -->) Translate Left --> Amazing Lens --> Translate Right.

Let me know if you're still struggling to get the effect you desire, I'll have time to have a more detailed look later.


It does not work
Maybe could work but there is a missed step and i can't see any command in MM to solve it.

if i shift the image part of the image go out of the canvas and is not rendered
solution would be create a new bigger layer with plenty of empty space at the sides, apply the effect, and crop at original size i fear there are no MM command for it

Much better solution would be wrapping automatically the image when offsetting and there is a wrap option for edges behavior

But the problem here is that if i see how chose that option manually i can't see how hardcode in a filter

So basically a similar filter will work for me, because i know the trick, but would be quite delusive for others

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Tue Jun 26, 2012 7:15 pm  (#33) 
Offline
GimpChat Member

Joined: Jun 21, 2012
Posts: 106
The canvas is technically infinite once your image is in the filter pipeline, so this is strange - there must be something else going wrong. Don't mess with your Gimp layers - should be no need. Bear in mind composer messes up sometimes depending on what order you add filters, try rebuilding from scratch then post a picture of your filter chain if it doesn't work.


Top
 Post subject: Re: New Filter for MM ? post here
PostPosted: Wed Jun 27, 2012 7:01 am  (#34) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
I will try again, today i am really busy but i hope to find time in the evening

a quick question about your suggestion

(Image In -->) Translate Left --> Amazing Lens --> Translate Right.

first i hope there is also a Translate Up /Translate Down then i suppose should be more complex as

(Image In --> ((A) Translate Left -->Translate Right --> Translate Up--> Translate Down --)> Enhanced Pond --> B = opposite of A

where A allow to shift in any directions and B is the opposite of A and is to revert in the original position

The point here is that i have no clear how to automatically give the correct values for B :gaah



humm..i hope i was clear, i have no gimp/mathmap at hand now maybe i'm missing something obvious


But i think a snippet for : Translate Right/Left/Up/Down-->(here the filter)> Revert Translate will be very useful to make many filters more flexible

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) cli345's cartoon filter as a native GEGL Filter.

10

No new posts Attachment(s) First Post

4

No new posts Cannot post anything

5



* Login  



Powered by phpBB3 © phpBB Group