The LFA Scene Manager for MAYA

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
Grognard
Kobold
Posts: 31
Joined: Fri May 03, 2013 2:40 am

Re: The LFA Scene Manager for MAYA

Post by Grognard »

Yeah I watched it, I just missed it somehow. Thanks for all your hard work, very nice tool.

Jedzia
Gnoblar
Posts: 2
Joined: Wed Oct 23, 2013 12:30 pm
x 2

The LFA Scene Manager, Ogre 1.9 and MAYA 2014

Post by Jedzia »

First things first: I just wanted a running LFA Scene Manager with Maya 2014, so i needed the regular Ogre exporter for Maya (Tools/MayaExport):

From http://www.lfa.com/help.php#install
[IMPORTANT: Before installing/using the scene manager, be sure to have the regular Ogre exporter for Maya installed as the scene manager relies on it to work properly.]

Like always, compiling from Ogre 1.9 branch against the Maya SDK doesn't work out of the box. After taking this hurdle, as a reward, Maya crashed:P
So i debugged a little and found the point where things get messed up. No LodStrategyManager was instantiated when running the plug-in and i fixed that by

Code: Select all

	if (Ogre::LodStrategyManager::getSingletonPtr() == 0)
	{
		Ogre::LodStrategyManager *mngr = new Ogre::LodStrategyManager();
	}
,a dirty quick fix, instantiating the Singleton.

Another point are the

// Get optimal vertex declaration
Ogre::VertexDeclaration* pOptimalDecl = pDecl->getAutoOrganisedDeclaration(params.exportVBA,params.exportBlendShapes || params.exportVertAnims, false);


calls in Tools\MayaExport\src\mesh.cpp and Tools\MayaExport\src\submesh.cpp.

Code: Select all

VertexDeclaration* Ogre::VertexDeclaration::getAutoOrganisedDeclaration 	( 	bool  	skeletalAnimation,
		bool  	vertexAnimation,
		bool  	vertexAnimationNormals 
	) 		const

Generates a new VertexDeclaration for optimal usage based on the current vertex declaration, which can be used with VertexData::reorganiseBuffers later if you wish, or simply used as a template.

Remarks:
    Different buffer organisations and buffer usages will be returned depending on the parameters passed to this method. 

Parameters:
    skeletalAnimation	Whether this vertex data is going to be skeletally animated
    vertexAnimation	Whether this vertex data is going to be vertex animated
    vertexAnimationNormals	Whether vertex data animation is going to include normals animation 
The old code for the exporter has no option to export vertex data normals animation, so i set that hardcoded to false. As this should be only a quix fix and no rewrite of the exporter, someone with deeper knowledge of the Ogre internals should take a look into when and where to dispose the LodStrategyManager and how the vertex data normals animation exporter setup is done.

I included the patch, sources and debug/release ogreExporter.mll, static linked against a 1.9.0 repository build of the OgreSDK rev5125.
I you want to compile the code yourself, set up the "Additional Include Directories", "Additional Library Directories" in the C/C++ Options and "Additional Dependencies" in the Linker Tab. They should point to your locations of the OgreSDK, Maya SDK, boost, etc. Maybe someone in the future has mercy and integrates that into the CMake build system.

Oh and if someone want that stuff:
http://www.mediafire.com/download/s572d ... 64-vc10.7z

Jedzia

User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 12
Contact:

Re: The LFA Scene Manager for MAYA

Post by metaldev »

thank you for doing this.

Grognard
Kobold
Posts: 31
Joined: Fri May 03, 2013 2:40 am

Re: The LFA Scene Manager for MAYA

Post by Grognard »

I have a little question. I have all my animation files in separate files from the geometry it's attached to. It's just got the skeleton attached to it. This is because I use the same animations for multiple characters.

So it seems like there's no way to export the skeleton and then give that to the mesh separately, without having it in the same file...is there a way to do that?

User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 12
Contact:

Re: The LFA Scene Manager for MAYA

Post by metaldev »

Grognard wrote:I have a little question. I have all my animation files in separate files from the geometry it's attached to. It's just got the skeleton attached to it. This is because I use the same animations for multiple characters.

So it seems like there's no way to export the skeleton and then give that to the mesh separately, without having it in the same file...is there a way to do that?
My advice in this case would be to combine them with MEL, and add the appropriate parameters back with MEL and then calling the actual export with MEL. (It's trivial to pass around the LFA settings with mel.)

Unless it is like 2 or 3 characters we are talking about, I think you will make a mess of your pipeline if you don't automate it.
Not sure if this is very related to the LFA scene manager, though.

Grognard
Kobold
Posts: 31
Joined: Fri May 03, 2013 2:40 am

Re: The LFA Scene Manager for MAYA

Post by Grognard »

Ok, thank you for the advice, I was starting to think I was out of luck. Having everything in the same file is not very workable. Hopefully I can actually do this....

Post Reply