Hello.
I has been made an OBJ to AWD converter utility for simple case of OBJ file content - only mesh, normals, faces, faces normals and uvs are exist in OBJ. Utility has been written on C++(Qt) using libawd.lib which has been compiled from the latest sources from the repository.
Additionally I have a textures for my OBJ models, which I add to AWD file too (add textures and materials and assign texture to material).
Actually the question is how can I automatically assign created materials to needed submeshes in scene object?
What I have at the moment:
- Input data: OBJ file with mesh, normals, faces, normal faces, uvs, JPG or PNG file with texture;
- Output data: AWD file with geometry with submeshes, textures with loaded textures from PNG or JPG files, materials with assigned textures, scene object with geometry, with default materials assigned to submeshes.
What I should to achieve: all the same as mentioned in “Output data” but in the scene object the materials (created by me) assigned to submeshes instead of default materials assigned to submeshes.
At the moment have to open Away Builder (v. 1.0.0), open converted AWD file on it and assign materials with my textures to submeshes manually (select it from dropbox list if materials for each submesh in scene object) and then save the file.
As I can see I need to set scene object property (numeric attribute) “material” to according value, but the current specification of AWD format (2.0 and 2.1 alpha) don’t allow this. Actually the question is how can I overcome this restriction of current version of format specification using libawd library.
Thank you.