Monday, September 30, 2013

Possible Call File Script

I'm not quite sure if Ed has written this already, but I came up with a short script to call a new file. I just cant seem to get the file to execute once selected.


proc int onOpen(string $filename,string $type) {
  print($filename+"\n");
  print($type+"\n");
  return true;
}

fileBrowser( "onOpen", "Open", "", 0 );

Holo Camera Rig Script V2

I have done a very minor update to the camera rig script I've been working on. This update adds a short dialog box telling the user to not adjust the camera angles and tells them how they should set up the render. This new version also locks the cameras from moving.


//Dialog Box
{
// create a confirm dialog with a yes and no button. Specif
$response = `confirmDialog -title "Hologram Creator" 
              -message "I will now make the rig for you to create holograms. Please do not adjust the angles of the camera. Feel free to parent the rig to the main focus of your animation. Be sure to render out every camera separately within the render settings and be sure to render it out as a square resolution. Got That?"
              -button "Yes" 
              -button "No"
              -defaultButton "Yes"
              -cancelButton "No"
              -dismissString "No"`;
// check response  
if( $response == "Yes" ) {
print("User says yes\n");
camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 0.4036 -horizontalFilmAperture 1.4173 -horizontalFilmOffset 0 -verticalFilmAperture 0.9449 -verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.1 -farClipPlane 10000 -orthographic 0 -orthographicWidth 30 -panZoomEnabled 0 -horizontalPan 0 -verticalPan 0 -zoom 1; objectMoveCommand; cameraMakeNode 1 "";
// camera1 // 
displaySmoothness -divisionsU 1 -divisionsV 1 -pointsWire 8 -pointsShaded 2 -polygonObject 2;
setAttr "camera1.translateZ" 27;
camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 0.4036 -horizontalFilmAperture 1.4173 -horizontalFilmOffset 0 -verticalFilmAperture 0.9449 -verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.1 -farClipPlane 10000 -orthographic 0 -orthographicWidth 30 -panZoomEnabled 0 -horizontalPan 0 -verticalPan 0 -zoom 1; objectMoveCommand; cameraMakeNode 1 "";
// camera2 // 
setAttr "camera2.translateX" 27;
setAttr "camera2.rotateY" 90;
camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 0.4036 -horizontalFilmAperture 1.4173 -horizontalFilmOffset 0 -verticalFilmAperture 0.9449 -verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.1 -farClipPlane 10000 -orthographic 0 -orthographicWidth 30 -panZoomEnabled 0 -horizontalPan 0 -verticalPan 0 -zoom 1; objectMoveCommand; cameraMakeNode 1 "";
// camera3 // 
setAttr "camera3.translateZ" -27;
setAttr "camera3.rotateY" 180;
camera -centerOfInterest 5 -focalLength 35 -lensSqueezeRatio 1 -cameraScale 0.4036 -horizontalFilmAperture 1.4173 -horizontalFilmOffset 0 -verticalFilmAperture 0.9449 -verticalFilmOffset 0 -filmFit Fill -overscan 1 -motionBlur 0 -shutterAngle 144 -nearClipPlane 0.1 -farClipPlane 10000 -orthographic 0 -orthographicWidth 30 -panZoomEnabled 0 -horizontalPan 0 -verticalPan 0 -zoom 1; objectMoveCommand; cameraMakeNode 1 "";
// camera4 // 
setAttr "camera4.translateX" -27;
setAttr "camera4.rotateY" -90;
circle -c 0 0 0 -nr 0 1 0 -sw 360 -r 1 -d 3 -ut 1 -tol 0.01 -s 8 -ch 1; objectMoveCommand;
setAttr "nurbsCircle1.scaleZ" 27;
setAttr "nurbsCircle1.scaleX" 27;
setAttr "nurbsCircle1.scaleY" 27;
select -r camera1 ;
select -tgl camera2 ;
select -tgl camera3 ;
select -tgl camera4 ;
select -tgl nurbsCircle1 ;
parent;
// camera1 camera2 camera3 camera4 // 
select -r nurbsCircle1 ;
rename "nurbsCircle1" "CameraRig";
// CameraRig //
// Lock Camera Movement //
select -r camera1 ;
setAttr -lock true "camera1.rx";
setAttr -lock true "camera1.ry";
setAttr -lock true "camera1.rz";
setAttr -lock true "camera1.tx";
setAttr -lock true "camera1.ty";
setAttr -lock true "camera1.tz";
select -r camera2 ;
setAttr -lock true "camera2.tx";
setAttr -lock true "camera2.ty";
setAttr -lock true "camera2.tz";
setAttr -lock true "camera2.rx";
setAttr -lock true "camera2.ry";
setAttr -lock true "camera2.rz";
select -r camera3 ;
setAttr -lock true "camera3.tx";
setAttr -lock true "camera3.ty";
setAttr -lock true "camera3.tz";
setAttr -lock true "camera3.rx";
setAttr -lock true "camera3.ry";
setAttr -lock true "camera3.rz";
select -r camera4 ;
setAttr -lock true "camera4.tx";
setAttr -lock true "camera4.ty";
setAttr -lock true "camera4.tz";
setAttr -lock true "camera4.rx";
setAttr -lock true "camera4.ry";

setAttr -lock true "camera4.rz";


} else if( $response == "No" ) {
print("User says no\n");
}  
}


//End Dialog Box

Sunday, September 22, 2013

Random Study

On a completely unrelated study I conducted out of procrastination from doing homework:

How music effects the users gameplay.
Game used: Call of Duty: Black Ops 2
Music: The xx and coexist album from the indie band, The XX.

Findings:
After playing for an hour online with my friend while listening to these more relaxing tracks than the in game audio we concluded that the music doesn't aid in the way we perform throughout the game, but it did keep us calmer than we normally would be whilst playing.

Tuesday, September 17, 2013

Minor Updates

Due to my lack of finding out how to have a solution to my render problem, I have been looking into different aspects of the project to pass the time.

Things I may want to do to the camera rig:
-Lock down some of the controls in order to prevent any ways to mess up the hologram set up.
-Consider allowing a camera point, but I must first run a test to see if it works.
-Allow the ability to add a 5th camera. This would be something saved for toward the end, since it                     basically changes a lot of the process.

Ideas for interactivity:
-Add interactivity with the use of Unity and Leap motion. This would most likely be a stretch goal if I for some reason have a lot of extra time.

I do want to figure out what animations I want to do to show off the hologram which may include either a reel of short animations or maybe a longer one.