Re: [Nuke-users] extend edge pixels

2016-09-21 Thread Howard Jones
Here’s a simple one I wrote.

I’ve found some on Nukepedia to be too noisey but they will probably handle 
corners better than this.
It does an internal comp but to be honest you should turn that off and merge 
under a slightly shrunk matte version of the original

Howard Jones
Visual Effects Supervisor

set cut_paste_input [stack 0]
version 10.0 v3
push $cut_paste_input
Group {
 name extendEdges
 knobChanged 
"n=nuke.thisNode()\nk=nuke.thisKnob()\nclearNodes=nuke.allNodes()\nif 
k.name()in('xTend','nSize','filterType', 'mergeUnder'):\nnuke.selectAll()\n 
   for i in nuke.allNodes('Output'):\ni\['selected'].setValue(False)\n  
  for i in nuke.allNodes('Input'):\ni\['selected'].setValue(False)\n
nuke.nodeDelete()\ndt=nuke.createNode('Dot', inpanel=False)\nfor i 
in range(int(n\['xTend'].value())):\nb=nuke.createNode('Blur', 
inpanel=False)\nb\['size'].setValue(n\['nSize'].value())\n
b\['filter'].setValue(n\['filterType'].value())\n
unp=nuke.createNode('Unpremult', inpanel=False)\npb=nuke.createNode('Blur', 
inpanel=False)\npb\['size'].setExpression('parent.postBlur')\n \n
mge=nuke.nodes.Merge()\nmge\['operation'].setValue('under')\n
mge.connectInput(n\['mergeUnder'].value(), pb)\n
mge.connectInput(1-n\['mergeUnder'].value(), dt)\n
mge\['disable'].setExpression('!parent.mergeUnder')\nfor i in 
nuke.allNodes('Output'): i.connectInput(0, mge)\n\n"
 selected true
 xpos 237
 ypos 271
 addUserKnob {20 User l Extend}
 addUserKnob {3 xTend l extend t "recursively extends the edge"}
 xTend 5
 addUserKnob {14 nSize l blur t "blur for each extend layer" R 0 100}
 nSize 1
 addUserKnob {4 filterType l filter M {box triangle quadratic gaussian "" ""}}
 filterType gaussian
 addUserKnob {7 postBlur l "post blur" t "blur result" R 0 20}
 addUserKnob {6 mergeUnder l merge +STARTLINE}
 mergeUnder true
}
 Input {
  inputs 0
  name Input1
  xpos -610
  ypos 148
 }
 Dot {
  name Dot1
  xpos -576
  ypos 174
 }
set N550327a0 [stack 0]
 Blur {
  size 1
  name Blur1
  xpos -610
  ypos 192
 }
 Blur {
  size 1
  name Blur2
  xpos -610
  ypos 236
 }
 Blur {
  size 1
  name Blur3
  xpos -610
  ypos 280
 }
 Blur {
  size 1
  name Blur4
  xpos -610
  ypos 324
 }
 Blur {
  size 1
  name Blur5
  xpos -610
  ypos 368
 }
 Unpremult {
  name Unpremult1
  xpos -610
  ypos 412
 }
 Blur {
  size {{parent.postBlur}}
  name Blur6
  selected true
  xpos -610
  ypos 438
 }
push $N550327a0
 Merge {
  inputs 2
  operation under
  name Merge1
  xpos -500
  ypos 434
  disable {{!parent.mergeUnder}}
 }
 Output {
  name Output1
  xpos -472
  ypos 1083
 }
end_group


-- 



*A X I S V F X*

The Bottle Yard Studios

Whitchurch Lane

Bristol BS14 0BH

 

axis-vfx.com
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] extend edge pixels

2016-09-20 Thread Gary Jaeger
Thanks all. Love nukepedia, should have checked it first. And we have
pixelfudger (PxF_Filler ftw!) but I've never reached for that one. Thanks
again all.

On Tue, Sep 20, 2016 at 2:39 PM, Dan Stein 
wrote:

> I've seen a lot of variants on tools that do this. Probably some on
> Nukepedia but I can't check at the moment.
>
> The basic idea is a series of Blurs or Edgeblurs followed by Unpremults.
> You can have the size increase exponentially the further out it gets or
> keep it uniform. Depends on the result you need.
>
> That's how I'd approach it anyway.
>
> On Sep 20, 2016, at 3:48 PM, Gary Jaeger  wrote:
>
> Anybody have a good way of extending the edge pixels of a premulted image?
> for instance, if I had an image masked by a circle, just to take the edge
> pixels and extend them out xx amount? Sort of like an unpremult but more :0
> Does that make sense?
>
> *Gary Jaeger */ 650.728.7957 direct / 415.518.1419 mobile
> http://corestudio.com
>
> ___
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
>
> ___
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>



-- 
Gary Jaeger // Core Studio
249 Princeton Avenue
Half Moon Bay, CA 94019
650.728.7957 (direct) • 650.728.7060 (main)
http://corestudio.com
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] extend edge pixels

2016-09-20 Thread Ian Northrop
http://www.nukepedia.com/gizmos/filter/edgemod

> El sept 20, 2016, a las 12:48 PM, Gary Jaeger  escribió:
> 
> Anybody have a good way of extending the edge pixels of a premulted image? 
> for instance, if I had an image masked by a circle, just to take the edge 
> pixels and extend them out xx amount? Sort of like an unpremult but more :0 
> Does that make sense?
> 
> Gary Jaeger / 650.728.7957 direct / 415.518.1419 mobile
> http://corestudio.com
> 
> ___
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Re: [Nuke-users] extend edge pixels

2016-09-20 Thread Michael Habenicht
Sure, just blur it before unpremultiplying and over the original afterwards. 
That is the simplest and easiest way!

Best regards,
Michael

On September 20, 2016 9:48:58 PM CEST, Gary Jaeger  wrote:
>Anybody have a good way of extending the edge pixels of a premulted
>image? for instance, if I had an image masked by a circle, just to take
>the edge pixels and extend them out xx amount? Sort of like an
>unpremult but more :0 Does that make sense?
>
>Gary Jaeger / 650.728.7957 direct / 415.518.1419 mobile
>http://corestudio.com 
>
>
>
>
>___
>Nuke-users mailing list
>Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

-- 
Sent from my Android tab with K-9 Mail. Please excuse my brevity.
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users


Re: [Nuke-users] extend edge pixels

2016-09-20 Thread Sven Schönmann
Hey,

check out Nukepedia for gizmos...for example:

http://www.nukepedia.com/gizmos/filter/edgeextend

Cheers

Sven


On Tue, Sep 20, 2016 at 9:48 PM, Gary Jaeger  wrote:

> Anybody have a good way of extending the edge pixels of a premulted image?
> for instance, if I had an image masked by a circle, just to take the edge
> pixels and extend them out xx amount? Sort of like an unpremult but more :0
> Does that make sense?
>
> *Gary Jaeger */ 650.728.7957 direct / 415.518.1419 mobile
> http://corestudio.com
>
>
> ___
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

[Nuke-users] extend edge pixels

2016-09-20 Thread Gary Jaeger
Anybody have a good way of extending the edge pixels of a premulted image? for 
instance, if I had an image masked by a circle, just to take the edge pixels 
and extend them out xx amount? Sort of like an unpremult but more :0 Does that 
make sense?

Gary Jaeger / 650.728.7957 direct / 415.518.1419 mobile
http://corestudio.com 
___
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users