I was looking at the Raspberry Pi 4 specs and realized that running a software renderer on the pi could get some decent graphics. By using USB ports and Ethernet ports, I think I might be able to send graphics data to the pi, using it as an external graphics card.
While the graphics of the external pi card would obviously not approach an RTX, would this work?
Is there a software renderer that I could run on all 4 cores of the Rpi 4?
I realize that I may have to create this myself, and I would like to make a custom, real-time Vulkan driver that uses the pi's cpu to do most of the rendering. It would only use the on-board graphics card to do simple, repetitive tasks that it can do efficiently.
By installing a special driver, I could output graphics data from a computer into the pi via USB or Ethernet; the pi would then solve it and output it through its own display ports.
Does anyone have info that could help me?
I'm a graphics noob and the only help I can get right now is from my dad, but he is quite busy.
-
$\begingroup$ Implement a rasterizer in c and you're good to go , it's not that hard. first versions of Doom and Quake games did the same. You can't get a realtime result with raytracer on Raspberry PI. Search github for samples. $\endgroup$– SalehCommented Jan 24, 2021 at 14:10
1 Answer
Theoraticaly this can work, but I am not sure if it would be very efficient. Modern GPU's are tailored for doing low level graphics operations and the drivers that manage them are also tailored for efficiently overseeing these operations to render your scene.
Now you can ask all the hardware questions related to using Raspberry Pi, how to access its cpu etc to Raspberry Pi SO. As per software side, I think P. Shirley's books on ray tracing should get you started on rendering on cpu's rather than gpus. Using multiple threads is extensively discussed in the following issue of the source code of the book. So once you had written your single threaded cpu ray tracer, you can adapt it easily to execute in multiple threads.
Update 21-01-2021
I noticed that there is already a driver for Raspberry Pi 4 provided by mesa, which gives you access to OpenGLES 3 functionality. I think it is a decent trade off, I was even surprised to see that there is actually a graphics driver for Pi.
Unless you insist on ray tracing your scenes, I would suggest to use that for your experiments.
-
$\begingroup$ E, Thank you for the input. I am going to try to write/find a vulkan driver for the pi or a software renderer for arm. I agree that this would not be efficient, but it would be pretty sick to play minecraft rtx with a graphics card costing 80 dollars. The pi i plan to use has 8 gb of ram, and I can overclock it... I might be able to approach a gtx 1030? $\endgroup$ Commented Jan 21, 2021 at 16:32
-
$\begingroup$ @TheOrchidomaniac edited the anwser as per comment $\endgroup$– Kaan E.Commented Jan 21, 2021 at 23:02
-
$\begingroup$ Does mesa use the cpu or gpu or both? I want to turn my pi into a graphics card, and I plan to squeeze as much processing power out as I can. Usually, software renderers try to use as little cpu as they can to reduce lag, but since I will not be running any other programs or applications, I will edit the mesa files so it uses 100% of the cpu and gpu. I don't want my pi reserving space for central processing when it only needs to process graphics! I will use the vulkan version of mesa, v3dv. Hopefully I can make a usb graphics card capable of nearly anything you can throw at it! $\endgroup$ Commented Jan 22, 2021 at 4:13
-
$\begingroup$ @TheOrchidomaniac I think it can use both depending on the environnment for the pi, I don't know. $\endgroup$– Kaan E.Commented Jan 22, 2021 at 20:57
-
$\begingroup$ @TheOrchidomaniac as a rough estimate nothing you can do on a raspberry pi CPU will come remotely close to any good graphics card $\endgroup$ Commented Apr 11, 2022 at 13:48