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
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

Does you exporter export multiple UV sets?
yes.
kirado
Kobold
Posts: 32
Joined: Sun Jul 23, 2006 11:36 pm

Post by kirado »

I haven't had a chance to test it yet.. but if it works that's EXECELLANTE!
User avatar
Arkos
Gremlin
Posts: 157
Joined: Wed Apr 26, 2006 12:30 am
Location: Michigan, United States

Post by Arkos »

Hey I just downloaded the LFA dotSceneExporter last week and it was not the most current version. I am extremely lucky that I found this post and was able to download the latest one from the thread on the previous page. Ofcourse I was only able to find it after several frustrating hours of trying to get the old one to export a mesh with the new ogre exporter. Anyways, great job with the exporter, it works as advertised.

I just upgraded to maya 7.0 and it is possible that I tried using the old lfa scene manager from my 6.5 folder, but I am pretty sure that I got a fresh one from the LFA site, so please make sure that you have the updated exporter on the site, thanks
User avatar
DieHard
Halfling
Posts: 57
Joined: Fri Apr 01, 2005 1:18 am
Contact:

Post by DieHard »

I made a simple scene with boxes and applied it with different materials (different colored lamberts). I have the latest version of both LFA Scene Manager and Ogre Exporters. I spent hours figuring what I did wrong. I just apply it's own single simple material with a different color.

When I export the scene, the exporter compiled an empty .material file. I even tried exporting the .mesh with the .material file, nothing in it either. I even tried using the native Ogre exporter to export just a box, same issue, empty .material file.

Please help, spent hours trying to figure this out.

I'm using Maya 7, LFA Scene Manager 1.5, and Ogre Exporter 1.2.1.2
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

When I export the scene, the exporter compiled an empty .material file. I even tried exporting the .mesh with the .material file, nothing in it either. I even tried using the native Ogre exporter to export just a box, same issue, empty .material file.
try saving your scene. the .material file should be named sceneName.material. It may be bugging out because you are using a scene without a name ie 'untitled' let me know if that works for you.
User avatar
DieHard
Halfling
Posts: 57
Joined: Fri Apr 01, 2005 1:18 am
Contact:

Post by DieHard »

Sorry, forgot to include something else important, I was also baking the Maya materials with UV. I don't know if the exporter can export the UV baked materials with shadows to Ogre. I thought the exporter have it, and I've been trying to get it working.

Download my test case on shadow baking (do a "render current frame" to see it with no lighting just baked textures) using Maya 7:
http://www.developersclub.org/public/ba ... 060816.zip

In any case, one thing lacking for .scene is shadowing compare to BSP, we need to have it working. I think it is a necessity for Maya Scene Exporter to include shadow baking using Mental Ray or Maya Software baking.

After a FULL DAY researching-and-trying how to bake (there is no REAL SOLID documentation on the Internet-Google about baking). So, I want to share my knowledge on the OGRE forum.

Metaldev and bisco, if you don't know how to bake shadows, I'll write up a simple documentation with pictures. Email me diehard@diehard.cc or AIM: DieHardBoss. In my opinion, I think it is very important feature to get it working with OGRE.
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

I do know how to operate Mental Ray for maya.. its not easy to get it working the way you want. Its complex enough to warrant professionals dedicated to lighting. Its also extremely slow to render (compared to max mental ray). More to the point, I think its a function that is too specific to include into the scene manager; feel free to add it yourself. The best solution I have seen for this problem though is to keep a scene set up that has all your favorite mental ray settings intact, and simply temporarily import anything you want lightmaps baked to.

Btw i dont believe maya software renderer does baking.

PS DieHard
you should document what you learned and put it on the wiki with your example
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

DieHard wrote:Sorry, forgot to include something else important, I was also baking the Maya materials with UV. I don't know if the exporter can export the UV baked materials with shadows to Ogre. I thought the exporter have it, and I've been trying to get it working.

Download my test case on shadow baking (do a "render current frame" to see it with no lighting just baked textures) using Maya 7:
http://www.developersclub.org/public/ba ... 060816.zip

In any case, one thing lacking for .scene is shadowing compare to BSP, we need to have it working. I think it is a necessity for Maya Scene Exporter to include shadow baking using Mental Ray or Maya Software baking.

After a FULL DAY researching-and-trying how to bake (there is no REAL SOLID documentation on the Internet-Google about baking). So, I want to share my knowledge on the OGRE forum.

Metaldev and bisco, if you don't know how to bake shadows, I'll write up a simple documentation with pictures. Email me diehard@diehard.cc or AIM: DieHardBoss. In my opinion, I think it is very important feature to get it working with OGRE.
You got wrong ideal, men
===
Baking material with MSoftware or MR is easily, I highly recommend MR because more choise when baking and better quality. You could do that by learning bake set. All item you want are in Render tab (F5)
====
After baking, the data you got is a texture is baked (it is colored like the way light affect them) or you could got a lightmap (with MR) that is a black and white color where white are bright and black are dark. You it with a modulate blending texture in Ogre material and you make the lightmap working. There are tutorial in WIKI too
===
http://www.ogre3d.org/wiki/index.php/Materials#Lightmap
====
================
Export .SCENE with lightmap is nothing without modify the material file and you must have baked texture or lightmap texture to use.
====
For BSP, after lighting, when compile, lightmap is created. That s BSP has BAKED lightmap into your model texture
===
So, lightmap is nothing without a texture and could easily created.
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

a weak point, or I do not know how to solve when using lightmap (compared with directly baking)
http://www.ogre3d.org/phpBB2/viewtopic. ... highlight=
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

Hi,
The solution for the highlight problem could be to use as based texture the texture fully lighted, then decrease the luminosity using the lightmap.
The thing is that if your multiply the color by 1 (white), whatever how many times you do it, of course the color will stay the same. Only values less than 1 will change the color when multiplied.
The other option can be to use a floating point (i.e. HDR) image for the lightmap, as it could store values above the 0-1 (or 0-255) limits. I know MR can render such images but I never had time to test it.
Btw i dont believe maya software renderer does baking.
It does, you have to look under the edit menu in hypershade (convert to file texture). Only problem is that it automatically reassign a "surface shader" with the texture to the object ...

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

Post by DieHard »

There are two techniques for baking shadows: 1. Maya Software and 2. Mental Ray. Trust me, it is all just a texture using UV mapping, not much rendering for Ogre, no performance hit. Maya automatically compiles, blending both your original material and the shadows casted upon them, to one material using UV mapping.

For the sake of both LFA Scene Manager and Maya Exporter authors, this is a must have feature exporting baked materials with shadows, comparing to BSP's only advantage (lightmapping). I'll write a simple step-by-step document with pictures later this week to help everybody on baking shadows, my opinion, using Scene-Mesh is the best especially when you can design it with Maya. Because using BSP on Ogre is a mess.

I found some documentations about these techniques (Please check them out!):
http://fromthehill.nl/tutorials/bake/index.html
http://accad.osu.edu/~aprice/courses/BV ... index.html
http://www.radonlabs.de/ToolkitDocs_HTM ... Howto.html

Metadev and bisco (I wish he read this):
In the meantime, please download my test case (Maya 7 scene done with Maya Software baking) on baking shadows with Maya. Look into the folder "sourceimages" containing jpeg's and also the Maya's hypershade window. I think you will understand what I'm saying. You will grow to liking it more and more. :)

If you want to learn how to bake shadows to your materials, I'll show you in real-time, contact me.

Note:
I read a subsection in Wiki about "Lightmap":
http://www.ogre3d.org/wiki/index.php/Materials#Lightmap

About Maya, it would be nice to have both the baked shadow material and the textured material separate, when it exports to script.material for Ogre, allowing more control and using it programmatically.
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

In the meantime, please download my test case (Maya 7 scene done with Maya Software baking) on baking shadows with Maya. Look into the folder "sourceimages" containing jpeg's and also the Maya's hypershade window. I think you will understand what I'm saying. You will grow to liking it more and more.
I give a look to your scene and sorry :) ... It s nothing special, just a scene b4 and after baked. The surfaceShader is good,not base on the lighting condition, but It seems still not be supported by the exporter (correct me If I am wrong)
===
About the baking, the fact, baking lightmap in Maya is really good for a small scene or interior, architect visual... But for something larger, like a village, baking like map is your choise. You could compare between the shooter game that use alot of lightmap with some MMORPG that have a large terrain, only terrain has lightmap (that I think I regerate in their Engine)
====
Adding lightmap support to exported, the fact make the export to do the baking thing with your scene :)... And evaluate it, is your scene ready to baked :).. In my experience, test baking many times b4 the final bake for these reason
+++ Wrong UVs (flip,wrong UV, over range... :) )
+++ Texture Seam
+++ Lightmap resolution
+++ Wrong model ( wrong normal vector direction, still not smooth normal)
...................
====
BSP is simple for baking bcause the object is baked only primitive object, and only simple boolean used for modelling, that will reduced the error to minimum)
====
In the end, I just want to say that baking in Maya is not as simple as baking a BSP that made in GMax. Try a simple interior scene, bake it and you will get many problem. So, embed a function like this is not so fun (for many errors we may encounter)
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

guy_iti wrote:Hi,
The solution for the highlight problem could be to use as based texture the texture fully lighted, then decrease the luminosity using the lightmap.
The thing is that if your multiply the color by 1 (white), whatever how many times you do it, of course the color will stay the same. Only values less than 1 will change the color when multiplied.

The other option can be to use a floating point (i.e. HDR) image for the lightmap, as it could store values above the 0-1 (or 0-255) limits. I know MR can render such images but I never had time to test it.
Could you tell more about the first way (use as based texture the texture fully lighted, then decrease the luminosity using the lightmap). I do not understand much.

Do you know about the second way, that s what I am searching now, image that have value above 1. I know HDR,or DXT has this function. But how to create and use it is still in mystery.
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

use as based texture the texture fully lighted, then decrease the luminosity using the lightmap
What I wanted to say is, taking the example of the brick wall in the other thread, if you have your brick wall original texture modified so it looks like fully lighted (like the brighest parts you see on the "baked" texture example), you can then use the lighmap to tone down this texture.
The technique you use, taking an average texture then trying to increase the luminosity by multiplying by a value (which in the case of B&W image means values from 0 to 1) can not work as multiplying by 1 only results in the original value. Try Photoshop with a white layer, set as "multiply" on top of an image, the image doesn't change.
So the idea is to add the lighmap not to "light" the image but to create the shadowed parts. The lightmap example in the WIKI as well as the example you gave on the ohter thread show it well : the lightmap only decreases the luminosity. So you better start with a original texture very bright.
Do you know about the second way, that s what I am searching now, image that have value above 1. I know HDR,or DXT has this function. But how to create and use it is still in mystery
As I said, I didn't had time yet to experiment with the MentalRay option of rendering HDR (or 32 bits floating point TIFF), but I suppose it's a matter of testing : in your example, if you set your lights to be extremely bright (intensity 50+) with decay, the lightmap image rendered by maya will show the "hotspots" as fully white (lets say value of 1 or 255).
When rendered in hdr with mental ray the same image should give a value for these "hotspots" of more than 1 ... That's the principle. You can use "HDRshop" of "Hedrie" image processing softs to check the results. Let me know if you manage as I'm also interested to see if this methos gives good results.

Hope (this time) I was a bit more clear ...

Cheers,
Guy.
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

So you better start with a original texture very bright.
Um. that s not a good idea because a normal image is not a HDR , so too brightness mean a bad texture. It s too brightness mean although lightmap blending could not bring detail that destroyed.
==================
Okie, the TIFF in MR is allowed 32 bit mode. But I still not tried to convert it to DDS to test in Ogre
User avatar
DieHard
Halfling
Posts: 57
Joined: Fri Apr 01, 2005 1:18 am
Contact:

Post by DieHard »

ghostlake:
My Maya scene file is directed to metaldev and bisco to see how baking shadow resulted as a single material and to test against their LFA Scene Manager and Maya Exporter.

Ogre's BSP is dead (no collision support) from SinBad:
http://www.ogre3d.org/phpBB2/viewtopic. ... 811#115761

Probably will take time to get the shadows to bake and look correctly for complex scenes, but it is all one-sided work, Maya take cares of it all. Exporting will be no problem once implemented.

We don't need to put dynamic shadows on background objects. Blending shadows and textures into one material is a great technique to save performance rendering than dynamic shadows (ex: stencils). I'm talking about background objects.
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

Yeah, Baking a a effective way to bring life to scene. However, Maya Baking command is powerful :)... And now layered texture is supported, so lightmap blending export is supported now.

===

Until now, sorry but I do not get what do you want to upgrade to the exporter. Baking exists in Maya, and export model with lightmap blending (layer texture) is quite supported
User avatar
DieHard
Halfling
Posts: 57
Joined: Fri Apr 01, 2005 1:18 am
Contact:

Post by DieHard »

I have the lastest version of both exporters, LFA Scene Manager and Maya Exporter, and it is not working for me. The Ogre material scripts are blank after exporting!

Use my maya scene and try it. It won't work.

If you got it working, let me know (given with a step-by-step process), I highly appreciate your help.
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

Okie
==
First, the core of exporter is Exporter of Bisco, the LFA do nothing of export except the .SCENE format.All material, mesh ... is exported use Bisco Exporter :)
===
And this is the hypershade of a layer texture to make lightmap material script
Image
===
The script is exported like this
material lambert2
{
technique
{
pass
{
ambient 1 1 1 1
diffuse 1 1 1 1
specular 0 0 0 0
emissive 0 0 0

texture_unit
{
texture anhmap.jpg
tex_coord_set 0
colour_op replace
scale 1 1
scroll 0 0
rotate 0
}

texture_unit
{
texture sop6.JPG
tex_coord_set 0
colour_op modulate
scale 1 1
scroll 0 0
rotate 0
}
}
}
}
===
PS: Sorry metaldev for hijacking your thread....
kirado
Kobold
Posts: 32
Joined: Sun Jul 23, 2006 11:36 pm

Post by kirado »

ghost er dude.. whats up with your post.. is that maya layered texture not exporting or what? I've got stuff to export that way (ie light map on add and a diffuse texture layered etc) cept it doesn't export multiple UV sets correctly using the maya plugin..albeit slightly older version..(it might work now?) haven't tested the scene manager? But I understand it uses Biscos maya exporter..
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

Um, that s for DieHard guy to use layer texture to make lightmap in maya and export to Ogre.
===
About the multiple UV, could you post your way of making the material in hypershade, so we could make a test too.
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

well one thing that i do plan to implement in the next version that may solve part of your issues is a specialized ogre material exporter... where as you can flag a given maya material to export as one of a set of predefined ogre shaders and simply fill in the blanks with options through a dynamic UI. (i will build it so you can easily add your own shader definitions by simply dropping text files into a directory) This should help a lot if you have a scene with lots of complex shaders... writing them all by hand kind of sucks imho.
User avatar
DieHard
Halfling
Posts: 57
Joined: Fri Apr 01, 2005 1:18 am
Contact:

Post by DieHard »

ghostlake:
Okay. But, the other problem is before that step. I can't bake only the shadows. So, I can keep both shadows and textures separate.
ghostlake
Halfling
Posts: 67
Joined: Mon May 29, 2006 8:06 am

Post by ghostlake »

The mental ray bake set has the shadow bake mode, read the Maya manual and you will learn more :)... And It is easy to understand when looking at the bake set interface
User avatar
DieHard
Halfling
Posts: 57
Joined: Fri Apr 01, 2005 1:18 am
Contact:

Post by DieHard »

I did, many times and the result is not exactly what I want. I already know how to bake the shadows to the texture. The problem is I want only shadows (as it's own material, into alpha channel probably) separate for more control.
Post Reply