Добрый день. Я занимаюсь web-разработкой и почти всем, что с этим связано.

Одна из наиболее значимых возможностей LuxRender — это возможность проводить визуализацию на GPU.

Введение в OpenCL

OpenCL — это открытая спецификация для вычислений на гетерогенных устройствах. Это значит, что в процессе визуализации могут принимать различные вычислительные устройства. Обычно этими устройствами являются видеокарты. Также к визуализации можно привлечь центральный процессор.

Hybrid Rendering

На настоящий момент LuxRender's GPU rendering uses a CPU/GPU hybrid renderer.

The problem with using OpenCL is that some functions are difficult to implement within its code. One possible solution is to use a powerful OpenCL device (обычно это видеокарта) to handle the brute-force work being fed to it by the regular CPU. This is how LuxRender's hybrid renderer works. The CPU handles most of the tasks of the render, such as running the interface, sampling rays, managing the image buffer and effects, etc. The GPU handles the heavy-lifting part of rendering, figuring out which pieces of geometry the ray hit. This allows nearly all the features of a CPU renderer, while running at 2-3 times the speed.

However, there is a flip-side. While a CPU/GPU hybrid can achieve 2-3x the speed of a pure CPU render, a renderer written entirely using OpenCL can achieve far greater speed increases, on the order 5-10x or more. A pure-OpenCL renderer has been experimented with in SmallLuxGPU, and there are plans to port it to LuxRender. There is no timetable for this at the moment, and it will likely support only a subset of LuxRender's features.

Введение в GPU в LuxRender

Для того, чтобы настроить GPU-визуализацию, необходимо указать Hybrid движок в файле сцены. Большинство экспортёров дают возможность делать подобные настройки прямо в программе моделирования. При использовании hybrid становятся доступными следующие интеграторы поверхности: Path и Bidirectional. Важно знать, что интегратор Bidirectional находится на стадии разработки, поэтому результаты его работы могут не совпадать с результатами обычного Bidirectional. It also does not support light strategies aside from one-uniform.

Generally, you should stick to the path integrator when using hybrid rendering for production use. Also, bear in mind that the hybrid renderer currently supports only the basic mesh shape primitive. It does not support instancing, microtriangle displacement, or mathematically defined shapes (such as the geometric sphere primitive).

Системные требования


Для Hybrid требуется видеокарта GeForce 8-series или новее, либо эквивалентная Quadro. Поддержка Tesla не протестирована, но всё должно работать.

Старые и бюджетные видеокарты, такие как GeForce 8600 или GeForce 9400 могут lack the raytracing performance needed for the hybrid renderer to be faster than a pure CPU renderer. This is primarily a limitation of the technology at the time/price-range, and is not likely to improve in the future.


Требуется карта HD 5000 серии или новее, либо эквивалентная FirePro. Видеокарты серии HD 4000 не поддерживаются. В принципе, это недочёт не разработчиков LuxRender, а разработчиков AMD.

Для Linux и Windows необходимо установить OpenCL-версию драйверов, которые могут не входить в стандартный пакет драйверов. You can get the proper drivers from http://support.amd.com/us/gpudownload/Pages/index.aspx

Чем новее версия драйверов, тем лучше.

Решение проблем

LuxRender запустился, но отображается только чёрный экран; в журнале ошибок никаких записей не присутствует

Several users have reported issues with setting the OpenCL work group size to 0, which is supposed to be the auto-detect mode. Setting it manually to 64 seems to work around the issue. Also, this can happen when using an ATI HD 4000 series card. While these cards technically support OpenCL, AMD has neglected to support several features on HD 4000 series cards in their recent drivers, and these features are required for running LuxRender. See the AMD/ATI section above.

У меня несколько видеокарт, но LuxRender использует только одну

This was a known limitation in the old v0.8 release. This should not be an issue with the v1.1 unless you specifically tell LuxRender to use a single device. Note the LuxRender 1.1 does require all targeted devices to be in the same OpenCL platform, but unless you have cards from multiple brands installed (meaning your computer has an Nvida AND an AMD card in it) this should be the case anyway.

LuxRender's log does not show my GPU as being found, even though I have a supported card

By default, LuxRender will target OpenCL platform "0". While this is probably the platform that contains your graphics card, it may not be. You can try increasing the OpenCL Platform setting in the exporter/scene file by 1 until the graphics card is used.

Hybrid медленнее, чем CPU, почему?

Being a hybrid CPU/GPU renderer, LuxRender has to deal with some overhead going back and forth between the CPU and GPU. On a simple scene, or with a slow GPU, this overhead may be larger than the speedup from the GPU, resulting in a slower overal render speed.

The GPU efficiency stat in LuxRender does not match the load reported by my graphics driver

The load shown in the LuxRender GUI is not the computation load on the card as a whole. Rather, it shows the percentage of time that LuxRender is able to keep the GPU fed with rays to trace. In other words, it shows how LuxRender is balancing use between the CPU and the GPU. Since this is specific subset of the GPU's total load, and is only from one application, it will not match what your driver reports. Furthermore, remember that LuxRender is a hybrid CPU/GPU renderer. That means that there's a good chance your GPU is being limited by your CPU (or possibly vice versa). It is unlikely that both your normal CPU load and your actual GPU load will both reach 100%.