古应春
龙骧将军
级别: 班主任
精华:
3
发帖: 1342
威望: 1357 点
金钱: 13560 RMB
贡献值: 9 点
注册时间:2006-11-30
最后登录:2008-11-14
|
在视频中制作动画房子的脚本
以前制作影视后期动画都是人工设定动画关键点,今年春节实在是闲得发慌,就学习悟出了用脚本语言SCRIPT在后期电影合成中添加脚本,动画起来就比较智能了. 过几天我把竹叶的动画发上来截图让大家看看 美中不足的是我做成了视频网站却不能提供上传,不能不说是个遗憾!
{
// Create script undo group
app.beginUndoGroup("Create Square");
// create project if necessary
var proj = app.project; if(!proj) proj = app.newProject();
// create new comp named 'my comp'
var compW = 160; // comp width var compH = 120; // comp height var compL = 15; // comp length (seconds) var compRate = 24; // comp frame rate var compBG = [48/255,63/255,84/255] // comp background color var myItemCollection = app.project.items; var myComp = myItemCollection.addComp('my comp',compW,compH,1,compL,compRate); myComp.bgColor = compBG;
// create new solid named "my square"
var mySolid = myComp.layers.addSolid([1.0,1.0,0], "my square", 50, 50, 1);
// create square mask
var newMask = mySolid.Masks.addProperty("Mask"); newMask.inverted = true; var myMaskShape = newMask.property("maskShape"); var myShape = myMaskShape.value; myShape.vertices = [[5,5],[5,45],[45,45],[45,5]]; myShape.closed = true; myMaskShape.setValue(myShape);
// set postition keyframes
var myPosition = mySolid.property("position"); myPosition.setValueAtTime(0,[80,30]); myPosition.setValueAtTime(1,[130,60]); myPosition.setValueAtTime(2,[80,90]); myPosition.setValueAtTime(3,[30,60]); myPosition.setValueAtTime(4,[80,30]);
// set rotation keyframes
var myRotation = mySolid.property("rotation"); myRotation.setValueAtTime(0,0); myRotation.setValueAtTime(4,720);
// set scale keyframes
var myScale = mySolid.property("scale"); myScale.setValueAtTime(0,[100,100]); myScale.setValueAtTime(1,[50,50]); myScale.setValueAtTime(2,[100,100]); myScale.setValueAtTime(3,[50,50]); myScale.setValueAtTime(4,[100,100]);
// set opacity keyframes
var myOpacity = mySolid.property("opacity"); myOpacity.setValueAtTime(0,100); myOpacity.setValueAtTime(1,50); myOpacity.setValueAtTime(2,100); myOpacity.setValueAtTime(3,50); myOpacity.setValueAtTime(4,100);
app.endUndoGroup();
}
|
风高浪快,万里骑蟾背
|
|
[楼 主]
|
Posted: 2007-02-25 10:04 |
| |