GeordieM Posted March 16, 2015 Share Posted March 16, 2015 Hi all, I've been trying to sample a COP node inside a COP SOP manager to create point attributes. I can do this at the current time no problems, but is there a way to specify sampling a COP at time N? I know you can't directly feed $F into the VEX colormap function but I thought there might be a way around this: I added a For loop SOP Added my attribWrangle node in the for loop Added a TimeShift node after the attribWrangle This works fine for general stuff, I can set attributes in my VEX according to $F and it works as expected with the Time Shift. BUT As soon as I try and use the colormap function Houdini either dies or I get an unhelpful compile error. I know Houdini can do this, I'm also using the Trace SOP which has an option to use a COP node with a supplied frame value and this works perfectly in a SOP For loop. I also tried the AttribfromMap SOP but this is just a VOP SOP network which fails the same way as my VEX. Are there any HDK SOP nodes out there that can sample pixels from a COP node into point attributes? TNKS! G Quote Link to comment Share on other sites More sharing options...
malexander Posted March 16, 2015 Share Posted March 16, 2015 You can grab an image from COPs using the op: syntax, with the frame at the end in []: op:/img/comp1/file[10] The above fetches frame 10 from /img/comp1/file. Quote Link to comment Share on other sites More sharing options...
GeordieM Posted March 16, 2015 Author Share Posted March 16, 2015 THANKYOU! I've been getting a lot of crashes trying to get this to work and read some posts saying it wasn't possible. I think the crashes were to do with the "Missing Frames" parm on my file COP node since I'm overriding an image and giving a frame range, seems to work on "Use Closest Frame" Well It's all working in a simple test, we'll see tomorrow if it works for realziez. TNKS! G Sample_COP_Test5.hipnc Quote Link to comment Share on other sites More sharing options...
GeordieM Posted March 16, 2015 Author Share Posted March 16, 2015 Updated scene, getting late, didn't realize I had 5 inputs into the COP switch. So this still hard locks Houdini if I try and change to much, when I changed the COP network it hung (but I'd saved the file). When I restarted Houdini it started working again. G Sample_COP_Test6.hipnc Quote Link to comment Share on other sites More sharing options...
magneto Posted March 16, 2015 Share Posted March 16, 2015 I think there are some deadlock bugs in COPs when used in other contexts sometimes. If you turn off Multithreading in compositing preferences, it might work. Quote Link to comment Share on other sites More sharing options...
GeordieM Posted March 17, 2015 Author Share Posted March 17, 2015 Hey dude, yup I've read some threads here that COPs need some love. I've also experienced wierdness when writing complex VEX with logic either giving garbage results or soft hanging on a certain bucket. I'm planning on writing some kind of COPs logic that auto caches my graphs out to images and then pulls those to return to the SOP which may help things instead of evaling the graph per point(?). G 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 17, 2015 Share Posted March 17, 2015 (edited) When reading COPs back to SOPs once it works, but when I read back and forth in successive iterations, I get hangs generally. I also mentioned here for example COPs have a GPU acceleration option but when using it, Noise related COPs generate rings/artifacts. SESI promotes their COPs but not allocating resources to advance it. Otherwise Mark would easily bring it to the 22nd century (yes future ) Edited March 17, 2015 by magneto Quote Link to comment Share on other sites More sharing options...
GeordieM Posted March 17, 2015 Author Share Posted March 17, 2015 I've done some testing and initially have this working in my main scene. From what I can tell the instability is linked to the "Missing Frames" Parm on the File COP nodes. "Use Next Frame" seems to work. G Quote Link to comment Share on other sites More sharing options...
GeordieM Posted March 17, 2015 Author Share Posted March 17, 2015 Nope giving up, it does "work" but way to unstable when I try to do any real processing in the COPs (generating normal maps from height maps). I'm also using a custom image importer which may not be thread safe for all I know. Quote Link to comment Share on other sites More sharing options...
GeordieM Posted March 19, 2015 Author Share Posted March 19, 2015 I've found a stable workaround for sourcing complex COP graphs in SOPs. For some reason the Trace SOP seems to be able to reference COP nodes without any threading issues at $F. I'll post a demo hip when I've got some time. I suspect this isn't a limitation of Houdini at large, more a VEX colormap problem. 1 Quote Link to comment Share on other sites More sharing options...
GeordieM Posted March 24, 2015 Author Share Posted March 24, 2015 OK here's what I have working, it's kinda hacky but been using it for a week or so and seems solid with heavy VEX COP work. You'll still need to disable threading on composites but that's fine with me as Houdini Engine is limited to a single thread anyway. So I have some COP logic to cache each frame out to disk (and read the disk image if it exists). The Trace SOP forces the COP to eval when I want it to at frame $F. The attribWrangle SOP then reads each image off disk at frame $F. I've also had this working in loops and and is solid. You get the added bonus of faster cook times once the COPs have been cached and all this works in Houdini Engine. Hope this helps someone out at some point and please let me know if there's better ways of doing anything in this HIp file. TNKS! G COPToGeo4.hipnc 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.