Skip to content

Conversation

@chrisc-lee
Copy link
Contributor

@chrisc-lee chrisc-lee commented Aug 14, 2023

Currently, when converting from a Cortex object to a Maya Mesh we set the normals anytime the normals were stored on the scc but by doing so we imply these are static values and so Maya locks them. Locked normals are undesirable in many parts of the Pipeline especially when deforming meshes as forcing the normal to stay the same causes unexpected results. Unlocked normals make more sense in most cases as they are computed values. This change willl stop setting normals so they are unlocked and instead rely on Maya to compute them.

Breaking Changes

  • IECoreMaya : Maya meshes converted from Cortex data no longer have normals set explicitly and instead relies on Maya to calculate them.

Fixes

Related Issues

  • Solves issues when reading an SCC written out from a Mesh that stored normals, the normals were than locked on read since the values were baked and treated as non-computed by Maya which is undesirable for deformation rigs.

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Cortex project's prevailing coding style and conventions.

Currently, when converting from a Cortex object to a Maya Mesh,
we set the normals anytime the normals are stored in the scc.
Setting the normals explicitly implies these are static values
and so Maya locks them rather than computing them on the fly.

Locked normales are undesirable in many parts of the Pipeline,
especially for deforming geometry as not recomputing them leads
to unexpected results, e.g. wrong tangents or incorrect shader
computations.

This change removes the normal transfer from the scc to the
Maya geometry and instead we rely on Maya to compute them.
Update test to exclude checking normals are equal since now we rely
on normals being computed by Maya which createBox does not do
Add to normals test a check that normals are unlocked after converting
from a cortex object
@ivanimanishi ivanimanishi merged commit 6103e34 into ImageEngine:RB-10.5 Aug 17, 2023
@ivanimanishi ivanimanishi deleted the mayaMeshLockedNormals branch August 17, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants