Re: Blender 4 compatibility
Posted: Sat Dec 30, 2023 4:17 pm
You need blendluxcore for Blender v4
on Blendluxcore it work :
on Blendluxcore it work :
Show your work, get help, participate in development
https://forums.luxcorerender.org/
After changing "Film Device" in Render:"LuxCoreRender" from GPU to CPU rendering in Viewport runs without errors using "Compute Device" CPU.
After switching from "Compute Device" CPU to GPU BlendLuxCore initiated compiling openCL kernel after starting a final render. Just a few minutes later final render started using GPU.
Changing "Film Device" back to "Apple M1 (OPENCL)" threw again an error message:"OpenCL driver API error ..." switching to CPU started rendering in Viewport immediately.
Code: Select all
[LuxCore][83.301] Film hardware image pipeline
[b][LuxCore][83.305] Film hardware device used: Apple M1 OpenCLIntersect (Type: OPENCL_GPU)[/b]
[LuxCore][83.306] Device OpenCL version: OpenCL 1.2
[LuxRays][83.307] [Device Apple M1 OpenCLIntersect] IMAGEPIPELINE buffer size: 57006Kbytes
[LuxRays][83.356] [Device Apple M1 OpenCLIntersect] Merge buffer size: 76008Kbytes
[LuxRays][83.357] [MergeSampleBuffersOCL] Compiler options: -D LUXRAYS_OPENCL_KERNEL -D SLG_OPENCL_KERNEL -D LUXRAYS_OPENCL_DEVICE -D LUXRAYS_OS_APPLE -cl-fast-relaxed-math -cl-mad-enable
[LuxRays][83.357] [MergeSampleBuffersOCL] Compiling kernels
Traceback (most recent call last):
File "/Users/michael/Library/Application Support/Blender/4.0/scripts/addons/BlendLuxCore/engine/base.py", line 128, in view_draw
viewport.view_draw(self, context, depsgraph)
File "/Users/michael/Library/Application Support/Blender/4.0/scripts/addons/BlendLuxCore/engine/viewport.py", line 238, in view_draw
framebuffer.update(engine.session, scene)
File "/Users/michael/Library/Application Support/Blender/4.0/scripts/addons/BlendLuxCore/draw/viewport.py", line 199, in update
luxcore_session.GetFilm().GetOutputFloat(self._output_type, self.buffer)
[b]RuntimeError: OpenCL driver API error (code: -30, file:/Users/runner/work/1/s/src/luxrays/utils/ocl.cpp, line: 371): CL_INVALID_VALUE[/b
Code: Select all
[Engine/Viewport] New session
[Exporter] Creating session
Updated node "Glass Material" in tree Material to new version
[SDL][12166.312] Define ImageMap: NamedObject
[SDL][12166.312] Camera type: perspective
[SDL][12166.312] Camera position: Point[7.35889, -6.92579, 4.95831]
[SDL][12166.312] Camera target: Point[6.70733, -6.31162, 4.51304]
[SDL][12166.312] Camera clipping plane disabled
WARNING: No material defined
[SDL][12166.315] Material definition: 140653016094520
[SDL][12166.315] Material definition: __CLAY__
[SDL][12166.316] Scene objects count: 2
[SDL][12166.316] Light definition: 140653599499272
[SDL][12166.316] Light definition: __WORLD_BACKGROUND_LIGHT__
[LuxCore][12166.344] Configuration:
[LuxCore][12166.344] path.pathdepth.total = 13
[LuxCore][12166.344] path.pathdepth.diffuse = 9
[LuxCore][12166.344] path.pathdepth.glossy = 9
[LuxCore][12166.344] path.pathdepth.specular = 12
[LuxCore][12166.344] path.hybridbackforward.enable = 0
[LuxCore][12166.344] path.hybridbackforward.partition = 0.8
[LuxCore][12166.344] path.hybridbackforward.glossinessthreshold = 0.049
[LuxCore][12166.344] rtpathcpu.zoomphase.size = 4
[LuxCore][12166.344] rtpathcpu.zoomphase.weight = 0
[LuxCore][12166.344] renderengine.type = "RTPATHCPU"
[LuxCore][12166.344] sampler.type = "RTPATHCPUSAMPLER"
[LuxCore][12166.344] film.width = 1387
[LuxCore][12166.344] film.height = 780
[LuxCore][12166.344] film.filter.type = "NONE"
[LuxCore][12166.344] film.filter.width = 1.5
[LuxCore][12166.344] lightstrategy.type = "LOG_POWER"
[LuxCore][12166.344] scene.epsilon.min = 1e-05
[LuxCore][12166.344] scene.epsilon.max = 0.1
[LuxCore][12166.344] path.albedospecular.type = "REFLECT_TRANSMIT"
[LuxCore][12166.344] path.albedospecular.glossinessthreshold = 0.05
[LuxCore][12166.344] film.opencl.enable = 0
[LuxCore][12166.344] path.forceblackbackground.enable = 0
[LuxCore][12166.344] renderengine.seed = 1
[LuxCore][12166.344] film.outputs.0.type = "RGB_IMAGEPIPELINE"
[LuxCore][12166.344] film.outputs.0.index = 0
[LuxCore][12166.344] film.outputs.0.filename = "RGB_IMAGEPIPELINE_0.png"
[LuxCore][12166.344] film.imagepipelines.000.0.type = "NOP"
[LuxCore][12166.344] film.imagepipelines.000.1.type = "TONEMAP_LINEAR"
[LuxCore][12166.345] film.imagepipelines.000.1.scale = 1
[LuxCore][12166.345] film.imagepipelines.000.radiancescales.0.enabled = 1
[LuxCore][12166.345] film.imagepipelines.000.radiancescales.0.globalscale = 1
[LuxCore][12166.345] film.imagepipelines.000.radiancescales.0.rgbscale = 1 1 1
[LuxCore][12166.345] batch.haltspp = 0 0
[LuxCore][12166.345] batch.halttime = 60
[LuxCore][12166.345] File Name Resolver Configuration:
Export took 0.0 s
[LuxCore][12166.345] Film resolution: 1387x780
[SDL][12166.345] Film output definition: RGB_IMAGEPIPELINE [image.png]
[SDL][12166.345] Image pipeline: film.imagepipelines.000
[SDL][12166.345] Image pipeline step 0: NOP
[SDL][12166.345] Image pipeline step 1: TONEMAP_LINEAR
[SDL][12166.346] Film output definition: RGB_IMAGEPIPELINE [RGB_IMAGEPIPELINE_0.png]
[LuxRays][12166.346] OpenCL support: enabled
[LuxRays][12166.346] OpenCL Platform 0: Apple
[LuxRays][12166.346] CUDA support: enabled
[LuxRays][12166.346] Device 0 name: Native
[LuxRays][12166.346] Device 0 type: NATIVE_THREAD
[LuxRays][12166.346] Device 0 compute units: 1
[LuxRays][12166.346] Device 0 preferred float vector width: 4
[LuxRays][12166.346] Device 0 max allocable memory: 17592186044415MBytes
[LuxRays][12166.346] Device 0 max allocable memory block size: 17592186044415MBytes
[LuxRays][12166.346] Device 0 has out of core memory support: 0
[LuxRays][12166.346] Device 1 name: Apple M1
[LuxRays][12166.346] Device 1 type: OPENCL_CPU
[LuxRays][12166.346] Device 1 compute units: 8
[LuxRays][12166.346] Device 1 preferred float vector width: 4
[LuxRays][12166.346] Device 1 max allocable memory: 16384MBytes
[LuxRays][12166.346] Device 1 max allocable memory block size: 4096MBytes
[LuxRays][12166.347] Device 1 has out of core memory support: 0
[LuxRays][12166.347] Device 2 name: Apple M1
[LuxRays][12166.347] Device 2 type: OPENCL_GPU
[LuxRays][12166.347] Device 2 compute units: 8
[LuxRays][12166.347] Device 2 preferred float vector width: 1
[LuxRays][12166.347] Device 2 max allocable memory: 10922MBytes
[LuxRays][12166.347] Device 2 max allocable memory block size: 2048MBytes
[LuxRays][12166.347] Device 2 has out of core memory support: 0
[LuxRays][12166.347] Creating 8 intersection device(s)
[LuxRays][12166.347] Allocating intersection device 0: Native (Type = NATIVE_THREAD)
[LuxRays][12166.347] Allocating intersection device 1: Native (Type = NATIVE_THREAD)
[LuxRays][12166.347] Allocating intersection device 2: Native (Type = NATIVE_THREAD)
[LuxRays][12166.347] Allocating intersection device 3: Native (Type = NATIVE_THREAD)
[LuxRays][12166.347] Allocating intersection device 4: Native (Type = NATIVE_THREAD)
[LuxRays][12166.347] Allocating intersection device 5: Native (Type = NATIVE_THREAD)
[LuxRays][12166.347] Allocating intersection device 6: Native (Type = NATIVE_THREAD)
[LuxRays][12166.347] Allocating intersection device 7: Native (Type = NATIVE_THREAD)
[LuxCore][12166.347] Configuring 8 CPU render threads
[LuxRays][12166.347] Preprocessing DataSet
[LuxRays][12166.347] Total vertex count: 28
[LuxRays][12166.347] Total triangle count: 14
[LuxRays][12166.347] Preprocessing DataSet done
[LuxRays][12166.347] Adding DataSet accelerator: EMBREE
[LuxRays][12166.347] Total vertex count: 28
[LuxRays][12166.347] Total triangle count: 14
[LuxRays][12166.349] EmbreeAccel build time: 1ms
[Engine/Viewport] Pausing session
Hi. At least for Blender 4.0.3 but not updated for Blender 4.1 or so. The main reason is in Blender 4.1 Python version has been changed to v3.11 from v3.10 and other deps too and this will be issue for LuxCoreRender v2.8+