Customise Ogre Importer

Hi all,

How can I customise the ogre importer that converts .scene into .j3o?

I have modified the script SceneLoader.java in src (ogre.com.jme3.scene.plugins.ogre), but building the project, although successful, does not change the behaviour of the import process.

I suppose I need to possibly build the importer somewhere inside the jMonkeyPlatform.app/Contents (I’m using a Mac) application folder.

Can someone help please?

Cheers

To use the importer in the Model Import panel you have to build your own version of the SDK and engine, see here:
https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:build_platform

What is the change you made? Maybe theres another way or it can be integrated.

1 Like

I’m merely experimenting so far, but what my goal is is to use Blender for creating full levels where I could make use of light mapping for example. However the ogre importer (or the blender importer) in jME SDK does not convert the models with the same hierarchy as I set in Blender. Especially ogre importer creates so many additional nodes that it basically becomes a mess to work with after I import the level. Know what I mean?

Ogre importer will use the material name as the name of the geometry in the scene viewer, but that’s not what I want since I’m creating my own materials (j3m files) instead of use the Blender-created materials. So I want to customize the importer to keep the blender hierarchy and names, and later on create a script that will auto-assign the j3m materials to geometries.

Make sense?

Not really because the changing of hierarchy, missing light maps etc. are all happening at the level of the ogre export so you’d have to change the blender ogre exporter. Furthermore, blender rendering and live rendering are simply different, you can have two materials on one “geometry”/object in blender, that doesn’t work in jME (or ogre) so the mesh has to be split into two objects.

I’d suggest simply importing the blender model directly and working with the options it supports, which are a lot more than the ogre one. But at some point you won’t get around reworking the models and adding metadata after the import anyway.