It is currently Tue May 21, 2013 8:24 am


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject: Re: Path Blend Script
PostPosted: Wed Apr 18, 2012 11:09 am  (#21) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 3087
Location: UK
lylejk wrote:
Might as well do something with the ring I made earlier. Erisian might like this one. ;)

Created a seamless interlinked texture and used Droste for the result. :)


I do!

_________________
Image




Top
 Profile  
 

 Post subject: Re: Path Blend Script
PostPosted: Thu May 03, 2012 9:56 pm  (#22) 
Offline
GimpChat Member

Joined: Apr 20, 2011
Posts: 52
Location: Dane-ish Co., West Gonsin
Rob,

The maths is done. (And yours is good maths.)

Could you now give it the one minor tweak necessary to make it truly "glacial?"

Rather than a single static monolithic gradient to rule them all, would you consider computing a new gradient at each step to smoothly connect the value on the inner path to the value on the outer? Linear would be fine, but of course it would only take some more maths to make the gradient be any function of the two values. And then a sequence of gradients could be computed from the ordinal value of the pairs being connected... <oh just stop it>

I'll venture a guess that Alan would like this too. It gets to my attempt in an other earlier post which called for blending the edge of a zebra's head outward to white, or if Path Blend MkII appears, on to tiger stripes, or yum, shamelessly mixing metaphors, cheese.

I'm going to use it for bas relief. The outer path is in all-white territory, the top of the model. The inner path is at the outer edge of the sculpted part, where the depth/brightness varies.

Anyway, great work, as I have noted, in a fumbled way in another post hailing my discovery of a new script: Path Blend! :oops:

Oh, here's what I did. I Sampled-Gradient-Along-Path around the spiral-gradient filled circle in the vain hope that I might be "priming" a matrix with starting points for gradients, but of course I only created one gradient to be used to connect all pairs.
Image

Got a little Moyray thing goin on in there too.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Last edited by gramp on Sat May 05, 2012 8:48 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Path Blend Script
PostPosted: Thu May 03, 2012 11:58 pm  (#23) 
Offline
GimpChat Member

Joined: Apr 20, 2011
Posts: 52
Location: Dane-ish Co., West Gonsin
gramp wrote:
Rather than a single static monolithic gradient to rule them all, would you consider computing a new gradient at each step to smoothly connect the value on the inner path to the value on the outer? Linear would be fine, but of course it would only take some more maths to make the gradient be any function of the two values. And then a sequence of gradients could be computed from the ordinal value of the pairs being connected... <oh just stop it>


I'm no Scheme programmer, but I was around when LISP (Lots of Inane Silly Parentheses) was invented, and looking at RMA_path_blend.scm, it looks like:

Line 89: (gimp-context-set-gradient inGrad)

would have to go inside the while at:

Line 98: (while (< strokecount (car strokes1))

and inGrad would have to be computed dynamically first by a function call inside that loop.

<thud>My head just hit the pavement. I think I broke it.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Profile  
 
 Post subject: Re: Path Blend Script
PostPosted: Fri May 04, 2012 3:47 pm  (#24) 
Offline
GimpChat Member
User avatar

Joined: Jul 14, 2010
Posts: 500
So something like this (xcf attached)?

Attachment:
pb2.jpg
pb2.jpg [ 10.94 KiB | Viewed 242 times ]


It has a few artifact issues, and you need to make sure your paths are inside the coloured areas you want samples - see the xcf for how I did it. I also should have rotated the circle path a bit more to get it's start point lining up with the start point of the square.

The source file in the first link has been updated for you to test...It adds a "use sampled gradient" check box that will sample the image for each blend.

-Rob A>


Attachments:
pb2.xcf [426.63 KiB]
Downloaded 19 times

_________________
Image
Fantasy Cartography and Mapping by RobA
Top
 Profile  
 
 Post subject: Re: Path Blend Script
PostPosted: Fri May 04, 2012 8:57 pm  (#25) 
Offline
GimpChat Member

Joined: Apr 20, 2011
Posts: 52
Location: Dane-ish Co., West Gonsin
Yes, very close, but two of the corners suggest walls where I'd have a continuous curve.

I really thought I had it figured out. I could hardly wait to get home and try it.

Imagine a grayscale island scene floating in a transparent land-locked sea in a land of white.

Bleed the edges of the grayscale half the distance to the land.

Bleed the edges (or more simply, bucket fill the remaining half-distance with white.

Select the "band" defining the sea.

Gaussian blur half the width of the sea.

It should've worked, but I end with an artifact from the bleed which also shows up in the
subsequent gblur. But this is tantalizingly close. (The artifact appears to bevel the
otherwise-continuous image.)

ImageImage

Still have to try it on the square-to-round, but in my application both the island and the sea will
be similar shapes. [EDIT: sqr2rd showed same artifact, but otherwise the idea has merit.]

I shouldn't give the impression that this an artifact of the Bleed script, but rather an artifact of my coercion of the
Bleed script where I ought to be using a copy tool to "grow" the edge colors (like perhaps StepResizeKeepingLayers).

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Last edited by gramp on Fri May 04, 2012 9:34 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Path Blend Script
PostPosted: Fri May 04, 2012 9:10 pm  (#26) 
Offline
GimpChat Member

Joined: Apr 20, 2011
Posts: 52
Location: Dane-ish Co., West Gonsin
I see the steps now.

Select a 1px edge around the island.
Copy it to a new layer.
Scale the selection to be "slightly" (wtm) larger.
Merge the layer down to grow the island with (roughly) a copy of its edge.
Rinse and repeat until "halfway" (wtm) to land.
Fill the remaining sea with land color.
Gaussian blur the sea area.

Sorry, needed to get this thought out of my head before it's lost.

Now I'll go back and fetch your pb2.xcf

Thanky. (Great, now I'm channeling Granny from the Beverly
Hillbillies.)

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Profile  
 
 Post subject: Re: Path Blend Script
PostPosted: Fri May 04, 2012 11:34 pm  (#27) 
Offline
GimpChat Member
User avatar

Joined: Jul 14, 2010
Posts: 500
gramp wrote:
Scale the selection to be "slightly" (wtm) larger.



That is the issue. You can only scale it larger if it is a regular, convex shape.

-Rob A.

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Profile  
 

 Post subject: Re: Path Blend Script
PostPosted: Sat May 05, 2012 12:22 am  (#28) 
Offline
GimpChat Member
User avatar

Joined: Jul 14, 2010
Posts: 500
OK - There was a dumb mistake again.... Don't sample visible from an image you are changing.... Now the code creates a new from visible layer internally and samples from that. Updated at the link to try...

The only artifact is now at the point where the path starts and ends.

Attachment:
blendsample.jpg
blendsample.jpg [ 9.36 KiB | Viewed 219 times ]


-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Profile  
 
 Post subject: Re: Path Blend Script
PostPosted: Sat May 05, 2012 8:18 am  (#29) 
Offline
GimpChat Member

Joined: Apr 20, 2011
Posts: 52
Location: Dane-ish Co., West Gonsin
RobA wrote:
That is the issue. You can only scale it larger if it is a regular, convex shape.
-Rob A.


Well, at least that explains the deja vu'... :)

Observation: A 'kill' switch would be nice for the second-guessers among us who only
notice what they did wrong after they hit 'OK.' Thank gooness my CNC
has one: in fact, I built it around a Big Red kill switch. But I diverge.

Having started a Huge Test of PB, I noticed it was actually Pretty Stupid
too, but PB seems bent on finishing. Kind've like its master on Tootsie-Roll binge.
If my 'Cancel' button weren't greyed-out, I'd put it to effective use.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Profile  
 
 Post subject: Re: Path Blend Script
PostPosted: Sat May 05, 2012 9:39 am  (#30) 
Offline
GimpChat Member

Joined: Apr 20, 2011
Posts: 52
Location: Dane-ish Co., West Gonsin
RobA,

I say! By Jove, Watson, Eureka! You have met the enemy!
Image

[Sorry about the quotes. I been overcome. Tears falling on keyboard. <must... adjust... medications>]

+1 on the Pilot G2 pens [Sorry about the anti-climax.]

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login   * Subscribe to RSS Feed


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group