Comments (6)
@JakubKahovec I did not create any of these DAE files used in the example app; they come from various sources namely:
- Files in
assimp
- Files from
openframeworks
- Files from
apple
examples
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 AssimpKit
and I could look into it?
Thanks.
from assimpkit.
Thank you for your quick response. I'm using AssimpKit on iOS.
Table.zip
I'm attaching the exported files.
from assimpkit.
@JakubKahovec Thanks for the files. I will check it over the weekend and let you know.
from assimpkit.
@JakubKahovec AssimpKit fails with the following error:
2017-08-14 23:12:42.558685+0530 OSX-Example[20693:1606676] -[AssimpImporter importScene:postProcessFlags:] [Line 137] Scene importing failed for filePath /Users/deepaksurti/Downloads/Table/Wood_Table.dae
2017-08-14 23:12:42.558711+0530 OSX-Example[20693:1606676] -[AssimpImporter importScene:postProcessFlags:] [Line 138] Scene importing failed with error Collada: Unable to resolve effect texture entry "**table_Col_png-sampler**", ended up at ID "**table_Col_png**".
A quick look at your .dae
file in a text editor refers to this:
<diffuse>
<texture texture="table_Col_png-sampler" texcoord="UVMap.001"/>
</diffuse>
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 assimp
) is not so forgiving :-(
I have attached a sample SceneKit project for this asset
TableSceneKit.zip. Check out this screenshot.
Please try with a new export with the dae file and all textures in place, if you still need to use AssimpKit
.
Hope this helps. Thanks :-)
from assimpkit.
@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 ?
from assimpkit.
@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 .dae
file.
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.
from assimpkit.
Related Issues (20)
- AssimpKit can not display all the animations of the FBX model HOT 10
- duration, this property does not take effect
- removeAnimationSceneForKey, this method does not take effect
- Swift Example similar to ObjC HOT 3
- How can I apply scaling, translation and rotation for a model HOT 1
- Problem with import of a dxf file HOT 1
- The problem with the import of external textures for the 3ds model HOT 1
- [UIView setScene:]: unrecognized selector sent to instance 0x101906830 HOT 4
- [SCNScene assimpSceneWithURL: unrecognized selector sent to class
- Scene importing failed for filePath DAE
- Xcode project won't build RE: ld: library not found for -lassimp-fat HOT 2
- .fbx model might loss textures
- Xcode run crash. HOT 1
- App size increase about 16M HOT 1
- Loading fail .ply file for point cloud. HOT 2
- Add support for Swift Package Manager HOT 2
- carthage update --platform iOS --use-xcframeworks Task failed with exit code 65: HOT 1
- Does the framework intend to continue to be updated? HOT 4
- VisionOS support
- Texture issue in FBX file HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assimpkit.