The LFA Scene Manager for MAYA

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.

Postby metaldev » Sun Feb 11, 2007 8:11 pm

ok new update available! :)

update to 2.2 >>HERE<<

for more info: HERE


FIXES:
- optimized the material handling scripts that were hanging people on export of certain scenes.

- added a preference to not auto-export scene materials, this may be helpful for users with very complex scenes to export geometry quicker.

thanks to hubble and wildfire for pointing me to the hanging issue!
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby hubbel » Fri Feb 16, 2007 10:50 pm

Thanks metaldev!

Unfortunately I won't get around to testing it until next week, but I guess your work is as great as always!
User avatar
hubbel
Gnoblar
 
Posts: 6
Kudos: 0
Joined: 08 Jan 2007
Location: Germany

Postby DieHard » Sat Feb 17, 2007 1:29 pm

I'm going to install Maya 8.5 soon and run both your "LFA_sceneManager" and "Maya Exporter 1.2.5 for Maya 8.5".

I hope it works.

By the way, my old post about baking shadows (lightmapping) had reached conclusion, I think for now I'll have to use gile[s] tool for shadow baking onto textures:
http://www.frecle.net/giles/
User avatar
DieHard
Halfling
 
Posts: 57
Kudos: 0
Joined: 01 Apr 2005

Postby JeDi » Thu Mar 08, 2007 3:25 pm

Hi,

I used the latest exporter for one of our scenes. It works great, but I have some comments/questions:

- I tried adding an ambient light, but it doesn't get exported, although it is marked as exportable. There is a node for it in the .scene, but no light itself. Directional, point and spot lights do work.

- The textures aren't copied to the export directory. I know there is a new tool for textures, but it seems more complex that what most want. The .material file is exported correctly, I just want the texture files in the export directory.

For the rest, great exporter! Good job!

Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Postby metaldev » Thu Mar 08, 2007 5:22 pm

- The textures aren't copied to the export directory. I know there is a new tool for textures, but it seems more complex that what most want. The .material file is exported correctly, I just want the texture files in the export directory.


you will want to use File Texture Manager to copy your texture files there. i removed an old function i had to copy them there because it was made obsolete by FTM but i could add it back for you if you want. Try FTM first and if you hate it let me know and i will add it back.

- I tried adding an ambient light, but it doesn't get exported, although it is marked as exportable. There is a node for it in the .scene, but no light itself. Directional, point and spot lights do work.


As far as teh ambient light. the only thing i can control is how it exports to the .scene. How it is read by your app i can't affect =/ ambience in .scene is controlled differently than regular lights... check these docs: www.lfagames.com/help.htm for more info on how ambient lights export
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby JeDi » Thu Mar 08, 2007 7:21 pm

Yeah, I read about the ambient lights just after I submitted the pos :oops:
I'll have a look at the TFM, it just looked a bit complex for my needs. I'm not at my machine with maya installed at the moment, but I think the path where the textures are copied isn't set to the export path of LFA by default. That would help. What I want is a button to press (in TFM) that copies all used textures to my export path. Maybe there already is such a button, I'll have a look...

One more thing: before exporting, we need to reset transforms. Does that have an influence on the maya scene itself? Cause otherwise, it would be nice to do that temporarily, so only for the export, so the modelers can keep working with their transforms. If you know what I mean :lol:

Thanks!
Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Postby metaldev » Thu Mar 08, 2007 9:15 pm

I'll have a look at the TFM, it just looked a bit complex for my needs. I'm not at my machine with maya installed at the moment, but I think the path where the textures are copied isn't set to the export path of LFA by default. That would help.


i agree with you, i will modify the FTM to favor the export directory.


One more thing: before exporting, we need to reset transforms. Does that have an influence on the maya scene itself? Cause otherwise, it would be nice to do that temporarily, so only for the export, so the modelers can keep working with their transforms.


Resetting tranforms does not modify the scene itself, it modifies the objects you run it on. When you move an object around in maya you are clicking on its rotation pivot to drag it along. If you hit insert and move a pivot, it changes the rotation pivot but not the actual origin of the model. The pivot that gets exported to ogre is its actual object origin as pivot so it may not behave as expected when in ogre. Resetting tranforms changes your actual object origin to match the rotation pivot. Automatically resetting transforms is not a good idea because it could mess up things that are instanced with bad tranforms, crash if you have locked or constrained any of the object's tranform attributes (or its parents) or also mess up transforms within a heirarchy or objects with bindings to skeletons. Lastly, someone may want their export pivot to differ from the pivot they use in maya to move it around. I like the way it is now because it is safe. The user chooses when to use it, and if it breaks the user will easily know on what object, not to mention that usually things dont need their transforms reset so having it automatic would needlessly slow down the exporter. What i am going to do in a future version though, is include a scene checking tool that will search your scene for possible problems for you including 'bad' transforms. So the user can decide what they want to do.
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby JeDi » Tue Mar 13, 2007 1:13 pm

Hi,

We are using this exporter at full speed now, and I have a couple of additional remarks:

- Our modeler put a camera in the scene, called persp1 (in the outliner, I actually don't have maya experience myself). When it was made exportable, and I tried to export the .scene file, I got an error: "Error: No object matches name: camera1". The error disappeared when I selected the camera and pressed "Delete" in the exporter dialog

- Having to press "Delete" for an object not exporting anymore isn't very intuitive I think (I for one had to look for it a while). Wouldn't it be better if the button was called "Don't export" or something?

- There is an error in the produced .scene file. It isn't valid XML, as there seems to be a bit of text lost. In the middle of the file, a part of a <node tag is cut off. In stead of the correct tag, there was only "0"> at the beginning of the line, so not correctly indented as the rest of the file. I changed the line to <node name="screen_01Node" id="0"> and it worked again.

Edit: Actually, the next times I pressed the "Export .scene file" button, the file was correct. It only seems to happen the first time you press the button...

Edit 2: Also, could the export dialog be made expandable in size? Cause when you are changing parameters, it's kinda hard with such a small dialog...

Edit 3: I just discovered the (very nice!) material system, but there seems to be something wrong with the simpleTexture material definition. I found out when the ambient color wasn't correctly taken over by the exporter (only an ambient light resulted in a completely black scene in Ogre). There are a couple of strange things in the definition:
Code: Select all
<A simple material with a texture.><text>
<newline>
<texture><file><color>
<lighting> <opt> <on,off>
<line>
<ambientColor><attrRGB><incandescence>
<ambientA><float><1>
<specular><attrRGB><specularColor>
<specularA><float><1>
<emissive><RGB><0 0 0>
<end>


the incandescence parameter isn't the ambient color, right? I tried to change it to Ambient Color, AmbientColor and ambientColor, but none of them works (no idea where I could find the names I could use).
The specularColor doesn't seem to work either. It gives an error in the exporter dialog: ATTR ERROR: 'specularColr' !



I also tried the texture file manager. If that target path would be filled in by the export path by default, it would be a great tool (it is already, but then it would be kinda perfect)


Again, thanks for the great exporter!

Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Postby metaldev » Tue Mar 13, 2007 3:06 pm

These are really good suggestions for the scene manager. Here are my responses:

- Our modeler put a camera in the scene, called persp1 (in the outliner, I actually don't have maya experience myself). When it was made exportable, and I tried to export the .scene file, I got an error: "Error: No object matches name: camera1". The error disappeared when I selected the camera and pressed "Delete" in the exporter dialog


im not sure what happened here, i would have to see the file.

- Having to press "Delete" for an object not exporting anymore isn't very intuitive I think (I for one had to look for it a while). Wouldn't it be better if the button was called "Don't export" or something?


this is a really good suggestion and something that never occured to me as i imagined it as 'delete parameters' i will change it to say 'remove' as the word delete already has a very specific meaning in maya.

Edit 2: Also, could the export dialog be made expandable in size? Cause when you are changing parameters, it's kinda hard with such a small dialog...


its actually small on purpose so it can be kept up while working and not take up a lot of screen space. I dont want to change this because it could have unpredictable results as the layout is dynamic and everything is built to fit in there (imho mel UI is the hardest part of mel and its very limited in some areas). However if you want to change it yourself you can, its inside lfa_sceneManager.mel
search for:
Code: Select all
window -title ("LFA Scene Manager v"+`lfa_getToolVersion`)

modify that window command and it should work, but i would expect layout issues.

Edit 3: I just discovered the (very nice!) material system, but there seems to be something wrong with the simpleTexture material definition. I found out when the ambient color wasn't correctly taken over by the exporter (only an ambient light resulted in a completely black scene in Ogre). There are a couple of strange things in the definition:
the incandescence parameter isn't the ambient color, right? I tried to change it to Ambient Color, AmbientColor and ambientColor, but none of them works (no idea where I could find the names I could use).
The specularColor doesn't seem to work either. It gives an error in the exporter dialog: ATTR ERROR: 'specularColr' !



using incandescence as ambient is done on purpose so you can see your changes in realtime in maya, it doesnt really matter what attribute is used to attach to what so if you feel more comfortable attaching it to the actual 'ambient' attribute of the material there shouldnt be any problems :)
use:
Code: Select all
<ambientColor><attrRGB><ambientColor> 
But if you do this you wont see your changes until youve exported and loaded into ogre. The thing is that the exporter only cares about whats in the LFA interface anyway, so i consider using incandescence as ambient to be under the hood. Theres no point to modifying the actual material parameters unless you also plan to use it also as a maya-rendered model.

as far as the "error", different materials carry different parameters, lambert for example doesnt have a specular attribute and the material definition is trying to connect to specular... so the LFA tools suggest in the interface and in the script editor that you use a different maya material to represent that particular ogre material. Even in the case you don't choose another material however, defaults are put in place of the unfound attribute and it shouldnt break your material. The best thing however would be to use a phong or phongE instead of lambert in the case of simpleTexture.

I also tried the texture file manager. If that target path would be filled in by the export path by default, it would be a great tool (it is already, but then it would be kinda perfect)


this is also a good idea and is already on my todo list.


thanks for the constructive feedback it is really helpful!
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby JeDi » Tue Mar 13, 2007 3:41 pm

its actually small on purpose so it can be kept up while working and not take up a lot of screen space. I dont want to change this because it could have unpredictable results as the layout is dynamic and everything is built to fit in there (imho mel UI is the hardest part of mel and its very limited in some areas). However if you want to change it yourself you can, its inside lfa_sceneManager.mel

OK, I understand that. It's just that with the material attributes for example, the sliders are only half a centimeter wide, and its really hard to actually use it. By the way, I don't know anything about mel script (or maya in general), but wouldn't it be possible to put the export attributes actually in the attributes pane of the object (Under "Extra Attributes" for example, we could have a "Ogre Export Options". That way, the export dialog itself could stay small, because it would only have the buttons and menus in it.


using incandescence as ambient is done on purpose so you can see your changes in realtime in maya, it doesnt really matter what attribute is used to attach to what so if you feel more comfortable attaching it to the actual 'ambient' attribute of the material there shouldnt be any problems Smile
use:
Code: Select all
<ambientColor><attrRGB><ambientColor>

But if you do this you wont see your changes until youve exported and loaded into ogre. The thing is that the exporter only cares about whats in the LFA interface anyway, so i consider using incandescence as ambient to be under the hood. Theres no point to modifying the actual material parameters unless you also plan to use it also as a maya-rendered model

OK, great! I'll tell that to the modeler. The scene is especially modeled for Ogre, so no problem in doing that. But I guess a note in the help couldn't hurt, so people know that. As I said, I don't know anything about maya, but you are right: changing the ambient slider doesn't change anything in the maya viewport, the incandescence one does.


as far as the "error", different materials carry different parameters, lambert for example doesnt have a specular attribute and the material definition is trying to connect to specular... so the LFA tools suggest in the interface and in the script editor that you use a different maya material to represent that particular ogre material. Even in the case you don't choose another material however, defaults are put in place of the unfound attribute and it shouldnt break your material. The best thing however would be to use a phong or phongE instead of lambert in the case of simpleTexture.

Thanks! Indeed, a PhongE material works way better. Our modeler is used to modeling for a very, very restricted rendering engine (basically just non-lighted textured polygons), so he will have to get used to the power of Ogre :-)


Thanks!

Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Postby metaldev » Tue Mar 13, 2007 4:16 pm

OK, I understand that. It's just that with the material attributes for example, the sliders are only half a centimeter wide, and its really hard to actually use it. By the way, I don't know anything about mel script (or maya in general), but wouldn't it be possible to put the export attributes actually in the attributes pane of the object (Under "Extra Attributes" for example, we could have a "Ogre Export Options". That way, the export dialog itself could stay small, because it would only have the buttons and menus in it.
i could look into it, but you dont really need to use the slider at all. I just kept it for convinience for clamping to black or full bright, click on the color swatch there and you'll have access to full HSV/RGB control.

But I guess a note in the help couldn't hurt, so people know that. As I said, I don't know anything about maya, but you are right: changing the ambient slider doesn't change anything in the maya viewport, the incandescence one does.

Sure, ill include comments in the material definition and help. Its true thats a little bit cryptic of why that is done.
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby JeDi » Tue Mar 13, 2007 4:38 pm

Great! I'm getting the hang of it. Now I would like to experiment with some more advanced shader-based materials like bump / parallax mapping. Does anyone have some resources on how to incorporate that into our tool chain?

Actually, I would need some tutorial of some sort to do it in maya, and then I'll try to create .mat files supporting it. The topics are:
- Bump mapping, parallax mapping, normal mapping in general
- Light maps, and how to use them properly

If anyone has some usefull links...

Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Postby metaldev » Tue Mar 13, 2007 5:05 pm

if you just want to use a normal map... plug it into a bump node and into the bump attribute of the material, then turn on high quality rendering in the viewport.

if you could write a .mat for this it would be very helpful!


lightmaps are also possible to see realtime in maya... you will need to use a layered texture, then 'relationship editors > UV linking' to describe which UV connects to which layer.
(a .mat for this does already exist )

parallax mapping however i think you may need to use CG to see in Maya which i will tell you right now i found very hard to use. imho much more trouble than its worth, its better to just use it in ogre.
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby JeDi » Tue Mar 13, 2007 6:34 pm

I'm sorry to bother you again, but we are having trouble with the exporter again...

We replaced some of our mesh copies with instances in stead of duplicates. So now there is a light_origin object in the outliner, and light_instance01 till light_instance14 (those are meshes, not actual lights). The "select instance original" and "select fellow instances" tools work as they should (determining that light_origin is the original object and the other instances).

If we export the .scene file, all light entities refer to light_origin.mesh (sounds logical). But if I export the scene, the mesh is called light_instance01.mesh. Not a big problem to rename the file off course, but just letting you know :-)

Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Postby metaldev » Tue Mar 13, 2007 6:56 pm

yea that is strange, i think i'd have to see the maya file to determine whats happening though. could you pm a link to me?
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby metaldev » Thu Mar 15, 2007 6:15 am

ok new update available! :)

update to 2.3 >>HERE<<

for more info: HERE


changes:
- thanks to jedi i was able to reproduce the instancing bug and i believe i fixed it.

- file texture manager now defaults to export dir

- renamed 'delete' parameters to 'remove'
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby JeDi » Thu Mar 15, 2007 11:20 am

Now that's service!

Thanks man!
Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Maya LoD Export?

Postby Artba » Tue Mar 27, 2007 9:49 am

Hello there! Thank you very much for this useful exporter.
I used it several times now and wonder if there is any hidden option to export level of detail information, either to a mesh of into the .scene file.
Or do you use a differnt construct for exporting LoD from Maya ?
Or how do you normally transport LoDs from Maya to Ogre ?

Thanks for your help,
Andreas
Artba
Gnoblar
 
Posts: 4
Kudos: 0
Joined: 01 Jun 2006
Location: Cologne, Germany

Postby JeDi » Tue Mar 27, 2007 10:11 am

Also, another great option would be to export the skeleton animation keyframes directly (if using keyframed animations). Would that be hard to do? I know the way it done now is more general because animations are sampled, but in the case of keyframe animation, it would be a big performance hit if we could actually get the keyframes from maya and let Ogre do the interpolation, so an option in the exporter for that would be very nice!

Would that be hard to implement?

Greetz,
JeDi
JeDi
Gnome
 
Posts: 351
Kudos: 3
Joined: 21 Oct 2004
Location: Diepenbeek, Belgium

Re: Maya LoD Export?

Postby metaldev » Tue Mar 27, 2007 5:17 pm

Artba wrote:Hello there! Thank you very much for this useful exporter.
I used it several times now and wonder if there is any hidden option to export level of detail information, either to a mesh of into the .scene file.
Or do you use a differnt construct for exporting LoD from Maya ?
Or how do you normally transport LoDs from Maya to Ogre ?

Thanks for your help,
Andreas


Right now the LFA tools do not recognize anything having to do with an LOD. But this is a very interesting suggestion - im not sure how LOD's are handled in ogre or if the .scene definition even supports them. Maybe someone who has a more experience with LODs in ogre can help suggest a standard? Is there anyone even maintaining .scene right now?
try posting in a main thread to see if we can arrive at least some rough consensus. otherwise LOD loading will have to continue to be left to each developer to export and handle on their own.
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Re: Maya LoD Export?

Postby Artba » Wed Mar 28, 2007 11:58 am

So far I use the Level of Detail construction inside the meshes, hence to manually add an empty mesh to an existing one you write
Code: Select all
   lMyMeshPtr->createManualLodLevel(400.0f, "meshEmpty");

(given that "meshEmpty" is a valid existing mesh. Or alternatively you can let Ogre automatically calculate LoDs using
Code: Select all
   Mesh::LodDistanceList lodDistances;
   lodDistances.push_back(500.0f);
   lodDistances.push_back(1000.0f);
   lMyMeshPtr->generateLodLevels(lodDistances, ProgressiveMesh::VRQ_PROPORTIONAL, 40.0f);

However, this very often crashes or doesn't result in useful reductions, distorting objects.

The first method would clearly belong to the mesh exporter. But the Maya mesh exporter does not support this feature. And Maya also seems to be fairly simple in its LoD definition: you can define a LoD group, but so far I was not able to find proper settings for LoD swiching... my knowledge of Maya is too limited to say that.

The .scene format does not yet define LoDs. This would be a useful feature if an LoD of an entity could be defined. This would allow the loader to manually rebuild the LoD structur on load time.

Who's the maintainer of the Maya mesh exporter, btw ?
Andreas
Artba
Gnoblar
 
Posts: 4
Kudos: 0
Joined: 01 Jun 2006
Location: Cologne, Germany

Postby funshark » Fri Apr 06, 2007 12:09 pm

How the "Path" for exporting .scene and things is defined?
And why we have file.me.scene when we export? Hard to avoid this?
User avatar
funshark
Gnoblar
 
Posts: 13
Kudos: 0
Joined: 14 Dec 2006
Location: paris, FRANCE

Postby metaldev » Fri Apr 06, 2007 9:55 pm

go here to learn how to change the default export path.


And why we have file.me.scene when we export? Hard to avoid this?

I'm not sure what you are asking, can you rephrase your question?
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

Postby funshark » Mon Apr 09, 2007 7:41 am

yeah sorry :
it's name_of_the_file.ma.scene
User avatar
funshark
Gnoblar
 
Posts: 13
Kudos: 0
Joined: 14 Dec 2006
Location: paris, FRANCE

Postby metaldev » Mon Apr 09, 2007 1:39 pm

it should be exporting name_of_file.scene i have never seen it export name_of_scene.mb.scene

are you sure that is occuring? if so, that is a bug and i would like to see your .mb file to try and reproduce it.

also if you need your .scene file to end with something else than .scene, it wouldnt be hard for me to make the ending a variable inside the settings file. Let me know.
User avatar
metaldev
Orc Shaman
 
Posts: 761
Kudos: 12
Joined: 17 Mar 2005
Location: Boston

PreviousNext

Return to Artists & Content Creators

Who is online

Users browsing this forum: No registered users and 3 guests