Foreach Progress or Verbose report ?

   3699   7   2
User Avatar
Member
258 posts
Joined: July 2006
Offline
Hello all, I am using a foreach setup manipulate geometry for every piece that is coming from a different department, , when I make a test region to work on around hundred pieces , the speed is fine, but I will be handling several thousand pieces, is there a way to visualise a progress report or to dump out a txt file for each piece number processed.

also found this

hou.InterruptableOperation in the H13 manual at
http://www.sidefx.com/docs/houdini13.0/hom/hou/InterruptableOperation [sidefx.com]

Although, I don't know if i can apply with my lil python knowledge. If it is the right direction I can ask my colleagues,

Thanks
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
User Avatar
Member
4520 posts
Joined: Feb. 2012
Offline
I think you can do this using the Python SOP, creating the file before Foreach and writing to it inside the Foreach.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
258 posts
Joined: July 2006
Offline
pusat
I think you can do this using the Python SOP, creating the file before Foreach and writing to it inside the Foreach.
We came up with a similar idea, to run an external python script per for each and to write out a TXT file, we will try it tomorrow, will update the info here if we succeed
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
User Avatar
Member
4520 posts
Joined: Feb. 2012
Offline
You don't need to use an external script. You can just use the regular IO in Python inline.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
There is a very handy operator for this in orbolt:

http://www.orbolt.com/asset/CalebHoward::trace_foreach [orbolt.com]
-G
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
If you wanna just create a Progress Report on the “For Each SOP” ,So you can simply use Script SOP inside For Each ,Just take your Iteration Number and convert it to percentage and print it with Script SOP ! :idea:

Check Attached File 8)


NOTE : This sample just take Iteration Number for “Each Group” , “Each Number” , “Each Primitives/Points” ,But you can complete it to take Iteration Number for “Each Attribute Value”

NOTE 2: To see your Progress Report ,You should open Console Window. (Python Shell must be close)

Attachments:
JKProgress.hip (64.9 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
If you like to save some files (e.g txt) on the disk just for showing progress report ,You don't need to use Python scripts ,Just append a “File SOP” and “Null SOP” to it's input inside “For Each” node and set “File Mode” to “Write Files” and use Percentage channel (In my attached project) instead of frame number ,Something like this :
C:\ProgressReport\Progress_Percent_`chs(“../Precent_Compute/Percent”)`.txt
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
258 posts
Joined: July 2006
Offline
thanks man, this works perfect. hope to return the favour in someday
Head of CG @ MPC
CG Supervisor/ Sr. FX TD /
https://gumroad.com/timvfx [gumroad.com]
www.timucinozger.com
  • Quick Links