[SOLVED] Assimp mesh loader can not apply materials

Problems building or running the engine, queries about how to use features etc.
Post Reply
HarlockOne
Gnoblar
Posts: 10
Joined: Tue May 04, 2021 4:21 pm
x 1

[SOLVED] Assimp mesh loader can not apply materials

Post by HarlockOne »

Hi All,
During the last few days I have recompiled ogre3d (version 1.12.11) to let it use the assimp library and then generate the Codec_Assimp plugin.
The main goal was to understand if it is duable to go with fbx, collada and blender models/meshes by letting the AssimpMeshLoader do its job.
Not less important was to understand if models taken from the Unity asset store could be easily loaded in an Ogre 3d scene.
The result unfortunately seems to be not so much promising.
The models that I have used are not coming from the asset store (as they are not for free) - before paying for one of those packages I ve choosen to give a try to few ones coming from the free3d website.
Only half of them are being rendered and all of them have issues with materials.
Please note that the AssimpMeshLoader I am using is the last one patched with the 'resource group' addition.
This is the Assimp loader console output:


Ogre Version: :1.12.11:
Operating System: :win32:
Render System: :OpenGL:

Code: Select all

Error, T2912: FBX: no material assigned to mesh, setting default material
Ogre: Assimp: Error, T2912: FBX: no material assigned to mesh, setting default material
Info,  T2912: FBX: generating full transformation chain for node: Object061
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Object061
Error, T2912: FBX: no material assigned to mesh, setting default material
Ogre: Assimp: Error, T2912: FBX: no material assigned to mesh, setting default material
Info,  T2912: FBX: generating full transformation chain for node: Object081
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Object081
Error, T2912: FBX: no material assigned to mesh, setting default material
Ogre: Assimp: Error, T2912: FBX: no material assigned to mesh, setting default material
Info,  T2912: FBX: generating full transformation chain for node: Object065
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Object065
Error, T2912: FBX: no material assigned to mesh, setting default material
Ogre: Assimp: Error, T2912: FBX: no material assigned to mesh, setting default material
Info,  T2912: FBX: generating full transformation chain for node: Plane014
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Plane014
Error, T2912: FBX: no material assigned to mesh, setting default material
Ogre: Assimp: Error, T2912: FBX: no material assigned to mesh, setting default material
Info,  T2912: FBX: generating full transformation chain for node: Object058
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Object058
Error, T2912: FBX: no material assigned to mesh, setting default material
Ogre: Assimp: Error, T2912: FBX: no material assigned to mesh, setting default material
Info,  T2912: FBX: generating full transformation chain for node: Object088
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Object088
Info,  T2912: FBX: generating full transformation chain for node: Object059
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Object059
Error, T2912: FBX: no material assigned to mesh, setting default material
Ogre: Assimp: Error, T2912: FBX: no material assigned to mesh, setting default material
Skipping one or more lines with the same contents
Ogre: Assimp: Skipping one or more lines with the same contents
Info,  T2912: FBX: generating full transformation chain for node: Base HumanLPlatform
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Base HumanLPlatform
Info,  T2912: FBX: generating full transformation chain for node: Base HumanRPlatform
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Base HumanRPlatform
Info,  T2912: FBX: generating full transformation chain for node: VRayStereoscopic001
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: VRayStereoscopic001
Info,  T2912: FBX: generating full transformation chain for node: Camera001
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Camera001
Info,  T2912: FBX: ignoring property link - no docs on why this is ignored
Ogre: Assimp: Info,  T2912: FBX: ignoring property link - no docs on why this is ignored
Info,  T2912: FBX: generating full transformation chain for node: Camera001.Target
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Camera001.Target
Info,  T2912: FBX: generating full transformation chain for node: Plane017
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Plane017
Info,  T2912: FBX: generating full transformation chain for node: Plane018
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Plane018
Info,  T2912: FBX: generating full transformation chain for node: Plane019
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Plane019
Assimp: Info,  T2912: FBX: generating full transformation chain for node: Plane020
Assimp: Info,  T2912: FBX: generating full transformation chain for node: Camera002
Assimp: Info,  T2912: FBX: ignoring property link - no docs on why this is ignored
Assimp: Info,  T2912: FBX: generating full transformation chain for node: Camera002.Target
Info,  T2912: FBX: generating full transformation chain for node: Plane020
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Plane020
Info,  T2912: FBX: generating full transformation chain for node: Camera002
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Camera002
Info,  T2912: FBX: ignoring property link - no docs on why this is ignored
Ogre: Assimp: Info,  T2912: FBX: ignoring property link - no docs on why this is ignored
Info,  T2912: FBX: generating full transformation chain for node: Camera002.Target
Ogre: Assimp: Info,  T2912: FBX: generating full transformation chain for node: Camera002.Target
Info,  T2912: Entering post processing pipeline
Ogre: Assimp: Info,  T2912: Entering post processing pipeline

Assimp: Info,  T2912: Entering post processing pipeline
Info,  T2912: RemoveRedundantMatsProcess finished. Removed 3 redundant and 0 unused materials.
Ogre: Assimp: Info,  T2912: RemoveRedundantMatsProcess finished. Removed 3 redundant and 0 unused materials.
Assimp: Info,  T2912: RemoveRedundantMatsProcess finished. Removed 3 redundant and 0 unused materials.
Error, T2912: Failed to triangulate polygon (no ear found). Probably not a simple polygon?
Ogre: Assimp: Error, T2912: Failed to triangulate polygon (no ear found). Probably not a simple polygon?

Assimp: Error, T2912: Failed to triangulate polygon (no ear found). Probably not a simple polygon?
Skipping one or more lines with the same contents
Ogre: 
Assimp: Skipping one or more lines with the same contents
Assimp: Skipping one or more lines with the same contents
Info,  T2912: TriangulateProcess finished. All polygons have been triangulated.
Ogre: Assimp: Info,  T2912: TriangulateProcess finished. All polygons have been triangulated.

Assimp: Info,  T2912: TriangulateProcess finished. All polygons have been triangulated.
Warn,  T2912: Found 288 degenerated primitives
Ogre: Assimp: Warn,  T2912: Found 288 degenerated primitives
Assimp: Warn,  T2912: Found 288 degenerated primitives
Skipping one or more lines with the same contents
Ogre: Assimp: Skipping one or more lines with the same contents
Is anyone using fbx, collada or blender meshes with the respective materials and animations out of the box in Ogre or this is a procedure that does not work without some tuning and corrections?
Many thanks!
Attachments
fbx_error_3.png
fbx_error_2.png
Last edited by HarlockOne on Wed May 05, 2021 10:17 pm, edited 1 time in total.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1993
Joined: Sun Mar 30, 2014 2:51 pm
x 1073
Contact:

Re: Assimp mesh loader can not apply materials

Post by paroj »

we are merely forwarding these errors from the assimp library:
https://github.com/assimp/assimp

maybe you could update your assimp version or ask there directly.

Anyway, unless you want to write a mesh viewer, I would recommend converting your assets to the native ogre .mesh format, as it is faster to load.

You can use blender2ogre for that. While at it, you can also inspect/ modify the files in blender.
HarlockOne
Gnoblar
Posts: 10
Joined: Tue May 04, 2021 4:21 pm
x 1

Re: Assimp mesh loader can not apply materials

Post by HarlockOne »

Hi paroj,
Thanks.
My first try was by using the blender2ogre python plugin but using that I get some artifacts too and most of the time it does not work.
It was only after that I ve given a chance to the assimp codec/plugin hoping for a good result.
I have compiled the assimp library from scratch yesterday and after that I immediately rebuilt ogre to have the assimp codec in place.
To be honest looking at the final results for me it is better to go with the assimp codec instead of the blender2ogre...but maybe it could be me to do something wrong with the blender plugin...are there some python version restrictions?
HarlockOne
Gnoblar
Posts: 10
Joined: Tue May 04, 2021 4:21 pm
x 1

Re: Assimp mesh loader can not apply materials

Post by HarlockOne »

Coming back with some good news :)
Both the Assimp Codec and the python blender2ogre plugin work.
I was using bad meshes which were compliant for "static rendering" only...just picked up few from the mixamo web site and that did the magic.
Thanks.
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 155

Re: [SOLVED] Assimp mesh loader can not apply materials

Post by sercero »

Hello HarlockOne,

What problems are you facing with the blender2ogre plugin?
HarlockOne
Gnoblar
Posts: 10
Joined: Tue May 04, 2021 4:21 pm
x 1

Re: [SOLVED] Assimp mesh loader can not apply materials

Post by HarlockOne »

Hi,
Everything is ok with the blender2ogre pyhton plugin, thanks!
It was me to let it run with models that were not created for real-time rendering/ 3d engines.
I ve just picked up few from the mixamo website and that did the trick.
Thanks again.
Post Reply