COP node for storing image data in Houdini

   4664   4   0
User Avatar
Member
32 posts
Joined: Aug. 2014
Offline
Hi,

I'm working on a houdini C++ node. It generates various images that I want to make accessible as COP nodes. I have managed to do it through saving out a file and importing it with a cop file node. It means anyone using the node need to keep track of a bunch of generated image files and copy them around with all the other data. I would want to give the user an option to store the images right into a houdini node not referencing a file on disk.
I didn't find a node representing a framebuffer I can use in a cop network. Is there one or would I need to build one myself?
User Avatar
Staff
2676 posts
Joined: July 2005
Offline
David Larsson
Hi,

I'm working on a houdini C++ node. It generates various images that I want to make accessible as COP nodes. I have managed to do it through saving out a file and importing it with a cop file node. It means anyone using the node need to keep track of a bunch of generated image files and copy them around with all the other data. I would want to give the user an option to store the images right into a houdini node not referencing a file on disk.
I didn't find a node representing a framebuffer I can use in a cop network. Is there one or would I need to build one myself?

Every node can store its own data when it saves. See the SOP_BlindData example.
User Avatar
Member
32 posts
Joined: Aug. 2014
Offline
I'm trying to make sense of how this applies to my problem:
1. Does this mean I can pick a random COP node and stick my framebuffer in it and use it instead of an cop file node for my new image?
2. Does it mean my SOP-node that generates the image should store the framebuffer as blind data in itself and I can then access the blind data from a SHOP network using some form of op syntax when using the image as texture?
3. Does it mean I really need to create a new COP node type that stores the image as blind data?
User Avatar
Staff
2676 posts
Joined: July 2005
Offline
David Larsson
I'm trying to make sense of how this applies to my problem:
1. Does this mean I can pick a random COP node and stick my framebuffer in it and use it instead of an cop file node for my new image?
2. Does it mean my SOP-node that generates the image should store the framebuffer as blind data in itself and I can then access the blind data from a SHOP network using some form of op syntax when using the image as texture?
3. Does it mean I really need to create a new COP node type that stores the image as blind data?
You didn't mention what type of node that created the images, just that it was C++

If it's a SOP, I would store the images with the SOP and make a custom COP that access the images. I think that's easier than adding your own op: syntax…

You could likely do the custom op: syntax using an FS_Reader, but I'm not sure how you'd easily get the raster data embedded in an IFD for rendering. So, a COP is likely the path of least resistance.
User Avatar
Member
32 posts
Joined: Aug. 2014
Offline
Thanks, this all makes very much sense since I don't need to create a new image storage node or file input node every time I reevaluate the SOP node. The COP node will just pull the new pixel data out of the SOP node.
  • Quick Links