exp_matrix3D.aep 「映像の自動配置(3D空間での横方向の輪)」 ユーザーが定義する数値分の3D空間での横方向の輪に自動配置します。 1st. layer パラメータのダミーレイヤーとして使用。 アンカーポイントのX座標 : 3D空間での横方向の輪の中心X座標 アンカーポイントのY座標 : 3D空間での横方向の輪の中心Y座標 アンカーポイントのZ座標 : 3D空間での横方向の輪の中心Z座標 位置のX座標 : 配置する映像の数 [n=3, 4, .......)] 位置のY座標 : 3D空間での横方向の輪の半径 2nd. layer〜 以下の計算式により、3D空間での横方向の輪に自動配置します。 位置 ------------------------- X0 = this_comp.layer(1).anchor_point[0]; Y0 = this_comp.layer(1).anchor_point[1]; Z0 = this_comp.layer(1).anchor_point[2]; N = this_comp.layer(1).position[0]; R = this_comp.layer(1).position[1]; LayerNo = this_layer.index-1; KAKU0 = 360.0/N; KAKU = 360.0/N*LayerNo-KAKU0; X = Math.sin((KAKU)*Math.PI/180.0)*R+X0; Y = Y0; Z = Z0-Math.cos((KAKU)*Math.PI/180.0)*R; [X,Y,Z]; ------------------------- スケール ------------------------- X0 = this_comp.layer(1).anchor_point[0]; Y0 = this_comp.layer(1).anchor_point[1]; Z0 = this_comp.layer(1).anchor_point[2]; N = this_comp.layer(1).position[0]; R = this_comp.layer(1).position[1]; LayerNo = this_layer.index-1; Xsize0 = this_layer.width; KAKU0 = 360.0/N; KAKU = (180.0-KAKU0)/2.0; Xsize = 2*R/Math.tan((KAKU)*Math.PI/180.0); scal_X = Xsize/Xsize0*100.0; [scal_X, scal_X]; ------------------------- Y回転 ------------------------- Rota0 = 360.0/this_comp.layer(1).position[0]; LayerNo = this_layer.index-1; Rota_Y = -Rota0*(LayerNo-1); -------------------------