Search Unity

Unity and the Raspberry PI?

Discussion in 'General Discussion' started by TylerPerry, Dec 25, 2012.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Broadcom BCM2835 700MHz ARM1176JZFS processor with FPU and VideoCore IV dual-core GPU
    GPU provides Open GL ES 2.0, hardware-accelerated OpenVG, and 1080p30 H.264 high-profile decode
    GPU is capable of 1Gpixel/s, 1.5Gtexel/s or 24GFLOPs with texture filtering and DMA infrastructure

    source - http://uk.rs-online.com/web/p/processor-microcontroller-development-kits/8111284/

    Quite a few mobile devices use it as the GPU http://en.wikipedia.org/wiki/VideoCore

    But don't most developers on the Pi use a flavour of Linux, and Unity can built to Linux or is it limited to (X86) and not ARM???
     
  2. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    The raspberry pi, and particularly the pi 2 is very capable hardware. Most people's Unity mobile games could run on it just fine. The problem, last time I checked and still seems to me, the video drivers just have extremely poor performance on the android versions released for it.
     
    Miscellaneous likes this.
  3. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,165
    Will Unity support Raspberry Pi with Windows 10?
     
    twobob and Miscellaneous like this.
  4. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Maybe with the mobile version of Windows 10 as I don't think the VideoCore IV is DirectX 12 compatible.
     
  5. MassDivide

    MassDivide

    Joined:
    Apr 16, 2013
    Posts:
    4
    Why not just have the unity web plugin support for PI?
    its a feasable option, given the low power of the pi and space limitations.
    Would be awesome to stream a photon powered game to my pi, like a game of angrybots :)
     
  6. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Not really. I'm pretty sure the webplayer is a modified version of the standalone player, if it did support the Raspberry Pi then a standalone Linux ARM version is just as likely.
     
  7. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    I would like the "Linux Headless Server" builds to run on a Pi.

    This seems like a very obtainable goal...
     
  8. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    The Pi 2 has Android running now, for a headless server that would work I'd imagine (Graphics are slow though so running games isn't a option ATM) I also wonder if it's possible to run a Windows store build on Windows 10 I imagine it's the same just without the fancy UI so maybe. Web GL should work but would be really slow, with UNet though perhaps it would be viable for a server.
     
  9. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    For what are you all hoping the Raspberry support for? playing games or just wanting to tinker with it?

    (I have both raspberry 1 and 2)
     
  10. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    nice - I signed up for the connect win 10 image. might get around to grabbing a pi2 then, my piB will have to remain in pure linux land... (binfrmt_misc might be able to help a bit though...)
     
  11. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    In my case I was thinking miniature Authoritative Server.
     
  12. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    I'd like if it could play games and run a server and do some headless simulation stuff.
     
  13. XGundam05

    XGundam05

    Joined:
    Mar 29, 2012
    Posts:
    473
    I've got a personal hobby project involving a mech game and custom controls using the Pi...which would be less of a pita to develop in Unity (my c++ is as rusty as the hull of the Titanic).

    And note: WebGL isn't an option on the pi (at least in raspbian) because the X environment (in which the browser runs) isn't hardware accelerated :( . Otherwise, nw.js would be a nice alternative.
     
    Last edited: May 26, 2015
    TylerPerry likes this.
  14. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Why does it need to be on the Pi? Just because it's cheap or for use of things like GPIO?
     
  15. XGundam05

    XGundam05

    Joined:
    Mar 29, 2012
    Posts:
    473
    Pretty much for both (cheap and GPIO), I could use one of the various arcade stick keyboard controllers to interface the controls, but I really wanted to put it into a custom arcade cabinet. I've got access to 3D printer (friend backed the micro) for custom sticks, and I've got access to printed vinyl graphics for the cabinet art (via another friend who runs a graphic design shop).

    And with the GPIO I could also run some RGB lighting based on the average screen color or other events.
     
  16. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    Last edited: May 28, 2015
  17. XGundam05

    XGundam05

    Joined:
    Mar 29, 2012
    Posts:
    473
    Mostly because I already own a Pi 2 and my budget for the project has enough left for the remaining hardware/electronics
    ¯\_(ツ)_/¯

    I had originally got it to make a Virtual On cabinet...but the only version I could legally emulate was the Dreamcast version, and I can't hardly find a Windows emulator that supports the twinstick peripheral, let alone a Linux build.

    I'm currently attempting Urho3d, and it is letting my update my C++ knowledge (managed pointers!? nice!). But I still don't have a cross-compile toolchain set up, and I have to implement myself several things that Unity so blissfully implements for me.
     
    Last edited: May 28, 2015
  18. evan140

    evan140

    Joined:
    Jul 15, 2014
    Posts:
    72
    Just wondering, what in a basic way, is the difference between x86/x64 and ARM processors?
     
  19. XGundam05

    XGundam05

    Joined:
    Mar 29, 2012
    Posts:
    473
    ARM processors are RISC processors (reduced instruction set computing), while x86 processors are CISC processors (complex instruction set computing). The instruction set being the available machine code instructions (think Assembler).
     
  20. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    Simply put they are different architectures. The ARM architecture is based around the concepts of a RISC architecture (Reduced Instruction Set Computer) and thus emphasizes a smaller set of instructions that often only perform one task.

    Simpler architectures have the advantage that they require fewer components and thus are cheaper, use less power, and put off less heat.

    http://en.wikipedia.org/wiki/ARM_architecture
    http://en.wikipedia.org/wiki/Reduced_instruction_set_computing

    The x86/x64 architecture is based around the concepts of a CISC architecture (Complex Instruction Set Computer) and thus emphasizes a larger set of instructions with some instructions performing multiple tasks.

    Complex architectures typically have additional logic, beyond simply performing multiple tasks with each instruction, that allow them to execute some instructions out of order, better predict the flow of code, and have larger caches.

    http://en.wikipedia.org/wiki/X86
    http://en.wikipedia.org/wiki/Complex_instruction_set_computing
     
    Last edited: May 28, 2015
  21. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    This is probably worth a look:
     
  22. XGundam05

    XGundam05

    Joined:
    Mar 29, 2012
    Posts:
    473
    So I just got notified that the Windows 10 IoT Core Preview is up. I don't hold out much hope, but I plan on giving it a look-see this weekend.
     
    TylerPerry likes this.
  23. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    I think Unity should support RaspPi, if not the first, at the very least Pi2. All they have to do is to compile linux branch for Linux-ARM, see if it works, if works or could work with relatively small adjustments, just roll with it.
     
  24. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    I'm fairly certain that Unity does now support the Raspberry Pi 2. If I'm not mistaken, the Windows 10 Universal App target allows for compilation for the Raspberry Pi 2. This requires that you install Windows 10 on your Raspberry Pi 2, but that just makes sense.
     
  25. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Never gonna install nsa spyware.
     
  26. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
    I found a statement in another thread by a Unity employee that it should work.

    http://forum.unity3d.com/threads/un...al-apps-and-raspberry-pi.353718/#post-2287140

    Support for universal binaries on Linux would be nice too. Or does Linux have a more modern equivalent to Microsoft's universal apps? Must admit I haven't kept up to date with it at all.

    https://icculus.org/fatelf/
     
    Last edited: Oct 9, 2015
    TylerPerry and JoeStrout like this.
  27. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Hmm. I don't see how installing Windows 10 on a RPi would ever make sense!
     
  28. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,165
    Windows 10 on Rasp2 is different than Windows 10 on desktop. so i do not think that will work.
     
    darkhog likes this.
  29. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    So exited!
     
  30. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    Yes, it is different. But one of the big benefits of Microsoft's new Universal App system is that you can use their environment to build projects for any number of different platforms. And this includes the Raspberry Pi 2. (although not any previous versions of the Pi) The Windows IoT edition that runs on the Raspberry Pi 2 is able to run software that you compile using the Windows Universal App system.

    So you would have to...
    1. Install Windows IoT on the Raspberry Pi 2.
    2. Install one of the latest versions of Unity on a separate Windows 10 machine. (the Universal App target was only recently added)
    3. Build your Unity project for the Windows Universal App target.
    4. Most likely, take the created Universal App project into Visual Studio, and build that sucker for Windows IoT.
    5. Copy that compiled project to the Raspberry Pi 2, and run it.
     
    tango209 and Ryiah like this.
  31. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,165
    Richard have you tried this workflow?
     
  32. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    Sadly, no. I only have an older Raspberry Pi B+. So I haven't gotten a chance to dig into Windows IoT at all. I was planning on picking up a Raspberry Pi 2, but I'm really busy at the moment with other things that aren't game-related. So I wouldn't have the time to play around with it even if I did pick one up.

    If anyone does have a Raspberry Pi 2, please give this a go and let us know how it works.
     
  33. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,165
    i have both rasp b+ and rasp 2. i wrote few simple applications for both. afaik there is no gui option for windows 10 rasp 2 edition. it works as target device. it is intended to work as a micro controller device. it is not like a pc. if you install linux it can work as a pc.
     
  34. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    I don't have one but by default it seems to have some UI stuff like for settings and whatnot just not a full start screen.
     
  35. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    I have now got a Raspberry Pi 2 and can confirm that Unity projects can run on it :) Performance seems to suck, but I won't discount it as usable yet! (Currently a cube rotating with no sky box and lowest quality settings gets around 10 or 15fps)
     
  36. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    That is good to know, TylerPerry. It's unfortunate that performance seems so low. I am curious, what resolution were you running your project at? Scaling a project down to a lower spec, and focusing on 2D elements as opposed to 3D, would probably make for a more viable environment. But some testing would have to be done to know for certain. Still, good to know that the latest Raspberry Pi 2 is a viable platform for Unity builds through Windows Universal Apps.
     
  37. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    It was running at 1920x1080 I think, I've tried changing the resolution in the config file but it does not seem to do anything. I want to try 480p or something, but It seems that because I'm optimizing to get a cube rotating it won't be usable for even simple 2D games.

    I also want to try composite video but I don't have a breakout cable.
     
  38. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Ok, seems like it's not hardware accelerated :(
     
  39. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    Yeah, that makes sense. I don't think the Raspberry Pi has a separate GPU. It will likely have support for OpenGL rendering, but it will be along the lines of Intel's integrated graphics, where all rendering is being done on the CPU. So you're not going to be squeezing high-level graphics out of the thing anytime soon.

    Also, you will have to do more than just tweak a config file for adjusting the rendering resolution. You may have to adjust settings for your in-game camera, and will certainly have to adjust the target rendering resolutions in your project settings.
     
  40. jbarbeau

    jbarbeau

    Joined:
    Dec 21, 2012
    Posts:
    46
    Does anyone have any info on Running a Unity app under Windows 10 IoT on Raspberry Pi 3B?

    Can I just compile for Windows and run it? I'm waiting to get my Pi 3B.

    BTW I suppose everyone knows Pi 3B has 1 GB ram, runs 4 cores at 1.2Ghz, has Wifi and Bluetooth built in. I think OpenGL 2.0 support in the graphics hardware..... I don't mind being corrected.... or even condescended to.... please chime in.
     
  41. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,155
  42. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    You can compile and run but rendering does not use the GPU at all so it's mega slow. Microsoft has said they were working on a GPU renderer but that was when the Pi 2 launched and nothing has been said since.
     
  43. KnightRiderGuy

    KnightRiderGuy

    Joined:
    Nov 23, 2014
    Posts:
    515
    They came out with the Raspberry Pi 3 not too long ago I wonder if that would run our Knight O.S. that we are working on, It will have Voice Recognition & Response and I hear that can be a little system intensive ?
    Anyone work with anything like that on the Pi 3?
     
  44. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    pi3.jpg I just got a couple Pi3(woot) and just happened to see this thread. One slightly amusing scenario a coworker and I were playing with was running a game server on it with a open wifi network so whoever is in the same area could play games on it.

    Not a really practical thing but I think it would be funny opening up your wifi list and seeing "Free Quake 3 server - join us!".
     
    TylerPerry and Ryiah like this.
  45. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    It would be cool to try that but with UNET!
     
  46. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Assuming you can build Linux headless server on it don't see why you couldn't pretty easily.
     
  47. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    It's not possible (Unity has no support for ARM linux) but I'm pretty sure that it's possible to do a headless UWP on Windows 10 IOT.
     
  48. VeggieVampire

    VeggieVampire

    Joined:
    May 18, 2016
    Posts:
    8
    Ony likes this.
  49. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
  50. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521