User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 08, 2018 7:09 am

Gavinmc42 wrote:
Sun Jul 08, 2018 2:21 am
You just happen to have a Castle obj?
How long it it take you to do?
... I've got more where that came from due to an old self-employed job!

Typically, the castle did take a couple of weeks or so ;)

User avatar
Gavinmc42
Posts: 2134
Joined: Wed Aug 28, 2013 3:31 am

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 08, 2018 9:17 am

Typically, the castle did take a couple of weeks or so ;)
So you did not go down to the nearest castle and 3D model it an few hours then just to test a bigger model ;)
How much National Trust stuff has been 3D modeled?
Some nice laser range finder modules around now.
Add them to Zero W with GPS and wander around collecting data.
DIY Surveying tools.

This stuff is giving me too many ideas, re-enacting famous and not so famous battles.

Is it legal to 3D model houses from Google Street view?
With the half dozen photos from various angles and the images for textures, how hard would it be?
Get all the school kids involved, UK 3D modeled in a year?
Practice town planning added to curriculum?
See what happen when that bypass goes through.

I need to learn this b4a/Blender stuff, that should keep me busy till retirement and beyond ;)

Installed the software for one of these a year ago.
https://arsandbox.ucdavis.edu/
Always thought it could be done on a Pi, if I knew how.
I now think I know how to do the 3D, nothing more than a terrain map.

Kinect is a bit problem as I want to do a Desktop sandpit.
Stereo from Pi USB Zero/cameras, DIY structured Light projection?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 08, 2018 9:29 pm

Gavinmc42 wrote:
Sun Jul 08, 2018 9:17 am
So you did not go down to the nearest castle and 3D model it an few hours then just to test a bigger model ;)
How much National Trust stuff has been 3D modeled?
Some nice laser range finder modules around now.
Add them to Zero W with GPS and wander around collecting data.
DIY Surveying tools.
You're right - so much stuff is being digitized nowadays! However, Kendal Castle is a reconstruction of just a few mounds and a few turrets that exists today ... unfortunately there's not much to digitize!

I've also reconstructed Raglan castle and a few others - some of which are on Google Earth.

The next demo will allow you to add your own model, collider, skybox etc.. plus a host of other options like avatar height/walk speed etc.. Demo also starts up with a console argument to select your scene and settings.

User avatar
Gavinmc42
Posts: 2134
Joined: Wed Aug 28, 2013 3:31 am

Re: Star Citizen on the Raspberry Pi?!

Mon Jul 09, 2018 4:16 am

There is a single Raglan reconstruction image on Wikipedia.
Made me wonder if Wikipedia can do WebGL?
The page has lots of words about how it would have looked like in it's glory but a WebGL walk around would be nice.
How well will your code translate to WebGL JS?
The next demo will allow you to add your own model, collider, skybox etc.. plus a host of other options like avatar height/walk speed etc.. Demo also starts up with a console argument to select your scene and settings.

That is getting closer to a game engine ;) 3D slideshow engine? 3D viewer?
Just those features could be used for all sorts of uses.
Virtual drone fly around? Drone training?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
paddyg
Posts: 2227
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Star Citizen on the Raspberry Pi?!

Mon Jul 09, 2018 10:08 am

gavin, the RPi could well have a role in serving 3D model info to visitors' phones but it probably doesn't involve the graphics capabilities of the RPi. In terms of rendering even a fairly ancient smartphone will probably outstrip it. For further comparison I took Tim's model and loaded it into a unity 3D project I had been working on, if you load the apk onto your (android) phone (and ideally use VR goggles) you can see that it's pretty smooth (it's actually throttled to 50fps for battery etc).

But using the RPi as a local wifi accessible server is a good idea, especially as it's so easy to have button or other sensor input.. which why the attached phone demo is rather hard to use: it's supposed to be driven by an exercise machine with RPi monitoring how hard you're working and increasing or decreasing power accordingly. Also the terrain it's designed to explore isn't as intricate and steep as the cargo hold so even with gravity turned off it's hard to get onto the mezzanine levels!
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
Gavinmc42
Posts: 2134
Joined: Wed Aug 28, 2013 3:31 am

Re: Star Citizen on the Raspberry Pi?!

Tue Jul 10, 2018 1:30 pm

Yep 50fps, cool stereo cargo hold, cheap ZTE Blade phone and VR Box goggles seemed to work.
Must work different downunder, I ended up staring at a wall or floor once moving stopped.
Just added another thing to learn to my list, VR on Android :D

Exercise machine is bluetooth?
Use Microbit as handheld direction/joystick?
Perhaps swivel chair, walking around with goggles was knee/shin bumping and got me a bit dizzy ;)
Augmented Reality better, less dangerous anyway?

A Pi Zero W serving via WebGL allows the mobile to do the rendering.
Simple WebGL browser?

Been wondering if two of these could be used with a Zero for Pi VR
https://www.adafruit.com/product/3787
Low enough res, might get good fps via SPI?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
paddyg
Posts: 2227
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Star Citizen on the Raspberry Pi?!

Tue Jul 10, 2018 2:27 pm

When you hit a collider the rotation rate should increase allowing you to turn one way or the other without twisting you head off. That's the idea anyway. The other 'feature' is that you can freeze the camera by shaking your head, then turn to face ahead and unfreeze by shaking again. Occasionally it gets frozen accidentally while you're looking around! Version 1 did use a bluetooth joystick (as comes with many of the VR googles) however for using on an exercise bike or rowing machine (step climber, rolling track etc) it's really inconvenient to hold a numchuck, which is why version 2 has steer by looking (with the limitations that entails).

The exercise bikes are just normal ones but a tiny magnet is stuck to a moving part and a hall effect sensor place near by connected to the raspberry pi. The raspberry pi can be a zero+ with wifi or a standard one with a micro usb wifi dongle. The pi just has a wifi router and simple web server (flask) with a simple page containing just the pulse speed and the user attaches themselves to it the same way they attach themselves to any wifi router.

When I've used webgl from the RPi I've found the frame rate to be significantly lower than using the gpu directly but it's probably a while ago and the browsers have probably come on leaps and bounds since then. I will do a few more tests and let you know.

Those tiny tft screen look really neat. You probably could make a nifty HUD/augmented reality for $50
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Wed Jul 11, 2018 11:02 pm

Oh Well! England did really well and gave us hope - maybe next time?

Meanwhile, here's a few pics of the Cargoship bridge to cheer you up! Once baked they will become the new 'scene' that connects up with the cargo bay ...

It's the control panels that are taking ages to design. However, I want them to be almost functional / believable (rather than all those flashing lights that are beyond our comprehension in Star Trek ;))

Image
Image
Image
Image
Image
Image
Image
Image

ensan
Posts: 11
Joined: Tue Jul 10, 2018 7:48 am

Re: Star Citizen on the Raspberry Pi?!

Fri Jul 13, 2018 10:55 am

Just seen this thread and wanted to say nice work!

Sorry don't want to hijack the thread but I'm also doing some side work on OpenGL and wanted to share. Am (slowly) putting together (and porting) an engine / editor that is plugin based. Have an installer for windows but now porting to raspberry pi. Using OpenGL (not ES) and X11 and it's slowly coming together. It's not as advanced graphically as the work you're doing as my interest is more on the x-platform tooling side.

The editor / engine is here (currently windows but approx. 80% through the rPI port):

https://benmorris.itch.io/plugin-based-scene-editor

A couple of screenshots:
zM39gf.png
zM39gf.png (174.19 KiB) Viewed 1452 times
screenshot1.png
screenshot1.png (221.32 KiB) Viewed 1452 times
It's a hybrid scene graph / Entity-Component-System and can be extended via plugins (both the engine i.e. pluggable Scene nodes and Components / and Systems and the Editor - pluggable toolbar tools and dialogs) and is scriptable via LUA.

The idea was to create a tool for educational purposes (teaching kids about 3D coding).

As mentioned currently porting to the rPI but given folks have treaded that path before me I'll maybe pick your brains if I may when I encounter issues. The 65K limit on VBOs you mention is useful info for instance.

User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Fri Jul 13, 2018 6:26 pm

ensan wrote:
Fri Jul 13, 2018 10:55 am
The idea was to create a tool for educational purposes (teaching kids about 3D coding).

As mentioned currently porting to the rPI but given folks have treaded that path before me I'll maybe pick your brains if I may when I encounter issues. The 65K limit on VBOs you mention is useful info for instance.
Looks great! - certainly a good start :)

As a former teacher it's also been my hearts desire to get kids programming using tools like yours and others.

My current approach is to provide a simple set of classes that can be used to create a great game / app without too much hard graft - I'd love to see something like Scratch mixed with Unity on the Pi!! ... but also allow for older / more experienced kids to really get into the code and produce something special :)

Certainly, if there's anything I can help with I'll do my best ... I know others here with a lot more knowledge and experience than I - I'm sure they can help too ;)

User avatar
Gavinmc42
Posts: 2134
Joined: Wed Aug 28, 2013 3:31 am

Re: Star Citizen on the Raspberry Pi?!

Sat Jul 14, 2018 8:54 am

Hey Tim, Paddy, it has been just over 6 years since Liz made the Pi3D announcement.
Big difference now.
My current approach is to provide a simple set of classes that can be used to create a great game / app without too much hard graft - I'd love to see something like Scratch mixed with Unity on the Pi!! ... but also allow for older / more experienced kids to really get into the code and produce something special :)
Or produce something ordinary, making the special stuff ordinary is the way it should be ;)
I looked at the scratch/blockly basic block shapes, they could be made in OpenVG which makes them scaleable.
I had done some LCARS shapes previously in Pascal, a left down elbow shape was made from just a few basic OpenVG shapes.
OpenVG is hardware accelerated, so it should be fast.

Code: Select all

procedure LDElbow(X,Y,W,H,EW,EH:Integer;const Color:TVGShapesColor);
begin
 {Left Down Elbow}
 VGShapesSetFill(Color);
 VGShapesRect(Grid * (X + EW/2) ,Height - Grid * Y,Grid * W,Grid * H);
 VGShapesArc(Grid * (X + EW/2),Height - Grid * (Y + EW/2 - H), Grid * EW, Grid * EW,90, 90);
 VGShapesRect(Grid * (X + EW/2 - 1),Height - Grid * (Y + EW/2 - H), Grid * EW,Grid * EH);
 VGShapesSetFill(STcolor0);
 VGShapesRoundrect(Grid * (X + EW),Height - Grid * (Y + EH + H),Grid * EW,Grid * (H + EH), Grid * 2 * H,Grid * 2 *H);
end;
Could it be made into a graphical scripting language that is faster than Scratch?
Hmm Verge3D is WebGL blockly based tool.
https://www.soft8soft.com/verge3d/
AJ Starks OpenVG C code has been ported to Pascal and Go, so it seems portable enough.

Scripting engines, it is on my list. Lua seems popular.
Hmm a google found me, finding this in 2015
https://github.com/Wiladams/LJIT2RPi
The older I get the more I forget, Google is becoming my memory?
The more Pi stuff I learn the bigger the list gets :lol:

Nice stuff ensan, is it C++ based?
I have found Gentoo64 has good OpenGL support out of the box.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ensan
Posts: 11
Joined: Tue Jul 10, 2018 7:48 am

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 15, 2018 7:47 am

Thanks tipam and gavinmc42. Yes, it's C/C++ based and makes heavy use of CMake, CTest and CPack. I'm trying to get it to a reasonable release candidate for raspberry pi. The engine is vanilla C++ but makes use of glm for math and zlib for scene file compression. The rendering back-end is pluggable (I wrote a desktop OpenGL renderer but it is modern OpenGL in that it uses shaders and vertex buffers / uniforms). Then I have written a bunch of plugins to wrap some external libraries to cover physics and path-finding. The editor which can be optionally built is Qt based and that's where I am right now, trying to compile Qt on the rPi 3. I am starting to use Jenkins for continuous integration as I build the software on Windows, Mac, Linux and now the rPi and it's starting to get a bit out of hand.

In terms of the next release, the real MVP (minimum viable product) needs a code wizard to generate a sample app. If you download the installer on windows you'll see I currently ship a small demo browser that links to the related source code for each example to give a feel as to how the engine works. So in order to support a code wizard I'm now looking at CMake package config files as it's a mechanism that allows you to bundle a file with your app that helps other apps (an executable generated by a code wizard integrated in the editor) to find the SDK headers and libs. I have a code wizard for generating SceneItems but I made the transition to an Entity-Component-System so now support those also in pluggable form but haven't created a code wizard for those yet. So as you can see there's quite a bit to do.

In terms of how it can be used, a scene could be either generated in-editor, in-script or as a standalone executable or a hybrid executable that loads an editor generated or (procedurally generated scene that has been written to file). I need to write some documentation that ideally walks a user through its use in terms of a trail (with a trail being a simple game perhaps with source).

Again apologies for gatecrashing your thread but got excited when I saw tipam's work as there is some crossover as regards the motivation with what I'm trying to do.

So regarding OpenGL then, should I transition to OpenGL ES or stick with desktop GL on the Pi? I'm also considering as an option a different rendering back end to use an open source rendering library as an option and in so doing leveraging the code in that rather than increasing the development burden of rolling my own. What do you think?

User avatar
paddyg
Posts: 2227
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 15, 2018 9:17 am

@ensan, can't you use qt5 which can be apt installed for raspbian stretch? In terms of wrappers, Tim (for his C++) and I (for my rust) experiments used sdl2 which, again, can be installed with apt (though Tim links his code to the compiled version, not sure why that's needed). sdl2 is used on most platforms so narrows down the issues with different targets. I had assumed that the optional OpenGL driver in raspbian would be slower than the raw OpenGLES driver used directly, however it doesn't make as much difference as I thought according to my limited test: I ran my rust version of Tim's demo with the new driver enabled which clocked 36fps at 6% CPU usage, then pi3d which is python and uses the GLES drivers directly which clocked 29fps at 8% CPU

Paddy

PS couldn't find a link to your source, is that planned?
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

ensan
Posts: 11
Joined: Tue Jul 10, 2018 7:48 am

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 15, 2018 2:03 pm

Hi Paddy - Thanks. I'm embarrassed to admit I didn't even think to look for a qt5 package in raspbian as initial google results indicated I was going to have to build from source and so I went that route (native build on pi) and it's been compiling all day. Have just installed qt5base-dev and the editor is now compiling on the pi slowly as I'm reluctant to cancel my source build until I've confirmed the qt5 package under raspbian works with my desktop gl rendering backend (I think Qt5 might be getting built against gles which is why I have a source build running now against standard gl).

Regarding the source of the engine, the headers, libs, example source code listings and doxygen generated docs are accessible from within the editor (Help menu for the API docs and the example source from the demo browser displayed on startup) as I install them with the package (currently package is available from my itch.io page for Windows linked to above but hopefully for the pi as well soon although I'll need to spend time getting the rpm or deb package assembled via CPack first and all the shinanigans that go with that i.e. rpaths).

ensan
Posts: 11
Joined: Tue Jul 10, 2018 7:48 am

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 15, 2018 2:33 pm

I feel a bit uncomfortable posting my queries to tipam's thread so I'll start a separate thread - thanks (and apologies) tipam.

User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Sun Jul 15, 2018 6:30 pm

ensan wrote:
Sun Jul 15, 2018 2:33 pm
I feel a bit uncomfortable posting my queries to tipam's thread so I'll start a separate thread - thanks (and apologies) tipam.
No worries Ensan - as long as it was helpful! ;) I'll keep a look out on your threads if I can help.

ensan
Posts: 11
Joined: Tue Jul 10, 2018 7:48 am

Re: Star Citizen on the Raspberry Pi?!

Tue Jul 17, 2018 7:21 am

Thanks Tipam. I'll continue to watch your thread with great interest :-)

User avatar
Gavinmc42
Posts: 2134
Joined: Wed Aug 28, 2013 3:31 am

Re: Star Citizen on the Raspberry Pi?!

Fri Jul 20, 2018 11:58 am

Version 0.95 of bforartists does not have the missing icon images, but it does seem even more jittery when rotating models.
Usable? Time to find out.
New Pi webpages had a Blender link, I thought it was Blender on Pi at first :(
Since these are for kids I may be able to do the Tuts.
https://projects.raspberrypi.org/en/pro ... 5D=blender

Anyway it should be good test to see if I can break OpenGL on Gentoo64 :D
Attachments
b4a0.95.png
b4a0.95.png (188.39 KiB) Viewed 1136 times
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

ensan
Posts: 11
Joined: Tue Jul 10, 2018 7:48 am

Re: Star Citizen on the Raspberry Pi?!

Fri Jul 20, 2018 1:43 pm

Good link Gavinmc42. Definitely want to invest some more time in Blender. I signed up for a Udemy course a while back and need to finish it, the course is called "Learn 3D Modelling - The Complete Blender Creator Course" and seems pretty good although I think the Blender UI is having an overhaul (it's not the most intuitive interface IMHO). Ah, I see bforartists you mention is a fork of Blender and is maybe the UI overhaul.

User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Sat Jul 21, 2018 1:26 am

NEW UPDATE!

Demo now includes the following;

- CargoBay scene (updated)
- Cargoship Bridge scene
- Kendal Castle

Download the demo from here (34Mb) and open README1ST file

To run a demo (after following instructions) do the folliowing;

Code: Select all

$ ./ShipDemo -scene CargoBay.scene
Enjoy!

User avatar
Gavinmc42
Posts: 2134
Joined: Wed Aug 28, 2013 3:31 am

Re: Star Citizen on the Raspberry Pi?!

Sat Jul 21, 2018 2:40 am

Ah, I see bforartists you mention is a fork of Blender and is maybe the UI overhaul.
Yep even with only my few minutes playing with b4a I was able to make the RPF Blender tutorial snowman ;)

They now need to update their webpages, you can use Blender (b4a) on Pi's if you run Gentoo64 ;) .
Blender requires you to watch those videos to learn the UI :(
BforArtists does not, if you have had any other CAD experience bf4 is very similar.
With the image icons being obvious the simple shape stuff is quick to grasp
The mouse buttons are very much like the other CAD programs I use, Altium Designer etc

The manual is not bad either,if only I could figure out where that materials coloring in button is ;)
https://www.bforartists.de/wiki/Manual#painting.

TIm, I'm going to need to cleanup my desk to get a third monitor on it for a Raspbian box, new demo does not run on Gentoo64.
Did get a secondhand monitor weeks ago $15 for this.

Wonder if Synergy will work in Gentoo64 on Pi's, Pixar use it?
https://symless.com/blog
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Sat Jul 21, 2018 8:58 am

Gavinmc42 wrote:
Sat Jul 21, 2018 2:40 am
... new demo does not run on Gentoo64.
... sorry about that - things weren't in the right folders and I've updated the README1ST. I've uploaded again :oops:

User avatar
Gavinmc42
Posts: 2134
Joined: Wed Aug 28, 2013 3:31 am

Re: Star Citizen on the Raspberry Pi?!

Sat Jul 21, 2018 11:01 am

Looks like I need to install SDL2 on Gentoo and Raspbian ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
paddyg
Posts: 2227
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Star Citizen on the Raspberry Pi?!

Sat Jul 21, 2018 9:24 pm

Tim, I can report that your multi-scene download works on the RPi nicely. I had to globally change the \r\n line ending in Kendal castle mtl file to \n before it would load any textures and I had to rename a couple of the bridge textures to match (fx3_panels and medmon1 I think).

Paddy

PS it's worryingly easy to 'fall out of' the space ship. I haven't managed to get downstairs from the bridge without teleporting through the floor!
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
tipam
Posts: 83
Joined: Fri Dec 30, 2011 1:32 pm
Contact: Website

Re: Star Citizen on the Raspberry Pi?!

Sat Jul 21, 2018 9:34 pm

paddyg wrote:
Sat Jul 21, 2018 9:24 pm
Tim, I can report that your multi-scene download works on the RPi nicely. I had to globally change the \r\n line ending in Kendal castle mtl file to \n before it would load any textures and I had to rename a couple of the bridge textures to match (fx3_panels and medmon1 I think).

Paddy

PS it's worryingly easy to 'fall out of' the space ship. I haven't managed to get downstairs from the bridge without teleporting through the floor!
That's good to know! Do you mean the bridge part of the spaceship? I'll fix the Kendal Castle mtl - I'm sure I did this but I must have had versions mixed up!

Return to “OpenGLES”