For Sketchup: Vray Render Settings
This is a complete guide to developing a feature for SketchUp (using the V-Ray for SketchUp API and Ruby).
settings.set("imageSampler/type", preset_hash["image_sampler"]) settings.set("imageSampler/progressive/minSubdivs", preset_hash["min_subdivs"]) settings.set("imageSampler/progressive/maxSubdivs", preset_hash["max_subdivs"]) settings.set("imageSampler/progressive/noiseThreshold", preset_hash["noise_threshold"]) settings.set("gi/on", preset_hash["gi_enabled"]) settings.set("gi/primaryEngine", preset_hash["gi_primary"]) settings.set("gi/secondaryEngine", preset_hash["gi_secondary"]) settings.set("output/width", preset_hash["resolution_width"]) settings.set("output/height", preset_hash["resolution_height"]) settings.set("system/raycaster/quality", preset_hash["quality"]) vray render settings for sketchup
UI.messagebox("Custom preset applied") end end SketchUp uses HTML dialogs for cross-platform UI. This is a complete guide to developing a
def vray return nil unless vray_loaded? VRay::Renderer.instance end end module VRaySettingsManager DEFAULT_PRESETS = "Draft" => "image_sampler" => "Fixed", "min_subdivs" => 1, "max_subdivs" => 4, "noise_threshold" => 0.05, "gi_enabled" => false, "gi_primary" => "Brute force", "gi_secondary" => "None", "resolution_width" => 800, "resolution_height" => 600, "quality" => 0.3 , "Medium" => "image_sampler" => "Progressive", "min_subdivs" => 1, "max_subdivs" => 16, "noise_threshold" => 0.01, "gi_enabled" => true, "gi_primary" => "Brute force", "gi_secondary" => "Light cache", "resolution_width" => 1920, "resolution_height" => 1080, "quality" => 0.6 , "High" => "image_sampler" => "Progressive", "min_subdivs" => 1, "max_subdivs" => 32, "noise_threshold" => 0.005, "gi_enabled" => true, "gi_primary" => "Brute force", "gi_secondary" => "Light cache", "resolution_width" => 3840, "resolution_height" => 2160, "quality" => 0.9 end Step 3: Apply Settings to V-Ray module VRaySettingsManager def apply_preset(preset_name) preset = DEFAULT_PRESETS[preset_name] return unless preset && vray # Access V-Ray settings through its API settings = vray.settings VRay::Renderer
def load_custom_preset(name) file_path = File.join(PRESETS_DIR, "#name.json") return unless File.exist?(file_path)
# Image sampler settings.set("imageSampler/type", preset["image_sampler"]) settings.set("imageSampler/fixed/subdivs", preset["min_subdivs"]) settings.set("imageSampler/progressive/minSubdivs", preset["min_subdivs"]) settings.set("imageSampler/progressive/maxSubdivs", preset["max_subdivs"]) settings.set("imageSampler/progressive/noiseThreshold", preset["noise_threshold"])
