gaurav Posted October 28, 2011 Share Posted October 28, 2011 Hi Guys, I am beginning with vex and not sure if I am asking the right question here. What kind of sampling/filtering is being used in default colormap node in vops ? I am hit by it while creating a basic vop to displace geometry along its normal using an image. I am trying to read image using colormap function available in vex instead of colormap node (File attached). This gives me some image sampling/ filtering controls that are available in vex. $col=colormap("default.pic",$u+$e,$v+$e,$u+$e,$v-$e,$u-$e,$v-$e,$u-$e,$v+$e,1,"filter","box","width",4); $e is my extra parameter to control the quadrilateral area of sampling. I have tried some reasonable settings with various numbers of samples and available filter types. But have been unable to get the result which one can get from default colormap node. Question 2.- Is there a function available to run “convolve / blur filter “on the incoming data after reading it with colormap vex function. Though it should be simple to write one. May be something like this Define a kernel size, Take some random samples in that area and filter the values. Simplest would be to take the average value and assign for all the points in the defined region. Please guide me in the right direction. Thanks, -Gaurav dispVop.hipnc Quote Link to comment Share on other sites More sharing options...
old school Posted November 2, 2011 Share Posted November 2, 2011 1. colormap() does not filter texture look-ups. Just direct raw sampling of the image with NO filtered look-up. See the help here: http://www.sidefx.com/docs/houdini11.1/vex/functions/colormap 2. texture() does filtered texture look-ups. This is the function you want. It supports various convolution filters. It supports st direct look ups or you can define the coordinates of the rectangle patch to sample allowing you to determine what area of the texture to sample and filter. http://www.sidefx.com/docs/houdini11.1/vex/functions/texture Quote Link to comment Share on other sites More sharing options...
gaurav Posted November 2, 2011 Author Share Posted November 2, 2011 Hi Jeff, Thanks for your reply. Things are little clearer now. However there are 2 observations. 1. texture ( ) is not available in sop context and this is where I was trying to read in the image in my attached hip file. Its more of a situation than a problem . I can always op: the cop to get image the way i want. it was purely out of curiosity. 2. As you said colormap() does not filter texture look-up. But in the Help card http://www.sidefx.com/docs/houdini11.1/vex/functions/colormap At the bottom there is an example with specifying filter parameters: colormap(map, u, v, "filter", "gauss", "width", 1.3, "mode", "repeat"); And this is what confused me in first place. What is it suppose to mean ? Pardon me if I am missing out on something really basic. Thanks, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.