Empfohlen Blender-O3D-IO Plugin 1.1.4

Lizenzbestimmungen
GPL-v3
WebSite / Support
https://github.com/space928/Blender-O3D-IO-Public
Empfohlene OMSI-Version
Aktuell v2.3.x
Vorausgesetzte kommerzielle Erweiterungen
Keine
Weitere Versionshinweise
Currently doesn't support model exporting properly, but this is coming very soon!
Blender-Version
2.79-3.5.x

A plugin for blender 2.7.x-3.x.x for importing and exporting OMSI .sco, .cfg, and .o3d files.

BLENDER-O3D-IO

En Français (merci a @boingtheboeing pour la traduction)

Features

Blender-O3D-IO includes a fast o3d file importer and exporter with full support for the format. For complex models, .cfg and .sco files can also be imported and exported. OMSI map tiles (.map files) can also be imported.

  • Fully supports O3D file format:
    • Explicit vertex normals
    • Long headers (version >= 3)
    • Encryption (requires private o3d_crypto.py module)
    • Long triangle indices
    • Alternative encryption seed
    • Embedded materials
    • Bones
    • UV coordinates
  • Supports many features in CFG/SCO files:
    • LODs
    • Imports and exports advanced material features including:
      • [matl]
      • [matl_alpha]
      • [matl_transmap]
      • [matl_envmap] & [matl_envmap_mask]
      • [matl_bumpmap] (Blender >= 2.80 only!)
      • [matl_nightmap] & [matl_lightmap]
      • ...
    • Interior lights and spotlights
    • Lens flares ([light_enh] and [light_enh_2])
    • Imports all referenced models (o3d files only) and textures in the CFG/SCO as separate objects
    • Imports .x if a compatible importer is installed (https://github.com/Poikilos/io_import_x)
  • Imports OMSI map tiles (.map files): [WIP]
    • Imports referenced scenery objects
    • Imports terrain tiles and materials
    • Imports splines and converts them to meshes

Documentation

Additional documentation is available in the README (or README-FR) file. Read it on GitHub for correct formatting:
https://github.com/space928/Bl…ublic/blob/main/README.md

Updates

The latest version of the plugin will always be available on my GitHub (as well as the source code).

https://github.com/space928/Blender-O3D-IO-Public

Bilder

  • 1.1.4

    Try The New CFG Exporter!

    Make sure to delete any previous versions of the plugin before installing.

    • Added a few checks for broken cfg files
    • Fixed bug where the exported cfg contains unselected objects
    • Fixed a small cfg export bug
    • Added logo
    • Added French translation of the readme (thanks @boingtheboeing)
    • Added option to override text encoding (fixes #42)
    • Fixed bug where the importer tries to import failed .x files as o3d files
    • Fixed o3d texture path export
    • Added option to hide additional LODs
    • Overhauled how CFG files are parsed and stored internally
    • Fixed empty uv_layer export bug
    • Fixed o3d material texture name export bug
    • Improved alpha handling in the importer to better support exporting
    • Friendlyname and groups are now imported and exported correctly
    • Added some fallbacks for unsupported features in Blender 2.79
    • Added import fallbacks for material parameters which are parsed but not currently used by the importer such that they can be exported
    • Implemented CFG exporting
    • Implemented Blender material -> omsi cfg exporter
    • If the "skip_export" property exists on an object, it will now be excluded from the export
    • Changed how unused cfg properties are copied to relevant Blender objects to allow multiple of the same property to exist on an object
    • Fixed bugs with light importing
    • Added support for importing spotlights
    • Changed terrain tile auto-naming scheme to make it less verbose
    • [matl_change] commands are now correctly preserved
    • envmap textures are now correctly preserved
    • Added cfg exporters for lights and lens flares
    • Changed how we do axis conversion to a much more reliable system
    • Pivot points (o3d transformation matrices) are correctly imported/exported now
    • Enabled export selection only by default (fixes #40)
    • Fixed specular export bug (fixes #45)
    • Fixed import bugs for single o3d files
    • Fixed a few 2.79 compatibility bugs
    • Updated README
    • Added user guide to the README
    • Fixed various small bugs
    • Refactoring

    232657243-2a2742c0-f119-4d4e-9290-15afdfb3670f.png

  • 0.2.4

    Loads of Bugfixes

    Make sure to delete any previous versions of the plugin before installing.

    • Made x file importing optional
    • Added Blender 2.79 compat for matrix multiplications (fixes #35)
    • Fixed some bugs with the x file importer selection behaviour
    • Fixed issue #38 with the spline importer
    • Added support for spline profiles with more than two points
    • Added Blender 2.79 compat to the log statement in io_omsi_tile.py
    • Removed some unnecessary code
    • Added tessface based mesh exporter for Blender 2.79
    • Added proper o3d material export compatibility for 2.79
    • o3d material importer now imports specular colour and emission
    • Added 2.79 compat for select_set() in various places
    • Replaced f strings for compat with 2.79
    • Added specular colour import to o3dconvert.py
    • Refactoring
  • 0.2.0

    • Added Omsi tile import operator
    • Added DDS file reader for Alpha_8 dds files as Blender can't import these natively
    • Terrain meshes and materials can now be imported
    • Added custom material wrapper for layered terrain materials (the number of imported layers is currently limited for practical purposes)
    • Added spline importer:
      • Imports spline profiles
      • Generates an optimised spline mesh using both an arc distance and a sag algorithm
      • Imports spline materials
      • Spline definition is cached in the Blender object
    • The texture search algorithm is more resiliant
    • Fixed bone exporting/importing, thanks @winer222
    • Improved x file importing
    • Made x file importer more resiliant to unsupported version (fixes #28)
    • Normals now import correctly (fixes #29)


    Sorry for taking so long to publish the update, university has been quite busy recently.

  • 0.1.5

    • Improved bl_info
    • O3D export now exports bones #19
    • O3D import now uses our own fork of node_shader_utils
    • Fixed KeyError when loading individual o3d files
    • Fixed interior lights import #25
    • [matl_alpha] now always uses the diffuse texture's alpha channel
    • Fixed bumpmap rendering
    • Fixed o3dconvert bone importing #18
    • Fixed Blender 2.79 import errors
    • Fixed blender mesh data extraction for export
    • Added invert_triangle_winding option to the o3dconvert.py exporter
    • Fixed custom normals importing in importer
    • Fixed o3d_crypto module import
    • Fixed decrypt_vert call bug
    • Added o3d version spinner to export dialog
    • Exporter now automatically creates new directories
    • Normals are now exported correctly
    • Safety check when exporting o3ds with no textures
    • Importer imports normals correctly
    • Loading progress percentage added to log
    • Fixed group_link bug #24
    • Fixed specular_texture #23
    • Fixed 2.79 install issue #22
  • 0.1.2

    • Fixed python import errors in Blender 2.79
  • 0.1.1

  • Hey, is there a way to export files to o3d correctly? My objects keep having no textures in the map-editor, when i export the file.

  • Hello in description you said it can import .map files but it can't. How can i import it?

  • How to export the o3d file correctly? If I just click export every texture is missing

  • Is it planned to make "encrypted" O3D files openable?

  • Blender 4.02 does not work.

    • Look into the description:


      Blender-Version:

      2.79-3.5.x

  • When trying to import objects of any of the Hamburg-Addons it is a 50/50 if the object is imported correctly or deformed. This problem only occurs in those addons, any other free- or payware o3d-files are imported correctly. Its worth noting that also all the o3ds cannot be loaded in the OMSI crossing-editor but in the game they are displayed correctly.

  • hey, changing only the coordinates of a given object and they are in the bus, e.g. door buttons, eg 1,2,3, the light in the cabin does not illuminate them? the same is with replacing the desktop in the vehicle, I only change the existing location in the .cfg file to my modded one and all I exported is the light in the cabin does not illuminate them

    blender version 3.6.1

  • 0

  • How exactly does OMSI encrypt x files to produce an O3D file? Can you maybe explain that?

    Wie macht OMSI aus einer .X Datei eine O3D Datei? Kannst du vielleicht einmal grob erklären, wie das funktioniert?
    Danke :)

  • The Version 0.2.4 its not work with Blender 2.79?

    At least not correctly? because I always get a warning and no textures are loaded.

    • Strange, it should work, what error message do you get?

    • I have the same problem. The warning says that it was written with/for Blender 3.1 so that it might not work correctly.

    • I just got into the new Blender version now and use that. The new Blender version is much better than the old ones. It also works without any problems.

  • Thank you for this masterpiece (and must have :D) plugin!


    Best regards

  • Hey, I've just tried to install version 0.2.0 on Blender 2.79 but it doesn't seem to work at all, I can't activate it in settings. Version 0.1.5 is installed as well, doesn't make a difference with it being removed.


    Danke 1
    • Hi, sorry about that, I missed that line while adding compatibility for Blender 2.79. For now you can just comment out line 302 of io_omsi_til.py like this:

          log(f"Loaded {len(objs)} objects!")

      Becomes:

          # log(f"Loaded {len(objs)} objects!")

      I'll try and release a patch soon.

    • I just tried that, it didn't help.


    • I have a patch ready, I'm just testing it and I'll upload it to WebDisk today. I've also fixed a bunch of other bugs relating to Blender 2.79 so hopefully exporting should work now as well.

    • It works now, thank you!


      I just played around with the exporter a bit and found two things that might need some change:

      -Selection only is off by default. I can't see most of the Omsi community regularly exporting an entire bus/blend file so it might make sense to turn Selection only on by default.

      -Indexes following file names are also exported. Is it possible to change that?

    • I've added these as feature requests to the GitHub page. I'll try and change that for the next release.

      https://github.com/space928/Blender-O3D-IO-Public/issues/39

      https://github.com/space928/Blender-O3D-IO-Public/issues/40

  • Really great plugin. Unfortunately it doesn't work with blender 2.81

    • Hi, it should work with blender 2.8, please try version 0.2.0 (as I write this it's still waiting on approval from a moderator but should be available soon) of the plugin and let me know if that works.

      If you're still having issues send me your Blender log. You can access it by opening the Blender console after the issue occurs by clicking "Window->Toggle System Console" and then copy the text in that window here, there should be something along the lines of:

      Code
      Traceback (most recent call last):
        File "\test_io_batch_import_model_cfg.py", line 13, in <module>
        File "C:\Program Files\Blender Foundation\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 132, in __call__
          ret = _op_call(self.idname_py(), None, kw)
      TypeError: Converting py args to operator properties: : keyword "mkodule" unrecognized
      Error: Python script failed, check the message in the system console

      Which is what I'm interested in.

    • Just tried the latest version from github but unfortunately it still doesn't work...

      Here is the log

  • Hello,


    And what about my mistake

    • Sorry for taking so long, I've been very busy recently.

      The issue should now be fixed in version 0.2.0 of the plugin (as I write I'm still waiting for the moderators to approve the file).

      If you have any more issues please raise a bug report on the GitHub page: https://github.com/space928/Bl…-Public/issues/new/choose

  • Thanks. That's a great plugin for Blender! Must-have for every mod developer!

    Gefällt mir 1
  • Python: Traceback (most recent call last):

    File "C:\Users\tubse\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Blender-O3D-IO\__init__.py", line 160, in execute

    io_o3d_export.do_export(self.filepath, context, global_matrix, self.use_selection, self.o3d_version)

    File "C:\Users\tubse\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Blender-O3D-IO\o3d_io\io_o3d_export.py", line 168, in do_export

    export_mesh(path, context, me, ob_eval.material_slots, o3d_version)

    File "C:\Users\tubse\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Blender-O3D-IO\o3d_io\io_o3d_export.py", line 87, in export_mesh

    for m_bone in mesh.bones:

    AttributeError: 'Mesh' object has no attribute 'bones'


    location: <unknown location>:-1

    • This appears to be an issue with bone exporting. I'll make a note of this on GitHub and try to investigate it soon.

    • Okay Thx

  • Really thanks for this plugin. :)

    Ich liebe es! 1