j00ey Posted January 13, 2015 Share Posted January 13, 2015 (edited) I am banging my head on the wall trying to get something that I thought would be very straightforward to work. I just want to remap the luminance of an image in COPS to then use that value for multiplying against some noise. I have a ramp on the snippet . I'm piping R G and B into the VOP from the globals and my code so far is this : vector rgb = set(R,G, ; vector hsv = rgbtohsv(rgb); float lum = hsv[2]; lum=chramp("lumremap",lum); R=lum; It seems the chramp function doesn't want to work as whatever value I put in there instead of lum, it still returns 0. I haven't used the snippet VOP before though I am familiar with wrangles and so on. Anyone know what's wrong here? Thanks Edited January 13, 2015 by j00ey Quote Link to comment Share on other sites More sharing options...
j00ey Posted January 13, 2015 Author Share Posted January 13, 2015 (edited) hmmm... ch("parm") doesn't seem to work either. Is this another COPs bug or am I missing something? From the help files for Snippet VOP : You can use the VEX function ch to evaluate parameters. The path is relative to this node (ch("parm") will evaluate the parameter parm on this node). This evaluation will be done at the current time. Edited January 13, 2015 by j00ey Quote Link to comment Share on other sites More sharing options...
Mandrake0 Posted January 13, 2015 Share Posted January 13, 2015 (edited) hi i just made a simple example. you have to put the command in single quotation mark: `ch("testparm")` vopcop_snippet_example_ch.hipnc Edited January 13, 2015 by Mandrake0 Quote Link to comment Share on other sites More sharing options...
j00ey Posted January 13, 2015 Author Share Posted January 13, 2015 Great! Thanks so much for the help, never occurred to me to try that. Is that just a COPs thing? I've never come across that syntax in wrangles... or is it snippet VOP specific and if so, why does for instance rgbtohsv work without backticks and ch doesn't? Thanks again Quote Link to comment Share on other sites More sharing options...
Mandrake0 Posted January 13, 2015 Share Posted January 13, 2015 Great! Thanks so much for the help, never occurred to me to try that. Is that just a COPs thing? I've never come across that syntax in wrangles... or is it snippet VOP specific and if so, why does for instance rgbtohsv work without backticks and ch doesn't? Thanks again maybe just ask the real houdini it's maybe just magic. :-) i think rgbtohsv is a VEX function the ch("") reads the value from the parameter interface so i'ts not a VEX function. when you want to use a parameter just RMB copy Parameter and paste (RMB -> Paest Copied Re...) the Parameter in the Text field that should work always. Quote Link to comment Share on other sites More sharing options...
j00ey Posted January 13, 2015 Author Share Posted January 13, 2015 Right I see... tis indeed black magic! Thanks for the copy paste tip also, I didn't realise that worked in VEX fields, very useful 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.