> I have a scene I'm rendering through Mental Ray Standalone
> and tell it to use an absolute directory to write the output
> images, but it seems to be writing the images relative to the project
> instead of the output directory I'm specifying.
>
> In the rush log, it looks like Rush is passing the correct -rd flag
> to maya for the MI generation, but it would appear that when I look
> in the MI file maya generated, the 'output' command doesn't have the
> absolute pathname in it, just the filename part.
>
> It looks like a Maya bug.. is there a workaround?
Yes, Maya apparently needs a special command line flag where you have
to tell it whether you want absolute or relative pathnames to be used
during the MI generation.
It seems to indeed be a bug in Maya's MI generator that it isn't
honoring the -rd flag when an absolute path is specified.
Depending on the rush script you're using, you'll need to add
either the -xp or -exportPathNames flag.
If you're using one of the older submit-maya rush scripts
that invokes Mayatomr directly via MEL to generate the MI file,
you'll need to specify on submit:
Mayatomr Flags: -xp aaaaaaaaaa
Or if you're using one of the newer submit-maya scripts which
invokes 'Render -r mi' to generate the MI file, then you'll
need to instead specify:
Maya Flags: -exportPathNames aaaaaaaaaa
These flags tell maya whether to expect absolute or relative
pathnames for the various files it reads and writes:
a = absolute
r = relative
n = no pathname
See Maya's own docs on the 'Mayatomr' plugin's -xp flag
for more details. (ie. inside Maya, hit 'Help', and in
the search field type 'Mayatomr', and then view the help
on the Mayatomr command which shows all the flags. Down at
the bottom it describes this stuff)
All (a)'s tells maya to use absolute paths for everything.
According to the docs you can also say e.g. "-xp absolute"
or "-exportPathNames absolute" to make everything absolute.
Here's how Maya documents the flag positions (there are currently
10 positions):
-xp "aaaaaaaaaa"
||||||||||
|||||||||Demand load object mi file
|||||||||
||||||||Photon map
||||||||
|||||||Finalgather Map
|||||||
||||||Shadow Map
||||||
|||||Output Image
|||||
||||Light profile
||||
|||Lightmap
|||
||Texture file
||
|Include mi file
|
Link library
(The same should be true for the 'Render -r mi ..' flag; '-exportPathNames')
So eg. '-xp rrarrarrrr' will use absolute paths for Textures and Output images,
and relative paths for the rest.
Sorry, I did not come up with this stuff ;)
I reported this to Alias as a bug in the -rd flag back in Maya 7.x,
and I think they're still working on it. I think Maya 8.0 still has
the problem, maybe it will be resolved in Maya 8.5, not sure.
|