Baking To Texture from VRay Standalone

Hi! Would it somehow be possible to export a .vrscene file from 3dsMax to bake textures through VRay Standalone?[

I saw an old thread](VRay Standalone - baking? - V-Ray for 3ds Max :: General - Chaos Forum) but it seems like it was related to VRayRT/GPU, and used “Render to Texture” instead of “Bake to Texture”. We want to do it through the CPU renderer, as the render elements we want to bake (metalness, roughness, some of the filters, etc) are currently not available on the GPU version as far as I’m aware.

Thanks in advance!

The method actually works for the CPU in a similar fashion. The point of the mentioned script is to export a .vrscene, which is set for baking. At this point, the .vrscene export for baking can be done in GPU only, but soon the whole process will be simplified and made available for any engine or Cloud (internal bug-tracker id: VMAX-7247) .

Basically, this is the process:
1. Setup your Baking Elements
2. Switch to V-Ray GPU
3. Run the following lines in the MaxScript Listener:


rtrend=renderers.current
rtrend.vrscene_on=true
rtrend.vrscene_fileName="E:\btest.vrscene"

4. Click Render/Bake in either baking functionality (Render to Texture/Bake to Texture)
5. Stop the rendering after the .vrscene export
6. Run the .vrscene through cmd with any engine you like
​

Thanks for the reply! Would the process you suggested work even if the render elements we initially set up are not available to V-Ray GPU itself? And how would we be able to “stop” the rendering after exporting the .vrscene file programmatically?

There shouldn’t be a problem, since both GPU/CPU elements are available in the menu.

Try enabling the “Don’t render final image” checkbox in Settings> Global Switches in the scene itself.
​