Page 2 of 4

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 1:32 pm
by Dade
juangea wrote: Fri Feb 21, 2020 1:04 pm Regarding the moment of kernel compile... Why not put a button in settings called "Compile Kernel" with a warning explaining that Blender will be frozen for some minutes.

After that if someone has not compiled the kernel and enable OpenCl a message could appear saying "Please compile kernel, Blender will froze for some minutes" and inside the message the same button to compile it.

That will give the user the consciousness that something is happening and that if Blender froze is normal and they have to wait, and at the same time the power to decide if they want to wait or not.

What do you think? :)
Something like that, it could be a button appearing under the render engine selection box so people see this button to pop up the first time they switch to GPU rendering.

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 1:34 pm
by Dade
lacilaci wrote: Fri Feb 21, 2020 1:30 pm I wouldn't worry about first time compilation... just have addon give a message about the kernel compilation and that's it

it is how blender optix/rtx cycles does it, and also how vray rt does it. Each update of the renderer/plugin triggers this "first time run compilation". I think people should be used to this already
I was think people were shipping pre-compiled kernels (is it in CUDA ?) but if it is how Cycles works, it shouldn't be a problem because people are already used to it.

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 1:36 pm
by Dade
Side note: this change affected more than 60 textures and 20+ materials ... it is obvious to say that there likely to be new bugs.

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 1:38 pm
by lacilaci
Dade wrote: Fri Feb 21, 2020 1:34 pm
lacilaci wrote: Fri Feb 21, 2020 1:30 pm I wouldn't worry about first time compilation... just have addon give a message about the kernel compilation and that's it

it is how blender optix/rtx cycles does it, and also how vray rt does it. Each update of the renderer/plugin triggers this "first time run compilation". I think people should be used to this already
I was think people were shipping pre-compiled kernels (is it in CUDA ?) but if it is how Cycles works, it shouldn't be a problem because people are already used to it.
No one does this AFAIK... Blender maybe with cuda but not with optix and vray never did supply precompiled kernels. I'm not sure why is that, maybe based on drivers it might be more up to date doing it at first run.

BTW: last time I updated blender the rtx kernel compilation took about 40-50 seconds.. so 90 for luxcore isn't that far

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 1:45 pm
by juangea
AAAAAAAAAAAAARGH! I want to test it right away! :D

And yes, Cycles does the same, CUDA is pre-compiled, or the Compile times are super small, but for OpenCL and Optix kernels are compiled with the first render :)

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 1:51 pm
by lacilaci
this is what blender tells you when rendering first time with new installation(optix)
popcorn.jpg
I say, if Simon can copypasta this infomessage for luxcore it should be good enough...

There will always be people wondering what's going on no matter how hard you try to give them a heads-up so I wouldn't bother and especially I would avoid making convoluted UI changes just to tell people they need to calm down :D

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 2:06 pm
by B.Y.O.B.
I couldn't get a popup to show up so far (there seem to be some restrictions to what I can do while starting a render), but I can show messages in the two places marked in the screenshot.

However, the bottom place with the red text is usually used for errors, so the user might think the render failed, so it might be better not to use it.

edit: but I can also show a friendly info message in blue in that place :)

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 2:14 pm
by B.Y.O.B.
Dade wrote: Fri Feb 21, 2020 1:28 pm
B.Y.O.B. wrote: Fri Feb 21, 2020 12:04 pm Is there a way to check if the call to KernelCacheFill() is necessary?
I could add a dedicated function (however calling KernelCacheFill() when the cache is already filled takes no time).
It would be good so I know when I have to show the message and when not.

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 3:49 pm
by marcatore
sooooo...when it will be ready for testing? :)

Re: New OpenCL textures and materials evaluation code

Posted: Fri Feb 21, 2020 6:54 pm
by Dade
marcatore wrote: Fri Feb 21, 2020 3:49 pm sooooo...when it will be ready for testing? :)
The binaries for all OS can be downloaded from here: https://dev.azure.com/LuxCoreRender/Lux ... dArtifacts (the down arrow on right)

You can replace your pyluxcore.pyd with the one inside the downloaded win64.zip (yes, it is tricky and suggested only for advanced user).