Improved j3m handling in jME3

Hi monkeys,

the j3m material handling in jME3 and the SDK has been further improved. With the latest changes in the engine, j3m files will be loaded and applied to a model when it is loaded via the assetManager. That means once a j3m has been used to set a material to an object, its name is stored and you only have to change the j3m file to change the appearance of your models. So now you don’t have to re-apply the material to the model anymore after you have changed it. When the j3m file does not exist, the material data stored in the j3o file will be used.

The material dropdown in the SceneExplorer now shows the correct asset name of the applied j3m file. When no j3m file has been assigned yet, a new option is visible that allows you to create a j3m file from the material that is currently applied to the geometry. The j3m file will be created in the model folder and applied to the model for further editing.

Known issues:

  • Parameter values for the j3m are created using toString() and some regex, some parameter types might still create wrong values in the j3m file (2D Textures, Colors and Numbers should work fine, as well as the supported AdditionalRenderStates)

  • The j3m file location is not customizable, it will be created in the folder of the j3o it belongs to

  • Texture flip and repeat settings are not imported

Available in the latest nightly.


Very Nice!