Closed pbrt4bounty closed 1 year ago
Hi.. I have a render error when the values for beta_m or beta_n in the Hair material are out of range( > 1)
beta_m
beta_n
F:\REPOS\pbrt4blender\src\pbrt\bxdfs.cpp:280 ] FATAL Check failed: beta_n >= 0 && beta_n <= 1 (unknown ) 0x0000000000000000 - ☺ (unknown ) 0x0000000000000000 - ☺ (unknown ) 0x00007FFB290C1B20 - configthreadlocale (unknown ) 0x00007FFB29DA75F0 - BaseThreadInitThunk (unknown ) 0x00007FFB2B642680 - RtlUserThreadStart Rendering failed at pixel (187, 0) sample 0. Debug with "--debugstart 187,0,0"
To avoid this error on render time, maybe is better to clamp this values on the right range in the material creation time.
FloatTexture beta_m = parameters.GetFloatTexture("beta_m", 0.3f, alloc); Clamp(beta_m, 0.0f, 1.0f); FloatTexture beta_n = parameters.GetFloatTexture("beta_n", 0.3f, alloc); Clamp(beta_n, 0.0f, 1.0f);
Cheers..
Or maybe extend this code, which checks the minimum value, so that it also checks the maximum value.. https://github.com/mmp/pbrt-v4/blob/master/src/pbrt/materials.h#L382
Hi.. I have a render error when the values for
beta_m
orbeta_n
in the Hair material are out of range( > 1)To avoid this error on render time, maybe is better to clamp this values on the right range in the material creation time.
Cheers..