VRayTranslator ignores post translate code

I got a VRayRender node that uses this post translate script to output to angular map/dome master:

from vray.utils import *
domeCam=create("CameraDome", "__camera_dome__")
domeCam.set("fov", math.pi)

However, when exporting a vrscene file and rendering via standalone this code is ignored.
Is there a workaround?

Cheers,
frank

Hey,

The post-translate script happens after the export of the scene so that’s why it’s not working.

Instead of that post-translate script you can use VRayCamera instead of the regular camera and set it to behave like a dome camera.

You can find more at - V-Ray for Nuke

I had checked out the projection types in the VRay camwera but could not find a dome type. Only fisheye and that’s different.

You can set the type to Spherical Panorama and override the FOV to 180 - this should give you pretty much the same result as the post-translate script.

but that produces an equirectangular image. I need an azimuthal equidistant image like this:

Ah, my bad. Totally missed that.
A simple workaround for the Standalone issue would be to open your vrscene file in a text editor and add the following lines:

CameraDome camera_dome {
  flip_x=0;
  flip_y=0;
  fov=3.141593;
}

This is essentially what the post-translate script does.

It doesn’t work because there is already another camera in the scene (the regular perspective one). However, in Maya, you can add the V-Ray dome camera attributes to the camera you normally render from:
https://docs.chaosgroup.com/display/…era+Attributes

Best regards,
Vlado

Thanks Geori, I will try that. Vlado, can this be implemented as another projection type in the camera itself in a way that the standalone will pick it up?

Yes, see my suggestion above. If you add those attributes, V-Ray will export a CameraDome plugin into the .vrscene file.

Best regards,
Vlado

oh, I misunderstood. It sounded like this will work in Maya but not Nuke. I will have a look, thanks.

yeah, I’m a little confused now. How would I add those attributes in Nuke? Is this something I can do in the VrayTranslator’s parameter override?
Also, in the link you posted a equirectangular image is shown, not a dome camera i.e. equiazimuthal).

Ugh many apologies, I just now realized this is in the Nuke section; not sure why I thought it was Maya. You are right, we need to add the dome camera to the options - I will make a note about it. So many editing the .vrscene file is the only thing to do for now.

Best regards,
Vlado

Ah great, thanks for confirming. Happy to edit the file for now.