PDA

View Full Version : multiquad poly uv clamp mapping tool?


Rodney
11-21-2005, 06:10 AM
How hard would it be to write a multiple quad polygon selection, and clamp UVs to fit into them. example

1. Select polygon faces next to each other , 2 rows of polygons on the U and 5 polygons on V (they would have to be quads) if you could write that regardless if its quads that would be awesome :)

2.Then Clamp all those quads into the 0 - 1 UV cordinate.

3. Have the option to clamp proportional to each other and one non proportional so everything is uniform. (proportional meaning if the poly on colum2 and 3 are shorter then the polygons on column 4 and 5, the proportional would compensate on the U, that way the texture doesn't look stretched).

I have been using a similar tool in maya with a plugin they wrote at work, I would love to use this in max.

I thought of taking the task on maxscript, but I'm not that experienced in it yet, so I just want to know if its even possible through max script.

thanx guys =)

-Rodney

prettyPixel
11-21-2005, 03:55 PM
Hi Rodney

If I understand exactly what you want, you would just like to normalize the UVW of a selection of faces.

I recently wrote a script to do that. I have just updated it today:
http://users.skynet.be/arketip/arketip_normalizeUVWENG.htm

hope this helps

Rodney
11-22-2005, 02:55 AM
thats a cool tool btw :),

I was thinking more along this lines

Select Faces
http://www.rodneyolmos.com/downloads/other/unitize_1.jpg


Unitize or Clamp Selected faces and stretch it to fit the 0 1 uv
http://www.rodneyolmos.com/downloads/other/unitize_2.jpg

2nd Example
Select Faces
http://www.rodneyolmos.com/downloads/other/unitize_3.jpg


And Clamp UVs
http://www.rodneyolmos.com/downloads/other/unitize_4.jpg


Hope that makes things a lil clearer :P

Gibbz
11-22-2005, 05:36 AM
arent the 2 examples the same? just with diffrent selections?

Rodney
11-22-2005, 06:10 AM
:) yeah, I was just showing 2 dif scenarios on where the tool could be useful

prettyPixel
11-22-2005, 10:36 AM
A long time ago I had started to write a script who map arbitrary forms.
The script detect the 4 corners and map the mesh automatically. The original mesh can be 'unmapped'.


http://users.skynet.be/arketip/CGtalk/morphMap-formS.jpg
http://users.skynet.be/arketip/CGtalk/morphMap-circle-flag.jpg


What make the 'clamp' exactly?

Gibbz
11-22-2005, 10:57 AM
Wow, looks nice prettypixel... Care to explain how you go about doing that, especially impressed by the last screenshot where u map it onto a non-quad object nicley....

prettyPixel
11-22-2005, 01:59 PM
No problem.

The principle itself is not complicated and the nature of polygons inside has no importance.

- first, You find for 4 corners of the selection. Paradoxically it is the most complicated part.
- For each border, you add the points of the opposite edge. You obtain a sort of grid. The shape of the grid is not always rectilinear.
- After that, you look at every vertice and you compare it with your grid which represents the UV space 0-1.

I had not ended it because I did not know how to break mapfaces correctly.
In this time I worked at the low-level of the mapping coordinates and my routines created unused mapVertices.
Now I know how to realize it correctly. As soon as I have time I would make an update...

Rodney
11-22-2005, 04:23 PM
wow !! thats nice:applause: :bounce: very impressive it seems that you are also handling any type of polygon size inside of it :thumbsup: me drools... that is exactly what I was thinking about, very cool prettypixel, it has many options that make mapping really nice, are you going to make this public someday ;) or have it for purchase? I want a tool like that so bad in max....

cheers

oh yeah, about "clamp" ( I really dont know what i means exactly, my engrish is bad ) they use that term in Animation Master so it kind of stuck on me, it does the same thing as map by face in max's uvw map

prettyPixel
11-23-2005, 12:36 AM
Thanks. I appreciate the interest which you carry to my script.

The principal risk by diffusing this tool free is that that could make the mapping in 3DSmax too easy.
What would it occur of the hours spent to move the vertices in the window of the unwrap?

lol I joke. I probably will make this script soon but it will be necessary to wait a bit.

Rodney
11-23-2005, 05:47 AM
lol dude !! because making it easy would be the smart thing to do, but why do the smart thing... because if you make it easy then it doesn't look smart :)

I would definetely wait all that is needed, thanx for replying on this post and posting some of your work, keep me updated when you have something ready for public, in the meantime or out of curiosity, was that very hard to write on maxscript? because I didn't see anything on the unwrap uvw that could make that work..

cheers

Gibbz
11-23-2005, 07:09 AM
Intresting, i would love to make something similar for my script im working on(but it does look very complex), care to into more detail on how you get the outer points of the object, and in the correct order?

I under stand what its doing at least :)

Edit, ok i know how to get the outer edges/vertecies, not in order.... i dont know how to get the outer 4 points, what if you have an od shape, similar to your maping to a round object like in your example?

prettyPixel
11-24-2005, 10:13 AM
i dont know how to get the outer 4 points, what if you have an od shape, similar to your maping to a round object like in your example?

My routines to detect the corners are a combination of several calculations.
In particular I try to balance the length of the opposite borders. That is the reason which that works on the circle...

Gibbz
11-24-2005, 11:03 AM
ah thats a great idea... i might try to do something similar eventually, looks pretty hard to do...

111
11-25-2005, 02:30 AM
2 prettypixel


cool idea!!!
very anxious to see your script ready very soon

prettyPixel
01-11-2006, 04:34 PM
Hi guys,

The program "morphMap" is now downloadable.
see: http://forums.cgsociety.org/showthread.php?p=2972579#post2972579

sorry for the delay ;)

CGTalk Moderation
01-11-2006, 04:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.