EdyJ / blender-to-unity3d-importer

Advanced Blender to Unity 3D model importer
MIT License
141 stars 34 forks source link

Enhancement: texture import into subdir "textures" #2

Closed orrence closed 10 years ago

orrence commented 10 years ago

Hi! On your website you have a blog entry that helped me a lot to get the textures of blender models into Unity3D. So thanks for that. I use this importer, too, so I asked myself if it would be possible somehow to add a feature to this importer that automatically extracts the textures it finds and puts it into a textures subdirectory (from the path in the Assets/xyz-folder, where the "blenderfile[importer].blend" resides.

Thanks a lot for the work you put into this so far!

Cheers, orrence.

EdyJ commented 10 years ago

Thanks for the feedback! I'm afraid that your suggestion can't be implemented because the importer works at Unity level, without reading the .blend file directly. Unity imports the .blend file normally with its built-in importer, then it creates all the standard structures (meshes, animation clips, etc) and finally calls the Importer. Then the importer processes all Unity standard structures and fixes them. Note that the importer is "agnostic" with respect to the 3D file itself. You could force it to run on any format with the option [forcefix]. Note that when Unity imports a FBX file that comes with embedded textures, it automatically extracts them to a "Textures" folder. You may try to export your .blend file to FBX with embedded textures (not sure if this can be done from Blender though).