It´s is really weird. I´m updating an old maya plug-in by my own, and having some issues. If i render on a second thread with maya and vray under console everything works correctly until i try to render vrscenes geomtry.
You can just watch the video.
Nope, it doesnt get render with batch render, normal geomtry yes, vrscenes not.
And in fact, older version of vray do render vrscenes through batch render
Could you attach (or send) a scene with the problematic .vrscene so we can troubleshoot? It may be something specific since I am able to render a simple .vrscene through Batch as expected.
Already send it. #154627.
I can also render vrscene thorugh Batch rendering, the problem comes out when you ty to import the vrscene file throug a PreRender Mel Routine where you import the file before rendering, as i told in the video, then and only then vrscene doesnt get render but normal geometry does.
All files needed are included, but roots will be all of them broken.
Okay. First, I am getting an error when using your Python script:
"# Error: line 0: ModuleNotFoundError: file \SLiBPreRenderPY.py line 16: No module named 'SLiBUtilities' # "
Second, I tried creating a post-translate python script that loads .vrscenes:
from vray.utils import *
appendSceneContent('BOCONCEPT_ELBA_ESTRUCTURA_001.vrscene', 'obj')
This seems to work both locally and in Batch, however, it seems the render settings are loaded from the .vrscene file itself. Is it possible that something similar is happening on your end?
I’ll continue troubleshooting and write back.
Now you wont get script errors. And you can try to mimic our issue.
1- Open up “temp_preview_obj” and reroot vrscenes files, you will see we have added a plain cube geometry.
2- Open up “vray_SLiB_preview_obj_01” and just hit render. VFB will pop-up and everything works like a charm.
3- Now delete the imported geometry and Batch render it. Everything work like a charm and you get the vrscene and the cube rendered.
4- Now open up again “temp_preview_obj” and delete the plain cube geomtry and save it.
5- Open up again “vray_SLiB_preview_obj_01” and batch render it and nothing appears. If you hit normal render VFB will appear and everything renders ok, but if you batch render it, then, if in the file there are only vrscene files it doesnt get render.
If you open up mayarenderLog.txt you will see on the batch render that vrscenes files are founded an imported but then nothing appears.REally strnge, we are struggleing a lot with this issue.
Thanks for clarifying. Testing with your script works now.
After troubleshooting we came to the conclusion that the issue lies in the bbox coordinates for .vrscenes. Testing with a simple script, which extracts the coordinates of the bbox, we noticed .vrscenes produce inf results. Since your script adjusts the camera position based on the bbox, the black image is the result of those wrong coordinates. It is likely that a preview for .vrscenes is not created when rendering in console/batch (I’ll talk to a dev to confirm this), hence the inf coords result. For now, a workaround could be adding an invisible box in the temp_preview_obj files so that the bbox coords are taken from it. I’ll write back whenever I get some information from the devs.
Thank you but the bbox is to put the object in the camera frame, the invible object should match the bbox of the vrscene, but i dont have correct acces to the vrscene bbox cause we are with the same problem.
The other issue from this thread: https://forums.chaos.com/forum/v-ray…box-and-pivots
Is most probably VMAYA-9539 - “Wrong bounding boxes on VRayScene preview”
This one is also fixed at some point in 4.3
I think the issue you’re having now is separate.
As far as I understand, you’re trying to get the Bounding Box (BBox) of the vrscene object in Batch, is that correct?
The way our code works at the moment, the BBox and the preview geometry are not computed in batch rendering.
It’s done for the sake of efficiency, as both preview and bounding box require reading the entire vrscene file.
If that’s the case, and you only encounter BBox issues in batch, we could add an option to re-enable BBox computation in batch, so that your scripts will work.
Please let me know if that’s correct.
Hi, you are right. Bounding box issue is now working. We have double check it. The problem as you say, is in batch, this is the reason why rendering in maya works perfect, and if we do render in batch it doesnt render cause we use the bounding box info of the vrscene prop to frame it within the camera.
Ok, your fix about the option to re-enable BBox computation in bacth should work for us. If you may think in an other solution for us to frame the vrscene prop in a camera without BBox, we are open to it.
If not, this option should do the trick for us.