- User Since
- Jan 4 2018, 7:57 AM (151 w, 3 d)
Oct 27 2020
Sorry, I left this thread for a while because there were no responses. Are reviewers still interested in this patch? Are there any technical issues other than performance?
I am currently busy in finishing a company project, so I may get some free time only after a couple of months.
Sep 27 2020
Sep 26 2020
Jun 19 2020
Apr 19 2020
Feb 13 2020
Feb 11 2020
Jan 29 2020
Dec 16 2019
Dec 15 2019
Update the patch to be appliable to the latest revision.
Dec 9 2019
Dec 3 2019
For external path tracing libraries not supporting a feature for estimation of a tight ray start time at the moment, ray_offset() is restored as a fallback. However, self-intersection is still guaranteed to be prevented by this patch for them. Only functions ray_offset() and ray_update_tstart() need to be modified when those libraries are ready to support the feature.
Dec 2 2019
In addition to triangle_update_tstart(), motion_triangle_update_tstart() is implemented to calculate a tight ray start time for motion triangle primitives.
I have completely forgotten triangle vertex motion.
Dec 1 2019
For an AVX2-optimized CPU kernel, bvh traversal routines are set to use triangle_intersect() temporarily instead of triangle_intersect8() for rays with tstart updated.
Nov 30 2019
External path tracing libraries now skip triangle_update_tstart() because the function does not work with them at all.
Some OptiX code is modified not to check unnecessary conditions. Optimization for OptiX is still left to experts.
Nov 29 2019
Thank @Patrick Mours (pmoursnv) for your advice. I have practically zero knowledge on OptiX.
Nov 28 2019
Artifacts caused by mesh overlapping are resolved.
Nov 25 2019
Recently I encountered an application which requires not only to render a scene filled with instanced objects correctly with arbitrary scaling but also to deal with objects of overlapped meshes without noticeable artifacts. For that application, my solution was to use this patch's method ( 'primitive id checking' ) with providing 'ray offsetting' as an additional option. I believe that we should put first priority on rendering a normal scene without glitches, but I admit that I am also distracted by mesh overlapping artifacts.
Nov 21 2019
Cycles object property 'offset_bouncing_ray' and light property 'offset_emitting_ray' are added. Their default values are 'False' but if given 'True' for older blender files after the blender minor version number being raised, all previous versions of blender files would be rendered as before with the mesh overlap issue as less noticed as before. ( Self-intersection avoidance is guaranteed now with this patch, but brightness of hair geom test results will become darken a little. ) I believe this is how blender has evolved. The related UI change is not included, and it seems better for blender staffs to consider the UI layout themselves.
Nov 19 2019
Thanks for spotting my last-minute error! I had to re-render benchmark scenes. Here are the results:
Nov 18 2019
Logic for preventing self-intersection within a cardinal curve is revised to be consistent with logic for other primitives.
Epsilon check is introduced between adjacent line segments to make the algorithm more numerically robust. Since this epsilon is defined in the curve parameter space [0,1], it will not cause any harm unlike those defined in the world space or the object space.
Nov 17 2019
Now I claim that this patch passed all the cycles regression tests.
Nov 15 2019
Many bugs are fixed.
Nov 14 2019
That is exciting to see movement on this front!
Unfortunately, with this change there are some real regressions caught by out regression suit. Just some of them: visibility_particles, ambient_occlusion_only_local, point density_vertices_world, volume_overlap, volume_scatter_albedo.
Nov 13 2019
Nov 6 2019
Unfortunately this does not fix the Optix render if one of the gpu's is driving the screen.
I get with 2 exact same RTX 2080 and the spring test scene:OptiX error OPTIX_ERROR_LAUNCH_FAILURE in optixLaunch(pipelines[PIP_PATH_TRACE], cuda_stream[thread_index], launch_params_ptr, launch_params.data_elements, &sbt_params, wtile.w * wtile.num_samples, wtile.h, 1), line 668
and then only the not screen driving device renders the scene. Cuda seems fine now.
Nov 5 2019
Parentheses are added around ‘&&’ within ‘||’ to make it easier to understand and silence strict compiler warning.
Oct 29 2019
The style of comments is modified.
Oct 28 2019
Oct 25 2019
Tab spacings were modified according to surrounding codes.
Oct 24 2019
Jan 31 2018
Thanks for a quick fix. In the above patch, I found one initialization was missed:
(svm_closure.h, line 336)
bsdf->T = make_float3(0.0f, 0.0f, 0.0f);
and it is not in function 'bsdf_microfacet_ggx_refraction_setup()', either.
Jan 30 2018
This patch might result in wrong merges of MicrofacetBsdf closures.
Jan 28 2018
I found that this patch made 'device_only_memory<T>' over-allocate device memory by a factor of sizeof(T). I think that line 248 of 'device_memory.h' should be revised from
data_size = num*sizeof(T);
data_size = num;
Jan 27 2018
I made a simple example showing the bug.
An emissive sphere is reflected on a floor with two different principled bsdfs. The left half has 'subsurface: 0.000' while the right half has 'subsurface: 0.300', so the latter is expected to look fuzzier.
Jan 26 2018
That's it! Thanks for a quick fix!
Although I cannot test the patch at the moment, I am certain that it will work for the 'path tracing' mode because 'shader_bsdf_pick' and 'shader_bssrdf_pick' now perform sampling closures in the same way with the same 'randu' ( = PRNG_BSDF_U ). ( ... besides numerical issues. How about sharing the code body as a common function? )
Yes. I will upload the .blend file after this weekend.
I encountered an issue related to this patch. Using blender v2.79 I made a test scene having a floor with rough reflection. However, the floor was rendered like a mirror with the blender executable built with the latest master branch. I found that the phenomenon occurred when a single shader generated multiple BSDF closures along with BSSRDF closures.
Jan 17 2018
Oh... I've always taken a snapshot of projects/blender.git at the git://git.blender.org/blender.git but it has given me mixed files.
The master version contains the atomic version of util_math_matrix.h, as you said.
I also encountered this problem and found a remedy.
I have been working on a rendering project, which heavily relies on the cycles denoising feature. ( Thanks a lot~! )