Announcement

Collapse
No announcement yet.

ColorSpace for defined colors in materials

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ColorSpace for defined colors in materials

    I just tried out a few Cosmos assets and there's a thing I don't quite understand.

    Maps have a defined color-space now due to the tag in the filename and are loaded with the vray bitmap loader, so in theory both srgb and acescg workflows work fine with that. However, diffuse colors in a VrayMtl for example are just defined as values if they are not coming from a texture map. Meaning if I import an asset and switch between srgb and acescg, one of those renderings will be wrong. What's the thought behind this and how is it supposed to be dealt with?

  • #2
    Hi racoonart ,

    Thank you for sharing your observations with us!

    Yes, VRayBitmap nodes will work fine if you swap between sRGB and ACEScg.
    However, as you pointed out color swatches are a bit different and currently, if you swap from sRGB to ACEScg you won't get consistent results.

    The way to deal with that is to convert the color swatch to VRayColor and set the "RGB primaries" to "sRGB".
    You don't need to do anything about the grayscale colors.

    At some point, we considered doing that for each color swatch, but that made the materials more complicated (something we wanted to avoid for Cosmos).

    We also had the idea of checking the current renderer color space on import and adjust the color swatches for ACEScg (if needed).
    With this approach, however, the materials are configured for the renderer color space that is active when the asset is imported. Changing the renderer color space after import will lead to wrong results.

    I would appreciate your input on the second suggestion, by the way!
    Do you tend to swap between sRGB and ACEScg or do you set it once per project?

    Best regards,
    Tsetso



    Last edited by tsetso; 27-05-2021, 05:41 AM.
    Tsvetan Milanov
    Chaos

    Comment


    • #3
      Hey tsetso ,
      thanks for the reply. That's what I thought...
      New projects are exclusively acescg here but with older projects it can happen that we switch back and forth. I made a script that does the heavy lifting for us, so that's not really an issue with our own materials (for example when using older assets).
      So, if I understand it correctly, cosmos assets are currently set up to be used in srgb, not acescg primaries mode. I can adjust our script to do the conversion of the colors but it's not really ideal as it clutters the shader tree, as you said yourself.

      I don't have a "best" solution for this problem as every single one has pro's and cons... other than using a VrayColor I could imagine:
      1) a dropdown/switch in the material to specify which color space the color swatches are specified in. The renderer then does the proper conversion internally (like in VrayColor). Not great but less hassle than an extra Vraycolor node.
      2) specifying the swatch color space in the render settings (next to the rgb primaries). Easiest, but less versatile solution and again no indication of what is was made for in the material itself, so it will get lost when exported.
      3) wait for proper color managment in max . Just kidding...

      I don't like the idea "burning in" a color depending on the current active primaries, I specifically tried out if this is what happened and was relieved to see that it doesn't. Having an asset where it's unknown which primaries are used is worse than just having all by default in srgb. This will lead to all sorts of issues down the line when exchanging assets with other studios or clients. There needs to be an indicator which primaries a material is specified in, thus my suggestion of a switch or dropdown.

      [Edit] Ideally we'd not just have the point3 arbitrary color data of a material property, but metadata attached to it which defines what space this color is defined in. I don't see how this will ever happen in max though...
      Last edited by racoonart; 27-05-2021, 06:04 AM.

      Comment


      • #4
        Thank you very much for your suggestions! That's definitely very valuable feedback.

        Yes, you can assume that all Cosmos assets are set up to be used in sRGB (both colors and textures).
        If you switch to ACEScg, you'll have to convert the colors (Diffuse, Reflection Color, Refraction Color, Self-illumination, Sheen Color, Coat Color).
        For the material slots that have textures assigned (rgb or grayscale), you don't need to do anything - they will render fine with both sRGB and ACEScg.

        Best regards,
        Tsetso
        Tsvetan Milanov
        Chaos

        Comment


        • #5
          Originally posted by racoonart View Post
          I just tried out a few Cosmos assets and there's a thing I don't quite understand.

          Maps have a defined color-space now due to the tag in the filename and are loaded with the vray bitmap loader, so in theory both srgb and acescg workflows work fine with that. However, diffuse colors in a VrayMtl for example are just defined as values if they are not coming from a texture map. Meaning if I import an asset and switch between srgb and acescg, one of those renderings will be wrong. What's the thought behind this and how is it supposed to be dealt with?
          I faced the same problem as you, all assets what i imported were rendered dark compared to the other existing assets.
          (For me I always work with Gamma Off for both 3ds max and Vray)
          I found a workaround, however it is a pain to apply it for each scene before rendering (especially if you import a lot of assets from Cosmos)
          I hope in the they will add some kind of included script that will detect which configuration is your scene having already and import the asset with the right colorspace settings accordingly.

          The Solution i found is :
          There is a free 3ds max script called VMC (VRay Material Control)
          after importing the sets from Cosmos and before you start rendering
          - you select all the assets imported from Cosmos
          - you open VMC
          - you select VrayBitmap in 1 and color_space in 2 (as it will be shown in the photo included)
          - you press the ''Selected" button
          - you render your frame
          That corrected the colorspace setting for my scenes and made the assets render normally like the other existing assets Click image for larger version

Name:	Untitled.jpg
Views:	573
Size:	19.4 KB
ID:	1115062

          Let me know if it works for you too, and again I hope the Chaos team will be able to implement such a script or similar in the future releases and updates.​​

          Comment


          • #6
            I was thinking of implementing an option for the Material Library and for Cosmos to either add VRayColor textures or to convert the colors to ACEScg on importing a material (f.e. similar to the option for applying Triplanar mapping or real-world scale for the material library). Would that work? Which of the two methods do you prefer (VRayColor or directly modifying the colors for ACEScg)?

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              If I had to chose I would go with VrayColor, definitely. As I said above, a big issue with baking in the colors is that nobody knows what color space it is meant to be in (which is why I would prefer having a primaries dropdown per material. We have one for VrayColor and VrayBitmap already). I could however imagine that others think differently about it. If we were a studio that never has to touch older files or exchange data and could enforce a strict color pipeline we would go the "modify colors" approach.

              Comment


              • #8
                Ok, thanks for the input!

                Best regards,
                Vlado
                I only act like I know everything, Rogers.

                Comment

                Working...
                X