Announcement

Collapse
No announcement yet.

Modo color gamma node connection stops working after refresh in this scene

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

  • Modo color gamma node connection stops working after refresh in this scene

    Modo color gamma node connection stops working after refresh in this scene

    MODO 10.2v2 131034
    V-Ray 3.40.03 27160

    1. Load the attached scene into the vray render layout
    2. Start RT CPU
    NOTE: The meshes render in a blue color
    3. Go to the schematic and connect the Color Gamma Output color, to the "Trans Col degamma" color input
    NOTE: You will see the color change in RT (red/orange). This is correct so far
    4. Restart RT

    RESULT: The material now renders black
    EXPECTED: The color should be red/orange

    VIDEO: https://www.dropbox.com/s/9r7i2jx4zk...start.mp4?dl=0
    Attached Files
    Last edited by 1funk; 21-01-2017, 01:17 PM.
    Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
    I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

  • #2
    I don't think the refresh is causing this.
    When you connect it with RT running it doesn't update properly and works correctly by chance.

    I will take a look what's wrong.

    Greetings,
    Vladimir Nedev
    Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

    Comment


    • #3
      This looks like a MODO bug to me, I will try to work around it, but it will be nice if you report it to The Foundry as well.

      So, here is what happens, when you have the Color Gamma Output color connected to Trans Col degamma color input.
      Since V-Ray supports the Color Gamma node it exports it as an internal texture and tries to fill the parameters of this texture using the Color Gamma channels.
      Since, Input Color is connected to something that is not an output of a texture/channel modifier, its value is taken directly.
      So, V-Ray tries to read the value of the Color Gamma -> Input Color channel.

      It seems to me that MODO has a bug, where input channels of channel modifiers, which are driven, do not return correct values.
      Instead they return the value stored in the channel (black in this case).

      This can be checked with a simple Python script modified from here : http://modo.sdk.thefoundry.co.uk/wik...Driven_Channel

      Execute the following code in your scene (doesn't matter if you made the connection to "Trans Col degamma"

      Code:
      import lxu.select
      
      scene = lxu.select.SceneSelection().current()
      scnsvc = lx.service.Scene()
       
      gammaNode = scene.ItemLookup('Color Gamma')
      chan = scene.Channels(None, 0.0)
      chan_idx = gammaNode.ChannelLookup("inputColor.R")
      print "The channel value is : " + str(chan.Double(gammaNode, chan_idx))
      Here is the result : Click image for larger version

Name:	incorrect_channel_reading.PNG
Views:	1
Size:	76.4 KB
ID:	866276

      Greetings,
      Vladimir Nedev
      Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

      Comment


      • #4
        Note that the item.channel command returns the correct value in this case.
        It seems the bug is present only when using the ChannelRead API.

        I cannot switch to the item.channel command because
        - it might be slower
        - it might break other stuff
        - it doesn't support reading at arbitrary times, which I need for the animation export and motion blur export, so using item.channel will require modifications to that code as well.

        I plan to work around the issue by reading the values from the texture feeding "Input Color", but I am not sure this will be enough to fix all possible scenarios.

        Greetings,
        Vladimir Nedev
        Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

        Comment


        • #5
          I've added the work around for this issue in today's nightly build ( 2017.01.25 ).
          Give it a try when you can.

          Greetings,
          Vladimir Nedev
          Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

          Comment


          • #6
            Thanks for the info Vladimir
            Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
            I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

            Comment


            • #7
              Vladimir, I tried something else and am getting a crash in V-Ray.

              Modo lets you do crazy stuff like this: The color value goes to the gamma node, then back into the color value, then modo uses the gamma corrected value in the render. You'd think there would be a dependency loop but it works.

              Preview renders the gamma corrected color, but starting RT gives me a crash
              Attached Files
              Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
              I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

              Comment


              • #8
                Aloha Funky,

                Well done, I can reproduce the crash with V-Ray build # 27160 & MODO 10.2.1

                BR.Boyan
                Last edited by boyan; 25-01-2017, 05:23 AM.
                Boyan Nalchadjiiski | QA Engineer @ Chaos |
                E-mail: boyan.nalchadjiiski@chaos.com

                Comment


                • #9
                  Originally posted by 1funk View Post
                  Vladimir, I tried something else and am getting a crash in V-Ray.

                  Modo lets you do crazy stuff like this: The color value goes to the gamma node, then back into the color value, then modo uses the gamma corrected value in the render. You'd think there would be a dependency loop but it works.

                  Preview renders the gamma corrected color, but starting RT gives me a crash
                  I am working on fixing the crash, but I don't think the result of this is well defined.
                  It depends on where in the loop you "start".

                  Also MODO seems to handle this inconsistently in some cases.
                  In the attached scene, I have connected a constant value equal to 100% to the mask slot.
                  In theory, this should have the same result as not connecting anything to the mask slot.
                  But instead the result is as if the gamma was applied twice.

                  So, I will try to fix the crash, but I can't guarantee that the results in V-Ray will match MODO.
                  The results may change if you connect some of the intermediate nodes of the loop to other textures, thus changing where the loop "begins" when V-Ray exports it.

                  color_gamma_and_constant_loop_with_mask.zip

                  Greetings,
                  Vladimir Nedev
                  Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                  Comment


                  • #10
                    Thanks Vladimir. I don't expect the results to always match, especially if the rules don't seem well defined.

                    The important thing is preventing the crash.
                    Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
                    I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

                    Comment


                    • #11
                      So I tried to make a longer loop to test my code.
                      I just tried to add a "Color Invert" in the loop, but MODO doesn't allow it.
                      I wonder whether a loop with 2 items is a special case on purpose or just a bug in the MODO code that detects those loops.

                      Greetings,
                      Vladimir Nedev
                      Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                      Comment


                      • #12
                        The crash should be fixed in tomorrow's nightly build ( 2017.01.27 ).

                        Greetings,
                        Vladimir Nedev
                        Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                        Comment


                        • #13
                          Thank you.
                          Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
                          I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

                          Comment

                          Working...
                          X