hoknamahn Posted October 20, 2005 Share Posted October 20, 2005 Hey, guys! I don't remember is it possible to add new image plane in VEX COP filter? For example, I want to pipe File COP with R, G, B, A planes to my VEX COP filter and get result with R, G, B, A, My_New_Pretty_Plane. The main idea is to generate multiple masks from Object IDs image plane (for color correction or something like that). It's the first question. The second question isn't related to COPs. Houdini doesn't allow to create dynamic interfaces like Maya can do with MEL. So maybe I can do the same things with Tcl/Tk? Never tried it before so I don't know. I just want to get my new generated Object IDs Masks and create one interface with multiple sliders (each slider for it's own mask). Quote Link to comment Share on other sites More sharing options...
edward Posted October 20, 2005 Share Posted October 20, 2005 I imagine that there isn't such a VEX function since it's creating new data although I could be wrong. What about just creating an HDA (hence your custom sliders) which just uses a Color COP to add new planes? In the Image tab of the Color COP parameters, change the Add Plane "M" to None. In the Custom Planes parameter, you can just give it a string of new planes (separated by spaces) to add. You can either just promote the whole parameter or use a backtick expression to generate the plane names. Now if you need further processing in your HDA, you can add your VEX COP stuff to it. Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted October 20, 2005 Author Share Posted October 20, 2005 I imagine that there isn't such a VEX function since it's creating new data although I could be wrong. What about just creating an HDA (hence your custom sliders) which just uses a Color COP to add new planes? In the Image tab of the Color COP parameters, change the Add Plane "M" to None. In the Custom Planes parameter, you can just give it a string of new planes (separated by spaces) to add. You can either just promote the whole parameter or use a backtick expression to generate the plane names. Now if you need further processing in your HDA, you can add your VEX COP stuff to it. 22007[/snapback] Wow! Nice solution, Edward! Good idea. Thanks. What about bunch of sliders? (Each plane must have it's own slider) I think that I can't add sliders to HDA dynamically, right? Quote Link to comment Share on other sites More sharing options...
edward Posted October 20, 2005 Share Posted October 20, 2005 That's a bit harder. Maybe you can just use spare parameters in the HDA. The opspare command has ability to list all the spare parameters of a node. Quote Link to comment Share on other sites More sharing options...
malexander Posted October 20, 2005 Share Posted October 20, 2005 You can also use an export parameter in VEX to create a new plane (though its name will be constant): cop2 addluminance(export float lum = 0) { lum = luminance(R,G,B); } This creates a plane named 'lum' and assigns it the luminance of R,G,B. float = scalar float plane (1 channel); int = scalar int plane; vector = 3 channel float plane; vector4 = 4 channel float plane There's really no way to do this for a variable number of planes, though, as there's no way to create a variable list of export parameters in VEX (the UI is similarily limited). Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted October 20, 2005 Author Share Posted October 20, 2005 Ehhhh, shame me Keyword is "export" ) Okey thanks guys! Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted October 23, 2005 Author Share Posted October 23, 2005 Any ideas how to detect automatically the number of IDs in the image plane? I can calculate the number of IDs in VEX but I see no ways how to export this to expressions or HScript. Maybe someone have an idea how to solve this (in any possible way)? For now I use semiautomatic mode where user set the number of IDs by hands. It's no good 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.