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
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

Just export the lightmap (using the bake function) after applying a 50% grey color to the object you want to bake ... Then "undo" the changes and use the generated lightmap image ...

Guy.
User avatar
DieHard
Halfling
Posts: 57
Joined: Fri Apr 01, 2005 1:18 am
Contact:

Post by DieHard »

Kewl. Works good so far. I used "multiply" to blend both shadow and the texture.

I've been playing around what you think about using "solid white lambert" rather than 50% grey?

FYI:
I already started writing a step-by-step tutorial on baking last weekend. I'll get it done soon.
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

I've been playing around what you think about using "solid white lambert" rather than 50% grey?
The choice of which type of shader (lambert, blinn, phong) and the color to use is yours, depending of what type of object you are baking (a shiny car or a stone ?) and how you're planning to use the lighmap.
I proposed grey as it means the lighmap will not only give you the "white= 100% lighted" information but also the placement of specular highlights (grey=100 % lighted, white=hotspots) when using shiny material.

Of course in case of "multiply" blending, you are back on the discussion on how to use the image not only as a light map (which, as you pointed out, is use to blend texture and shadows) but also to recreate these specular hotspots ...

Time for a proper heuristic approach (which means "trial and errors" :) )

Looking forward for your tutorial ...
Guy.
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

I've been playing around what you think about using "solid white lambert" rather than 50% grey?
The choice of which type of shader (lambert, blinn, phong) and the color to use is yours, depending of what type of object you are baking (a shiny car or a stone ?) and how you're planning to use the lighmap.
I proposed grey as it means the lighmap will not only give you the "white= 100% lighted" information but also the placement of specular highlights (grey=100 % lighted, white=hotspots) when using shiny material.

Of course in case of "multiply" blending, you are back on the discussion on how to use the image not only as a light map (which, as you pointed out, is use to blend texture and shadows) but also to recreate these specular hotspots ...

Time for a proper heuristic approach (which means "trial and errors" :) )

Looking forward for your tutorial ...
Guy.
eternalSage
Gnoblar
Posts: 24
Joined: Wed Oct 11, 2006 5:19 pm
Location: Johnson City, TN, USA

Post by eternalSage »

I've been having some major difficulties in using the exporter, altough I think they stem more from my own geometry screw ups, but I'm not sure. This is what is happening:

I have a group of objects, 3 unique, one which is copied 9 times, for a total of 12 objects. 2 of the unique objects are able to be tagged for export, while the 3rd unique object and all the objects that were copied from it give me the following error when I select them.

//
Error: the exporter UI can't properly handle this object, try deleting its history.
//

Which is a pain, because I have deleted history (it was already deleted to begin with). But my question, I suppose, is what causes this error, because I don't know what is wrong with my geometry.

To give an example, the geometry in question has many faces extruded in.

Thanks for any help anyone can give.

+++++++++++++++++++++++++++++++++++++++

Edit: I fixed what was wrong by simply letting Maya opimize the scene, altough I still don't know what was wrong with it to begin with, and I'm reluctant to allow Maya to do this often, as In my expirience it ruins files more than fixes them.
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

my hunch is that the object had multiple shape nodes, lots of unusual geometry edits/undoing sometimes adds this. the following page details how to diagnose and fix this:

www.lfagames.com/help.htm
eternalSage
Gnoblar
Posts: 24
Joined: Wed Oct 11, 2006 5:19 pm
Location: Johnson City, TN, USA

Post by eternalSage »

This makes sense. Thank you, both for the awesome tool, and the help.
psquare
Hobgoblin
Posts: 554
Joined: Tue Nov 14, 2006 3:26 pm
x 7

Post by psquare »

I am using metaldev's tool to export to .scene format, I had a few newbie questions that relate both to Maya and the plugin ( I am not an artist, so bear with me)

I am still unclear about how I could use Locators, Custom attributes (and/or anything else) to :

1. An artist should be able to define points on a model with certain properties. e.g Define 4 thruster points on a spaceship (for 4 thrusters). Each thruster would have properties, such as forward thrust, reverse thrust, thrust power. etc.

I could use the locator to define such a point. But how do I assign arbitrary properties (custom attributes in Maya) and have these properties exported? Also the .scene definition seems inadequate in this regard.

2. Assign properties to faces as well. Certain interior walls of an arena have bounce collision. So properties would include collidable or not, and potentially the collision properties (spring factor, etc.)

Currently, I foresee having to create dummy locators pointing to dummy plane meshes which are not visible but only their properties used to do the collision detection as one possible solution.

3. The model itself may have properties. For example, mass

My understanding is that without using custom nodes for the .scene format
& changing the loader/using another standalone parser (tinyXML e.g.)

+ tweaking around with your script to export locator's attributes this is not possible. Correct me if I am wrong.
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

1. An artist should be able to define points on a model with certain properties. e.g Define 4 thruster points on a spaceship (for 4 thrusters). Each thruster would have properties, such as forward thrust, reverse thrust, thrust power. etc.
parent the locator to the model and set the locator as a particle system. use the ID and subID string tags on the locator... yes this is limited and would be somewhat hackish but its the existing functionality in the tools. Its the only annotations that were allowed in the official dts for the .scene definition depending to what you define the locator to be. But since its a string you could put whatever you want in those tags, inluding putting several attributes into a single ID.
2. Assign properties to faces as well. Certain interior walls of an arena have bounce collision. So properties would include collidable or not, and potentially the collision properties (spring factor, etc.)
assigning properties to faces i dont think is a practical thing you can do through .scene, maybe possible, but i would investigate a way to do this through materials.
3. The model itself may have properties. For example, mass
again use ID and subID properties on the mesh.
psquare
Hobgoblin
Posts: 554
Joined: Tue Nov 14, 2006 3:26 pm
x 7

Material prefix problem

Post by psquare »

Thanks for your reply. Now I have another problem.
Since material scripts need to be unique, I changed the LFA scene manager to account for this in line 1102, by passing on the material prefix to the ogre exporter.

string $options = " -sel -world -lu pref -mat \"" + encodeString(toNativePath($outputDir+$materialFile)) + "\"" + "-matPrefix " + $nameOfScene;

However, debugging into the code, I see that the mesh file references a material without the prefix appended. Hence the object is rendered without any material. My understanding is that the problem is in the ogre exporter mel script. Or it could be that I have to modify some more code in the LFA mel script.

Could you please help me on how to fix this problem?

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

Post by metaldev »

usually i modify materials that are exported rather than try to point the model at a pre-existing material.
you can turn off material exporting via the LFA tools to prevent material changes being overwritten. As long as the material name is the same on the file than in maya it should hook up.

Also, there is a long term plan though to have a more robust material handling for the exporters.
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

w00t :!:
finally! new version 2.0 available ^_^

loads of changes and improvements. i recommend to delete your old version before installing this one.

now runs by simply typing:
lfa;

grab it --->HERE<---

get more help on it here --->HERE<---

updates include:
  • - added a robust and easy to use material managing system... its even easy to share your materials with others! hopefully now artists will not have to be mucking with text files all the time! this took a while but i think its worth it... it dynamically creates interfaces for your material based on chosen presets. very easy to add your own material presets and link their properties with the actual maya materials to view as close as possible in maya what you are exporting. and finally... no more worrying about duplicate materials being exported.

    - added easy to use custom scripts menus and buttons (this completely replaces LFA_customScripts.mel) now simply drop your .mel files into directories and they are dynamically loaded into the menu's and buttons

    - exposed all default variables for easy access inside lfa_settings.mel

    - massive architecture change to later allow addons such as a per-object animation settings system later on

    - numerous bug fixes and improvements

    - loads of new tools that are documented in the help. (too many to list here)

there were a lot of changes so let me know if anyone finds bugs.
also i could use some help with a normal map + specular mask material definition preset
(or any new handy presets that people make would be cool to check out)

enjoy!! ^_^
User avatar
hakanpersson
Gnoblar
Posts: 8
Joined: Tue Jan 23, 2007 9:37 am
Location: Sweden
Contact:

Post by hakanpersson »

metaldev wrote:finally! new version 2.0 available ^_^
Thanks Metaldev. Really nice work you have done there!

I have a question. Not sure if those are bugs. (if i have missed them in the thread im sorry).

When trying to export multiple objects(or one), the object gets duplicated and and only the object furtherst down in the outliner/selection gets exported.
I have ran the scriptlistener, but I cant find when that happens.
At this moment that makes the exporter very difficult to use as our level may include about 500 objects:)

Im usin lfa2.0. On maya 7.0. Maybe I need an older version of maya the get it working?

/Håkan
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

im not sure if i understand the question exactly.

but if i am not mistaken you are only giving export parameters to the lowest object in a heirarchy. if you want all objects in a heirarchy to export each has to have its own parameters, or at least the top most object must have parameters (if you want them to export as a single mesh using shared geometry).


a quick way to do this if you have 500 objects is to select them all,
run 'params > multiple make exportable'

then 'run entity names > reset all entity names'.

btw your maya version and scene manager version should work fine.
User avatar
hakanpersson
Gnoblar
Posts: 8
Joined: Tue Jan 23, 2007 9:37 am
Location: Sweden
Contact:

Post by hakanpersson »

metaldev wrote:btw your maya version and scene manager version should work fine.
The fault was on my side. My maya 7 ogre exporter was version 1.2.1. Upgrading to latest (1.2.5) fixed it. Now its working elegant!

Thanks again Metaldev :)
User avatar
hubbel
Gnoblar
Posts: 6
Joined: Mon Jan 08, 2007 4:28 pm
Location: Germany

Get this working with Maya 8.0?

Post by hubbel »

Hi there,

does anyone know hot to make the current version work with Maya 8.0?

Greetings
User avatar
spooky_paul
Halfling
Posts: 61
Joined: Fri Oct 20, 2006 6:09 am
Location: Romania
Contact:

Post by spooky_paul »

it did work for me. what is the specific problem u`ve encountered? have followed closely the install instructions?
User avatar
hubbel
Gnoblar
Posts: 6
Joined: Mon Jan 08, 2007 4:28 pm
Location: Germany

Post by hubbel »

The previous version worked for me as well, but the current one comes with a plugin (.mll) binary. This binary seems to be compiled for Maya 7.0. When I try to load this plugin, Maya 8.0 complains about unmatching versions.


Another issue concerning the previous version (which works with Maya 8.0): When exporting a scene I often get the message "Translating scene to Ogre format" and then the script hangs. I figure that this may have something to do with scene nodes that have colons in their names, but I am not sure. Nodes with colons seem to be automatically generated by Maya 8. (e.g. Object_Node:Sub_Node:polySurface80.mesh).
User avatar
hakanpersson
Gnoblar
Posts: 8
Joined: Tue Jan 23, 2007 9:37 am
Location: Sweden
Contact:

Post by hakanpersson »

Error: Plug-in, "melfunctions" was compiled against too old a version of the Maya API and is thus incompatible with the current Maya version. (melfunctions)

Is the message i get when i try to activate melfunctions in the pluginmanager. Im using lfa 2.0 and ogreexport 1.2.5 (currectly latest).

edit: forgot to mention that way maya 8.0. Works perfect on 7.0. But ofc it would be nice to get it working on 8 aswell:)
WildFire
Gnoblar
Posts: 14
Joined: Sat Oct 21, 2006 2:16 pm

Post by WildFire »

Hi metaldev,

This updated exporter is great news - I use the old version a lot, however, I am having some problems. I removed the old version and have extracted the contents of the zip to the stated directory (mydocs\maya\8.0\scripts) but when I type lfa; in Maya it says it cannot find the procedure. I have added "source lfa_sceneManager.mel;" to my userScripts.mel file in that directory but it doesn't seem to have made any difference.

Does it not work with Maya 8? Should I be putting the .mll file in Maya plugins and loading it? (Instructions don't say to do this - but it doesn't work because it is for an old Maya version)

Does this mean the new version will be unusable on Maya 8 ? :(

Thank you in advance
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

ah guys im sorry about this, ill get separate versions uploaded as soon as i can so that both 7.0 and 8.0 users can use the scripts with no problems.
WildFire wrote:Hi metaldev,
but when I type lfa; in Maya it says it cannot find the procedure.
the reason "lfa;" doesnt work on the older version is because it has since been simplified... the old way is runExporterLFA;
(also with the new version you dont need to modify your userSetup.mel)

fixes coming soon guys.
WildFire
Gnoblar
Posts: 14
Joined: Sat Oct 21, 2006 2:16 pm

Post by WildFire »

Yeah I used to use 'runExporterLFA' with the old version - my saying 'lfa' is not working was with the new one. Perhaps that's just because it doesn't work with Maya 8 though :) Thanks for confirming I don't need to edit userSetup.mel also.

Fix for Maya 8 would be great - thanks!
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

alright guys!

update to 2.1 :)

>>HERE<<

for more info: HERE


i ported the needed functions in the plugin to mel, so now it should once again be maya version independent (altho was not able to test on 8.0 it should work).

Also i added a new tool called pivot matcher that matches transforms from all selected objects to the last selected object. I use it very often.


(if you choose you can delete now the melfunctions.mll, the new version omits and ignores it anyway.)


let me know of any bugs.

enjoy.
Last edited by metaldev on Sat Feb 03, 2007 7:59 pm, edited 1 time in total.
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

hubbel wrote: Another issue concerning the previous version (which works with Maya 8.0): When exporting a scene I often get the message "Translating scene to Ogre format" and then the script hangs. I figure that this may have something to do with scene nodes that have colons in their names, but I am not sure. Nodes with colons seem to be automatically generated by Maya 8. (e.g. Object_Node:Sub_Node:polySurface80.mesh).
it probably is that... the colon is an illegal character in a file name.. so the script is probably choking on that as it tries to name your mesh file the same as the object name. I will look into putting a safety for this.
WildFire
Gnoblar
Posts: 14
Joined: Sat Oct 21, 2006 2:16 pm

Post by WildFire »

That's working great now - thanks metaldev. Incidentally I am using it on the new Maya 8.5
Post Reply