-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating DAE files with embedded textures #57
Comments
@JakubKahovec I did not create any of these DAE files used in the example app; they come from various sources namely:
What platform are you using AssimpKit on? iOS or macOS. Your issue could be related to the fact that AssimpKit assumes the texture files are placed along side the source file, the dae files in your case. See: https://github.com/dmsurti/AssimpKit/blob/master/AssimpKit/Code/Model/AssimpImporter.m#L595 So even if Blender puts aside the texture files, as long as you can place the dae file, texture files alongside in one directory, then AssimpKit should be able to read those fine. Otherwise, can you send me a sample of the DAE file which does not get imported with Thanks. |
Thank you for your quick response. I'm using AssimpKit on iOS. |
@JakubKahovec Thanks for the files. I will check it over the weekend and let you know. |
@JakubKahovec AssimpKit fails with the following error:
A quick look at your
I think your diffuse texture may be missing when you export your asset from Blender. Sorry, but I don't have a detailed idea of how Collada exporter of Blender works, but check out their settings and ensure that whatever textures you have used in your blender scene are all exported. -- By the way, I just checked with the SceneKit editor and a sample app, as SceneKit directly supports Collada and you don't need any other library TBH. SceneKit's collada importer is more lenient as it just renders the table without any textures applied, which shows that there is a problem with the way Blender has exported the dae file and the textures. AssimpKit (with I have attached a sample SceneKit project for this asset Please try with a new export with the dae file and all textures in place, if you still need to use Hope this helps. Thanks :-) |
@dmsurti thank you for such thorough analysis. I've concluded pretty much the same. When exporting though I tried several options but I was not able to export it in such a way it would work. I also tried other tools like Cinema 4D or SketchUp but with none of them I was able to export it so that it loadable with texturess in AssimpKit. Without textures it works pretty good, but the only models where textures work corretly are the ones which you have part of your iOS example. Do you have an experience with some tool which would export models into Collada DAE format and textures would load correctly with Assimkit ? |
@JakubKahovec I found a .dae file with a 3D model of a wooden create and specular, diffuse and normal textures. I exported it from Blender with the following settings: Note that I check the options to Include textures and also the Copy option, so that the texture files are copied to the destination where you place your exported Then I exported this model in AssimpKit and checked with both MacOS and iOS example viewers: PS: The blend file I used for testing this is proprietary and hence I cannot share it, Sorry! I hope the above instructions can help you further. So I would suggest you try exporting from Blender correctly and then if AssimpKit does not work, open this issue again. I am closing it for now. |
Hi @dmsurti ,
may I ask how did you manage to create DAE files, in your example app, which have embedded textures ? I tried Blender 2.78 but it always put them aside, and I'm not even able to read them in AssimpKit. Yours DAE files work fine though.
Thank you.
The text was updated successfully, but these errors were encountered: