Home Technical Talk

[Maxscript] Why are there less UV verts than Geometry Verts

polycounter lvl 7
Offline / Send Message
EspiSensei polycounter lvl 7
Hello polycounters!

i have a simple feature that it checks if the Uvs are "Corrupted", the tool show the error when the number of UVs verts is less than Geometry Verts ( polyop.getNumMapVerts $ numChannel < $.numverts ). I have discovered, this error is by 2 cases that i actually know:

- Dead vertices
- UVs flipped ( actually i dont understand this case)

This unknown case, i don't know why happens because on some models still the "error" (the number of UVs verts is less than Geometry Verts).

the only way to "Fix" this is re-make the Uvs, but I prefer avoid this way.

Do you know Why happen this?

P.D: in some models happens in one specific channel.

Thank you guys! ^^

Replies

  • Noors
    Online / Send Message
    Noors greentooth
    I think it happened once to me, but the mesh wasn't mine and i have no idea how to reproduce it. People always come with the weirdest bugs.
    The uv's of duplicated elements were welded together. I don't remember if i checked it, but i guess then the map verts were fewer than geo verts. Unwanted behavior anyway. I had to break geo elements to different objects then attach again. Even export/import didn't fix it. I guess the face number is equal tho ?
    If you can, you could share one of the corrupted mesh, it would help to find the issue.
  • Swordslayer
    Offline / Send Message
    Swordslayer interpolator
    You can have one mapvert for all the map faces and it's a perfectly valid mapchannel, so yeah, stuff like this happens.
  • monster
    Offline / Send Message
    monster polycounter
    Why do you consider this an error? When we make very low res background objects that are vertex colored we use UVW Remove modifier to remove UV channel 1 and 2. Because they are not needed.
  • Noors
    Online / Send Message
    Noors greentooth
    Removing the channel there would be no map verts at all.
    I'm curious about one map vert for all map faces, could it be done without building the mesh via maxscript ? All faces having the same vert index ?
  • Swordslayer
    Offline / Send Message
    Swordslayer interpolator
    Noors said:

    I'm curious about one map vert for all map faces, could it be done without building the mesh via maxscript ? All faces having the same vert index ?

    Don't think so, the unwrap modifier will probably have a check against creating degenerate faces (degenerate faces are those where one vert is used repeatedly, such as the top/bottom 2-vert faces of max teapot).
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    It's very easy to create a mesh with less uv verts than real verts in Maya. You can do the 1 vert for everything thing too.

    I suspect (haven't checked) that you could achieve it on an editable mesh in max but I think you'd have to try quite hard - probably via a script. I'm 90% confident it wouldn't be possible on an editable poly

    if you're dealing with imported meshes it's a situation you'd want to account for but for objects created in max it's very unlikely you'd end up with less UV verts than real ones.
  • spacefrog
    Offline / Send Message
    spacefrog polycounter lvl 15
    I remember in older Max versions you simply could delete UV vertices in the Unwrap UVW editor by pressing delete. But apparently this has been removed with the UVW Unwrap Editor revamp a few releases back. But i suspect it's just the delete shortcut being not assigned any longer. The functionality to delete selected UV vertices will still be there ( my assumption )

    Update:
    just checked, the old Unwrap UVW Editor ( tested with Max 8 ) processes the global "max delete" call that is bound to the DEL key. But the updated UVW Editor does'nt process it. Briefly looking I did'nt find an explicit call in it's maxscript interface either...
  • Noors
    Online / Send Message
    Noors greentooth
    Ok there's a paste/weld in the unwrap that indeed let you copy/paste and WELD uv between same topology elements. Resulting in less map vert than geo vert. I guess it's for easing uv packing with similar elements.
  • EspiSensei
    Offline / Send Message
    EspiSensei polycounter lvl 7
    monster said:

    Why do you consider this an error? When we make very low res background objects that are vertex colored we use UVW Remove modifier to remove UV channel 1 and 2. Because they are not needed.

    i agree with you monster, i understand that you remove Uv Channel, theoretically there are less map verts than geom verts, but i said only in the case that the model has UV Channel.
  • EspiSensei
    Offline / Send Message
    EspiSensei polycounter lvl 7
    Noors said:

    I think it happened once to me, but the mesh wasn't mine and i have no idea how to reproduce it. People always come with the weirdest bugs.
    The uv's of duplicated elements were welded together. I don't remember if i checked it, but i guess then the map verts were fewer than geo verts. Unwanted behavior anyway. I had to break geo elements to different objects then attach again. Even export/import didn't fix it. I guess the face number is equal tho ?
    If you can, you could share one of the corrupted mesh, it would help to find the issue.

    yes i have tried this also, but not works. And, sorry i cant share the model :neutral:
  • EspiSensei
    Offline / Send Message
    EspiSensei polycounter lvl 7

    You can have one mapvert for all the map faces and it's a perfectly valid mapchannel, so yeah, stuff like this happens.

    hahaha, i just see it. The 3ds Max black magic.
Sign In or Register to comment.