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.
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.
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
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).
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:
Navigate to C:\Users\Elias Almén\AppData\Local
Right click on the Temp folder
Choose Properties
In the Security tab click Edit
In the window that appears select your user Elias Almén
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
Could you please try copy and pasting the following in the SketchUp ruby console? 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
Ok, let’s try a different approach. Can you copy and paste this before activating the scene and then try again
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.
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).
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
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.
I tried with all extensions disabled, no difference as far as I can tell.
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:34:in `block in handle'
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:34:in `block in handle'
#<VRay::Callback:0x000001c0f9080988>
Material Bricks_Tiles_D02_50cm 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>'
C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:84:in `call'
C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:84:in `send_pending_events'
C:/Program Files/Chaos Group/V-Ray/V-Ray for SketchUp/extension/ruby/helpers/helpers:84: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:34:in `block in handle'
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'