Well when I create a model in any modelprogramm taht can export to ogrexml it is really easy to use it now with JME3, however I'm still wondering, if there is a autoamted way to load the models with normalmaps and spectacular maps (assuming I already have them backed), without the need to create a .j3m file manually (as this really slows down the workflow)?
Not right now. But it might be possible to write a J3M exporter for modeling tools.
What do you recommend should be done? I don't see any straightforward way of handling this.
Hm maybee just some simple converter, give it a model, and select in a gui, normalmap, spectacular ect, and wich texture layer it is,
aka loading bla.meshxml -> normal importer imports all materials as standart texture -> then say unit 1 is normal texture, 2 is spectacular, and a material file is automatically generatedfor it.
(We could add in the standart loader to search for a jm3 file named same as model, or a flag to set to enable that behaviour)
Yay, this sounds cool. Somebody who's digging more into the blender side of things would surely be very welcome.
About on demand loading of j3m's, we are planning to store the j3m assetkey in the geometry and then load the data from the j3m if it exists. Assigning a j3m to a geometry is already possible in jMP but auto-using of a j3m file is probably not a good idea, they would be assigned to every geometry in the model and maybe thats not what you want. I think some hands-on editing of models will always be necessary to adapt them to the engine/game (think of attached particle effects etc.) jMP is built exactly for those purposes.
You're right, i was assuming 1 geom per j3o file, which is abviously not the case.
Picking the good material in the geom property sounds good to me, i didn't notice that we already could do that in jMP.
nehon said:
You're right, i was assuming 1 geom per j3o file, which is abviously not the case.
Picking the good material in the geom property sounds good to me, i didn't notice that we already could do that in jMP.
You just need to create a j3m file somewhere in the assets and then you can select it in the sceneexplorer for a geom.
Well i now use a Texture atlas fore very model using more than one texture, then generate a normalmap /spectacular, ect. for this texture and use it on my model. Then my small loader function, checks if a j3m file with the same name as the modelfile exists, (and caches the answer, to reduce harddrive acces later) and if it exist it loads it and applies it to the model. Also increases performance a bit, since there are no texturestate swiches needed for one geometry.
I'm currently trying to write a ogre to jme native compiler somewhat.
It gets all used textures,
(resizes them to 2x2 (needed for atlas creation, also I have more time than the game engine so i can use higher quality interpolation)
checks if for either of them are normal ect exisitng, then generates a texture atlas for normal, diffuse ect.
(working till here already)
corrects the uv coordinates
(saves this as ogrexml with different name)
create a J3M file with the atlases,
load in jme
saves as jme binary.
Of course this will only work if every used material has normalmaps or none, …
They are found by simply searching for _normal ,_spec *_height, so your modeller only needs to make models, and the texture artist needs to create the additional textures, rest is automatic.
Should probably make a dedicated export script for blender, for correct export of J3M files. I checked material templates a while ago and found out that they cant export materials into separate files so this wouldn't work well.