Available at: GitHub - TehLeo/JmeAssetImporter: A tool to automatically import assets from blender to jME
Current Workflow Outline:
Imagine you are making a game with a lot of models. To import them them to jme:
- you create a separate blend file for each
- convert each of those files to j3o
- [if the models use custom materials] set material either in code or in editor for each object
- you repeat the above process when you make changes to your original blend file
There are two workflow concerns with this:
- lot of actions required to import a model
- each different models requires separate blend file
Solution Idea
My idea is to create a simple text file that will contain what to import to jme automatically. See the below code as an example of such file.
global {
in-path: "/media/leo/Kaiba/data/Codename Violet/Env"
out-path: "/media/leo/Kaiba/workspaces/craft/Codename Violet/assets/Models"
out-texture-path: "/media/leo/Kaiba/workspaces/craft/Codename Violet/assets/Textures"
copy-texture: true
}
flowers {
in-blend: assetimporttest.blend
out-j3o: [
["Blue Flower" "flower1.j3o" ]
["Pink Flower" "flower2.j3o"]
["Yellow Flower" "flower3.j3o"]
]
}
trees {
in-blend: assetimporttest2.blend
out-j3o: [
["Willow" "tree1.j3o" ]
["Oak" "tree2.j3o"]
]
}
The above file first defines where to look for blend files, then where to create j3o files and texture files. Then, for each different blend file, multiple objects can be exported into j3o files.
One thing that is not present in the above example, is setting a custom material for imported object.
I am writing this to possibly receive feedback and any ideas you might have in regards with this. If you have any ideas what would be good if this accomplished, or how do you imagine the syntax of setting a material look like, feel free to share.
Currently I am implementing a tool that will do this job, as it will save me a lot of time when creating a game with plenty of assets. I also believe this will be useful to many of you, mostly if you are dealing with plenty of assets.