THIS IS KIMS SRIPT
/////////////////////////////////////////////////////////////
//
// ExpandView.js.
//
// Expand view from camera by adding pixels to the
// size of the render output, adjusting Camera FOV to compensate.
// ie, an image rendered after the effect has been applied will
//composite
// over one rendered before and still fit exactly.
//
// User inputs extra pixel resolution, dX, the value of which is added
// to either side of the image. ie, a value of 100 will increase the x
// resolution of the rendered image by 200 pixels. -ve values will work,
// reducing image size and fov.
//
// Kim Aldis, 2003
//
//
/////////////////////////////////////////////////////////////
var oPass = getcurrentpass();
var oCam = getvalue( oPass + ".RenderOptions.PassCamera" );
var FovType = getvalue( oCam + ".camera.fovtype" ); // 0 = vertical,
1=horizontal
var fov = getvalue( oCam + ".camera.fov" );
var aspect = GetValue( oPass + ".RenderOptions.PictureRatio" );
var pixratio = GetValue( oPass + ".RenderOptions.PixelRatio" );
var xRes = getvalue( oPass + ".RenderOptions.CameraXres" );
var yRes = getvalue( oPass + ".RenderOptions.CameraYres" );
// vertical or horizontal FOV
if ( FovType == 0 ) {
fov *= aspect;
}
fov /= 2;
xRes /=2;
var dX = Dialog();
var D = xRes / Math.tan(fov * Math.PI/180);
var newFov = Math.atan((xRes + dX)/D) * 180/Math.PI * 2;
if ( FovType == 0 ) {
newFov /= aspect;
}
logmessage( "New fov = " + newFov );
Setvalue( oCam + ".camera.fov", newFov );
setvalue( oPass + ".RenderOptions.CameraXres", (xRes + dX)*2 );
setvalue( oPass + ".RenderOptions.CameraYres", (xRes + dX)*2 / aspect *
pixratio );
function Dialog() {
var oRoot = ActiveProject.ActiveScene.Root;
var myPset= oRoot.AddProperty( "Custom_parameter_list", false,
"ExpandView" );
var odX = myPset.AddParameter2( "dX" , siUInt4, 50, 1, 200,null,
null, siClassifUnknown, 0, "dX", "Pixels to add to each side in X" );
// Show the ppg
InspectObj( myPset,"","ExpandView" ,siModal );
deleteobj( myPset );
return odX.value;
}
-----Original Message-----
From: kim aldis [mailto:kim(at)aldis.org.uk]
Sent: Wednesday, July 20, 2005 1:11 PM
To: XSI(at)Softimage.COM
Subject: RE: Motion Blur in two passes ???
I wrote a script a short while back that allows you to increase the image
resolution and at the same time increase the fov of the camera to
compensate. This sounds like what you need. Unfortunately I lost it but
usually it pops up again when I grovel to the list. Anyone?
General hint, in case you've not spotted it; use rapid motion for your blur
render. Also give it a shot on the non-blurred render. You should get better
frame times on both.
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM
> [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Andrew Konkin
> Sent: 20 July 2005 12:45
> To: XSI
> Subject: Motion Blur in two passes ???
>
> Hello List.
> I have to use motion blur in two pass.
> First pass I've render a scene without motion blur and second
> pass I've render the scene with motion blur and project the
> sequence of first pass to geometry of the scene with using
> constant shader , seems I do it the way everybody know.
> But there is a little problem when I render the second pass ,
> corners of the frames have black artifacts which definitely
> appear because of way I do motion blur.
> Does anybody know the way to add to current resolution of a
> frames a little bit more pixels around the frames during
> final render and also kipping same ratio of viewing of the
> frames like in view port camera in XSI.
> For example I've render a frames with 720 576 resolution and
> have camera view with same settings in XSI view port so how
> can I have frames after render a scene with keeping
> proportion of the frame and get frames after final render
> with for example 730 586 a little bit more resolution to keep
> the motion blur artifacts out of range of my frames ?
>
>
>
> Thanks.
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following
> text in body:
> unsubscribe xsi
>
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi