Maya6.0e exporter bug w/ plane?

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
Feral
Halfling
Posts: 80
Joined: Thu May 26, 2005 9:12 pm
Location: NORTHERN California, USA

Maya6.0e exporter bug w/ plane?

Post by Feral »

I seem to have ran across a snag with the maya6 exporter (ogreExporter_bin_maya6.0e.zip)
Specifically:

NURBS plane
Deformed by taking the middle and dragging it down a bit to create a depression. The edges of the plane stay at y=0;
Modify|Convert|NURBS to Polygons
Normal show as pointing up, that is to say +y
Planeular texture map; apply nice texture;

Select object
Export this via Ogre|Export

Code: Select all

Export: (x)Selected
Coordinate Space: (x)Object (wold seems the same)

[x]Export mesh to Ogre XML format
[x]Include Vertex Normals
[x]Include texture coordinates

[x]Export material to Ogre .material format
[x]Copy texture to output dir
[x]Export with “lighting off” option
Script Editor Displays:
select -cl ;
select -r nurbsToPoly1 ;
ogreExport -sel -obj -mesh "C:\\home\\feral\\dev\\ffo\\out\\maya6\\vortex.mesh.xml" -n -t -mat "C:\\home\\feral\\dev\\ffo\\out\\maya6\\vortex.material";
// Translating scene to OGRE format
// Found mesh node: |nurbsToPoly1|nurbsToPolyShape1
// Translating mesh node |nurbsToPoly1|nurbsToPolyShape1...
// Found material: vortex
// OK
// Command is not undoable
I have exported other things without issue so I presume it has to do with the shape of this plane; If I reverse the normals I end up with the same results.

Oh the results: My normals are wrong; They are pointing to -y, that is to say the texture is visible when looking from under the mesh, but if we look down from above the mesh. looking into the depression we see nothing;

It appears normals are not correctly exported for this plane. At least, that is my guess.

Am I doing something wrong somewhere or is this a exporter bug ?

Please pardon my incoherent-ness; it is quite late.
Bringer of Darkness
Halfling
Posts: 98
Joined: Thu May 05, 2005 3:57 pm

Post by Bringer of Darkness »

History, Delete history...
And triangulate... before...
User avatar
Feral
Halfling
Posts: 80
Joined: Thu May 26, 2005 9:12 pm
Location: NORTHERN California, USA

Post by Feral »

Thank you for the hints Bringer of Darkness.

Hum, interestingly it seems a polygon plane exports just fine so apparently it is not plane style geometry which is good (=

For reference History was deleted and triangulation was done via Modify|Convert|NURBS to Polygons.

I created a new scene, made a polygon plane, tweaked it, textured, triangulated exported and everything seems fine and normal.

I created a new scene, made a NURBS plane, tweaked it, converted to polygons, deleted original NURBS plane, textured polygon plane, (was already triangulated), exported; and it looks like normals are reversed.

I normally don’t mess with NURBS so perhaps it is user error on my part.
A normally Polygon plane exported fine and without issue so my original though of it being plane related is incorrect, for what that is worth.
joi
Gnome
Posts: 327
Joined: Tue Feb 22, 2005 8:11 pm
Location: brazil

Post by joi »

stay away from nurbs :D
maya 7.0, vs 2005, ogre 1.2
Bringer of Darkness
Halfling
Posts: 98
Joined: Thu May 05, 2005 3:57 pm

Post by Bringer of Darkness »

NURBS are fine;-), but not too much for games, hehe

Anyway, I have found a new bug in exporter - in fact it could be a bug in Maya, I am not sure where it should be classified more...
The error reported is: "Error getting connected shaders"
You can encounter this one in the following manner:
1. Create any skeleton
2. Reference any item from other scene
3. Bind the item to skeleton
4. Export the scene - now it exports fine
5. Save/and reload the scene
6. Now you receive the above mentioned error when trying to export item - you need to re-bind it to be able to export...
User avatar
bisco
OGRE Contributor
OGRE Contributor
Posts: 235
Joined: Wed Nov 03, 2004 5:01 pm
Location: London, United Kingdom

Post by bisco »

hmmm, interesting, I wonder why you have to rebind to the skeleton.... the message means that maya can't get the associated material, so I don't see where the skeleton comes into play...
well, after I turn in my masters thesis (a few days left ;)) I'll go back working on the exporter and try to figure out the problem.
juliusan
Gnoblar
Posts: 8
Joined: Tue Jun 21, 2005 2:02 pm

Post by juliusan »

Hi.

I am having the same problem of the normal pointing to the wrong direction. I cleared the history as well as triangulate the model, but it still does not work.

The model is constructed with only polys. Does anyone have a solution for this?

Thanks
Julius
Bringer of Darkness
Halfling
Posts: 98
Joined: Thu May 05, 2005 3:57 pm

Post by Bringer of Darkness »

@bisco : thanks, such message can be encountered othertimes as well, but I assume the conditions are quite similar to this one, so no need for describing it in more details...

@juliusan: Have you reversed normals in Maya? Or is it in the way that exported normals are pointing the other direction from Maya's normals?
User avatar
bisco
OGRE Contributor
OGRE Contributor
Posts: 235
Joined: Wed Nov 03, 2004 5:01 pm
Location: London, United Kingdom

Post by bisco »

Anyways, sometimes I have the feeling that Maya is a little bugged when managing normals. I had the same problems with normals a while ago, in fact even in Maya's visualization I had troubles.

I'll see what I can do, but the fact is... I'm reading the normals directly from the mesh with the getNormals function, so it should return exactly the normals that Maya uses for rendering... there may be a bug in the getNormals function.
I'll check it out and let you know, if you have similar problems tell me so we can try to correct the bug
juliusan
Gnoblar
Posts: 8
Joined: Tue Jun 21, 2005 2:02 pm

Post by juliusan »

Hi BoD and Bisco,

Thank you for replying.

I have done every possible thing under the "edit->normal" in maya, reversing them and such. However nothing seems to do the trick. But by reversing normal, do you mean I do it in ogre mesh viewer or something.

I have done a check by loading the model straight into ogre in case it is a bug of the mesh viewer. However, the normals are still wrong inside. I will continue to explore as well and see if I can find the problem. Thanks.
Bringer of Darkness
Halfling
Posts: 98
Joined: Thu May 05, 2005 3:57 pm

Post by Bringer of Darkness »

I think I may had the similar problem - check the following topic:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=10208

It may be, that problem is somewhere in the model - in my problem the problem was solved by using another model - so it definitively appeared as some model specific problem...
Not sure whether this might be helpful in your case of course.
It can be, that there is some "step-by-step" modeling/editing procedure, which f$#s up the normals completely and maya may not be able to correct it (I have used all functions in edit polys->normals, but no success as well).
I am not sure, if I have checked exporting to some trivial format (obj for example) and importing it back to maya - some redundant bad data might get lost, but not sure...
User avatar
metaldev
Orc Shaman
Posts: 761
Joined: Thu Mar 17, 2005 11:56 pm
Location: Boston
x 15
Contact:

Post by metaldev »

It is a Maya issue, i had the same problem and posted the way i fixed it here as well:

http://www.ogre3d.org/phpBB2/viewtopic.php?t=10208
Post Reply