Search Unity

How to transcode additional information from 2.49b .blend files while importing?

Discussion in 'Asset Importing & Exporting' started by Joshex, Mar 4, 2019.

  1. Joshex

    Joshex

    Joined:
    Mar 4, 2019
    Posts:
    4
    Hi, I know your stance on providing official support for things like blender 2.49b's Logic bricks, python code and physics engine settings will be a composition of the two answers "1; it's outdated, we'd much rather support blender 2.5+, or just export to fbx" and "2; it's a lot of work to transcode all that, we have other things we're focusing on like new features".

    So today's question isn't necessarily trying to get you (the devs) to support these things to be transcoded on import of.blend files (so people can use unity to publish blender games to systems and phones and such).; [! however it would be nice to at least see support for the import of Logic bricks and the physics settings (scripting could be done separately)!]

    Instead, I want to know how to do it myself so you don't have to waste your time. I'm perfectly happy to modify the import script and draw equivalencies if this is available for me to do.

    So, can I get the source of your blender import script and work on transcoding things? Will unity accept python code words being transcoded to machine code? or does it have to be a C language? or.. could we just get legacy python scripting support? (that would drastically limit the code words I'd have to transcribe!, there may even be some blender specific code words which are not necessary in Unity because they are not handled in code but handled natively by object settings and the graphics engine (in example reflections, shadows, in-game windows, dynamic text (to name a few).)
     
  2. bart_the_13th

    bart_the_13th

    Joined:
    Jan 16, 2012
    Posts:
    498
    afaik, unity doesnt directly import blender nor any other format other than fbx, instead it use the installed corresponding 3D tool internal exporter module to export the model to fbx...
    That's why you cant import .blend to unity without installing blender...
     
  3. Joshex

    Joshex

    Joined:
    Mar 4, 2019
    Posts:
    4
    Interesting turn of developments that I did not consider. Is it possible to get the source code of the 3D tool exporter? I can modify it's code for the .blend to include more than just the model, and change it to export directly to unity's format (if documentation can be provided on that format) rather than fbx.

    Even easier, if I can get documentation on Unity's save file format I can export directly from blender to it via a python script..

    So yeah, I'm requesting documentation on the file structure of the .Unity and or .unity3D file formats, I think that .unity will be enough for import purposes.

    for file structure I will need to know:
    File Header info: for example the order of information such as date time of creation and or last save and what sort of file type it is and any necessary messages about where the file starts or ends or the file name etc.

    Order of information in the archive after the header: example is it [objects]n\ [meshes]n\ [textures]n\ [sounds] n\ [rigging] etc. where do things appear, OR are they organized by [scene:] [object list] [object] etc.?

    how are material settings recorded? how about lamps and lighting?, what about cameras? how are scripts recorded? how are sounds recorded? what format are images kept in? how to reference it's a motion texture? and so on.

    a full list preferably with comments.
     
    Last edited: Mar 4, 2019