Lightmapping - LightMapMaker/Irrlicht

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
MikeP
Posts: 25
Joined: Fri May 16, 2008 1:51 pm

Lightmapping - LightMapMaker/Irrlicht

Post by MikeP »

Ok, after my lame attempts at getting lightmaps with 3DS and my3D, I tried another thing that I found on this forum, LightMapMaker irrlicht plugin by dhenton@users.sourceforge.net.
It allows to export in *.irr in LightmapMaker. Then there's a loader the author provided with a nice working example compiled.
And AGAIN this is outdated and doesn't work with current Irrlicht.
When compiling his example code under C::B 8.02 I'm getting this :
D:\Game Studio\irrlicht-1.4\projects\LMM_test\LMMLoader.h||In constructor `irr::scene::CLMMLoader::Surface::Surface()':|
D:\Game Studio\irrlicht-1.4\projects\LMM_test\LMMLoader.h|99|warning: converting of negative value `-0x000000001' to `irr::u32'|
D:\Game Studio\irrlicht-1.4\projects\LMM_test\LMMLoader.h||In member function `void irr::scene::CLMMLoader::Surface::PrintOut()':|
D:\Game Studio\irrlicht-1.4\projects\LMM_test\LMMLoader.h|137|error: name lookup of `j' changed for new ISO `for' scoping|
D:\Game Studio\irrlicht-1.4\projects\LMM_test\LMMLoader.h|129|error: using obsolete binding at `j'|
D:\Game Studio\irrlicht-1.4\projects\LMM_test\itest.cpp||In function `int main(int, char**)':|
D:\Game Studio\irrlicht-1.4\projects\LMM_test\itest.cpp|73|error: cannot allocate an object of type `irr::scene::CLMMLoader'|
D:\Game Studio\irrlicht-1.4\projects\LMM_test\itest.cpp|73|error: because the following virtual functions are abstract:|
D:\Game Studio\irrlicht-1.4\include\IMeshLoader.h|34|error: virtual bool irr::scene::IMeshLoader::isALoadableFileExtension(const irr::c8*) const|
||=== Build finished: 5 errors, 1 warnings ===|
(there was also the famous error with the eventreceiver but since I've seen it 100 times already I corrected it)

the obsolete binding was this :

Code: Select all

				for (j=0;j<verts.size();j++)
				{
					printf("vert %d\n",j);
					verts[j].PrintOut();

				}
that I turned in this :
for (int j=0;j<verts.size();j++)
{
printf("vert %d\n",j);
verts[j].PrintOut();

}
but I have no clue about the other error, in LMMLoader.h it's this :

Code: Select all

class CLMMLoader : public IMeshLoader
	{
	public:

		//! constructor
		CLMMLoader(video::IVideoDriver* driver);

		//! destructor
		virtual ~CLMMLoader();

		//! returns true if the file maybe is able to be loaded by this class
		//! based on the file extension (e.g. ".cob")
		virtual bool isALoadableFileExtension(const c8* fileName);

		//! creates/loads an animated mesh from the file.
		//! \return Pointer to the created mesh. Returns 0 if loading failed.
		//! If you no longer need the mesh, you should call IAnimatedMesh::drop().
		//! See IUnknown::drop() for more information.
		virtual IAnimatedMesh* createMesh(irr::io::IReadFile* file);
and in Irrlicht's IMeshLoader.h this :

Code: Select all

class IMeshLoader : public virtual IReferenceCounted
{
public:

	//! destructor
	virtual ~IMeshLoader() {}

	//! Returns true if the file maybe is able to be loaded by this class.
	/** This decision should be based only on the file extension (e.g. ".cob") */
	virtual bool isALoadableFileExtension(const c8* fileName) const = 0;

	//! Creates/loads an animated mesh from the file.
	/** \return Pointer to the created mesh. Returns 0 if loading failed.
	If you no longer need the mesh, you should call IAnimatedMesh::drop().
	See IReferenceCounted::drop() for more information. */
	virtual IAnimatedMesh* createMesh(io::IReadFile* file) = 0;
};


} // end namespace scene
} // end namespace irr
and the call in the cpp is :

Code: Select all

scene::CLMMLoader* lLoader = new scene::CLMMLoader(driver);
what shall I do to make that loader work :?

Is anyone actually using Lightmapmaker with irrlicht or is everyone using Blitz3D :x ?
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Code: Select all

class CLMMLoader : public IMeshLoader
   {
   public:

      //! constructor
      CLMMLoader(video::IVideoDriver* driver);

      //! destructor
      virtual ~CLMMLoader();

      //! returns true if the file maybe is able to be loaded by this class
      //! based on the file extension (e.g. ".cob")
      virtual bool isALoadableFileExtension(const c8* fileName);

      //! creates/loads an animated mesh from the file.
      //! \return Pointer to the created mesh. Returns 0 if loading failed.
      //! If you no longer need the mesh, you should call IAnimatedMesh::drop().
      //! See IUnknown::drop() for more information.
      virtual IAnimatedMesh* createMesh(irr::io::IReadFile* file); 
to

Code: Select all

class CLMMLoader : public IMeshLoader
   {
   public:

      //! constructor
      CLMMLoader(video::IVideoDriver* driver);

      //! destructor
      virtual ~CLMMLoader();

      //! returns true if the file maybe is able to be loaded by this class
      //! based on the file extension (e.g. ".cob")
      virtual bool isALoadableFileExtension(const c8* fileName) const;

      //! creates/loads an animated mesh from the file.
      //! \return Pointer to the created mesh. Returns 0 if loading failed.
      //! If you no longer need the mesh, you should call IAnimatedMesh::drop().
      //! See IUnknown::drop() for more information.
      virtual IAnimatedMesh* createMesh(irr::io::IReadFile* file); 

You forgot the const after isALoadableFileExtension(const c8* fileName);


For the record, switching to Ogre will just make things more difficult on you if you're missing things like that. ;)
MikeP
Posts: 25
Joined: Fri May 16, 2008 1:51 pm

Post by MikeP »

monkeycracks wrote: For the record, switching to Ogre will just make things more difficult on you if you're missing things like that. ;)
That's what I'm doing sorry :/

It's driving me crazy not having up to date tutorials and examples and having to debug old crap just to fit the 1.4 before I can even get how this or that features works is a pain in the ass I don't wanna face anymore.
And seeing how big is the content made for, with and towards Ogre, fresh one, will definitely make things easier. Just compare the Wikis :shock:
Same for the forums.. the max number logged was 272 in Feb.2007 here. Since i'm there I never saw more than 8-10 registered user at a time. bigger community makes it easier to get help too.

cya
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Well, good thing. Chances are you'll need a lot of help. I had a harder time getting Ogre set up than Irrlicht.

Actually, I've never been able to get Ogre set up.

Mostly laziness and refusal to download a billion things from a billion sites to get it to work with C::B or something like that.
Post Reply