# VRScene images path

**URL:** <https://forums.chaos.com/t/vrscene-images-path/50048>\
**Category:** Issues\
**Created:** [June 4, 2014, 8:42am UTC](https://forums.chaos.com/t/vrscene-images-path/50048 "2014-06-04T08:42:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![radobe](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@radobe](https://forums.chaos.com/u/radobe)\
**Post date:** [June 4, 2014, 8:42am UTC](https://forums.chaos.com/t/vrscene-images-path/50048/1 "2014-06-04T08:42:53Z")

</div>

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.

SettingsOutput vraySettingsOutput {  
img\_file=“tmp/layer1/vrsceneTest/vrsceneTest.png”;  
img\_dir=“Y:/1364\_xxxxx/02\_WORK/03\_3D/05\_Maya//./../01\_renders/”;

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

Thanks in advance

---

<div class="post-metadata">

**Author:** ![yolov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/yolov/32/11920_2.png) [@yolov](https://forums.chaos.com/u/yolov)\
**Post date:** [June 4, 2014, 12:46pm UTC](https://forums.chaos.com/t/vrscene-images-path/50048/2 "2014-06-04T12:46:29Z")

</div>

Hi,

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 hope that this is helpful.

---

<div class="post-metadata">

**Author:** ![radobe](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@radobe](https://forums.chaos.com/u/radobe)\
**Post date:** [June 5, 2014, 8:11am UTC](https://forums.chaos.com/t/vrscene-images-path/50048/3 "2014-06-05T08:11:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yolov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/yolov/32/11920_2.png) [@yolov](https://forums.chaos.com/u/yolov)\
**Post date:** [June 5, 2014, 10:12am UTC](https://forums.chaos.com/t/vrscene-images-path/50048/4 "2014-06-05T10:12:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ivaylo.ivanov](https://avatars.discourse-cdn.com/v4/letter/i/eb8c5e/32.png) [@ivaylo.ivanov](https://forums.chaos.com/u/ivaylo.ivanov)\
**Post date:** [June 5, 2014, 10:16am UTC](https://forums.chaos.com/t/vrscene-images-path/50048/5 "2014-06-05T10:16:24Z")

</div>

If you are already using post translate script, you can use this to change the path:

from vray.utils import \*  
so=findByType(“SettingsOutput”)  
so[0].set(“img\_file”, “test.png”)

and it will write the image where you like it with whatever name you like.

---

<div class="post-metadata">

**Author:** ![radobe](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@radobe](https://forums.chaos.com/u/radobe)\
**Post date:** [June 5, 2014, 4:04pm UTC](https://forums.chaos.com/t/vrscene-images-path/50048/6 "2014-06-05T16:04:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![yolov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/yolov/32/11920_2.png) [@yolov](https://forums.chaos.com/u/yolov)\
**Post date:** [June 5, 2014, 4:57pm UTC](https://forums.chaos.com/t/vrscene-images-path/50048/7 "2014-06-05T16:57:13Z")

</div>

OK, then. I hope that what Ivo suggested will work for you.
