The cameras need to have different horizontal and vertical apertures so
that three cameras are rectangular and two are square.


Ron Ganbar
email: [email protected]
tel: +44 (0)7968 007 309 [UK]
     +972 (0)54 255 9765 [Israel]
url: http://ronganbar.wordpress.com/



On 20 January 2012 05:43, ruchitinfushion <[email protected]
> wrote:

> **
> @Ron Ganbar
> i Already tried with five cameras to get Top,Bottom,Front ,Left & Right
> And it works fine only if you want to present on cubic dimension display
> but we are having rectangular screen so because of this i am having trouble.
>
> *Code:*
> #cross panorama Camera Rig By Ruchit Bhatt
> import maya.cmds as mc
> def cubeCamWindow():
>    if mc.window('cubeCamUI', exists=True):
>       mc.deleteUI('cubeCamUI')
>    window = mc.window('cubeCamUI', title='.::CubeCam ::.',
> widthHeight=(150, 200), sizeable=1, minimizeButton=0, maximizeButton=0)
>    form = mc.formLayout()
>    mc.button('creationButton', label='Create', width=80, height=30,
> command=cubeCameraGen)
>    mc.text('authorText', label='By Ruchit Bhatt', align='center')
>    mc.formLayout(form, edit=True,attachPosition = [('creationButton',
> 'top', 0, 10), ('creationButton', 'left', 0, 15), ('authorText', 'left', 0,
> 15)], attachControl =[('authorText', 'top', 10, 'creationButton')])
>    mc.showWindow('cubeCamUI')
>
> def cubeCameraGen():
>     #Controller
>    cubeController = mc.circle(name='cubeCam_Controller', c=(0, 0, 0),
> ch=1, d=3, ut=0, sw=360, s=8, r=2.5, tol=0.01, nr=(0, 1, 0))
>    #Front Cam
>    cubeCameraX = mc.camera(focalLength=12.7, horizontalFilmAperture=1,
> verticalFilmAperture=1, name='Cubic_Eye')
>    mc.select(cubeCameraX)
>    mc.setAttr((str(cubeCameraX[0]) + str('.rotateY')), -90)
>    mc.rename('cubeCam_Front')
>
>    #Top Cam
>    cubeCameraY = mc.camera(focalLength=12.7, horizontalFilmAperture=1,
> verticalFilmAperture=1, name='Cubic_Eye')
>    mc.select(cubeCameraY)
>    mc.setAttr((str(cubeCameraY[0]) + str('.rotateX')), 90)
>    mc.setAttr((str(cubeCameraY[0]) + str('.rotateY')), -90)
>    mc.rename('cubeCam_Top')
>
>    #Bottom Cam
>    cubeCamera_Y = mc.camera(focalLength=12.7, horizontalFilmAperture=1,
> verticalFilmAperture=1, name='Cubic_Eye')
>    mc.select(cubeCamera_Y)
>    mc.setAttr((str(cubeCamera_Y[0]) + str('.rotateX')), -90)
>    mc.setAttr((str(cubeCamera_Y[0]) + str('.rotateY')), -90)
>    mc.rename('cubeCam_Bottom')
>
>    #Right Cam
>    cubeCameraZ = mc.camera(focalLength=12.7, horizontalFilmAperture=1,
> verticalFilmAperture=1, name='Cubic_Eye')
>    mc.select(cubeCameraZ)
>    mc.setAttr((str(cubeCamera_Y[0]) + str('.rotateX')), -180)
>    mc.setAttr((str(cubeCamera_Y[0]) + str('.rotateZ')), -180)
>    mc.rename('cubeCam_Right')
>
>    #Left Cam
>    cubeCamera_Z = mc.camera(focalLength=12.7, horizontalFilmAperture=1,
> verticalFilmAperture=1, name='Cubic_Eye')
>    mc.select(cubeCamera_Z)
>    mc.rename('cubeCam_Left')
>
>    #Parenting
>    mc.parent('cubeCam_Front', 'cubeCam_Controller')
>    mc.parent('cubeCam_Top', 'cubeCam_Controller')
>    mc.parent('cubeCam_Bottom', 'cubeCam_Controller')
>    mc.parent('cubeCam_Right', 'cubeCam_Controller')
>    mc.parent('cubeCam_Left', 'cubeCam_Controller')
>
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to