Notifications
Clear all

[Closed] how to assign unique uvsets

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)

)

5 Replies

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.

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

For updating issues try the
” with redraw off “
context and maybe
” progressStart “do stuff” “

Works for me…

Goodluck,
Johan

Aha! Thanks for the help, will try when i get a chance.

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.