Page 16 of 24

Re: Different Works in Progress

Posted: Fri Jun 07, 2019 9:42 pm
by Sharlybg
My point of view is to have accelerated Bidir + optional spectral for top noch and scientifique approach while keeping the Opencl GPU PGI stuff for visually plausible imagery.

But again we are limited in Human ressources. DADE for Sure is the Superman of Coding. But he is like an Unicorn. Unbelievely rare wonderfull.

We have to manage time we get from him preciously.
Maybe the caustic cache could be improved and solidified before we move somewhere else.

As i said in the General forum side thing are changing too fast currently in CG field with AI and dedicated path tracing hardware evolution.
So we have to work cleverly to avoid to spend energy on tech that would be outdated 6 months later.

openCL PFGIC: Influence of amount of photons

Posted: Fri Jun 07, 2019 11:37 pm
by FarbigeWelt
Comparison of the same scene regarding amount of photons, from 1 to 100 million photons (indirect and caustic cache).
Indirect look up radius is 0.25. Caustic look up radius is 0.0002. Normal angle are 5°. Photon depth is 10. Other parameters have their default values.
openCL PGIC amount of photons
openCL PGIC amount of photons
Interesting, the caustics can be seen clearly already with one million photons but there is a cloudy color pattern around the caustics. The more photons are cached the more colors dilute to smooth neutral shades, additionally the caustics' resolution increases and they get sharper.
The back draw of large amounts of photons is the initialization time, from 15 s (1 mio) to 18 s (10 mio) to 58 s (25 mio) means first a slight increase of time but from 129s (50 mio) over 304s (75 mio) to finally 680 s (100 mio) means a massive increase of time. Render time after init is in average 108s for 1440*810 pixels.
Even with 100 million photons cached openCL cannot compete with the quality of the BiDir render.
Three Lenses BiDir 0.75 res 1003 samples 29m49s
Three Lenses BiDir 0.75 res 1003 samples 29m49s
I hope I can optimize PGIC parameters to achieve a better result keeping shorter times than BiDir.
(For larger images openCL is without questions much faster.)

openCL 12.5 million lights

Posted: Sat Jun 08, 2019 12:00 am
by FarbigeWelt
12.5 million lights and I run out of VRAM of one of my cards. Lights buffer size: 4018001Kbytes (3924MBytes)!
Fortunately, one can switch off cards. The second card has max allocable memory: 8192MBytes instead of 'only' max allocable memory: 4096MBytes.
Mushrooms openCL PGIC 1508 samples 1 GPU 42m20s VRAM 4686, 12.5 mio lights .png

Sun beam in house, denoised with BCD

Posted: Mon Jun 10, 2019 7:49 pm
by FarbigeWelt
Sun beam in house, openCL without indir cache 2503 samples BCD 1.0 44m29s denoise 5m21s
Sun beam in house, openCL without indir cache 2503 samples BCD 1.0 44m29s denoise 5m21s
5m21s for denoising with BCD of total 44m29s rendering time is a quite long time. But OIDN did not work well.

Fun use of ObjectID

Posted: Wed Jun 12, 2019 5:12 pm
by FarbigeWelt
There is this material utility called "Object ID". Normally, object have a object.luxcore.id of -1. This means "Object ID" node reads a random 32 bit value, i.e. a number between 0 and 2^8^4 or 2^32. If node's output is set to Color the first three Bytes can be used as RGB color input for other nodes. Thanks to the open architecture of Blender one can change the ID with a simple python script. Although the principle of three Byte color definition is quite simple it took me a while to write the script for the rainbow colors. Fortunately, adding one object and appending a material to it requires only four lines of code. There are a few lines required for rotation and placement of an object.
First I did not understand the behavior of RGB values. The mistake was to visualize a simple increasing counter with adjustable step width. This lead to repeating 'black' to red patterns. Wondering about it I almost forget what RGB triple Bytes means.
r+g*256+b*256^2; r,g,b<{0,1,2,...,255}.
This means 255 is red max, 255*256 is green max and 255*256^2 is blue max.
Presumed repeating pattern was in fact made from reds and very dark greens because counter's maximum was about 10*256. To draw a rainbow one has to see its color contain at least one of the max colors. After I noticed this simple relation I finished the script with a simple cascade in shape of "if bla: color_r else: if blabla: color_g else: if...".
Fun use of Object ID, openCL 524 samples 4m39s
Fun use of Object ID, openCL 524 samples 4m39s

Quasi 3D Impression

Posted: Wed Jun 12, 2019 7:53 pm
by FarbigeWelt
Animating an object by rotating it softly leads to a spatial, 3D impression.

Animated GIF is downsized by 50%.
Rainbow-Chains.gif
60 frames, 1248*1080, each rendered with 150 samples in 12 s.

Rainbow Chains, the scene with the script and an error message

Posted: Fri Jun 14, 2019 4:18 pm
by FarbigeWelt
After cleaning up the python script and commenting it, I like to share this first bit of software. Maybe someone like to use node "Object ID" too for one's own work and is glad to have a template. The file is free and gratis and can be copied, changed, distributed without restrictions.
Rainbow Chains.zip
Rainbow Chains.zip
(334.89 KiB) Downloaded 136 times
Currently, there are a few issues, independent on my python script. The script runs, adds cubes and appends predefined material.
For testing purpose I run my script, added four area lights and a cuboid to the scene.
BiDir and CPU path render. openCL crashes blender with error message see below.
BiDir renders a strange artifact in shape of a shadow on the cuboid floor.
Rainbow Chains BiDir
Rainbow Chains BiDir
LuxCoreRender 2.2 beta 1, build 322edc9

Code: Select all

[LuxCore][132.485] [PathOCLBaseRenderThread::0] PathOCL kernel compilation error
ERROR clBuildProgram[CL_BUILD_PROGRAM_FAILURE]:
material_main_withoutdynamic.cl:668:88: error: too few arguments to function call, expected 11, have 10
                                        Texture_GetSpectrumValue(material->roughmatte.kdTexIndex, hitPoint TEXTURES_PARAM));
                                                                                                                          ^
materialdefs_funcs_matte.cl:110:1: note: 'RoughMatteMaterial_Sample' declared here
float3 RoughMatteMaterial_Sample(
^
1 error generated.

error: Clang front-end compilation failed!
Frontend phase failed compilation.
Error: Compiling CL to IR


Traceback (most recent call last):
  File "C:\Users\Michael\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlendLuxCore\engine\__init__.py", line 85, in render_final
    final.render(self, scene)
  File "C:\Users\Michael\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlendLuxCore\engine\final.py", line 40, in render
    _render_layer(engine, scene, render_slot_stats)
  File "C:\Users\Michael\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\BlendLuxCore\engine\final.py", line 63, in _render_layer
    engine.session.Start()
RuntimeError: PathOCLBase kernel compilation error
ERROR: PathOCLBase kernel compilation error
Error: EXCEPTION_ACCESS_VIOLATION
What does this bug mean? What could be missing there?

Fun stuff: Rainbow Chains, cubes animated

Posted: Tue Jun 18, 2019 3:58 pm
by FarbigeWelt
With LuxCoreRender V2.2 beta2, 9ba3ad6, openCL works fine again.
Frame with 624*540 render in approx. 5.5 s.
Since the last post I add a few features to the script. It adds a panel with float properties. The position update of a bit more than thousand cubes is done fast enough to change properties value with the mouse without lag. The properties can be key animated. This is how I rendered the following animated GIF.
Rainbow-Chains-animated.gif

Re: Different Works in Progress

Posted: Tue Jun 18, 2019 5:22 pm
by B.Y.O.B.
Nice script!

Spot Study, open CL and BiDir

Posted: Wed Jun 19, 2019 6:20 am
by FarbigeWelt
There are standard spot light in the middle and right column of beams. The other spots have an inner and an outer reflector. The spots on the floor look quite different, especially the spot of the double lights lamp in the front. Rendered image depends much on cache type or render engine.
Spot Study openCL pure 784 samples 0.95 OIDN 5m22s
Spot Study openCL pure 784 samples 0.95 OIDN 5m22s
Spot Study openCL indir cache only 6018 samples 0.85 OIDN 7m43s
Spot Study openCL indir cache only 6018 samples 0.85 OIDN 7m43s
Spot Study openCL caustic cache only 2307 samples 0.85 OIDN 4m59s
Spot Study openCL caustic cache only 2307 samples 0.85 OIDN 4m59s
Spot Study openCL PGIC lr0.02 784 samples 0.95 OIDN 6m28s 50 mio
Spot Study openCL PGIC lr0.02 784 samples 0.95 OIDN 6m28s 50 mio
Spot Study BiDir 75 samples 0.75 OIDN 7m51s
Spot Study BiDir 75 samples 0.75 OIDN 7m51s