Announcement

Collapse
No announcement yet.

V-Ray 5 SU2021 V-Ray materials with textures in diffuse wont apply

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

  • V-Ray 5 SU2021 V-Ray materials with textures in diffuse wont apply

    Hey!

    SU2021 + V-Ray5

    When i try to apply V-Ray materials with diffuse textures it does not work. The first three boxes in the picutre have been applied "Apply to selection" with the materials in the Asset editor.
    Only when I try with non-texture materials it works. I.e. the last to boxes in the picture.

    I have tried to reinstall without any luck. I've also tried V-Ray5 for SU2020, same thing.

    Click image for larger version

Name:	Chaos3.PNG
Views:	2307
Size:	798.5 KB
ID:	1093863

    BR
    Elias

  • #2
    Hi elias_almn

    This is odd - have you made any changes to the file path of the V-Ray Material Library? Assets by default are located in C:\Users\USERNAME\Documents\V-Ray Material Library
    In the SketchUp viewport it appears that the materials are not assigned at all.

    We would need some further information to determine the cause of the issue -
    • Please do share info regarding your OS version/CPU/GPU/driver versions.
    • Are you using any additional 3rd party plugins? If so, would it be possible to disable them and check if the issue persists?
    • Please also share recent log files so we can check if they can give us more information. Log files are located in C:\Users\USERNAME\AppData\Roaming\Chaos Group\V-Ray for SketchUp (VRayForSketchUp.log) and C:\Users\USERNAME\AppData\Local\Temp
    • It would also be appreciated if you could make a recording with the issue visible so we can try and reproduce it step by step.

    Last edited by nikoleta.garkova; 30-11-2020, 08:36 AM.
    Nikoleta Garkova | chaos.com

    Comment


    • #3
      Hi Nikoleta,

      Thanks for your response. Before we continue the investigation I want you to know that I found a work around.
      When I clear the highlighted texture slot in the material it then becomes applicable to an object as it normally should.

      Any thoughts on this?

      BR
      Elias

      Comment


      • #4
        Hi elias_almn,

        It looks to me that the root cause for your issue is the handling of .tx texture files (used for the library materials).
        The textures in the new material library are quite large because of their resolution but also thanks to the mipmaps stored in every tx file.
        After the initial V-Ray 5 release we noticed that SketchUp is storing the .tx files in the SketchUp model (the ones displayed in the viewport) without any additional compression and this was causing the .skp files to become huge.
        In hotfix 1 we added a special handling for tx textures to avoid this unnecessary bloating of the skp files.
        We are basically generating a smaller JPG version of each TX and using that for the viewport display in SketchUp (the smaller version is also stored in the skp file).
        So, the bottom line is - this optimization is most probably causing your issue.

        We have not received any other reports for the same thing which makes me think there is something specific on your system that plays a role.
        Can you please tell me where is the Material Library located on your computer?
        Is there a chance that the folder is locked (or write protected)?

        We will continue the investigation on our end and I'll get back to you as soon as we find something.
        Konstantin



        Comment


        • #5
          Hi Konstantin,

          Thanks for the info. I've got at "standard" computer setup, nothing special i.e. software that blocks or locks files.
          The V-Ray installation was made with all standard pathways, no special selections. The Material Library is located: C:\Users\Elias Almén\Documents\V-Ray Material Library

          I'm starting to believe that this can be related to my other problem also. When i try to batch render I get an error string in the Frame buffer.
          I know that there is a work around, render as animation with 0sec transitions. The work around is OK but not optimal.

          BR
          Elias



          Comment


          • #6
            Hi elias_almn,

            I can actually see the issue now - it's the é character in your user name.
            Both the .tx handling logic and the Batch Rendering process require some temporary files to be saved.
            The path to the temp folder most probably contains you username - something like C:\Users\Elias Almén\AppData\Local\Temp
            And V-Ray fails to save the temp files there.

            This is our fault entirely.
            We'll resolve both issues with the next update (it is coming soon).

            Excuse us for the inconvenience,
            Konstantin

            Comment


            • #7
              ok! No worries Konstantin. Happy to help!

              **SLOVED**

              BR
              Elias

              Comment


              • #8
                Hi elias_almn,

                Unfortunately the non-Latin characters might not be the issue after all.
                We did everything we could to reproduce it and we could not.

                I'll need your help once more.
                Can you open the Ruby Console in SketchUp and try assigning a material or starting a batch rendering job?
                You can then share any errors if such get printed.
                I'm still suspecting lack of write permissions for the Temp folder.

                Another thing you can check is the folder itself:
                1. Navigate to C:\Users\Elias Almén\AppData\Local
                2. Right click on the Temp folder
                3. Choose Properties
                4. In the Security tab click Edit
                5. In the window that appears select your user Elias Almén
                6. Make sure that all the Deny checkboxes are disabled
                In the Security tab you can also click Advanced and make sure your user has Full Control
                Last edited by konstantin_chaos; 10-12-2020, 05:58 AM.

                Comment


                • #9
                  Hey Konstantin, thanks for getting back to me.

                  I've check the premissions and I have full admin rights to the folder. And all other folders Everything is truly just "standard" settings.

                  RUBY LOG APPLYING V-Ray MAT:
                  helpers(57):error: failed to save image
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:132:in `save_file'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:132:in `block in set_sketchup_texture'
                  C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/tmpdir.rb:89:in `mktmpdir'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:129:in `set_sketchup_texture'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:108:in `block in apply_texture'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:142:in `preserving_size'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:104:in `apply_texture'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:15:in `apply'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:65:in `translate'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:17:in `block in sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:53:in `initialize'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:13:in `new'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:13:in `sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/material_sync:21:in `to_sketchup'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:143:in `handle_plugin_created'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:77:in `handle_plugin_change'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:49:in `block (3 levels) in <module:Callbacks>'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:47:in `each'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:47:in `block (2 levels) in <module:Callbacks>'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:82:in `handle_outer'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:75:in `block in handle'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:74:in `change'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:74:in `handle'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:46:in `block in <module:Callbacks>'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/throttle:40:in `sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:59:in `sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/callbacks:156:in `block in <module:Callbacks>'
                  SketchUp:in `call'
                  material_sync(24):error: failed to save image
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:132:in `save_file'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:132:in `block in set_sketchup_texture'
                  C:/Program Files/SketchUp/SketchUp 2021/Tools/RubyStdLib/tmpdir.rb:89:in `mktmpdir'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:129:in `set_sketchup_texture'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:108:in `block in apply_texture'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:142:in `preserving_size'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:104:in `apply_texture'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_translator:15:in `apply'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:65:in `translate'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:17:in `block in sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:53:in `initialize'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:13:in `new'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/vray_to_sketchup_material_syncer:13:in `sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/special_objects/material_sync:21:in `to_sketchup'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:143:in `handle_plugin_created'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:77:in `handle_plugin_change'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:49:in `block (3 levels) in <module:Callbacks>'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:47:in `each'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:47:in `block (2 levels) in <module:Callbacks>'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:82:in `handle_outer'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:75:in `block in handle'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:74:in `change'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:74:in `handle'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:46:in `block in <module:Callbacks>'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/throttle:40:in `sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/plugin_callbacks:59:in `sync'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/callbacks:156:in `block in <module:Callbacks>'
                  SketchUp:in `call'
                  #<VRay::Callback:0x000001d0a159e430>
                  Material Bricks_A01_1m not found
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/tools/material_applier:34:in `apply_to_selection'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/callbacks/callbacks:166:in `block in <module:Callbacks>'
                  SketchUp:in `call'

                  RUBY LOG BATCH RENDER
                  Error: #<StandardError: Failed to export scene>
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/live_scene/batch_exporter:32:in `block in export'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/live_scene/batch_exporter:18:in `collect'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/live_scene/batch_exporter:18:in `export'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/gui/commands:107:in `block in <module:GUI>'
                  C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/gui/commands:18:in `block in generate_command'


                  Comment


                  • #10
                    Could you please try copy and pasting the following in the SketchUp ruby console?
                    Code:
                    Dir.mktmpdir { |dir| File.write("#{dir}/temp.txt", "hello"); File.read("#{dir}/temp.txt") }
                    Please copy paste the output here. This should help us narrow down the problem

                    Comment


                    • #11
                      Hey,

                      Code:
                      Dir.mktmpdir { |dir| File.write("#{dir}/temp.txt", "hello"); File.read("#{dir}/temp.txt") }
                      hello

                      Comment


                      • #12
                        Ok, let's try a different approach. Can you copy and paste this before activating the scene and then try again
                        Code:
                        class Dir
                            singleton_class.send(:alias_method, :old_mktmpdir, :mktmpdir)
                            def self.mktmpdir(*args)
                                res = old_mktmpdir(*args).force_encoding("utf-8")
                                block_given? ? yield(res) : res
                            end
                        end
                        This overrides the tmpdir creation method and forces utf-8 encoding on path strings.

                        Comment


                        • #13
                          Hey, not sure about the activating scene part. But I pasted it in the ruby console without clicking any of the V-Ray icons (in a completely new scene).

                          Code:
                          class Dir
                          singleton_class.send(:alias_method, :old_mktmpdir, :mktmpdir)
                          def self.mktmpdir(*args)
                          res = old_mktmpdir(*args).force_encoding("utf-8")
                          block_given? ? yield(res) : res
                          end
                          end
                          mktmpdir

                          Comment


                          • #14
                            ​After I pasted that code when i try to apply a material I get this. The diffuse texture slot turns empty.

                            Code:
                            materials_helper(68):info: "Material sanity check: Resyncing VRay::Material /Bricks_A02_1m"
                            Error: #<SystemStackError: stack level too deep>
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            <main>:3:in `mktmpdir'
                            ...
                            Click image for larger version

Name:	Chaos10.PNG
Views:	1500
Size:	774.2 KB
ID:	1095463
                            Attached Files
                            Last edited by elias_almn; 11-12-2020, 12:23 AM.

                            Comment


                            • #15
                              I seem to remember some ruby issue related to the order in which the "tmpdir" and "fileutils" gems are loaded
                              Could you try disabling all other SketchUp extensions? (assuming you have others installed)
                              Bare in mind that after disabling them you will have to close SketchUp for the changes to take effect.

                              Comment

                              Working...
                              X