VRay CPU render don't use full cores?

VRay sdk version: appsdk-win_qt5-nightly-vray_v5.20.24-20221205
OS: Windows Server 2022 standard
In rendering, I found CPU utilization is not always 100%. so, what settings I should change?


my code is simple:

renderer.RenderMode = RenderMode.PRODUCTION;
renderer.SetImprovedDefaultSettings(VRayRenderer.D efaultsPreset.High);
renderer.StartSync();
renderer.WaitForRenderEnd();

​​​​

Hi! A few questions:

1. progressive or bucket production mode? Do you have a noise limit if it’s progressive?
2. Are you able to test with version 6 and tell us whether it’s the same?
3. Can you export a .vrscene-file and check whether it’s the same in V-Ray Standalone (vray.exe)?
4. Can you send us a sample .vrscene-file to reproduce the issue on our side?

What is progressive or bucket production mode? any demo code?

@stanislav.kirilov


Using vray-benchmark, all cores all used constantly. so, it’s bug of vray sdk?

This is VRay standalone (vraystd_adv_60020_x64_vc14), I still can’t use all cores.

SettingsImageSampler plugin controls the image sampler type. SettingsImageSampler::type accepts values: 0 - fixed rate, 1 - adaptive, 2 - adaptive subdivision, 3 - progressive.
You cannot directly compare to V-Ray Benchmark as most probably you use different scenes.

SettingsImageSampler type is 3

SettingsImageSampler settingsIS {
type=3;
min_shade_rate=6;
fixed_subdivs=1;
dmc_minSubdivs=1;
dmc_maxSubdivs=18;
dmc_threshold=0.01;
subdivision_minRate=-1;
subdivision_maxRate=2;
subdivision_jitter=1;
subdivision_threshold=0.1;
subdivision_edges=0;
subdivision_normals=0;
subdivision_normals_threshold=0.05;
progressive_minSubdivs=1;
progressive_maxSubdivs=100;
progressive_threshold=0.01;
progressive_maxTime=0;
progressive_bundleSize=128;
progressive_showMask=0;
progressive_progNoiseThreshold=80;
progressive_effectsUpdate=10;
render_mask_mode=0;
render_mask_clear=0;
progressive_autoswitch_effectsresult=1;
}

just can’t make full use of CPU cores.​

Try lowering the value of progressive_bundleSize, a higher rendering resolution (if your scene is too “light”). Then try bucket rendering by setting SettingsImageSampler::type=1. It would be good if you can test with version 6 as well.

@stanislav.kirilov

I had changed the type of SettingsImageSampler to 1:

SettingsImageSampler imageSampler = SettingsImageSampler.GetInstance(renderer, "settingsIS");
imageSampler.SettingsImageSamplerType = 1; 

however, I exported the vrscene file via renderer.Export, I still got

SettingsImageSampler settingsIS {
type=3;
min_shade_rate=6;
fixed_subdivs=1;
dmc_minSubdivs=1;
dmc_maxSubdivs=18;
dmc_threshold=0.01;
subdivision_minRate=-1;
subdivision_maxRate=2;
subdivision_jitter=1;
subdivision_threshold=0.1;
subdivision_edges=0;
subdivision_normals=0;
subdivision_normals_threshold=0.05;
progressive_minSubdivs=1;
progressive_maxSubdivs=100;
progressive_threshold=0.01;
progressive_maxTime=0;
progressive_bundleSize=128;
progressive_showMask=0;
progressive_progNoiseThreshold=80;
progressive_effectsUpdate=10;
render_mask_mode=0;
render_mask_clear=0;
progressive_autoswitch_effectsresult=1;
}

bug here?​​

And also I found that using Bucket rendering, bumpMap will be affected.

I tried your 2 lines of code to change the sampler type and then Export and the sampler type was changed. If you loaded a vrscene after you had made the change, it wouldn’t work.

oh, I have found the reason, my full code is

SettingsImageSampler imageSampler = SettingsImageSampler.GetInstance(renderer, "settingsIS");
imageSampler.SettingsImageSamplerType = 1;​
renderer.SetImprovedDefaultSettings(VRayRenderer.D efaultsPreset.High);

SetImprovedDefaultSettings(VRayRenderer.DefaultsPreset.High); will change the sampler type to 1.
so, progressive is better than bucket rendering?
And

SettingsRTEngine settingsRTEngine {
cpu_bundle_size=128;
cpu_samples_per_pixel=4;
gpu_bundle_size=192;
gpu_samples_per_pixel=16;
opencl_resizeTextures=0;
opencl_textureFormat=2;
progressive_samples_per_pixel=1;
undersampling=2;
noise_threshold=0.01;
max_draw_interval=150;
min_draw_interval=50;
}

Lower the noise_threshold value can make bucket rendering better?​