Announcement

Collapse
No announcement yet.

possible to override textures only in vray scene file?

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

  • possible to override textures only in vray scene file?

    Hi,

    I'm wondering if it's possible to load a vray scene file (coming from 3dsMax) and only updating the textures in Nuke, without changing the shader setup.
    Is there some clever code snippet I could use in the VRayVRScene node's "override snippet" field?

    Cheers,
    frank

  • #2
    Hey,

    Sure it should work. In the VRscene file find the textures that you would like to change. The part that you need should look like this:


    BitmapBuffer bitmapBuffer_0_gsRGB {
    filter_type=1;
    filter_blur=1;
    color_space=1;
    gamma=0.4545454;
    maya_compatible=0;
    interpolation=3;
    file="C:\Users\Georgi Zhekov\Documents\3dsMax\sceneassets\images\BARK5.j pg";
    load_file=1;
    ifl_start_frame=0;
    ifl_playback_rate=1;
    ifl_end_condition=0;
    }


    So in the override snippet you can type

    BitmapBuffer bitmapBuffer_0_gsRGB {

    file="NewTexturePath";

    }


    You might need to add double slashes for your path to work so if your path is C:\Test\Tex.jpg you will have to change it to C:\\Test\\Tex.jpg






    Georgi Zhekov
    Phoenix Product Manager
    Chaos

    Comment


    • #3
      brilliant, thanks, will try that today

      Comment


      • #4
        Is it possible to apply a search and replace via the overrides? All my textures just need the file root swapped and then they would be workable.

        Cheers,
        frank

        Comment


        • #5
          and one more issue. I just plugged in a production scene file and got this:
          [2018/May/21|15:09:10] VRayRenderer2 | VRayScene: Found file for frame 1: "/ohufx/shows/_SYCLONE/MyFoodBag/Russell/3D/RnD/setups/MyFoodBag_Russell_RnD_Russell_Shader_Build_v006.vr scene"
          [2018/May/21|15:09:10] VRayRenderer2 | Reading scene file "/ohufx/shows/_SYCLONE/MyFoodBag/Russell/3D/RnD/setups/MyFoodBag_Russell_RnD_Russell_Shader_Build_v006.vr scene"
          [2018/May/21|15:09:10] VRayRenderer2 | Scene file parsed successfully in 0.0 s.
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "dome_adaptive" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.VRayLigh t001@light_42"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "compensate_camera_exposure" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.a9___Def ault@mtl_brdf_0"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Failed to create object of type "BRDFAlSurface"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "loop_textures" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.Map__7@t ex_1"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "seed" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.Map__7@t ex_1"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "loop_textures" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.Map__30@ tex_10"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "seed" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.Map__30@ tex_10"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "loop_textures" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.Map__37@ tex_mono_0"
          [2018/May/21|15:09:10] VRayRenderer2 | warning: Unknown property "seed" in object "78dc7213359415e09cf8204cacfdbc9374b663d9.Map__37@ tex_mono_0"
          [2018/May/21|15:09:10] VRayRenderer2 | Scene created successfully.
          [2018/May/21|15:09:10] VRayRenderer2 | Objects in scene: 140
          [2018/May/21|15:09:10] VRayRenderer2 | VRayScene: Scene node sets: 2
          [2018/May/21|15:09:10] VRayRenderer2 | VRayScene: Instancer items: 18
          [2018/May/21|15:09:10] VRayRenderer2 | Mtls 6.78MB, Geo 158.58MB, Lights 0.00MB, LightCache 0.23MB, Other 129.95MB (data index 10
          [2018/May/21|15:09:11] VRayRenderer2 | Noise threshold lowered to 0.142857 with 10.9 percent active pixels.
          [2018/May/21|15:09:11] VRayRenderer2 | GPU adaptive lights v1 built successfully
          [2018/May/21|15:09:12] VRayRenderer2 | Noise threshold lowered to 0.090909 with 5.1 percent active pixels.
          [2018/May/21|15:09:12] VRayRenderer2 | Noise threshold lowered to 0.052632 with 5.8 percent active pixels.
          [2018/May/21|15:09:13] VRayRenderer2 | Noise threshold lowered to 0.028571 with 7.9 percent active pixels.
          [2018/May/21|15:09:13] VRayRenderer2 | Noise threshold lowered to 0.014925 with 9.7 percent active pixels.
          [2018/May/21|15:09:14] VRayRenderer2 | Noise threshold lowered to 0.007634 with 11.1 percent active pixels.
          [2018/May/21|15:09:15] VRayRenderer2 | Noise threshold lowered to 0.003861 with 11.9 percent active pixels.
          [2018/May/21|15:09:16] VRayRenderer2 | Noise threshold lowered to 0.001942 with 12.4 percent active pixels.
          [2018/May/21|15:09:16] VRayRenderer2 | Final noise threshold set: 0.001000


          Comment


          • #6
            Hey,

            Unfortunately for now we can't do search and replace right inside of Nuke. You will have to copy your vrscene file and replace the paths in a text editor I'm afraid.
            As for the log messages - seems like you are using a vrscene from a newer V-Ray compared to the one in Nuke and the warnings are about nodes that are missing from V-Ray 3 in Nuke.
            Although it may work you should have in mind that there may be some issues.
            Georgi Zhekov
            Phoenix Product Manager
            Chaos

            Comment


            • #7
              Thanks Georgi. As for the search&replace, maybe there is a chance to integrate with Nuke's path swapping facilities both in the preferences as well as via nuke.filenameFilters()?
              The vray scene file came from 3dsMax, so I guess they are on a version that doesn't exits yet for Nuke?
              The biggest issue is that the model does not pick up any of the textures, but I guess that's no big surprise if it can't create the shader.

              Cheers,
              frank

              Comment


              • #8
                If the shader doesn't exist the textures will render black as you have noted.
                As for the path remapping we already have an idea how to do it we just have to implement it.

                Cheers,
                Georgi Zhekov
                Phoenix Product Manager
                Chaos

                Comment


                • #9
                  Cool, sounds good. Though I hope it will integrate with Nuke's default facilities for that sort of thing?!

                  Comment


                  • #10
                    We'll try and I hope we can use them
                    Georgi Zhekov
                    Phoenix Product Manager
                    Chaos

                    Comment


                    • #11
                      Hi,

                      I just wanted to follow up on this as I just tried loading a vrscene file and Nuke's path swapping is still ignored, so I had to manually search/replace in the file, even though the required swapping is set up in Nuke's preferences.
                      Is this still in the cards as a feature?

                      Also, I think it would be good to have the Nuke node indicate that there are missing textures (and which ones), so that it's easier to QC technically.


                      Cheers,
                      frank

                      Comment


                      • #12
                        Hey,

                        Still in the to do list I'm afraid. I bumped it up and logged the missing textures as a feature request.

                        Cheers,
                        Georgi Zhekov
                        Phoenix Product Manager
                        Chaos

                        Comment


                        • #13
                          Thanks Georgi!

                          Comment


                          • #14
                            Hello Frank,

                            Flagging the missing textures or filepath asset in general is in progress. That should enter in the nightlies next week.

                            I have also looked at the path substitution request, that also seems quickly achievable.
                            Just to be sure, we are only talking about supporting what's can be setup via the Nuke preferences to setup path substitution globally (which affects the persistent Nuke config file), correct ?

                            Coming back to your initial post :
                            I'm wondering if it's possible to load a vray scene file (coming from 3dsMax) and only updating the textures in Nuke, without changing the shader setup.
                            How many texture do you want to change in this case ?
                            A much nicer solution exists and is available in Nuke but is not yet documented - I can check with you if it makes sense to go that way
                            Christophe COT
                            Software Developer - Chaos
                            christophe.cot@chaos.com

                            Comment


                            • #15
                              Thanks Georgie. I am afraid I accidentally mixed two requests in this ticket:
                              The initial one was for manual swapping of textures, e.g. to update textures in Nuke as thy become available (e.g. diffuse_v01.tif to diffuse_v02.tif). I know you can do this via the override snippet but that is not very user friendly.
                              The other request was for general path swapping to occur according to the preferences, so that I can grab a vray scene file that was exported on windows and use it on linux without any manual re-pathing. E.g. If the vrscene file contains a path like X:\lib\textures\my_texture.tif and Nuke's preferences are set to swap X:\lib for /mnt/lib, Vray would try to open the file /mnt/lib/textures/my_texture.tif under linux.
                              All of Nuke's paths are parsed according to the preferences (and any file name filters installed via the Python API) before they are used, and it would be great if Vray could do the same.

                              Does that make sense?

                              Cheers,
                              frank

                              Comment

                              Working...
                              X