Zurück   3dmaxforum.de > 3ds Max > 3ds Max - Plugins und Skripte
Zurzeit aktive Benutzer im Chat: 0
Mit 10 Benutzern waren die meisten Benutzer an einem Tag im Chat (14.03.2008).
Zurzeit ist kein Benutzer im Chat.

Bücher
Digital Lighting and Rendering 3ds max 2009 Workshops Poly-Modeling with 3ds Max: Thinking Outside of the Box Deconstructing the Elements with 3ds max How to Cheat in 3ds Max 2009: Get Spectacular Results Fast

über 3dmaxforum.de bestellen

über 3dmaxforum.de bestellen

über 3dmaxforum.de bestellen

über 3dmaxforum.de bestellen

über 3dmaxforum.de bestellen

Antwort
 
LinkBack (2) Themen-Optionen Ansicht
Alt 23.06.2005, 22:53   #1
neuer Benutzer
 
Registriert seit: 09.03.2005
Beiträge: 13
mate hat noch keine Resonanz auf seine Beiträge erhalten, um sein Renomee anzuzeigen
Standard Objekt nach After Effects

Hallo,

bin grad dabei, ein script zu schreiben, was ein objekt aus 3ds max nach after effects exportier, so dass man, wenn man eine kamera mit RPF rausrendert, einfach in AFX eine 3d Ebene an ein sich bewegendes objekt im 3d raum von 3dmax dranhängen kann. Das is extrem praktisch, weil man sonst die Ebenen in after effects immer nich richtig hingeschoben bekommt.

Das funktioniert soweit auch schon super, die positio stimmt perfekt, und nun gehts an die rotation, und die krieg ich irgendwie nich hin. Da sind so offsets oder irgendne funktion auf den kanälen (3dsmax->RPF->AFX) die ich nich rausbekomme.

Hier mal das Script. Vorher kurz zur funktionsweise. das script lässt einen ein objekt auswählen und generiert dann ein .jsx script für AFX, was man dort dann mit file/script ausführen kann, welches widerum in der composition einen 3d layer generiert. soweit so einfach. das script hier von mir is auch nich optimiert oder nix, also wem was einfällt, bitte. ;)

fn GetGeometry o = (
Superclassof o == Geometryclass and classof o != TargetObject )
obj = pickobject filter:GetGeometry
if isValidNode obj then
(
tmesh = snapshotAsMesh obj
out_name = GetSaveFileName()
if out_name != undefined then
(
out_file = createfile out_name

--
-- generate AE6.5 script
--

format "{\n" to:out_file
format "// Create script undo group\n" to:out_file
format "app.beginUndoGroup(\"%_undogroup\");\n" (obj.name) to:out_file
format "\n" to:out_file
format "// create project if necessary\n" to:out_file
format "var proj = app.project;\n" to:out_file
format "if(!proj) proj = app.newProject();\n" to:out_file
format "\n" to:out_file
format "// Get the active comp\n" to:out_file
format "var activeItem = app.project.activeItem;\n" to:out_file
format "if (activeItem != null && (activeItem instanceof CompItem)){\n" to:out_file
format "var myComp = activeItem;\n" to:out_file
format "}\n" to:out_file
format "\n" to:out_file
format "// create new solid\n" to:out_file
format "var mySolid = myComp.layers.addSolid([1.0,1.0,0], \"%\", 50, 50, 1);\n" (obj.name) to:out_file
format "mySolid.threeDLayer = true;\n" to:out_file
format "\n" to:out_file
--
-- // set postition keyframes
--
format "// set postition keyframes\n" to:out_file
format "var myPosition = mySolid.property(\"position\");\n" to:out_file

for t = animationrange.start to animationrange.end do
(
at time t current_pos_x = obj.pos.x
at time t current_pos_y = obj.pos.y
at time t current_pos_z = obj.pos.z
format "myPosition.setValueAtTime(%,[%,%,%])\n" ((t as float)/ticksPerFrame/frameRate) current_pos_x -current_pos_z current_pos_y to:out_file
)
format "\n" to:out_file
--
-- // set rotation keyframes
--
format "// set rotation keyframes\n" to:out_file
format "var myXRotation = mySolid.property(\"xRotation\");;\n" to:out_file
format "var myYRotation = mySolid.property(\"yRotation\");;\n" to:out_file
format "var myZRotation = mySolid.property(\"zRotation\");;\n" to:out_file

for t = animationrange.start to animationrange.end do
(
at time t current_rot_x = obj.rotation.x_rotation-90
at time t current_rot_y = -obj.rotation.y_rotation+180
at time t current_rot_z = -obj.rotation.z_rotation
format " myXRotation.setValueAtTime(%,%);\n" ((t as float)/ticksPerFrame/frameRate) current_rot_x to:out_file
format " myYRotation.setValueAtTime(%,%);\n" ((t as float)/ticksPerFrame/frameRate) current_rot_y to:out_file
format " myZRotation.setValueAtTime(%,%);\n" ((t as float)/ticksPerFrame/frameRate) current_rot_z to:out_file
)
format "\n" to:out_file
--
--
--format " // set scale keyframes\n" to:out_file
--format "var myScale = mySolid.property(\"scale\");;\n" to:out_file

--for t = animationrange.start to animationrange.end do
-- (
-- at time t current_pos_x = obj.pos.x
-- at time t current_pos_y = obj.pos.y
-- format "myScale.setValueAtTime(%,[%,%]);\n" ((t as float)/ticksPerFrame/frameRate) current_pos_x current_pos_y to:out_file
-- )
format "\n" to:out_file
format "app.endUndoGroup();\n" to:out_file
format "}\n" to:out_file
--
--
close out_file
)
)


jetzt hier noch ne kleine tabelle wo ich schonma notiert habe, was das RPF exportieren aus den rotationsdaten macht.

3ds max AEX

x x

0 -90
10 -80
20 -70
30 -60
40 -50
50 -40
60 -30
70 -20
80 -10
90 0
100 +10


y y

0 0
10 -10
20 -20
30 -30
40 -40
50 -50
60 -60
70 -70
80 -80
90 -90
100 +90 -80 -180


z z

0 -90 +0 +0
10 -90 +0 -10
20 -90 +0 -20
30 -90 +0 -30
40 -90 +0 -40
50 -90 +0 -50
60 -90 +0 -60
70 -90 +0 -70
80 -90 +0 -80
90 -90 +0 -90
100 -90 +0 -100

so und hier hatte ich ja schonma was versucht:

at time t current_rot_x = obj.rotation.x_rotation-90
at time t current_rot_y = -obj.rotation.y_rotation+180
at time t current_rot_z = -obj.rotation.z_rotation

das funktioniert für jeden kanal einzeln auch gut, aber alle zusammen zerhaut´s dann wieder.

Nagut schonmal vielen Dank und ich bin gespannt!

::peace.mate::
mate ist offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Mit Zitat antworten
Sponsored links
Antwort


LinkBacks (?)
LinkBack to this Thread: http://www.3dmaxforum.net/forum/3ds-max/3ds-max-plugins-und-skripte/7069-objekt-nach-after-effects.html
Erstellt von For Type Datum
Equity Loan Rates - rates personal loan, equity fat loan This thread Refback 16.11.2007 05:23
Objekt nach After Effects - 3dmaxforum.de This thread Refback 25.02.2007 07:49

Themen-Optionen
Ansicht

Forumregeln
Du kannst keine neue Themen eröffnen
Du kannst keine Antworten verfassen
Du kannst keine Anhänge posten
Du kannst nicht deine Beiträge editieren

BB-Code ist An.
Smileys sind An.
[IMG] Code ist Aus.
HTML-Code ist Aus.
Trackbacks are An
Pingbacks are An
Refbacks are An

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
nach Neustart leuchtende Textur auf Objekt Chriss_K 3ds Max - Allgemeines 1 24.06.2004 16:14
Monitor Output bei After Effects Mastermind Off Topic 5 15.02.2003 01:21
Brauche hilfe bei Glow-Effects Gast 3ds Max - Modellieren 4 22.01.2003 19:52
Objekt verdecken - Matte Objekt etwas anders Smay 3ds Max - Materialien 10 28.11.2002 10:24


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:37 Uhr.


Powered by vBulletin Version 3.7.0 (Deutsch)
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
Template-Modifikationen durch TMS
Copyright ©2002 - 2008, 3dmaxforum.de
Ad Management by RedTyger