Making a texture atlas in blender 2.79 and exporting to xbuf [solved]

if a model has 4 parts and 4 materials and 4 textures slot and 4 UV Maps and 4 images for each UV maps.

then I made a texture atlas that it has one image and one UV map but 4 texture slot that I set the images to the made texture atlas image and 4 materials. and joined them into one geometry, everything is looking good in the blender but when I export to Xbuf or Ogrexml and converted it to j3o file UV map fails.

is making texture atlas in that way correct?

why not just make it via JME utility?

anyway it should work if you have 1 geom and 1 atlas texture for it with proper uv.

1 Like

how did you do it in JME utility? is it an SDK tool or a lib that I can programmatically make texture atlas?

There is:

so you just do:
Geometry geom = TextureAtlas.makeAtlasBatch(scene, assetManager, 2048);

but if its not animated model, because probably animations will break.
For animated model you can just use it to generate Atlas only and batch in blender into one geom to leave animations working.

but, there is missing PBR support there, its easy to add yourself if you need anyway.

3 Likes

I made a new animated model, and made a texture atlas for and join them in one geometry in the blender, it looks correctly, the texture and the uv map. but when I export it to Xbuf or ogreXml, UV maps crashed. where is the problem?

for converting to j3o format I used jmonkeyBuilder 1.8.
and blender 2.79.

can I use gltf export in blender 2.79?
what about skeleton and nlaStrips for animations, is it working with gltf exporting like xbuf?

UV maps crashed. where is the problem?

I think people would ask for Error log or any description that would allow know the issue.

can I use gltf export in blender 2.79?

Blender 2.79 had special type of Gltf export plugin that was working, but im using 2.8+ now and i dont remember which one it was. NLA Strips were working there.

But i would suggest skip GLTF usage until you move to Blender 2.8 where GLTF work just great.

1 Like

finally, I found the problem. it was because I forgot to remove other UV maps after making texture atlas, even if set the UV map slot in texture tab of blender tab to UV map of the texture atlas, they must be removed to work correctly in converting to j3o.

and also if you are using ogrexml, other UV maps most be removed from UV maps of blender files in the data tab of the blender.
image

3 Likes