Digital humans the art of the digital double
Ever wanted to know how digital doubles are created in the movie industry? This course will give you an insight into how it's done.
# 1 08-01-2020 , 10:33 AM
Registered User
Join Date: Jan 2020
Posts: 1

Optimal way to assign shaders to faces

This is for a transfer shader between different software tool I’m working on. The geometry shape nodes have a multi attribute with a long list of face indices for each shading group. The only way I’ve fount to assign those faces to a shadingGroup node is to run a loop through each face and with the sets command assign each face to a shadingGroup node. While this works fine for light geometries, when the geometry is large and the number of faces long, the script takes too long to finish if at all.

Is there another, faster way to assign faces to a shadingGroup node?

PS. I’ve tried converting the long list of faces to the unflatten format Maya uses (ie .f[1:300] ) but that doesn’t seem to make anything better.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads