Comments (7)
aiScene::HasTextures() refers to embedded textures. Check the scene materials (aiMaterial::GetTexture(...) & aiMaterial::GetTextureCount(...)) for externally references textures.
from assimp.
@jdduke I see...
so I have to load the image Texture separately and match it with GetTexture() / GetTextureCount() data
I'll have to look into it :)
Off Topic: Do you have a mailing list or some other support channel to ask questions? Thanks
from assimp.
Yes - if there is embedded textures. they are referenced as *<someNumber>
paths from the texture entries in the material. If such an entry does not exist, though, there is also no texture loaded (maybe it is simply not implemented).
There is a mailing list, assimp-discussions - you can signup on our old SF.net page.
Bye Alex
from assimp.
I made it print something after loading the .dae file:
08-20 10:25:10.935: D/ASSIMP(14047): [assimp] open file: collada/m11_BBJ94_13WishesDollAsst.dae with pMode: rb
08-20 10:25:16.211: D/ASSIMP(14047): [assimp] Scene has been loaded
08-20 10:25:16.211: D/QCAR(14047): [assimp] scene has materials
08-20 10:25:16.211: D/QCAR(14047): [assimp] scene has meshes
08-20 10:25:16.211: D/QCAR(14047): [assimp] Scene with 0 animations, 0 cameras, 0 lights, 1 materials, 1 meshes, 0 textures
[assimp] scene has materials
and
[assimp] scene has meshes
are printed because HasMaterials() and HasMeshes() returned true
instead this:
[assimp] Scene with 0 animations, 0 cameras, 0 lights, 1 materials, 1 meshes, 0 textures
is printed by using mNum...Whatever... elements
from assimp.
Ah sorry, I was confused by the above comment on embedded textures. This texture is obviously not embedded, but given as an external reference. Get the material from the scene and get the AI_MATKEY_DIFFUSE_TEXTURE(0)
property on it (aiString
). This gives you the path!
Bye, Alex
from assimp.
@acgessler ah! thanks!
I was looking at the doc here: http://assimp.sourceforge.net/lib_html/structai_scene.html but couldn't find this reference.
I loaded it in a different way now but good to know! marked it for later use!
ps: I subscribed to the ml and asked my question, thanks!
from assimp.
I think this can be closed as it wasn't a bug at all :)
Just me don't understanding what HasTextures() was for
from assimp.
Related Issues (20)
- Bug: Imported DXF do not assign color to inserts HOT 2
- Bug: DXF conversion assigns incorrect colors HOT 2
- Bug: FBX Export requires writing each mesh to a separate node.
- Bug: broken fbx animation HOT 1
- Bug: loading a obj format model has crashed(mingw gcc) HOT 5
- Bug: loading a obj format model's faces data crashed(OpenGL) HOT 7
- Bug: Identity matrix check problem HOT 1
- Bug: FBX export Video does not export correct tags HOT 1
- Bug: FBX Export does not respect materials per face
- Help: Get dimensions of embedded texture. HOT 2
- FBX Imported animation applies action to all nodes HOT 5
- MacOS compilation error: error: unknown type name 'constexpr' constexpr ai_real ai_epsilon = (ai_real) 1e-6; HOT 1
- Bug: segmentation fault while removing redundant materials HOT 4
- License missing for pyassimp HOT 3
- Bug: Issue 64108 in oss-fuzz: assimp:assimp_fuzzer: Stack-overflow in Assimp::LWS::Element::Parse
- Bug: Cant rendering on DX11 HOT 4
- FBX Feature Flag for ignore start and stop time on import
- Bug: Issue 64586 in oss-fuzz: assimp:assimp_fuzzer: Integer-overflow in Assimp::FBXExporter::WriteObjects
- Bug: assimpd export GoldSrc MDL -> OBJ possibly changes model origin? HOT 2
- Bug: FBX Exporter axes do not respect metadata HOT 1
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 assimp.