Search Unity

Current Raspberry Pi 3 B+ and Unity state?

Discussion in 'General Discussion' started by Metron, Jan 17, 2019.

  1. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Hello,

    one of our customers would like to integrate a very small scale computer into one of his products. The computer must be able to run Unity games (simple, low-poly 3D not 2D games).

    We thought about using a Raspberry 3 B+, but it seems to me that it's quite cumbersome to make it run as should (no GPU support, must go through Android install, ...).

    Has anyone experience running Unity on a Raspberry?

    Which very small sized computer (PC?) would you advise if Raspberry is no viable solution?

    Thanks for your help.
     
  2. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    There's the Intel NUC, but it'll be something like 10x the cost of a Pi...

    Or cheap Android tablets... but they tend to have next to no GPU power, and may struggle with even very simple Unity games...
     
  3. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
  4. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    I've gotten Unity running on a Raspberry Pi running a version of Android TV. I would not recommend it though. The performance was not very good. And the process of getting it running was a real pain.

    Unity has a bit more overhead than you'd want for a minimalist platform like the Raspberry Pi. And without proper GPU support you just aren't going to get the kind of rendering you would have wanted. Having Pi support would be nice, but it isn't a particularly viable platform for selling software on. It's understandable why Unity hasn't been pushing to support thin clients like this.
     
    Deleted User likes this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    There are numerous solutions available. Just search for "stick pc" or "single board pc". Below is an example board that has a Samsung Exynos 5422 Octo-core (2.1 GHz Cortex-A15 x4, 1.4 GHz Cortex-A7 x4), Mali-T628 (OpenGL ES 3.1), 2GB RAM, USB 3.0, Gigabit Ethernet (most likely through USB) for $49.

    https://www.hardkernel.com/shop/odroid-xu4q-special-price/
     
  6. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Thanks for your replies... this was very helpful.

    I think I'll give the odroid a shot :)
     
  7. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    587
    A friend of mine bought a recent, very small Intel NUK and said it's workable for a VIVE game. It's small, cheap, and if that's true would be excellent at any simple Unity game. That would be my recommendation.

    I did get a Unity build working on an Android OS Pi. The performance was just able to load a spinning 3D object. I recently created a similar project using Openframeworks (C++) on a PI and the performance was much smoother. I could load a couple of 3D objects with a scrolling image background. Once I added any kind of interactivity, it was a struggle to maintain 30 fps.

    My takeaway - the PI can do some very simple interactive game type of things, but the lack of a GPU is seriously limiting. You pretty much have to think of game styles of the 80's or maybe mid 90's. Tons of cheats, workarounds, etc. to get things working without a GPU.
     
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    Your friend was most likely comparing the cost to a normal desktop computer. The Intel NUC is a barebones PC that ships with a processor and you have to add the remainder of the components. It starts at $300 for the i3 model, $350 for the i5 model, and $450 for the i7 model. Once you've added memory and storage the final cost is close to $650.

    https://www.amazon.com/Intel-NUC-Mainstream-Kit-NUC8i7BEH/dp/B07GX69JQP/
     
    Last edited: Jan 21, 2019
  9. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    The GPU limitation is a product of Android on the Pi. The Raspberry Pi itself has a GPU, and it can be accessed and used for other operating systems running on it. The Pi GPU is an older model, which means that several of the more recent iterations of OpenGL ES don't run on it, which is why Android wouldn't bother supporting it.

    If you want to develop using GPU support, be prepared to be running Raspbian, and settling for an older OpenGL version.

    It's also worth noting that most of the "alternative" micro-boards do have GPUs that Android supports, and will most likely get much better performance. The only problem is that pretty much all of them are more expensive than the Pi, and not nearly as ubiquitous in their support or communities. Bottom line, you aren't getting a GPU-capable micro computer for Pi prices, and will need to spend extra for one that can run Android with GPU rendering support. But you won't have to go the NUC route, as there are plenty of micro-computers in the sub-$100 range, just don't expect to find any in the sub-$40 range.
     
    Last edited: Jan 21, 2019
  10. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    Also, going to throw this out there again, but Tilengine.

    Tilengine is one of the go-to options I usually think about when looking at the Pi for game development. But one of the factors at play in this is that Tilengine specifically does not require or use the GPU. It is a scan-line renderer, and has python bindings, so it can be used on a Pi out-of-the-box, with standard Raspbian. But using Tilengine would be an alternative to using Unity, and would be limiting in a lot of other ways. It's a great way to make pixel-art tile-based games for the Pi, but you can kiss 3D models goodbye. And it would NOT solve the issue of Unity not running well on a Pi.

    Your best bet is an ODroid, or possibly the new Asus Tinkerboard. (their new S model is more powerful, but also more than twice as much as a Pi) Once again, you are going to be spending more, but can at least keep your budget below $100. I recommend looking for examples of other people trying out Unity on those machines before making a decision.
     
  11. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Have you considered the HTML Tiny build of Unity, it requires using TalkScript but builds for any platform that can run a browser (Canvas or HTML) and aims to have a very small build size e.g. suitable for Pi level devices.

    Info on Tiny here: https://blogs.unity3d.com/2018/12/05/project-tiny-preview-package-is-here/
     
  12. TypeScript. And they're working on the reimplementation on C# basis.
     
    Arowx likes this.
  13. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    From experience I don't think it's good to use preview packages in production. I'd rather wait that it becomes a proven, used tool.
     
  14. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Apologies Tiny is currently only 2D so it's not a viable solution for your clients needs, at the moment.
     
  15. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    No need for apologies :) With all the changes and new (preview) features, it's hard to keep up current information. I wonder if Tiny will include 3D features in the end.
     
    hippocoder likes this.
  16. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    What about the recently released Orange Pi 3 (article)
    • ARM Cortex-A53 4 core 1.8Ghz CPU,
    • ARM Mali-T720 graphics (OpenGL 3.1/DX11),
    • 1 or 2 GB RAM
    • Android or Linux OS,
    • $29.90/£23.59 to £39.90/£21.48.
    The more powerful GPU is the key think Raspberry Pi lacks.
     
    VirtualPierogi and Ryiah like this.
  17. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    Ooooo, now there's an option that might just cover all of the desired requirements. Given how new it is, I would love to see some technical breakdowns and comparisons before making a purchase. In particular, it would be advisable to find out how well this Orange Pi 3 supports Android, as that would be the real factor for providing Unity support. But the initial technical sheet is quite promising. A decently powerful processor for a single board computer, a respectable GPU with the needed graphical compatibility, options for 1 or 2 Gigs of Ram, built in Wifi and Bluetooth. And best of all, a VERY competitive price point. The lowest-end model option is less than the standard Raspberry Pi, and even the tricked-out version is only about $5 more expensive than the Raspberry Pi.

    And here's a nifty little addition. They offer the option for adding on-board flash memory. This was actually a major selling point for the much-more-expensive Tinker Board S. Micro-SD cards as the primary source of long-term storage tend to be more than a bit slow on most single-board computers. Having on-board flash memory that you can use for installing an operating system and software is a big advantage for speed. Even the tiny 8 Gigs they're offering for the Orange Pi 3 would still be a sizable feature for the diminutive system, and well worth the extra expense.

    If the Orange Pi 3 gets some solid reviews, I would seriously consider ordering one. And I would definitely spring for the $40 model. It would be well worth the price for what you're getting.
     
  18. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
  19. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    There are a few minor drawbacks to the Orange Pi 3, that I can see.

    • Fewer pins: The Orange Pi 3 has fewer I/O pins compared to most hobby boards. For a lot of users, this won't be much of a problem, but it is worth pointing out.
    • No micro-USB power. The Orange Pi 3 does not accept standard micro-USB for providing power, it requires a more traditional adapter. Of course, the adapter it requires is quite common, and not expensive, but it is still worth thinking about.
    • Not nearly as broad support. You aren't going to find nearly as large of a community, or as much development support on the Orange Pi 3, so be prepared to face some trial-and-error when trying to get things working with that thing.
    As you can tell, these are all fairly minor quibbles, and likely wouldn't be a problem for most developers. I would be ever so slightly put off by having fewer pins. But even my dreams of creating tiny arcade cabinets would not be derailed. The number of pins on the board are still plenty for a standard 2-Player JAMMA rig. If you can get Android 7.0 running on this thing, it should be off to the races.

    Also, if I'm not mistaken, this bloody thing might actually support SSD sticks. That's a PCI Express slot I see mounted on it.
     
    Last edited: Jan 23, 2019
  20. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Not sure about Tiny having 3D, but regular ECS is more than capable of fitting the same performance window, albeit at cost of more ram. You would probably want builtin or LWRP for it (best yet, a modified LWRP to be even faster).
     
    VirtualPierogi likes this.
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    That said this would be easily solved with a microcontroller that converts each pin into multiple pins. The Raspberry Pi has had plenty of daughterboards become available for it. If this takes off I fully expect we'll see a few for it too.
     
  22. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,139
    I do recall them having 3D support in tiny in the works, but I'm pretty sure it's going to be like a "one light, hard limit on shader instructions" kind of thing.
     
  23. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    I got tired of waiting, and I had some extra Amazon gift cards burning a hole in my pocket. I decided to go ahead and order an Asus Tinker Board. The Orange Pi 3 looks like a good value, but a lot of the stories I've been hearing about its software support have not been positive. I would likely have to go it alone in trying to optimize that thing. Asus provides a capable Android distro.

    I didn't spring for the S model, just went with the vanilla Tinker Board. Having the built-in flash memory would have been nice, but not a deal-breaker. And the upgraded support for 4K was thoroughly unnecessary for my purposes. As far as CPU, GPU and RAM are concerned, the two models are practically identical. I've been getting better about posting tutorials for my work, so I'll toss up a guide once I get Unity running on it. I'm curious to see what kind of performance it will be capable of with a Unity Android build.
     
    OCASM likes this.
  24. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    The Odroid arrived at the office today. I included a linux chip and a small battery in the order. Didn't have any time to check it today, but I'm gonna do it on Tuesday latest.
     
    OCASM likes this.
  25. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Have Unity considered allowing building for Linux ARM yet that could make for a more native performant app that can take advantage of Burst?
     
    VirtualPierogi likes this.
  26. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    The proposition has been brought up, but I believe it is too much of a fringe case for them to prioritize it. Frankly, we're lucky that Unity currently supports exporting to Linux, due in large part to the increased support for Linux from digital distribution platforms like Steam. Unity is primarily a commercial engine, and is not open-source. So while it does get used for a lot of hobby projects, most of its revenue comes from people using it in a commercial capacity. And ARM-Linux is very much the domain of hobbyists and tinkerers. x86 Linux is niche as it is, but ARM-Linux is almost exclusively getting run on Raspberry Pis and other assorted single-board computers. And almost no one buys or sells games on those platforms. There's just no monetary incentive to pursue a build like that.

    Thankfully, they do support ARM-Android, and these days a lot of modern single-board computers also support Android. The only reason Raspberry Pi has poor Android support is because of how old its GPU is. There IS now an official Android build that targets the Raspberry Pi, it's just that GPU support is still not there. (and likely never will be) So there is a viable deployment path, just be prepared to build some APKs.

    There's always the option of developing natively in ARM-Linux, but this would preclude the use of Unity. I am planning on trying to build Godot when I get my Tinker Board. Earlier versions of Godot with less stringent GPU requirements were built for the Raspberry Pi, so it is definitely possible.
     
    Ryiah likes this.
  27. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    My Tinker Board arrived a little early, and I was able to start trying it out today. So far, impression have been good. It runs a little on the hot side under load, but I was expecting that from some of the accounts I had read ahead of time. The installation of the Tinker OS Android build was relatively painless. It did take a fair amount of time to actually boot up, but once up and running performance was solid, with no noticeable hiccups. And you can tell immediately that GPU support is present. The interface in Android runs, way, way faster than it ever did on the Raspberry Pi trials I performed. It was also very easy to adjust the screen settings within the Android interface itself. No mucking around with configuration settings in a text file.

    Getting a Unity deployment running on it was extremely easy. I used 5.6 as my trial Unity version, and the process was largely painless. The Tinker OS Android build comes with an application for installing APKs, and you can just copy one over on a USB drive without any headache. I'm certain there are probably other more developer-friendly deployment options for more rapid prototyping and testing, but it is nice having a simple, no-nonsense option as well. I built a basic 3D scene with several 3D objects, a camera that constantly rotates around the scene via a script, and a nice little UI element for reporting the current framerate. (also driven by the same script) Everything worked fine. The scene displayed without any needed alterations, and ran at a steady 60 fps. This was with a 3D scene, at 1080p, but with no anti-aliasing. There was only one light, and no advanced textures or effects, but it was still really nice to confirm GPU rendering was a go.

    So yes, I would say that the Tinker Board is a viable option. The comparable ODroid models would also probably be a good bet.
     
    Ryiah likes this.
  28. Metron

    Metron

    Joined:
    Aug 24, 2009
    Posts:
    1,137
    Sooo... I've done some tests with the XU4Q (which uses a passive cooling system). OS (Linux) setup was as easy as switching the device on 2 times (bought a 64Gb Linux eMMC module which is clipped onto the back of the board).

    I then ran some 3D tests. One of them was this: http://carvisualizer.plus360degrees.com/threejs/

    It ran smooth with no problems. The devices heated up quite a bit, though. For my customer I might want to add a fan on top of the passive cooling system.

    Haven't yet done any Unity tests, but I expect it to run ok (we're going low poly style).
     
    Ryiah likes this.
  29. zubair_saqib

    zubair_saqib

    Joined:
    Sep 21, 2014
    Posts:
    11
    Hello, so have you done your unity test. Was it working?
    We are planning to use it as a simple media player with touch support building it through unity.
     
  30. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Soon.... very soon i give this a try.

    I guess it will be time for the S***ty LWRP to make its proofs :p
    (EDIT: sorry for the taunt but i found no ways/platforms in wich LWRP is faster than SRP ^^ )

    I don't expect much though on a raspi as my project is kinda crazy-big.....

    Anyway i'll give it a try 8)) and will report all here.

    Happy unitying !
     
  31. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    You are aware that the LWRP is an implementation of the SRP, right?
     
    hippocoder likes this.
  32. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You seem excited and have an active imagination. Happy Unitying too :)
     
    grobonom and Joe-Censored like this.
  33. grobonom

    grobonom

    Joined:
    Jun 23, 2018
    Posts:
    335
    Indeed ^^
    I just suppose ( according to its name ) that it's lighter and then faster than the SRP....

    In practice, i never noticed this.
    But i guess U3D team works hard for making FPS fluent apps on light platforms ?

    Yes @hippocoder when talking about U3D, i'm always excited ;)
    It's kinda Vall'allah to me :p Coz it allows me to make things a wanna do.....

    Happy unitying !
     
  34. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,139
    You should stop making assumptions and read the documentation. LWRP, URP, and HDRP, are all built upon the Scriptable Render Pipeline system or "SRP" for short.
     
    Ryiah likes this.
  35. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,145
    You clearly aren't familiar with the SRP, URP, and HDRP so let me explain the basics. The SRP (Scriptable Render Pipeline) is a framework for building a custom rendering pipeline. Just like the .NET framework by itself doesn't do anything, the SRP by itself doesn't render anything. It requires a custom profile.

    The URP (Universal Render Pipeline) and HDRP (High-Definition Render Pipeline) are example profiles for the SRP. They are intended to be used as starting points for people wanting to build their own pipelines.

    On the topic of performance it's not a straightforward answer that the URP is faster than the HDRP. It's completely possible based on the developer for a URP-based game to be slower than an HDRP-based game just as it's possible for it to be the other way around. An unskilled developer won't magically have great performance by choosing the URP.
     
    Last edited: Apr 15, 2020
  36. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    LWRP is to SRP as Ubuntu is to Linux.