Hi, i have problems with writing out vrscene files with correct “img_file” paths.
Right now i am using this command:
mel.eval("vrend -layer " + layer + " -camera " + camera)
My file prefix in the render settings is set to:
%s/%s
Vray always adds “tmp” at the beginning of the path, you can see an excerpt from the written vrscene file. This also happens when i do a render directly within maya, not from my script.
Is there an argument i can use in conjunction with vrend to set the img_path?
Btw, i had a hard time finding all arguments for vrend, could not find any description in the manual. It still behaves weird, since i have to switch to the renderlayer i want to export before executing the actual vrend -layer command. Otherwise just the actual renderlayer gets rendered.
Vray Version is:
VRay nightly 2.45.01
Windows 7
Maya 2015
This is how VRay behaves in Maya, as do all other renderers. Here’s an excerpt from our help files:
Keep in mind that when rendering a single frame, V-Ray saves out the image file to the project_root/images/tmp/filename.ext or to any subfolder of the images directory if specified (project_root/imates/tmp/scene_name/filename.ext). When rendering animation, V-Ray saves out the image file without pre-pending the “tmp” directory: project_name/images/filename.#.ext.
I see, this makes sense now, still i need to get around this somehow.
Is there any chance of using an attribute with vrend to set the file path myself?
My problem is, that i need to have a post translate expression in my file that does not evaluate properly when i use batch render, because i need to query the actual frame and on batch rendering this always leads to the frame being evaluated to 1. Workaround is exporting vrscenes one by one, that works, but i end up with the wrong paths.
A stupid way of fixing this would be to parse the vrscene file and exchange the path after the file was written, but i would like to avoid that.
The batch render will not pre-pend the “tmp” to the path, but yes, now there will be the problem with the post-translate script.
Rendering 1 frame in animation will give you the paths you want, but will add the frame number to the file name.
Is what you’re describing related to rendering/exporting animation ?
I’m still discussing with some of our developers to come up with something that will be helpful to your case.
Thanks for the tip ivaylo.
I will try this out, just have to make sure i find a good way to deal with all the different renderlayer/camera naming possibilities. But a script is taking care of the export already, so i can adjust the post translate script also for each pass if i would like. Maybe only if it is actually being written to vrscenes and not when rendering locally. Then tmp is basically fine.
@ yolov
Yes, this has to do with exporting animation, it is actually a massive integration script that i am working on, everything works smoothly with the exception of this tmp path issue.