bluring an image using CHOP

   6801   9   3
User Avatar
Member
122 posts
Joined: May 2006
Offline
i created a grid sop,
append point sop to add point color (Cd) attribute, and set it to black,
append paint SOP & draw a simple image on the grid surface ,
then what i like to do is to blur the image i painted.

i want to achieve this effect specifically using CHOP.
so enter CHOP network, drop a geometry CHOP to grab the Cd attribute from paint SOP.
then append a filter CHOP, so hopefully this ‘filter’ node will blur the image.
but as the result, this ‘filter’ doesn't do a nice blur..
so how to achieve a nice blur effect using chop?
anyone can help me on this?

thanx
User Avatar
Member
4140 posts
Joined: July 2005
Offline
I suppose the first question is “why?”, but anyway - CHOPs are designed to deal with time based channels - when you filter a channel you're affecting the transition of a value over time - effectively adjacent time values. When you're blurring an image, you're using some sort of filter to average out adjacent pixel values, and typically *surrounding* pixel values in 2 dimensions, not linear pixel feeds. I'm unclear why you'd expect those two processes to somehow behave the same, although I'll admit I'd never sat down and tried to do it. Seems like trying to use a saw to hammer in a nail. You need to mimic the u/v 2 dimensional layout internally in CHOPs to somehow mimic what compositing does.

Maybe you can clarify more.

You can convert an *image* into CHOPs, using the image CHOP, but that doesn't seem to be what you want to do.

Cheers,

J.C.
John Coldrick
User Avatar
Member
1192 posts
Joined: July 2005
Offline
Check this old and interesting post:
Mailing list archive [sidefx.com]

I actually don't see CHOPs only as a time-channel tool. I love manipulating geometry with CHOPs, for example.

Dragos
Edited by - Sept. 4, 2006 10:59:50
Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
7046 posts
Joined: July 2005
Offline
Holy cow, that's almost 7 years ago!! And that's Houdini 4!! Ahhhhhhhhhhhh I'm old!!!!!!

Sorry. Back on topic, processing images in CHOPs is cool, but not always intuitive since the pixels get turned into “time” and “channel” data. Once you wrap your brain around it (like many many other things in Houdini) the world is your oyster.

Mark Alexander showed me a nice trick where you can use CHOPs to detect and return the values of the brightest and darkest pixels in an image, using CHOPs and a couple of simple expressions. If you're really patient you can even use it to find the brightest and darkest pixels across a range of images. Both of these things are very hard to do in COPs natively without some heavy scripting or HDK work.

Naturally, I've forgotten the trick, I have it in a HIP file somewhere

Cheers,

Peter B
Cheers,

Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
User Avatar
Member
122 posts
Joined: May 2006
Offline
JColdrick
I suppose the first question is “why?”,

thanx,
actually i'm not doing anything important, just a curiousity maybe…
well, i'm just looking some alternative way in my learning proccess,
since i'm a beginner, i'm doing a lot of experiment
and i attached a hip file and an OTL that i created,
maybe this can explain what i ‘m trying to achieve.
i know again that this can be done with other easier way, something like using an animated images (that goes from sharp to blur) as texture to drive the shape, but this i’m just trying to explore some other possibilities.

so in the hip file , i'm trying to distort/modify the shape of an extruded faces based on Cd attribute.
the OTL i created has one parameter : blur scale , this for controling the displacement ….as u drag the value, shape is changed.
but the result is more like a directional blur, so it's only blur the image in one direction, that 's the problem.
maybe i need some hard coded expression to do the blur (if i insist w/ the CHOP)?

thanx.

Attachments:
displacement.rar (25.6 KB)

User Avatar
Member
2199 posts
Joined: July 2005
Online
You can blur an attribute using the attribute transfer sop. Just put the same geometry into both inputs. Then on the conditions tab play with the radius and max sample count. Maybe that will help.
The trick is finding just the right hammer for every screw
User Avatar
Member
8081 posts
Joined: July 2005
Offline
If you just want to blur simple float attributes, the Paint SOP is by far the easiest. In the Paint SOP's parameters, change the Operation parameter to Smooth. Now click on the Apply To All parameter a couple of times. You don't have to use the same paint sop, you can just append a new one. Since this is a non-procedural operation, it won't work if your upstream input has changing attribute values though.
User Avatar
Member
2199 posts
Joined: July 2005
Online
Actually it would be a nice addition to the paint sop if it would blur too. Smoothing is all well and good but sometimes you can get to the point where the value is “smooth” but not blurred enough.

Also reminds me you can use the smooth sop to blur attributes but you need to turn the cutoff frequency up above 3 to get it to blur rather than just smooth. Generally for large blurring the attribute transfer sop is quicker i think….
The trick is finding just the right hammer for every screw
User Avatar
Member
122 posts
Joined: May 2006
Offline
thanx guyz,

both using paint(smooth) and attrib transfer work fine, where the attrib. transfer can give more ‘blury’ effects compare to paint.

digitallysane
Check this old and interesting post:
Mailing list archive

i tried this link, but in the part where it says : “Back in COPS: Use the Channel COP, reference the Lag Chop and …..”
in COPs there's nothing like ‘channel COP’ as mentioned. what's wrong? since it was version 4, is this node replaced ?

another thing is… just curious… is it possible to grab Cd attributes & bring them into COP network? so then i can manipulate and send it back to SOP.

thanx
User Avatar
Member
2199 posts
Joined: July 2005
Online
There is a geometry cop - but I don't think it picks up colour attributes. Might be wrong though as I never tried it.
Other than that then you'd have to use a render cop….
The trick is finding just the right hammer for every screw
  • Quick Links