Polymesh facevarying indices query ?

15 views
Skip to first unread message

Nicholas Yue

unread,
Nov 5, 2022, 6:11:41 PM11/5/22
to alembic-discussion
Hi,

  For UVs that are per face / facevarying

```
g
v 0 1 0
v -0.942810297 -0.333329707 0
v 0.471405149 -0.333329707 0.816497624
v 0.471405149 -0.333329707 -0.816497624
vt 0.722624719 0.419783443 0
vt 0.4655599 0 0
vt 0.979689538 0 0
vt 0.14841646 0.954223633 0
vt 0 0.534440219 0
vt 0.445249379 0.534440219 0
vt 0.762392759 0.859877348 0
vt 0.46555984 0.440093935 0
vt 0.910809159 0.440093935 0
vt 0 0.257064849 0
vt 0.445249379 0 0
vt 0.445249379 0.514129698 0
g
f 1/1 3/2 4/3
f 1/4 4/5 2/6
f 1/7 2/8 3/9
f 2/10 4/11 3/12
```

  How do we get the indices associated with UV?

        Abc::Int32ArraySamplePtr getFaceIndices() const { return m_indices; }
        Abc::Int32ArraySamplePtr getFaceCounts() const { return m_counts; }

  getFaceIndices only returns those that is for the position

  I wish to get the indices to querying the correct vertex UV for a given face.

Cheers
--

Nicholas Yue

unread,
Nov 5, 2022, 10:45:37 PM11/5/22
to alembic-discussion
I think I figured it out, UV as it's own indices properties which one can query, that indices array as opposed to faceIndices contains the index I should be using

Python prototyping

_uvParam = schema.getUVsParam()
_uvValue = _uvParam.getIndexedValue()
_indices = _uvValue.getIndices()
Reply all
Reply to author
Forward
0 new messages