Is there a way to render things in eevee using the CPU or is it just a GPU render engine?
3 Answers
The Blender EEVEE render engine uses OpenGL for all the rendering, so YES, rendering on the CPU should be completely doable, as long as a viable CPU-based OpenGL implementation is also installed and enabled.
In particular, Blender lists system requirements of only "OpenGL 3.3", which is officially supported by at least softpipe
, LLVMpipe
, and OpenSWR
.
Linux distributions of Blender additionally include a blender-softwaregl
launcher script which runs Blender using bundled CPU OpenGL libraries.
Base Knowledge
OpenGL is just a standard interface that programmers can use to perform operations that are commonly related to computer graphics. What happens when a program actually runs that code is completely up to the system it's running on.
In most cases, a program that runs OpenGL code will have its processing redirected by the OS to the GPU, because the GPU is specifically designed to be more efficient than the CPU at running the kinds of operations that OpenGL is used for.
However, there is nothing fundamentally different about the mathematics that the CPU is capable of doing and that the GPU is capable of doing, so it is also possible for the OS to simply compute the result of each OpenGL operation entirely on the CPU, without the program ever touching the GPU (or knowing any better).
Analogy
Imagine that the CPU is a secretary, and the GPU is a group of workers. Usually, when a blueprint (OpenGL call) comes in, the secretary passes it along to the workers to do the heavy lifting (rendering).
However, there's nothing that's actually stopping the secretary from rolling up their sleeves and helping with the work themselves— so long as they have the proper training (OpenGL software implementation). They might not be as skilled or in as great shape, so they'll be slower, but they can still do it.
Caveats
There are only some limited situations where this would come in handy:
You do not have access to a GPU, for either a lack of compatible hardware or software.
You have a surplus of CPU power, and you want to squeeze out as much rendering speed as possible from what you have without caring about the efficiency and electricity usage.
Basically, if you have the choice, using the GPU will almost certainly be both faster and more efficient than the CPU. In order to match the speed of a \$50, 30 watt integrated GPU, you would probably need a \$400, 150 watt server-grade CPU. But in cases where GPU-rendering simply isn't an option, setting up a CPU pipeline should be fully possible too.
Addendum
Wikipedia has some information on the software OpenGL capabilites on most Linux desktop and workstation computers:
The following software projects all purport to offer some degrees of support for CPU-only software rendering of OpenGL (and potentially other graphic APIs):
Phoronix.com has also done a performance benchmark of two of the above options:
(Note that the above tests were done on an 80-thread server-grade CPU— and it still struggled to reach a playable framerate in simple video games.)
These guys seem to have successfully run Eevee using openswr
:
For reference, I have run Blender completely in software when all I had access to was a cloud VM with four cores. The performance wasn't great, as you may expect, but it was entirely usable.
How-To
It may be enough for you to simply run Blender using the blender-softwaregl
launcher script that should be included with your installation of Blender:
-
3$\begingroup$ This answer says YES and the one below says NO... which one is correct? $\endgroup$ Commented Jun 29, 2020 at 14:44
-
2$\begingroup$ @Alexis.Rolland My answer is technically correct as I wrote it explicitly to refute the other one, but it should be emphasized that in almost all cases where you care about render times, hardware costs, or energy/environmental efficiency at all, there is likely little justifiable reason to actually render OpenGL/EEVEE on the CPU. A \$2,000 workstation's CPU will probably struggle to keep up with the tiny GPU in a \$200 smartphone for these types of applications. $\endgroup$ Commented Jun 29, 2020 at 21:54
-
1$\begingroup$ Thanks, actually I was thinking about doing simple rendering tasks on a server which does not have a GPU. This is why I am looking for a solution to use EEVEE with CPU. $\endgroup$ Commented Jun 30, 2020 at 1:30
-
$\begingroup$ This is a theoretical and not very useful answer. Of course, it is true that virtually anything can be done in software without any limit on human work and computation time. A useful answer would explain step by step how to do it in Blender, benchmark the result and conclude whether it makes any sense to do it in practice. $\endgroup$– divenexCommented Jul 14, 2021 at 11:02
-
$\begingroup$ @divenex Feel free to write your own, better answer if you have the time and money to test out hundreds of hardware configurations across all three major OS's, in order to be able to give "useful" data on whether it "makes sense to do" for all potential readers of the question. I wrote this as a direct refutation of the other equally theoretical but wrong answer that was accepted at the time, included links to proof it can be done and examples of how to do it, specified the necessary software, and touched on the approximate probable performance characteristics. $\endgroup$ Commented Jul 14, 2021 at 17:43
Blender EEVEE uses OpenGL for all the rendering, so NO, no CPU rendering is supported at all.
Base knowledge
The way the CPU and GPU run commands (instructions) is different, CPU is for more general tasks with higher frequency and shorter latency; GPU is for parallel computation like graphic pipe-line. So they don't really understand the same instructions, OpenGL uses mostly GPU instructions that CPU is bad at it. CPUs (x86) can only simulate the instructions instead of directly supporting them.
Example
Imagine that CPU is a secretary or housekeeper, GPU is a group of workers. You told the secretary to render your scene, so the secretary gathers those object information and convert it to a blue print (OpenGL). Then those workers do the rendering job based on the blue print (instructions) and their tools (GPU hardware).
So your question is basically telling an office secretary build a house by hand, with no tools.
That's why the development Wiki sais it would be very inefficient to run on pure CPU structure. Maybe there might be some strange guys trying to force the secretary to build things by hand, who knows?
Addition
So will we ever be able to use CPU on EEVEE?
No we can't, EEVEE stand for Extra Easy Virtual Environment Engine using the power of OpenGL to achieve something, and the structure is stable right now, it is almost impossible and meaningless to make it compatible with CPU instructions. If there must be a CPU version, it might not be called EEVEE but something else like Cycles v2, and that thing will be hugely different from EEVEE for sure.
-
1$\begingroup$ This answer says NO and the previous one says YES... which one is correct? $\endgroup$ Commented Jun 29, 2020 at 14:44
-
2$\begingroup$ @Will Chen is correct. Just forget this post, I didn't answer the question but rather given an opinion base information $\endgroup$– HikariTWCommented Jun 29, 2020 at 15:18
The official Blender 2.9 reference for Eevee HERE states that CPU rendering is currently not supported and there are no plans to support it.
Limitations: Being an OpenGL engine, Eevee only uses the power of the GPU to render. There are no plans to support CPU (software) rendering as it would be very inefficient. CPU power is still helpful to handle high complexity scenes as the geometry and modifiers are still prepared on the CPU before rendering each frame.
This implies that, although it is true that in principle OpenGL can be rendered (very inefficiently) on the CPU, there is no plan for this to work with Eevee.
What remains to be seen is whether it is possible to use a software implementation of the OpenGL API, as Will answer suggests without practical details. More details would be needed to show if that is feasible in practice and how, and if it is not too slow to make it usable.
-
$\begingroup$ This answer misunderstands how OpenGL works, and deliberately overlooks the existence of software renderers. Blender doesn't need to be "trick[ed]" "into thinking it is using a GPU", because it doesn't actually care about the existence of physical GPU hardware— Only that it has access to a standards-compliant OpenGL API, of which there are many mature and proven software implementations. $\endgroup$ Commented Aug 13, 2021 at 16:36
-
$\begingroup$ Will's comment is addressed in my edited version thanks. $\endgroup$– divenexCommented Aug 17, 2021 at 11:42