daz3d / DazToMaya

Daz To Maya Bridge
https://www.daz3d.com/daz-to-maya-bridge
Other
29 stars 20 forks source link

Preserve color space when saving Arnold textures #39

Open Fidifis opened 2 years ago

Fidifis commented 2 years ago

When saving a scene with textures the change of the fileTextureName attribute causes color space to change to the default value which is sRGB. With this fix, a correct color space is preserved.

Maya version: 2020 How to replicate the bug:

  1. Launch DazToMaya window
  2. Click Auto-Import
  3. Click Convert Materials (Arnold is selected)
  4. Click Save Scene with Textures...
  5. Write file name and save
  6. In hypershade (or anywhere else) look at any texture that should have raw color space

What we can see: All textures have sRGB color space (depends on Maya settings, but sRGB is the default). Expected: sRGB or RAW depending on the texture.

What is fixed in this pull request: Textures preserve their original color space and we can see in the texture node that it has the correct color space.

danielbui78 commented 1 year ago

Code reviewed, will plan to merge after I do some basic QA tests to confirm fix. Thanks very much!