PDA

View Full Version : how to assign unique uvsets


dutch_delight
08-11-2007, 04:04 PM
Hi,
I have a little problem and im not sure what the best way is to solve it.
I have 2 quads next to eachother. the vertices are welded so it looks like this: (simple tri-strip)

face1 / face2 | face3 / face4

I need to go through each quad and apply a unique uv set to it.
However, when my loop goes to the next face or quad, the routine grabs the vertices that
are already assigned a uv position and overwrites them effectively messing up the previously assigned uv coords.
How do I assign a unique set of mapverts to the next face/quad?
Any help much appreciated


--quick code:
for n = 1 to $.numfaces do
(

--get vertices of first face
mapverts = meshop.getVertsUsingFace $ n as array

--set mapping to the verts
meshop.setMapVert $ 1 mapverts[1] (point3 0 1 0)
meshop.setMapVert $ 1 mapverts[2] (point3 1 1 0)
meshop.setMapVert $ 1 mapverts[3] (point3 0 0 0)


)

dutch_delight
08-11-2007, 04:07 PM
another related question is about the maxscript help file: "How do I align the UVW_Modifier's Gizmo to a selected face?"

Is there anyway to make this routine quicker? on larger scenes it tends to keep redrawing the modpanel and suspendEditing() only results in crashes.

guruware
08-11-2007, 04:50 PM
you need to use different mapchannels for connecting quads

...
meshop.setMapVert $ 1 mapverts[1] (point3 0 1 0)
meshop.setMapVert $ 2 mapverts[1] (point3 1 1 0)
...

there are "only" 99 mapchannels available...

guruware

JHN
08-11-2007, 08:41 PM
For updating issues try the
" with redraw off "
context and maybe
" progressStart "do stuff" "

Works for me...

Goodluck,
Johan

dutch_delight
08-11-2007, 09:09 PM
Aha! Thanks for the help, will try when i get a chance.

dutch_delight
09-05-2007, 09:36 AM
Decided to re-open the question because I've spend far too long trying to figure this out.

Can I set a custom mapface for a face? I want to do something like take a face and set 3 unique mapverts. Then when finished with that one, go to next face and apply another 3 unique mapverts.

Sofar all my efforts have ended up with all shared edges sharing the same mapverts.

Using a differnt channel eventually ends up messing up previously assigned uv's (even with keep:true) and is there a way of combining channels?



Any help would be greatly appreciated.

CGTalk Moderation
09-05-2007, 09:36 AM
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.