PDG Tutorial 2 Image Manipulation - {inputfilename} alternative

   1188   6   2
User Avatar
Member
10 posts
Joined: March 2017
Offline
I created "convert_images" node according to this article.
https://www.sidefx.com/docs/houdini/tops/tutorial_pdgimagemanipulation.html [www.sidefx.com]

Since {inputfilename} expression has no more used, I used @filename attribute instead, but I got only 2 types of filename pattern ... not file names(frame000001.jpeg, frame000002.jpeg, ...) but directory names(brimstone_images, stock_pictures).
I also tried pythonscript node using below, still got same result.

file = work_item.attribValue("filename")
work_item.setStringAttrib("input_filename", file)

Now how can I get each work item name?
Edited by shin_t_o_ - Sept. 5, 2022 06:45:16

Attachments:
capture.PNG (351.4 KB)

User Avatar
Member
53 posts
Joined: Feb. 2017
Offline
Just checked this fast, as far as I understand you can use `@filename`. You have to use backticks to isolate the expression within a string parameter. @filename is automatically made by a file pattern TOP, so I assume you have something similar in your network. Alternatively `@pdg_input` gives you access to the implicit top attribute Input. Hope this helps you out Cheers!
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
User Avatar
Member
10 posts
Joined: March 2017
Offline
Sorry for the lack of explanation, I used expression in ImageMagick > Output > Output File Path, and got result above.

now I will use @pdg_input, and some method to split it.
Thank you for prompt reply.
User Avatar
Member
53 posts
Joined: Feb. 2017
Offline
shin_t_o_
Sorry for the lack of explanation, I used expression in ImageMagick > Output > Output File Path, and got result above.

now I will use @pdg_input, and some method to split it.
Thank you for prompt reply.

Can you post a screenshot of your work item information and TOPS graph? That would maybe clear up some things.
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
User Avatar
Member
10 posts
Joined: March 2017
Offline
Here is whole capture.
I set each parameters just like this tutorial, and changed only OutputFilePath item.
Using @pdg_input instead of @filename, result changed a little but it is still incomplete.

also I tried each "Generate When" item "Automatic" to "Each Upstream Item is Cooked", got same result.
Edited by shin_t_o_ - Sept. 5, 2022 07:36:53

Attachments:
tops_graph.png (216.8 KB)
capture_pdg_input.PNG (506.8 KB)

User Avatar
Member
53 posts
Joined: Feb. 2017
Offline
Reading the documentation for the imagemagick node (https://www.sidefx.com/docs/houdini/nodes/top/imagemagick.html [www.sidefx.com]) there seems to be an attribute called {inputfilepath} which you might be able to use. As you mentioned, the {inputfilename} seems to be gone. Alternatively, you can also use the @output_dirs attribute that should come from the file decompress node to point to a path and then use some globbing (for example *.png) to select all files and expand them to separate work items. You can then get the filename attribute correctly. For as far as I can read here, the instructions in the tutorial you are following do not accommodate for the removal of the {inputfilename} attribute, so I guess you have to dive a little deeper now By holding middle-mouse button on a work item you can easily inspect the attributes it holds and debug that way.
Technical VFX artist @ Housemarque / Sony Interactive Entertainment
User Avatar
Member
10 posts
Joined: March 2017
Offline
thank you for your comments, I continue to find and try appropriate attribute.

ref1. other article where {inputfilename} was mentioned
https://www.sidefx.com/forum/topic/76236/?page=1#post-325969 [www.sidefx.com]

ref2. Output File Path: $HIP/images/{inputfilename}.png
Edited by shin_t_o_ - Sept. 5, 2022 12:14:34

Attachments:
inputfilename.PNG (212.3 KB)

  • Quick Links