Render.ru

Экспорт камеры из 3dmax в AE

#1
Есть скрипт для макса, создающий ключи под афтеровскую 3д-камеру...
Вот сам скрипт, краткое описание работы - в комментариях в исходнике:

-- After Effects Camera Export
-- script by George Polevoy. June 01, 2001

-- comments
-- select your camera (must be target camera)
-- run this script (Ctrl+E)
-- analyse output for AE keyframe data
-- select everything from "Adobe After Effects.... to ... End Of Keyframe Data"
-- copy to clipboard (Ctrl+C), select your camera in AE and paste (Ctrl+V)
-- that's it

myCam = $
a = ""
st = StringStream a

fn outLine l = format "%\n" l to:st

outLine ""
outLine "Adobe After Effects 5.0 Keyframe Data"
outLine "\tUnits Per Second 25"
outLine "\tSource Width 768"
outLine "\tSource Height 576"
outLine "\tSource Pixel Aspect Ratio 1"
outLine "\tComp Pixel Aspect Ratio 1"

outLine "Point of Interest"
outLine "\tFrame\tX pixels\tY pixels\tZ pixels"

for iTime = animationRange.start to animationRange.end do
(
i = (iTime as integer) / ticksPerFrame
at time iTime
(
outLine \
("\t" + \
(i as string) + "\t" + \
(myCam.target.pos.x as string) + "\t" + \
((-myCam.target.pos.z) as string) + "\t" + \
(myCam.target.pos.y as string) )
)
)

outLine "Position"
outLine "\tFrame\tX pixels\tY pixels\tZ pixels"

for iTime = animationRange.start to animationRange.end do
(
i = (iTime as integer) / ticksPerFrame
at time iTime
(
outLine \
("\t" + \
(i as string) + "\t" + \
(myCam.pos.x as string) + "\t" + \
((-myCam.pos.z) as string) + "\t" + \
(myCam.pos.y as string) )
)
)

outLine "Z Rotation"
outLine "\tFrame\tdegrees"

for iTime = animationRange.start to animationRange.end do
(
i = (iTime as integer) / ticksPerFrame
at time iTime
(
outLine \
("\t" + \
(i as string) + "\t" + \
((-myCam.controller.roll_angle) as string) )
)
)

outLine "Zoom"
outLine "\tFrame\tpixels"

for iTime = animationRange.start to animationRange.end do
(
i = (iTime as integer) / ticksPerFrame
at time iTime
(
outLine \
("\t" + \
(i as string) + "\t" + \
((384./tan(myCam.FOV/2.)) as string) )
)
)


outLine "End of Keyframe Data"

st

-- the end
Только непонятно как это так получается скопировать из MaxscriptListener данные в AE камеру?

У кого получилось?
 

serko

Активный участник
Рейтинг
15
#2
Мне это не нужно було, так скоринул с форума, тут ге-то говорили об этом. Так вот цитирую "Проще простого.Экспорт из макса в PRF сенквенцию.Импортируеш ь в AE, из трека вытаскиваеш камеру PRF camera import. Все."
 
#3
Пообую,а вобще я разобрался почему не получалось:несовпадение в кейфреймах
 
#4
В rpf не пишется FOV или пишется, но некорректно.
Скрипт Полевого работает.
 
Сверху