Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export UV sets as USD Texture Coordinate value types by default #618

Merged

Conversation

mattyjams
Copy link
Contributor

This change flips the default value of the PIXMAYA_WRITE_UV_AS_FLOAT2 env setting variable so that UV sets export to USD as texCoord2f-typed instead of float2-typed. The resulting values are handled the same by consumers but the additional context about the role of the value's type can provide some useful information for DCCs and pipelines.

The old behavior of exporting UV sets as float2-typed can be restored by setting the environment variable PIXMAYA_WRITE_UV_AS_FLOAT2 to true.

@mattyjams
Copy link
Contributor Author

See the usd-interest thread here for a bit more discussion and context:
https://groups.google.com/forum/#!topic/usd-interest/I6loL1KCY5k

@HamedSabri-adsk HamedSabri-adsk added core Related to core library import-export Related to Import and/or Export labels Jul 1, 2020
Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me! Thanks.

There are bunch of other places where we are still writing out UVs as float2, could you also apply the same changes for them for sake of consistency?

test/lib/ufe/test-samples/cylinder/cylinder.usda
test/lib/ufe/test-samples/parentCmd/simpleHierarchy.usda
test/lib/ufe/test-samples/parentCmd/simpleSceneTRS.usda
test/lib/ufe/test-samples/sphereAnimatedRadius/sphereAnimatedRadius.usda
test/lib/usd/translators/UsdImportCameraTest/UsdImportCameraTest.usda
test/lib/usd/translators/UsdImportFrameRangeTest/MovingCube.usda
test/lib/usd/translators/UsdImportSessionLayerTest/Cubes.usda
test/lib/usd/translators/UsdImportShadingModeDisplayColor/RedCube.usda
test/lib/usd/translators/UsdImportShadingModePxrRis/MarbleCube.usda

@kxl-adsk
Copy link

kxl-adsk commented Jul 1, 2020

@mattyjams Thank you!

This change flips the default value of the PIXMAYA_WRITE_UV_AS_FLOAT2 env
setting variable so that UV sets export to USD as texCoord2f-typed instead of
float2-typed. The resulting values are handled the same by consumers but the
additional context about the role of the value's type can provide some useful
information for DCCs and pipelines.

The old behavior of exporting UV sets as float2-typed can be restored by
setting the environment variable PIXMAYA_WRITE_UV_AS_FLOAT2 to true.
@mattyjams mattyjams force-pushed the pr/export_UV_sets_as_TexCoord_by_default branch from 4844130 to 0c0ebae Compare July 1, 2020 07:32
@mattyjams
Copy link
Contributor Author

There are bunch of other places where we are still writing out UVs as float2, could you also apply the same changes for them for sake of consistency?

Done. Rebased the change and replaced float2 with texCoord2f for all UV sets in 0c0ebae.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core library import-export Related to Import and/or Export
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants