Blender Im/Exporter

  • Da es in letzter Zeit wieder vermehrt Anfragen nach dem Exporter gibt, lade ich hier die aktuelle Version hoch, es gilt: Nutzung auf eigene Gefahr!
    Im Moment ist der Im/Exporte allerdings nicht besonders fehlertolerant, daher solltet ihr eure Blender-Datei sichern, bevor ihr ein Modell exportiert.


    Installationsanweisung:

    • Das Archiv entpacken und die "io_scene_cim_import_export.py" in den "addons"-Ordner von Blender verschieben oder kopieren (normalerweise unter "<Blender Installationsverzeichnis>/<Versionsnummer>/scripts/addons")
    • Danach Blender starten (am besten keine Datei laden, da diese sonst beim Speichern zur Standarddatei wird) und die Einstellungen öffnen ("File -> User Preferences..")
    • Dort den Addons-Tab auswählen und links "Import-Export" anklicken
    • In der Liste, die dann rechts zu sehen ist, nach "Import-Export: Cities in Motion (.object)" suchen und dort einen Haken setzen
    • Als letztes noch ein Klick auf "Save As Default" und die Einstellungen werden gespeichert

    Jetzt sollte das Plugin spätestens beim nächsten Start von Blender funktionieren, im Menü ist der Im/Exporter da zu finden, wo auch der obj.-Im/Exporter ist.


    Funktionsübersicht

    • Im/Export von .object-Dateien in und von Blender, inklusive:

      • Skeletons
      • Animationen (scale ungetestet)
      • Vertext Colors
      • Materialien (Multi-Material Support)
      • Pfade


    Was noch nicht funktioniert

    • _ao-Texturen (wegen der zusätzlichen UV-Koordinaten)
    • low_meshes (zur Detailreduzierung bei Gebäuden, etc)
    • und andere Sachen, von denen ich möglicherweise not nicht einmal weiß, dass es sie gibt


    Englisch
    Since many people asked about the exporter lately, i decided to upload the newest version here. But if you use it, you are doing it on your own risk.
    At the moment, the im/exporter is not very error safe, so you should better save your blender file before exporting an modell.


    Installation

    • Unpack the archive and move or copy the file "io_scene_cim_import_export.py" into the "addons"-directory of Blender (normally located under "<Blender installation directory>/<versionnumber>/scripts/addons")
    • Then start Blender (you should better not load a file, since it will be saved as default) and open the settings ("File -> User Preferences..")
    • There select the "Addons"-tab and then "Import-Export" on the left list
    • On the right list, search for "Import-Export: Cities in Motion (.object)" and activate it
    • Last but not least, click on "Save As Default" and the settings will be saved

    Now the im/exporter should work (maybe you need to restart blender), the buttons for the im/exporter are located in the same menu as the obj.-im/exporter.


    Functions

    • im/export of .object-files to and from Blender, including:

      • skeletons
      • animations (scale untested)
      • vertext colors
      • materials (multi-material Support)
      • paths


    what is not yet working

    • _ao-textures (because of the additional UV-coordinates)
    • low_meshes (poly-reduction for buildings, etc.)
    • and other things I might not even now yet


    Als letztes würde ich mich noch gerne bei eis_os und immi für ihre Arbeit beim entschlüseln der Dateiformate bedanken, ohne diese Arbeit hätte das alles noch wesentlich länger gedauert. :thumbup:

  • Skeleton

    • Hauptbone (bei den Originalobjekten gleicher Name wie das Modell), zugehörige Vertexgruppe leer
    • Bone für alle nicht animierten Teile

      • Bones für die animierten Teile (können auch noch weiter verzweigt werden)

    Wer das ganze visuell braucht, kann auch einfach ein Originalobjekt importieren


    Script

    Code
    with (this.loadSkeleton("Pfad zur .skeleton-Datei")) {
      .loadAnimation("default", "Pfad zur .animation-Datei", 0);
    }


    Code
    this.doorOpenStart = 0.0 / 30.0; //Startframe für die Türöffnungs Animation
    this.doorOpenLen = 30.0 / 30.0; //Länge der Türöffnungs Animation in Frames
    this.doorCloseStart = 35.0 / 30.0; //Startframe für die Türschließungs Animation
    this.doorCloseLen = 30.0 / 30.0; //Länge der Türöffnungs Animation in Frames


    Wichtig: die Anzahl und Position der Frames bezieht sich nur auf die tatsächlich vorhandenen Keyframes, nicht auf die interpolierten.


    Materialien
    Sollten zwar funktionieren, aber ich empfehle trotzdem vorhandene Materialien zu ändern und nicht die des Exporters zu verwenden


    English
    Skeleton

    • main bone (same name as the object for objects from CO), vertex group is empty
    • bone for all non animated parts

      • bones for the animated parts (it is possible for these bones to have own child bones)

    Anyone who needs a more visual explanation can just import an original file.


    Script

    Code
    with (this.loadSkeleton("path to the .skeleton-file")) {
      .loadAnimation("default", "path to the .animation-file", 0);
    }


    Code
    this.doorOpenStart = 0.0 / 30.0; //starting frame for the door-opening animation
    this.doorOpenLen = 30.0 / 30.0; //length of the door-opening animation in frames
    this.doorCloseStart = 35.0 / 30.0; //starting frame for the door-closing animation
    this.doorCloseLen = 30.0 / 30.0; //length of the door-closing animation in frames


    Important: The number and position of the frames is based on the actuall keyframes, not on the interpolated ones.


    Materials
    Theoretically they should work, but I recommend to use manipulated existing materials and not the ones created by the exporter.

  • Hello, it's time for questions! :D


    Look, I created tested model with animation in 3DsMAX. After a few days and lot of troubles I finally imported model to Blender (but Blender don't knows about Smooth groups, it's very bad D:).
    After this I tried to use your plugin and export model to .object. And here I have new trouble. :D When I try to export just body of model - all good, I get normal .object-file. But if I select body with animated doors and try to export - I get .object-file with size 1kb.


    So, maybe I did something wrong?

  • Gibt es irgendeine Fehlermeldung von Blender beim exportieren?
    Is there an error-message in blender when exporting?


    Eventuell ist die Animation nicht kompatibel für den Export nach Cities in Motion. Versuche mal bitte, ein Originalfahrzeug als Vorbild zu importieren und die Animation komplett in Blender zu nachzubauen.
    Maybe your imported animation is not compatibel to Export it to Cities in Motion. Try to Import an original CiM-vehicle an try to exactly rebuild animations in your vehicle.

  • importing animations from other programs is always a pain ...


    also, i think it is pretty much impossible to guess what went wrong here, just by your description.
    What you might want to do is, create a simple test model with some simple animation, import to blender, and then post the .blend file here.
    Maybe then our blender experts can figure out whats wrong.
    or maybe not ...


    Probably the most straightforward way is, as mediziner said, just look at a few examples and do the animation in Blender.
    You might need less time to learn to do this, than sort out all the import complications.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!