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

Sharing an OpenGLES 2.0 Christmas Scene ...

Sun Nov 25, 2018 3:08 am

I'm still working on an OpenGLES 2.0 lightweight and fast engine for the Pi and a number of examples ...

Here's a scene from one of my favourite places on the planet ... Yosemite! It's running at 24fps with over a 1000 trees, mutli-layered animated clouds, a huge area to explore (including a wood cabin) and full collision detection. I hope to share a Christmas version quite soon that you can explore and get into the festive season!! :P

Image

Image

Image

User avatar
ksharindam
Posts: 96
Joined: Sat Jan 09, 2016 4:16 pm

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Mon Nov 26, 2018 2:48 am

Great job...
Give the github link of the source
My Qt projects at ... https://github.com/ksharindam

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Mon Nov 26, 2018 3:30 am

Tim, yet another impressive output.
You still using SDL?

I was looking at Demoscene stuff and wondered if it could be done on Pi's without an OS.
viewtopic.php?f=72&t=227424

Then I found this, 27KB OpenGLES triangle in C
https://github.com/LdB-ECM/Raspberry-Pi
Turns out this sort of baremetal stuff can be done in Pascal too.
https://github.com/mvdhoning/fprpbm

Time for me to retire the Linux box and move to all Pi compiling?
Setting up cross compilers is not fun ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Mon Nov 26, 2018 11:45 pm

Gavinmc42 wrote:
Mon Nov 26, 2018 3:30 am
Tim, yet another impressive output.
You still using SDL?
Hi Gavin,
Yes, still using SDL2 as it takes care of the bare metal stuff on several platforms!
Gavinmc42 wrote:
Mon Nov 26, 2018 3:30 am
Then I found this, 27KB OpenGLES triangle in C
https://github.com/LdB-ECM/Raspberry-Pi
Turns out this sort of baremetal stuff can be done in Pascal too.
https://github.com/mvdhoning/fprpbm

Time for me to retire the Linux box and move to all Pi compiling?
Setting up cross compilers is not fun ;)
Wow! Leon's bare metal code is amazing!! I'd love to see the difference in performance with my models - I read he was pushing 800fps with his biplane - that's plain crazy :o (excuse the pun)

Meanwhile, I'm beefing up the demo's and simplifying the engine to make it easy to use. Also adding stuff to the Yosemite demo with a small game element. Just tested it on the Zero ... here's a pic ...

Image

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Tue Nov 27, 2018 12:53 am

I had been wondering what you have been up to :D
The real Yosemite?
That would mean using DEM terrain data plus procedurally generated trees?

Game? Dog sled team racing Reindeer and Sleigh? Tux racer?

Leon's stuff is really pushing it, did not notice the 800fps :o
As I barely understand the VC4 the texture units are hardware so should be able to keep up at the same rate?

Been watching all the old Demoscene stuff, that hardware is so basic.
Your stuff and Leon's stuff are showing what can be done with the new hardware - Pi's.

Baremetal music? SonicPi is written in Ruby?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Tue Nov 27, 2018 8:00 am

Gavinmc42 wrote:
Tue Nov 27, 2018 12:53 am
I had been wondering what you have been up to :D
The real Yosemite?
That would mean using DEM terrain data plus procedurally generated trees?

...

Leon's stuff is really pushing it, did not notice the 800fps :o
As I barely understand the VC4 the texture units are hardware so should be able to keep up at the same rate?
I read the 800fps from Leon's Git readme at https://github.com/LdB-ECM/Raspberry-Pi ... "Update: All memory allocation now removed from render call and render speed now goes well over 800fps so I timed the rotation speed. You will notice rotation is alot smoother." ... however, I haven't tried his demo out to check it out.

Yosemite is probably an SRTM DEM with a Google map overlay (thank you Google!) .. Trees are simply scattered using Max's scatter tool. Everything is static geometry with the appearance of animation using UV animated sprite sheets and sliding textures.

The only work the CPU has to do is calculate collisions, basic rotations and around 25 draw calls :)

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Tue Nov 27, 2018 8:00 am

Ah! double posted!!

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Tue Nov 27, 2018 11:53 am

The only work the CPU has to do is calculate collisions, basic rotations and around 25 draw calls :)
That leaves a lot for a game engine ;)
Leon has some multicore and 64bit code too :D

I've setup one of my Raspbian Lite Pi3's as a networked compiler box so I can C and Pascal compile natively on it.
Baremetal <0.4sec compile times ;)

Is there any way you can tell how many QPU's you are using?

Been thinking about Demoscene, Procedurally Generating stuff like terrain and trees
https://www.grendel-games.com/procedura ... n/?lang=en
https://openworks.wooster.edu/cgi/viewc ... ndentstudy

A small kernel.img can generate a very large 3D world.
Instead of making all the models and texture maps in Blender etc PG them.
Making one model in blender and rendering it takes a lot of time for a noobie 3D model maker.
So PG everything, it could take time to generate the models and put them in ram.
Viewing them should be quicker than rendering on the fly,.
Last edited by Gavinmc42 on Wed Nov 28, 2018 1:00 am, edited 1 time in total.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Tue Nov 27, 2018 1:31 pm

Gavinmc42 wrote:
Tue Nov 27, 2018 11:53 am
The only work the CPU has to do is calculate collisions, basic rotations and around 25 draw calls :)
That leaves a lot for a game engine ;)
...Yes, you're right ... on my Pi3B+ the scene only takes 7-8% CPU time in desktop.

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Sun Dec 23, 2018 12:27 am

Just added a video on Youtube featuring an update of this demo with a hotel and snow!

Here it is .. https://youtu.be/goHVP0a85JY

I'll do my best to get it out (inc. source code) before next year :oops:

Here are some snapshots from an RPi 3 B+ ...

Image
Image
Image

Happy Christmas!!

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Sun Dec 23, 2018 12:17 pm

Wow, clouds and snow :D
You just answers a few questions I had.

I had comes across a Baregame2 demo that had alien landscape with a ground mist and wondered if this was possible on Pi's.
https://www.getlazarus.org/videos/bareterrain/

Been dabbling in Steampunk blimps and wondered if there was a way to do clouds.
Lots of super realistic stuff is out there now, lots of research papers and lighting/particle effects to do to make them look real.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Mon Dec 24, 2018 5:01 pm

Gavinmc42 wrote:
Sun Dec 23, 2018 12:17 pm
Lots of super realistic stuff is out there now, lots of research papers and lighting/particle effects to do to make them look real.
... you can do a lot with simple UV animation, sprite sheets and alpha textures :D
.

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

Re: Sharing an OpenGLES 2.0 Christmas Scene ...

Wed Jan 09, 2019 2:29 am

Tim, got a borrow of this book, it explains lots of stuff in a way even I can understand ;)
http://glbook.gamedev.net/GLBOOK/glbook ... fault.html

Got lots of books, some make sense now.
One thing I can across was texture compression.
Most PC based OpenGL/Directdraw/DirectX seems to be S3TC but we only have ETC1 available on the VC4.

I was wondering if you were using texture compression at all?
It looks like it makes for smaller memory access, ie 4 times saving.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “OpenGLES”