Interaktion mit Kulissenobjekten bei der Personenanimation

  • #1, by MachtnixMonday, 21. April 2014, 19:42 10 years ago
    Hallo.

    In meinem Mini-Projekt, das ich mir zum Austüfteln von Visionaire ausgedacht habe, gibt es mehrere Interaktionen des Charakters mit Gegenständen der Kulisse. Die Figur muss z.B. ein Handrad drehen, ein Hebel hebeln (YellowSubmarine lässt grüßen... ;-) oder ändert beim Betreten eines bestimmten Kulissenobjekts ihr Outfit. In einer Szene betritt die Figur eine Telefonzelle (nein, ich bin kein Dr.Who-Fan ;-)

    Ich probiere dabei aus, ob Cinema4d R11 dazu geeignet ist. Die Charakteranimation ist leicht zu bewerkstelligen, bloß das Erstellen der Kulissen erfordert natürlich unendlich mehr Zeit als die mal eben zu zeichnen... Da ich mit Sketch- und Toon noch Null Erfahrung habe, dieses Tool mich mit Einstellmöglichkeiten geradezu überschüttet und die Figur einfach nicht wie gezeichnet aussehen will, würde zur Zeit immer der Unterschied zwischen der 3D-Figur und dem handgemalten Hintergrund auffallen.

    Aber nun zu meiner eigentlichen Frage:

    Ich legte also die Animationen der Figur mit dem interaktiven Objekt als PNG-Animation mit Alpha-Kanal an. Um KB zu sparen, waren die Animationen der Figur auf den Ausschnitt beschränkt, in dem die auch stattfindet. Nun bekomme ich es partout nicht hin, dass die Figur exakt an der Stelle startet und die gleiche Größe hat, an der auch die Animation beginnt. Die Animation ist nie deckungsgleich mit dem Kulissenobjekt und zudem verschieden groß. Sollte ich das Kulissenobjekt von vornherein ganz weglassen???

    Erster Versuch also: die Kulisse wird ohne die - später animierten - Objekte gerendert; diese kommen als Kulissenobjekte später drauf. Beim Erstellen des Wegenetzes tauchen die Objekte aber nicht auf, so dass ich mir regelrecht Markierungen auf dem Hintergrundbild anlegen müsste, wo gerade ein Hebel oder das Handrad sich befindet... Wie im Theater ;-) Das wird nie und nimmer passgenau. Ich kann mir nur schnell merken, wo die Animation startet und möglichst exakt die Stelle des Objekts nachvollziehen (also z.B. die Kulissen-Telefonzelle an die Animation anpassen, nicht umgekehrt).

    Cinema4d hat dummerweise Probleme, Ausschnitte aus einem bestehenden Bild herauszupicken und in derselben Größe und im selben Winkel zu rendern, sodass sie später einfach draufgepappt werden können. Ich kann nämlich nicht sagen: rendere mir diesen Ausschnitt raus und füge oben stumpf 100 Pixel hinzu. Oder rendere mir einen Ausschnitt von 100x100 Pixel. Photoshop CS3, das mir zu Verfügung steht, schneidet zwar brav die Detailmotive aus dem Komplettbild heraus, ignoriert beim Im- und Export aber den PNG-Alpha-Kanal. Das ist also nichts.

    Zweiter Versuch: Die interaktiven Animationen komplett im Endformat (1024x768) und mit Alpha-Kanal zu rendern. Das ist prinzipiell doof, weil z.B. die Animation des Hebels und die Figur zusammen nur eine Größe von z.B. 500x500 Pixel einnimmt. Ich habe also sämtliche Animationen im Endformat 1024x768, auch wenn sie selbst z.B. nur 30x30 Pixel groß sind... Der Rest ist schwarz bzw. Alpha-Kanal. Aus vielen Spielen weiß ich aber, dass die Animationen immer nur den Raum abdecken, in dem sich auch was bewegt - ist auch sinnvoll.
    Vorteil: Immerhin stehen die Objekte und die Animationen schon mal an der richtigen Stelle und ich müsste es nur schaffen, den Übergang der Spielfigur zur animierten Sequenz so unauffällig wie möglich hinzukriegen. Das widerspricht dem Grundsatz, alle Personenanimationen in derselben Auflösung zu erstellen, damit diese gleich groß sind und überblendet werden können.

    Wenn sich die Interaktionen aber weiter hinten im Raum befinden, ist auch die Figur nicht mehr passgenau. Diese wird durch Visionaire zwar skaliert, die Pose AN SICH bleibt aber unverändert. Ich kann die Animationen also nicht an der Stelle rendern, an denen sie später stattfinden. Die Figur mit Wegepunkten so genau zu skalieren, dass man keinen Übergang sieht, habe ich nicht geschafft.

    Die Personenanimation der Interaktion (also die komplette in 1024x768) passt nicht zu den üblichen Geh- und Stehanimationen (diese sind 450 x 800px). Wie ich es auch drehe und wende: es klappt nicht, den Charakter in irgendeine Animation einzubauen. Entweder startet die Interaktion nicht exakt an der richtigen Stelle und/oder ist zu klein. Ich kann die Animationen auch nicht deckungsgleich kriegen, denn skalieren ist in Visionaire nachträglich nicht möglich (Mitte setzen und verschieben schon, aber das ist nicht genug).

    Die einzige Möglichkeit, die mir einfällt, ist: ALLE Personenanimationen in der maximalen Spiele-Auflösung von 1024 x 768 anzulegen. ODER wenigstens eine Größe wählen, in der alle zukünftigen Animationen Platz haben (Ungefähr 800 x 768 px). Alle Posen (also auch Walk usw.) in die Mitte plazieren, die Figur gleich groß machen und gut. Dann hätten alle Walk- und Standposen dementsprechend viel toten ungenutzten Raum. Ich kann dann jede erdenkliche Animation nur durch Verschieben zur Deckung bringen und muss dann nur noch das nichtanimierte Kulissenobjekt in derselben Größe zusätzlich einpassen. Tja... s.o.

    Bislang hat jeder Standardframe der Figur ca. 70KB. Mir dieser Methode würde jeder Frame plötzlich 200 KB kriegen (weil ja unnötig groß). Außerdem wird die effektive Größe der Figur natürlich sehr viel kleiner und damit pixeliger.

    Ist das also sinnvoll?

    LG
    Machtnix

    Thread Captain

    1097 Posts


  • #2, by afrlmeMonday, 21. April 2014, 19:57 10 years ago
    hmm if I'm understanding this correctly then you are saying something along the lines of your character animations are not all correctly aligned?

    This is what the animation studio (harmonizer) is for. It is used to make sure each character animation is correctly aligned with each other.

    The best practice when designing your character would be to create them inside of a bounding box. The character animations should all be the same size as should be the width/height of each individual animation. For example: all of the animation frame images of the walk left animation should be the exact same height & width. The reason for this is that you will not have to mess about later on, correcting the alignment of each frame.

    If you were to create & animate your characters in a 3D program, then they should be correctly aligned & the correct size providing you don't go messing about with the camera distance from the character or the height angle etc.

    In general the default size of your characters should be approx half the height of your default game resolution... Say my default game resolution is 1920x1080, the size of my character would then be approx 540px at its highest point.

    Well something along those lines. I've no idea if I even understood the translation of what you wrote correctly.

    P.S: you have to take into consideration that the character moves in integer value (1px etc instead of float, which would be .decimal values). Also you could actually include part of the scene object/background into your character animations, if needed.

    Imperator

    7278 Posts

  • #3, by MachtnixMonday, 21. April 2014, 21:55 10 years ago
    The best practice when designing your character would be to create them inside of a bounding box. The character animations should all be the same size as should be the width/height of each individual animation. For example: all of the animation frame images of the walk left animation should be the exact same height & width.


    Thank you! I'm not sure my English is good enought, but I will try to answer:

    Yes, that sounds good. That means: I pick up the largest animation (f.e.: the character use the phone box), look at the character's size in there and this might be the future size I use for ALL walkcycles and animations? The "bounding box" contains the character, various animated objects and the final border size may be 800x768px (the largest one I used). Of course then most of the basic walk and standing frames contain only a little character in a huge box - most of the frame is black... So the character has the same size in all of the animations. That's the correct way to do?

    I already did all the pose animations at the same size (hey, there are about 100..., different camera angles, different outfits, different random poses... ;-) OMG!

    The last problem is to fit the objects together: the animated phone box and the phone box on the backdrop must have the same position. I think that's try and error with the object's coordinates... ;-)

    Machtnix


    Thread Captain

    1097 Posts

  • #4, by afrlmeMonday, 21. April 2014, 22:27 10 years ago
    I meant that all frames inside of each animation must be the same size. Per animation. Not all animations have to be same image size. That's what the animation (character center) center is for.

    In general the character should be the same size in each animation, so that the animations scale up/down correctly. But the animation center is what is used to make sure each different animation is correctly aligned. The animation studio (harmonizer) is not currently working properly in the released beta of vs 4.0 though, so you will need to wait for the upcoming RC version (in a few weeks hopefully) before you can use that.

    For placing objects on the scene it's best to use 2 different backgrounds. One containing all of the scene objects, which you can use for aligning the scene object images/animations into the correct place & the second which would be the final version of the background which you will replace the first one with, after you've done adding your scene objects.

    Would you be willing to share some screenshots, or a video of what you are talking about?

    Imperator

    7278 Posts

  • #5, by MachtnixMonday, 21. April 2014, 22:50 10 years ago
    I meant that all frames inside of each animation must be the same size. Per animation. Not all animations have to be same image size. That's what the animation (character center) center is for.


    Well. I can use my character animations already finished... hm, good!! I've created the phone box animation with the same character size inside, so I can switch between the basic poses and the larger animated scene, because the hero inside has the same height (in px), using this Visionaire studio tool (I've installed the 3-demo, it works). I've tried it, but the crossing didn't work properly not yet. I have to fix the character at ONE and only ONE coordinate to start the animation!

    The idea of two backgrounds is simple and BRILLIANT :-)

    Bye
    Machtnix

    Thread Captain

    1097 Posts

  • #6, by afrlmeMonday, 21. April 2014, 23:23 10 years ago
    hmm you can assign where the character will interact with each scene object... see attachments.

    Imperator

    7278 Posts

  • #7, by MachtnixTuesday, 22. April 2014, 19:52 10 years ago
    Mit dem Englisch tue ich mich ein wenig schwer. Drauflosquasseln ist ja ok, aber so ein spezifisches Thema zu beschreiben, und dann noch korrekt, ist schon heftig :-)

    Ich versuche es mit einfachen Worten:

    Eigentlich ist die Schwierigkeit dieser Animationsgeschichte ziemlich einleuchtend: ich habe vier Elemente, die ich unter einen Hut bringen muss:
    1. die Animation, bestehend aus der Figur und dem Objekt, mit dem sie interagiert (hier: die Telefonzelle), Maße ca. 800x600 px
    2. die einzelnen Walk- und Standposen der Figur, Maße 400x600 px
    3. den Hintergrund, auf dem die Telefonzelle drauf ist, Maße des späteren Spiels, hier: 1024 x 768 px.
    4 und das Objekt Telefonzelle selbst, Maße noch unbekannt.

    Weil die Figur in einer bestimmten Größe angelegt wurde (ja, ich weiß, die hätte kleiner ausfallen dürfen...), muss sich die Telefonzelle in der Animation der Figur anpassen. Ich kenne also die genauen Maße des Objekts und dessen Koordinaten gar nicht, sondern kann nur abmessen, wieviel Pixel es in etwa hoch wird.

    Der erste Schritt hat - dank Hilfe aus dem Forum - funktioniert: die Walkposen und die Animation sind deckungsgleich und überblendbar, weil ja die Figur dieselbe Pixelhöhe und denselben Winkel hat. Die Personenanimationen können ruhig verschieden groß sein - Hauptsache, der Charakter ist immer gleich groß. Perfekt.

    So. Jetzt läuft also an einer bestimmten Stelle auf der Kulisse eine Animation ab. Die effektive Größe der Figur (und damit der Telefonzelle) hängt von der Position innerhalb des Wegenetzes auf der Kulisse ab. Ich habe also einen Wegepunkt als Startposition gewählt, denn dort kann ich die Größe der Figur genau einstellen. Hier ist sie 80%. Ich schicke die Figur also zu dieser Position, sie wird in den richtigen Winkel gedreht, und starte die Animation. Am Schluss kommt die Figur um 180° rotiert heraus und steht wieder auf der Startkoordinate. Alles gut. Auf dem Kulissenhintergrund befindet sich noch keine Telefonzelle, vorher und nach der beendeten Animation ist also der Platz leer.

    Ich muss nun das Objekt "Zelle" in der Größe anpassen und auf die Kulissenposition setzen, damit sie genau dort ist, wo sie in der Animation steht. Während ich im Studio-Tool die einzelnen Walk- und Personen-Animationen jedoch gut überblenden, verschieben und plazieren kann, kann ich das mit Objekten nicht tun. Ich kann also nur einen Screenshot (!) vom Visionaire-Player machen und im 3D-Programm dieses Bild als Vorlage verwenden, um darauf die Telefonzelle in ihrer effektiven Größe anzupassen und auf die Position zu stellen. Dann kann ich diesen Hintergrund als Kulisse rausrendern. Ob mir die Mauskoordinaten in Visionaire dabei helfen, weiß ich noch nicht. Im 3D-Programm nützen sie mir nichts.

    Das eigentliche Problem ist außerdem, dass die Telefonzelle auch transparent ist (Telefonzellen sind nun mal z.T. mit Fenstern), so dass ich das Kulissenobjekt kurz vor der Animation ausblenden und unmittelbar nach der Animation wieder einblenden muss. Denn übereinandergelegt sieht man ja beide Objekte... Ich muss nun entweder die Kulisse wechseln, also: starte Animation und blende sofort Kulisse OHNE Telefonzelle ein, usw., oder - ich lasse die Kulisse leer und blende nur das Objekt ein und aus. Natürlich darf die Figur das Objekt im Normalfall nicht betreten können, es muss also vom Wegenetz ausgespart werden. Mal sehen, was schließlich besser geht.

    Hm, Filmchen und Sreenshots sind ganz nett, es ist aber von der Kulisse noch nicht viel zu sehen (alles erst graue Dummys). Kann man den Visionaire-Player capturen? Ich hab kein Programm dafür.

    Machtnix

    Thread Captain

    1097 Posts

  • #8, by afrlmeTuesday, 22. April 2014, 19:59 10 years ago
    yeah you should be able to capture it with some screen recording software like camtasia - there are some free alternatives also, although I'm afraid I don't know which ones are actually any good.

    If you want you can always send me an exported build of your game or the .ved & resources themselves for me to test & find out the issue.

    The thing you are talking about with the animations disappearing after they have done playing is because they get unloaded when they have finished playing for the specified amount of time/loops. You need to set them to infinite loop if you don't want them to disappear from the scene.

    Imperator

    7278 Posts

  • #9, by MachtnixTuesday, 22. April 2014, 20:08 10 years ago
    The thing you are talking about with the animations disappearing after they have done playing is because they get unloaded when they have finished playing for the specified amount of time/loops. You need to set them to infinite loop if you don't want them to disappear from the scene.


    Thx. But it's a misunderstanding: I want the animation only once. Disappearing is ok. But there isn't a phone box on the backgroung (Kulisse), so after animation the phone box is gone, because the animation contains the phone box...

    And: I'm just at the beginning. I want to test what's possible. I haven't a finished game not yet... :-)

    Hm.... jpg-upload doesn't work.... my ff did an endless hourglass...

    Thread Captain

    1097 Posts

  • #10, by afrlmeTuesday, 22. April 2014, 20:35 10 years ago
    The thing you are talking about with the animations disappearing after they have done playing is because they get unloaded when they have finished playing for the specified amount of time/loops. You need to set them to infinite loop if you don't want them to disappear from the scene.


    Thx. But it's a misunderstanding: I want the animation only once. Disappearing is ok. But there isn't a phone box on the backgroung (Kulisse), so after animation the phone box is gone, because the animation contains the phone box...

    And: I'm just at the beginning. I want to test what's possible. I haven't a finished game not yet... :-)

    Hm.... jpg-upload doesn't work.... my ff did an endless hourglass...


    ah ok. bing translator is not always very accurate in translating correctly.

    Probably updating something on the forum, which has killed the image attachments - again! razz

    Imperator

    7278 Posts

  • #11, by MachtnixTuesday, 22. April 2014, 20:46 10 years ago

    Thread Captain

    1097 Posts