UV problem

Announcements, requests and support regarding the MAYA exporter
User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

UV problem

Post by CTZn » Sun Dec 10, 2006 11:45 am

Hi there !

Ok, that'll be straight forward to catch with images:

Thats what I've got in the viewport of Maya:

Image

And thats what Indigo renders:

Image

I think the red line should follow the green one, or something like that.

:?:

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sun Dec 10, 2006 11:59 am

Image

That's when using the mel part for export (ie without IME)

:/

BTW: Maya 8. Ok, I know ;)

User avatar
yourdaftpunk
Posts: 27
Joined: Thu Nov 23, 2006 3:24 pm
Location: Houston
Contact:

Post by yourdaftpunk » Tue Dec 12, 2006 7:18 pm

Sorry, I've been out of town since the 7th. I'll take a look soon as possible!

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Tue Dec 12, 2006 10:16 pm

Ok, glad you're back around here :)

How about your own projects, big ones ?

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri Dec 29, 2006 1:04 am

Did someone have more luck with Maya 8 ? Does this work on 7.0 anyway ?

I'm very disappointed I cant get textures to work, same for bumps of course.

Here's a new test, UVs are just clean in Maya. However, I outlined an artifact introduced by the Transfer Map tool:
Image

See the artifact ? And bump noise should be homogenous, it's stretched out in the render...

Image

:cry:

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Thu Feb 01, 2007 10:03 pm

Correction:

I decided yo do a new battery of tests and I've got expected (working) results without IME.

Image

Ok the texture is ugly but I wanted a strong contrast, that's why :) There is an artifact at the pole but that's negligeable, the pole is twisted (that's not the case within Maya/mental ray).

However... there is a twist too when I use IME (Indigo Mesh Exporter, for non-initiated people ;) )

Image

Eh ! Yes, a twist :D Obviously that's a triangle ordering issue :? I will do further testing to see if that can be corrected if I create new UVs after triangulation, there may be a relation (I'm using default UVs for the sphere of course)... So, via the script triangulation preserves faces number while IME (or maybe the common triangulation of Maya) does not.

If that persists I hope Shawn will pass by, or maybe I'll try to get in touch with him... cause without IME exporting is so slooow... barely 15 triangles per second, took 9mn15s for these 8064 triangles... would take approximately 5h45mn for 300k tris :lol:

Apart that I'm getting used with MTI, so everything else is fine, say...

Sorry I'm complaining all the time but I'm quite in a good mood because of the good result, I would like to be a better supporter for you devs but I'm just me, I can hardly fake my mind :D

Cheers

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Thu Feb 01, 2007 10:55 pm

Well.. I know nothing about Maya or the script you are using, but looking at the last image it seems to me, that the model doesn't preserve exact texture coordinates. The thing is, that there could be more than one texture vertex per one geometry vertex (at least it is so in 3ds Max). In order to preserve the exact texture coordinates you have to split the geometry vertex that has multiple texture vertecies. At least that's how it works while exporting from max.
At the moment it seems, that the geometry vertex on the pole of the sphere has more texture vertecies than one. That's why this spiral occures. The solution could be to split/break the vertex. In max you can do it manually too. Dont know about Maya. See if you can find a tool there to split that vertex. Then you can test if it helps or not.

I'm not 100% sure that this is the case here, but the image is very similar to the problem i described.

Suvakas

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri Feb 02, 2007 9:53 am

Thats something different happening here suvakas, but thank you for your intrusion, I was feeling a bit lonely here ;)

Both issues, in both images are related to triangles arrays. In the first image, where the pole only is twisted, that's because when you create a sphere you can choose between pinched or sawtooth triangles at the pole; I chose sawtooth because it looked better within Maya, but that introduced the lil twist because the exporting script ThatDude33 and arneoog did here is working well but was develloped with Maya 7, wich has not this feature of choosing the pole type. The script works well, triangulating quads while preserving overall uv coordinates but it is slow as I said.

In the other hand Shawn (aka yourdaftpunk) created a plugin wich exports geometry as fast as a dll can, but the geometry has to be triangulated prior to be exported, and its likely the default triangulation in Maya reorders the triangles array, thus shifting the uvs of a factor 2 :arrow: 1 quad (1 face) becomes 2 tris (2 faces), and that's what introduces the offset you can see in the second image i believe.

That's why I think I have to recreate uvs after triangulation, I'm testing this within the next hours. But I'm dubitious cause even after triangulation UVs are preserved within Maya, now I realize, doing internal renders show the texture without the smallest twist :?

Anyway that will be history as soon as obj supports texture (haven't tried yet but read somewhere around that was not the case already). Then I think my frustration will be finally over :D

Sorry for the long input, thanks for reading ;)

Image
The triangulated sphere in Maya is OK in fact

Image
Quick mr/Final Gather test showing no deformation

The default UVs layout in Maya atfer triangulation doesn't show any offset, it's just right (click for image). So I'd better wait a bit for .obj I think, UVs will be right then :)

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Fri Feb 02, 2007 7:08 pm

Hmm.. if triangles are in wrong order, then how the sphere comes out as a sphere? I think you would have mesh errors. Well..maby :D
Did you try my idea? Split that vertex and explode the mesh into triangles manually and then export. I'm just curious what happens....

suvakas

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri Feb 02, 2007 9:41 pm

Hmm.. if triangles are in wrong order, then how the sphere comes out as a sphere? I think you would have mesh errors.
That's their numbers in a list that are changing, not their position, so the shape remains unaffected.

Consider two adjacent quads, called Q1 and Q2. If I triangulate them I now have 4 faces, all triangles of course. What happens now is that face n°2 in the new list is not within the area of the former Q2 any more, it is within the former quad Q1 (that is triangle n°2 of Q1), therefore an offset has been introduced.

The worst scenario for my sphere (8064 quads) would be the following: in my new list (after triangulation), face n°1 is still the first of the two triangles of the former quad Q1, face n°2 is the first of Q2, n°3 the first of Q3 etc, then face n°4031 would be the first triangle of the former quad 4031, THEN face n°4032 would be the second triangle of Q1 etc etc :) A whole rage of things can happen with arrays (lists), depending on how the software manages that.

The fact is that the script and the plugin manage that differently, the script preserves faces order in the list (1, 2, 3, 4, 5, and so on) while the plugin is doing something different, wich is even not what I described below (1, 4032, 2, 4033, 3, 4034 ... ), because then the texture would not be twisted but rather would show fragmented (the texture, not the geometry wich would remain a sphere anyway. Again all that jazz is about the position of triangles names within a list). Enough, I'm not sure you asked for that suvakas ;)
Did you try my idea? Split that vertex and explode the mesh into triangles manually and then export. I'm just curious what happens....
That's funny... I was recreating the scene from scratch (it wasn't saved) to try that and when I was to choose between 'Pinched at Pole" or "Sawtooth at Pole" for the sphere, I realized that you had not checked the link down my last post: that's exactly what "Sawtooth at Pole" does, splitting the polar UVs :D

Here's the very same link as above, again ! 1280x1024 px
If I was to choose "Pinched" all these triangles would join into one unique UV, wich is often what we want to avoid.

My pleasure, you don't have to read that all :D ;)

Cheers

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Fri Feb 02, 2007 11:19 pm

CTZn wrote:That's funny... I was recreating the scene from scratch (it wasn't saved) to try that and when I was to choose between 'Pinched at Pole" or "Sawtooth at Pole" for the sphere, I realized that you had not checked the link down my last post: that's exactly what "Sawtooth at Pole" does, splitting the polar UVs :D
No. I checked the link, but i missed the "pole action" :) Ok. you're right. The pole gets splited indeed.
Well..if that's the case, then I can't help you with this triangle issue. Unknown territory for me...

suvakas

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Sat Feb 03, 2007 2:06 am

Okay, CTZn, I will do some tests and try to fix this :)
Atleast in the MEL exporter.. Maybe add .obj export feature too 8)

Hope this is good news :lol:
And thanks for all your testing! :D

Cheers!

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Feb 03, 2007 8:37 am

Okay, CTZn, I will do some tests and try to fix this :)
Atleast in the MEL exporter.. Maybe add .obj export feature too 8)

Hope this is good news :lol:
What do you think ? Sure it is !!!

And thanks for all your testing! :D
No problem, I'm somehow... interested.
And you got to bear with me :lol:

Ok, take your time Arne :wink: 8)

How's ThatDude33, got news ?

suvakas wrote:I can't help you with this triangle issue. Unknown territory for me...
Indeed, morally you helped me, see how big my answers were :lol: :lol: :lol:

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Sat Feb 03, 2007 9:31 am

What do you think ?
I think it might be that Maya and Indigo are using diffrent UV cords..
Maya Y-up/Indigo Z-up
Don't know, haven't found anything yet.. :?
And you got to bear with me :lol:
I won't stop untill it's fixed :wink: :P
How's ThatDude33, got news ?
Well, I can't say anything for sure, but I think he's busy.. heh..
I'll try to contact him very soon :)

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Sat Feb 03, 2007 11:23 am

Maybe it's better to focus on the obj feature, and thus better to wait a bit to see if Ono wants to manage textures/multi mats. mtl files would be an excellent solution then.

I found something interesting, you can activate elements numbers in Custom Polygon display, and see what's going on for a defaule sphere:

Image

Image

That illustrate pretty well the theorical example I was giving before. But I couldn't dispaly UVs numbers, dunno why that wasn't working.

I think data ordering is the direction to look at, but again obj is the solution ;)


EDIT: UVs numbers show up in the UV Texture Editor, of course :roll: btw the sphere is 20x20 quads.

Image

Post Reply
16 posts

Who is online

Users browsing this forum: No registered users and 17 guests