SamplePbs_Materials failure (no codec for tga)

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
Post Reply
bayoubengal
Gnoblar
Posts: 10
Joined: Wed Sep 05, 2018 3:18 pm

SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal » Mon Sep 10, 2018 5:35 pm

I"m attempting to run SamplePbs_Materials and I'm seeing an exception occur because there is no .tga codec in msMapCodecs when it tries to process "Rocks_Diffuse.tga".

I don't see in the code what is responsible for setting up the codecs for such common graphics formats. Could i get some guidance on what is missing?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3776
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 134
Contact:

Re: SamplePbs_Materials failure (no codec for tga)

Post by dark_sylinc » Mon Sep 10, 2018 5:48 pm

Hi!

It would seem that Ogre was built without FreeImage codec nor the STBI codec.
Check in CMake that OGRE_CONFIG_ENABLE_FREEIMAGE is enabled.
If it doesn't even appear, then probably CMake failed to find the CMake library (FreeImage_INCLUDE_DIR, FreeImage_LIBRARY_DBG, and/or FreeImage_LIBRARY_REL are not set).

See Setting Up Ogre to properly setup the Dependencies from Ogredeps.

Cheers.
0 x

bayoubengal
Gnoblar
Posts: 10
Joined: Wed Sep 05, 2018 3:18 pm

Re: SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal » Mon Sep 10, 2018 5:52 pm

OGRE_CONFIG_ENABLE_FREEIMAGE does not appear in the cmake config window. in fact, nothing in the lists contains " FreeImage"
0 x

bayoubengal
Gnoblar
Posts: 10
Joined: Wed Sep 05, 2018 3:18 pm

Re: SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal » Mon Sep 10, 2018 5:54 pm

I am seeing #define OGRE_NO_FREEIMAGE 1 in the header.
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3776
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 134
Contact:

Re: SamplePbs_Materials failure (no codec for tga)

Post by dark_sylinc » Mon Sep 10, 2018 6:09 pm

Then see how to setup the dependencies.

Important Note: The instructions indicate to clone ogredeps into OgreRoot/Dependencies. However this causes trouble in some machines! The online instructions need to be updated.
Clone ogredeps somewhere else (e.g C:\MyOgreDeps) and the result of its build (i.e. C:\MyOgreDeps\build) just copy it into OgreRoot\Dependencies.

If properly setup, after doing the procedure, the following files should exists:
  • OgreRoot/Dependencies/include/FreeImage.h
  • OgreRoot/Dependencies/lib/libFreeImage.a (Linux)
  • OgreRoot/Dependencies/lib/Debug/FreeImage_d.lib (Windows)
  • OgreRoot/Dependencies/lib/Release/FreeImage.lib (Windows)
OgreRoot is wherever you cloned Ogre.

Cheers
Matias
0 x

bayoubengal
Gnoblar
Posts: 10
Joined: Wed Sep 05, 2018 3:18 pm

Re: SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal » Mon Sep 10, 2018 6:16 pm

thanks. I'll figure it out now that I have a clue what is happening
0 x

Post Reply