Giter VIP home page Giter VIP logo

Comments (7)

jdduke avatar jdduke commented on May 16, 2024

aiScene::HasTextures() refers to embedded textures. Check the scene materials (aiMaterial::GetTexture(...) & aiMaterial::GetTextureCount(...)) for externally references textures.

from assimp.

danielesegato avatar danielesegato commented on May 16, 2024

@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.

acgessler avatar acgessler commented on May 16, 2024

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.

danielesegato avatar danielesegato commented on May 16, 2024

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.

acgessler avatar acgessler commented on May 16, 2024

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.

danielesegato avatar danielesegato commented on May 16, 2024

@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.

danielesegato avatar danielesegato commented on May 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.