Autodesk Maya Tutorial - Assign Different UVs Per Texture

Опубликовано: 07 Май 2022
на канале: renderBucket
10,917
130

Summary:
This video will go over how you can map each node or file texture to a different UV Channel or Coordinate of a Mesh. You can do this through UV Centric Relationship Editor but that dialog will not always shows all files/textures. For certain things like displacement this method will allow you to use the node editor to map each displacement or texture to a specific UV Channel/Coordinate of each mesh.

Patreon:
  / renderbucket  

Discord:
  / discord  

Some Sample Python Code To Get You Started If You Want To Potentially Automate This

----

import maya.cmds as cmds

Object You Want To Map To Different UV Channel/Slot
getSel = 'pCube1'

Channel You Want To Use
channel = 1

Get Shading Group Connected To Object
mtlList = cmds.listConnections(cmds.listRelatives(cmds.ls(selection=True), s=True), type='shadingEngine')
print(mtlList)

Get Texture Connected To Color In Material
shading_node = cmds.listConnections(mtlList[0][:-2] + '.color')
print(shading_node)

Get 2D Texture Node Connected To Color Texture
place2d = cmds.listConnections(shading_node[0] + '.uvCoord', type='place2dTexture')
print(place2d)

Create A UV Chooser Node
uvChooser = cmds.shadingNode('uvChooser', asUtility=True)
print(uvChooser)

Connect UV Chooser Node To Place 2D Texture uvCoordinate
cmds.connectAttr(uvChooser+'.outUv', place2d[0]+'.uvCoord', force=True)

Connect Objects Chosen UV Channel To The UV Chooser
cmds.connectAttr(getSel+'.uvSet['+str(channel)+'].uvSetName', uvChooser+'.uvSets[0]', force=True)

---


Смотрите видео Autodesk Maya Tutorial - Assign Different UVs Per Texture онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь renderBucket 07 Май 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 10,917 раз и оно понравилось 130 людям.