question

Paolo Giandoso avatar image
Paolo Giandoso asked ·

aiImage node, how to assign a UVset other then the default one?

Hi all

I am writing a script in Python to convert Maya File Nodes to aiImage Nodes.

I need to use aiImage nodes because there are certain UV modifications you can do with them that the default File Node can not.

One thing I can not seem to figure out is how to transfer the correct UVset linking from a default Maya File node to an aiImage Node. And i can not make it work even by hand.

Can anyone help me figure out how o do it?

I see that in an aiImage Node there is a UVSet slot, where you can write down a string with the UV set, but I have tried inserting the name of the UVset I want (uvSet1, from the object pCubeShape2) and it just does not work, it only renders the default 1 . I tried with and without "", with and without '', I tried writing

pCubeShape2.uvSet[2].uvSetName

pCubeShape2.uvSet[2].uvSet1

uvSet1

'pCubeShape2.uvSet[2].uvSetName'

'pCubeShape2.uvSet[2].uvSet1'

'uvSet1'

"pCubeShape2.uvSet[2].uvSetName"

"pCubeShape2.uvSet[2].uvSet1"

"uvSet1"


Nothing works.

With the Maya File Node it works perfectly using the Windows-->Relationship Editors-->UVLinking-->UV-Centric window, but these commands do not seem to work for the aiImage.


I am probably making some really obvious mistake here. Any idea on what is the correct writing?

Also, what to do if the material is applied to multiple objects? Can you write a list/array of sets?

Thanks

P

texturepythonuvaiimage
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

It has to be a uv set on the same object, and you have to use the name that you see in an exported ass file.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Paolo Giandoso avatar image
Paolo Giandoso answered ·
It has to be a uv set on the same object, 

Thanks @Stephen

I should have connected the aiImage to the object's material before :D Now it works!

It only shows up in the renderings, not in the viewport, I noticed, while Maya's default File Node shows up in both.

you have to use the name that you see in an exported ass file. 

That was not the case, the ass file showed this name (and so did the python command uvLink (texture = i, query = True))

pCubeShape2.uvSet[1].uvSetName

but to make it work I had to use the name that shows in Maya UV Set Editor instead, which was

uvSet2 , without any ' ' or '' ''

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.