Mantra Python filter property to set filename differently

   7445   6   2
User Avatar
Member
18 posts
Joined: Aug. 2007
Offline
Working on a python filter to render tiles and need to name each tile dynamically I've tried to setproperty on image:filename and plane:filename but the IFD filename still gets used!

Anyone able to shine a light on my dim area of knowledge of houdini filters?
Cheers

Jamie

better explanation here:
http://forums.odforce.net/index.php?/topic/10335-p-python-filtering-imagefilename-set-property-problem/ [forums.odforce.net]
User Avatar
Member
1390 posts
Joined: July 2005
Offline
txrx
Working on a python filter to render tiles and need to name each tile dynamically I've tried to setproperty on image:filename and plane:filename but the IFD filename still gets used!

Anyone able to shine a light on my dim area of knowledge of houdini filters?
Cheers

Jamie

better explanation here:
http://forums.odforce.net/index.php?/topic/10335-p-python-filtering-imagefilename-set-property-problem/ [forums.odforce.net]

Perhaps the easiest way would be to overwrite output via command line:

mantra -P ./filterMantra.py -f myIfd.ifd ./myoutputfile.exr
User Avatar
Member
18 posts
Joined: Aug. 2007
Offline
Hi there,

Thanks for your help on this. So there's no way the python filter script can access/change the output name I take it? That's ok

The command line is generated on the nodes using a Python wrapper to also set DB elements and env vars in place so I'll make it call the pytile script to get the proper name amendment output at the end of the commandline and executed on the nodes.

Thanks again for your help!

J

PS: Incidently where's the best place to post? Here or Od since I feel I've just double posted
User Avatar
Member
338 posts
Joined: Sept. 2006
Offline
Was just thinking about this issue jamie.

This may cause issues with our setup

“mantra -P ./filterMantra.py -f myIfd.ifd ./myoutputfile.exr”

Not that its wrong but more of how we are exporting the .exr files. We dont save a single exr file out that include our imageplanes. We have a separate exr file for each plane.

So we need to be able to set a path for each image plane, as well as stitching each image plane together after wards.

For any of that to work you need to know the imageplane contents from the IFD, unless we can search through the IFD for imagePlanes contents using your python script to do this. Even with that im not sure if we can set imageplane outputs through command line?

Maybe we can redirect all the outputs to a tile folder.
Havent tried this but it may work…

mantra -P ./filterMantra.py -f myIfd.ifd ./myOutputTileFolder1/
mantra -P ./filterMantra.py -f myIfd.ifd ./myOutputTileFolder2/
mantra -P ./filterMantra.py -f myIfd.ifd ./myOutputTileFolder3/

Then you can simply scan the output directory for all tiles and compile them together.

Thinking outloud here , A cheeky workaround and not a great one to be honest, is to generate multiple ifds but using an enviroment var in the folder path for controlling the tile number… i.e $TILENUMBER, which you can set before the IFD job runs. I suppose its similar to a wedge rop, but controlled at a renderfarm level. Maybe we can do a post renderscript to set this so it is generic.

Either way a python filter or commandline option would be best if it was possible.

Downside means multiple IFDs, its not generic and requires user input rather then simply telling the farm to render tiles.

Cheers
Nick
User Avatar
Member
4271 posts
Joined: July 2005
Offline
I ran into this a few weeks ago too. You can filter/change the extra planes, (Deep rasters), but not the main image sadly.
if(coffees<2,round(float),float)
User Avatar
Member
18 posts
Joined: Aug. 2007
Offline
Thanks for the reply. I'm going to avoid using multiple IFDs and image planes for the mean time. The main thinking behind this is to remove the need to re-render IFDs and try and keep as much of the tile-rendering on the farm functionality to the mantra python wrapper.

Additionally I'm looking to get this base functionality working then we can add more features to it as we progress.

I'll make the farms python mantra wrapper check for the render huge tile flags from the farm and call the tile co-ord function from the python filter and append the file name with the tile co-ords for the auto-stitcher script to re-join etc..

I can see how it works, slight shame that python filtering doesn't reach into the output api of the render but hey, that's not the end of the world!

'xpect me to be spamming these forums a little more in weeks ahead Nick!
User Avatar
Member
1390 posts
Joined: July 2005
Offline
txrx
PS: Incidently where's the best place to post? Here or Od since I feel I've just double posted

whichever you prefer , but preferable one at the time
  • Quick Links