SamplePbs_Materials failure (no codec for tga)

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
bayoubengal
Halfling
Posts: 48
Joined: Wed Sep 05, 2018 3:18 pm

SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal »

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?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: SamplePbs_Materials failure (no codec for tga)

Post by dark_sylinc »

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.
bayoubengal
Halfling
Posts: 48
Joined: Wed Sep 05, 2018 3:18 pm

Re: SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal »

OGRE_CONFIG_ENABLE_FREEIMAGE does not appear in the cmake config window. in fact, nothing in the lists contains " FreeImage"
bayoubengal
Halfling
Posts: 48
Joined: Wed Sep 05, 2018 3:18 pm

Re: SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal »

I am seeing #define OGRE_NO_FREEIMAGE 1 in the header.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5296
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1278
Contact:

Re: SamplePbs_Materials failure (no codec for tga)

Post by dark_sylinc »

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
bayoubengal
Halfling
Posts: 48
Joined: Wed Sep 05, 2018 3:18 pm

Re: SamplePbs_Materials failure (no codec for tga)

Post by bayoubengal »

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