j00ey Posted March 17, 2014 Share Posted March 17, 2014 Hi I've not used COPS very much at all but there's something I've been doing in Photoshop that sounds like the sort of thing Houdini would be great for. I would like to be able to get all the images in a given folder, eg $HIP/images and sum [or screen] all the pixel values [they're all the same format, bit depth etc] and then output a single floating point image. I thought there might be something like a Copy COP or a forEach COP but I can't find anything that might be the answer. Can anyone give me a clue?! Thanks Quote Link to comment Share on other sites More sharing options...
malexander Posted March 17, 2014 Share Posted March 17, 2014 You can use a TimeFilter COP to blur over frames. First, put down a File COP with your sequence and set the File Raster Depth parameter to "Specific Depth", then Depth to "32b FP". Now append a Time Filter, set the Filter Range to "After Current", Filter Width to the number of frames ($L) ...and wait a bit, depending on your sequence length. If you'd like a straight sum rather than an average, follow that up with a bright COP with the Brightness parameter set to $L (sequence length). The previous conversion to 32b FP ensures that you won't lose much precision during the blur process. You can then append a File Output ROP to write only the first frame of the sequence to "sum.pic". Quote Link to comment Share on other sites More sharing options...
j00ey Posted March 17, 2014 Author Share Posted March 17, 2014 Thanks for the suggestions Mark, I'll look into that. The issue is that I'm not dealing with sequences [that is to say the images don't have sequential numbers], it's just a bunch of images in a folder. They are all the same size etc so perhaps it's easiest just to use a file renamer and treat them as a seqence. Nuke has a time echo node for doing this but I'll have a go with Houdini just for the sake of learning a bit of COPs. Thanks again Quote Link to comment Share on other sites More sharing options...
symek Posted March 17, 2014 Share Posted March 17, 2014 (edited) I do it from time to time... that is manually in a simplest possible way (I don't think there is an automatic-but-not-scripted way): I press + while being in Cops, I select all images present in a folder (potentially disabling Show Sequence...) , and press OK. I have a bunch of FileCops ready. Now I add a LayerCOP, then I select all FileCOPs and connect first selected to a LayerSOP, and voila: all get connected with a single click! My images are merged. Now I change a type of an operation to Add or Screen. Yes, I feel strange and bizarre doing this like an ordinary mortal, without Python nor Vex, but with time I got used to it. skk. ps This is great way of making contact sheet for my Canon images: by replacing LayerCOP with SequenceCOP, and connecting to MosaicCOP I get my thumbnails all together. Edited March 17, 2014 by symek 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 17, 2014 Share Posted March 17, 2014 This is much easier in VEX though, right? I did a similar thing but I noticed there are a lot of bugs in COPs that unfortunately makes using certain operations very hard. In the light of the new Houdini renovations, I wonder if COPs will see some love as XSI also has a built-in compositor Quote Link to comment Share on other sites More sharing options...
j00ey Posted March 17, 2014 Author Share Posted March 17, 2014 Thanks both. Symek, I will look into those COPs, sounds useful. It's digital photos I'm working with too. Magneto, where would I go about writing the vex? I looked for functions that might let you look in a folder for images and then loop through them but I didn't have any luck. I don't know much at all about COPs but I just imagined somehow that H would make it easy. Seems so clunky doing it in Photoshop. Thanks all for the input Quote Link to comment Share on other sites More sharing options...
magneto Posted March 17, 2014 Share Posted March 17, 2014 Many places but non directly. Check out VOPCOP2 Filter/Generator COP and inside that, place a Snippet VOP, or an Inline Code VOP. SESI not adding simple Wrangle COPs for Filter and Generator is the testament COPs are abandoned IMO. That's a major feature that should be mirrored in other contexts. I think there were user made contributions for those on Orbolt but they should come out of the box, and not invented by the users. Quote Link to comment Share on other sites More sharing options...
symek Posted March 18, 2014 Share Posted March 18, 2014 Yes, Cops are kind of buggy, I guess because of the interaction with Houdini's GUI, inherently single threaded whereas they are multi-threaded. Also ultimate support for any pixel type must be pretty difficult to maintain (I don't think I can even imagine how difficult is to write an image operations which can work on any data type from 8bit integer up to 32 bit float (through such things like 32 integers)). I hope SESI will came back to Cops, once internal issues get resolved. From my experience while working on a static images, they hardly crash, but when you start moving time slider things go quickly bad, specially when cache is nearly full. I don't think VEX is better approach for that particular task. When we were rendering lots of tiled images I wired simple script making Cops composition from provided images. Using from command line Cops are ultra fast and never crash so for repeatably task they are perfect. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 18, 2014 Share Posted March 18, 2014 I have several bugs that are very severe. For example using the filter functions in a VEX COP with certain code, while adjusting the parameters interactively, immediately crashes Houdini. GPU assistance option artifacts, deadlock issues, which only works if you switch to single threaded cooking, also not cooking VEX COPs correctly using parameters with expressions when you change these dependent nodes. You have to restart Houdini or delete the expression, force recook and then redo it again, but it breaks as soon as the dependent changes again, etc. I just think compositing is also very suitable for node based procedural workflow and even SESI uses them for certain effects, so they are not useless, but left to die with lots of issues. It would be nice if they hired just one guy to work on COPs Quote Link to comment Share on other sites More sharing options...
symek Posted March 18, 2014 Share Posted March 18, 2014 (edited) Looks like you're doing advanced stuff! My basic comp usually goes smoothly. I made stupid example with merging files without scripting, but this is like a textbook example on how not to solve such task. Don't follow! ps I think Mark Alexander is actually the one guys behind COPs and I'm pretty sure it's a matter of priorities to let him make COPs shiny again (for me rather CHOPs are on top of the list to update though). merge_images.zip Edited March 18, 2014 by symek 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 18, 2014 Share Posted March 18, 2014 Thanks man, I am sure my COP skills are nothing compared to your indepth knowledge of them I am not surprised to hear Mark was one of the guys behind COPs, much respect to him. But the current priority of viewport work, I don't know if he will ever be back in COP land 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.