[ISSUE] ImageMagick - can't montage single images ("{image}" is only accessible by convert operation)

   2492   3   0
User Avatar
Member
11 posts
Joined: 5月 2017
Offline
Hi everyone, basically the title. I'd like to use a montage operation, however by default the command line only accepts {input_images}, and not “{image}”.
A work around is to set the operation mode to convert, but change the command line to montage, so that I have access to the “{image}” variable. But this creates new problems. I'd also like to use a custom expression from the montage operation. However since the operation mode is now set to convert, I don't have access to it anymore.
Even hard-enabling it through the parameter interface, it just doesn't accept the “{overlay_label}” if the operation mode is set to convert.
So, I hope someone could take a look into that. I understand these presets are there to help us, but right now they seem to be useless (since the default command line values lack the operation (convert, montage, etc) in the first place).

Here's what I'm trying to do, just for context.

I have a ROP mantra in TOPs which is rendering a wedged particle simulation. I then want to process all the the frames independently, embed their wedges attributes and other relevant information into their alpha channels as text with a -label command, while converting them to .PNG to keep the file size small (since this is only for viz). Last step would be to partition them all by frame and finally montage them into a final thing, possible even encoding a video from it.

I managed to do that, and the code used for embedding the information to the frames is this:

{imagemagick} montage -background none -label "Attribute `@attribute`" "{image}" -geometry +0+0 "{output_image}"
This will work, but like I said, I have to use it in Convert mode Operation, and I have no access to the overlay_label, which would be very handy for embedding a lot of information at once. This will basically be a temporary step for generating the final montage.

Just for reference, here's the log if you try to run this command line while in montage operation mode:

montage: unable to open image ‘{image}’: No such file or directory @ error/blob.c/OpenBlob/3497.

Any help on this subject would be very appreciated. I'm a beginner in TOPs and IM, so if anyone has a better solution to this situation please let me know. I researched a lot about this but I guess there just not a lot of information out there yet, and the documentation about Houdini's IM implementation is not very detailed. It's been a lot of trial and error!

Thanks in advance!
User Avatar
Member
544 posts
Joined: 9月 2012
Offline
Hi there, sorry for the late response. Our team member in charge of this feature is out on vacation this week. We’ll take look as he returns.
- Ken Xu
User Avatar
スタッフ
387 posts
Joined: 8月 2017
Offline
Hi there,

{input_images} and {image} are just internal variables used by the node. There should definitely be more documentation surrounding these to clarify where the node gets the value of each of these variables, but more generally the node needs to be updated to avoid having to use this special syntax. This syntax for internal variables should be replaced with attributes so that they are more transparent and easily configurable. For example, it should be using `@input_images` so that the the input_images can be transparently configured by the user if they wish. This update is on the todo list!

For the use case that you are describing, this should be possible now using the montage operation. {input_images} is substituted with any incoming result files that are tagged as file/image, so we can make use of this to conduct the labelling operation. I've attached a .hip file that demonstrates. Just make sure to put in a valid path to an image file in the parameters of the Attribute Create node. The {overlay_label} text gets substituted with the evaluated contents of the “Expression” parameter.

Attachments:
montage_label.hip (92.1 KB)

User Avatar
Member
11 posts
Joined: 5月 2017
Offline
BrandonA
This syntax for internal variables should be replaced with attributes so that they are more transparent and easily configurable. For example, it should be using `@input_images` so that the the input_images can be transparently configured by the user if they wish. This update is on the todo list!

That would be really helpful and much better integrated, thank you.

BrandonA
For the use case that you are describing, this should be possible now using the montage operation. {input_images} is substituted with any incoming result files that are tagged as file/image, so we can make use of this to conduct the labelling operation. I've attached a .hip file that demonstrates. Just make sure to put in a valid path to an image file in the parameters of the Attribute Create node. The {overlay_label} text gets substituted with the evaluated contents of the “Expression” parameter.

Yes, however what I meant is that it should be possible to use a montage operation with the {image} variable instead of {input_images}. In specific cases, some operations like labeling work great with the montage operation, and right now the ability to process the images individually as work items is lacking (instead of processing the result of a partition; multiple images). Besides, I think the {overlay_label} text field should be always visible and accessible by any of the operations.

Thanks for the response. Cheers!
  • Quick Links