Vamphye, 2D AA + Terrain rendering

Anything and everything about programming graphics with Ultibo
Gavinmc42
Posts: 1003
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Vamphye, 2D AA + Terrain rendering

Postby Gavinmc42 » Mon May 15, 2017 8:46 am

Googling Animated PNG files finds the Vamphye library.
http://imaginglib.sourceforge.net/index.php?page=home

Marek has done some other stuff, like 3D rendering.
http://galfar.vevb.net/wp/tag/terrain-rendering/
When he is talking tiling that reminded me of the Videocore 3D manual Section 11 micro-tiles etc

Page 39 has this
The memory organization of most texture types is T-format or LT-format, with LT-format automatically selected
for smaller size textures. The texture units also support raster format 32-bit YUYV and RGBA textures, allowing
video and image data to be directly used as a texture without needing conversion to T-format. Finally, the TMUs
can also be used for general 32-bit data lookup using a direct address.


Image data used as texture, I understand that bit :D
That tells me a simple bitmap controls the Z axis.
I'm starting to wonder do we need OpenGL etc?

Page 12
Supports 16x coverage mask antialiasing for 2D rendering at full pixel rate.

Could that be used for antialiasing 2D lines, objects etc?
No need for Aggpas stuff?

Think I might stay with 2D for a while, there seems to be lots missing from the VC4 AG100 doc.
Will need to read patents to understand it more I think
https://github.com/hermanhermitage/vide ... s-Pipeline
Er it's all too hard, next year?
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby Ultibo » Mon May 15, 2017 9:57 am

Gavinmc42 wrote:I'm starting to wonder do we need OpenGL etc?

You don't have to use it, you are welcome to handcraft your own raw QPU code if you prefer ;)

Gavinmc42 wrote:Er it's all too hard, next year?

If we all decide it's too hard then we might as well pack up and go home now :roll:
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1003
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby Gavinmc42 » Mon May 15, 2017 12:09 pm

3D next year ;)
This year, get 2D working, that's my goal, which changes every month :lol:
I can see the next few months are going to be fun as images get plonked onto the framebuffer.

I actually think QPU coding looks doable, the assembler is quite basic but doing parallel coding, er that might take me sometime.
Not sure but the QPU's are not used for the framebuffer, that means I can use them for other stuff with the fft code showing the way.
Don't know the guts of jpeg decoding but that could run on QPU?
https://www.raspberrypi.org/forums/view ... %20openmax

I understand 1 and 1/2 pages of the VC manual. going to need to learn much more, which of course is the whole point :lol:

DRM/Direct Rendering Manager is the next step up on framebuffer and it looks like Eric Anholt has figured it out.
Probably the important bit for us is the DRM driver code for the Pi's.
https://github.com/raspberrypi/linux/tr ... pu/drm/vc4
Hmm, just because I can google it does not mean I understand it, last update 17days ago, so still active.
Linux kernel is now 4.11 released and 4.12 RC, what got added in 4.10/4.11 that could be useful?
4.11///vc4 has code dated 14th May, vc4_v3d.c?

Is tinydrm useful?
https://dri.freedesktop.org/docs/drm/gpu/tinydrm.html
Don't know, maybe. Ask me next year :oops:

Anyway the Vampyre stuff looks like another library that could be ported/used.
Could QPU's be used to accelerate Zlib?
Compression is mostly a serial stream process? What about PNG decompression?
Decompress 12 images, one per QPU? Google is my friend.
http://www.libpng.org/pub/png/
.....
I will google stuff 6months from now and find this :lol:
Gavinmc42
Posts: 1003
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby Gavinmc42 » Sat May 20, 2017 12:28 pm

Anyone tried Aggpas?
I was looking for SVG stuff and Aggpas keeps showing up.

Seems like fpGUI has aggpas in it, current status?

Was looking for simple AA code to extend the graphic console draw stuff to diagonals and curves.
http://stackoverflow.com/questions/3613 ... r-delphi-7

This sort of code look like it could be GPUed.
http://programmersheaven.com/discussion ... m-help-plz
But the VC4 can do AA, manual says 4x multisample antialiasing.
Is it urned on, automatic or coded?

Clues?
https://github.com/anholt/mesa/wiki/VC4 ... nce-Tricks
User avatar
Ultibo
Site Admin
Posts: 1476
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby Ultibo » Sun May 21, 2017 1:29 am

Gavinmc42 wrote:I was looking for SVG stuff and Aggpas keeps showing up.

Seems like fpGUI has aggpas in it, current status?

Broadly speaking the AggPas classes are all functional in Ultibo and the work to allow them to output to the framebuffer is completed. There are still some things missing which is why none of the AggPas demos currently work but that is to do mostly with not having a window type concept for them to output text and graphics to. The next stage in the porting process is to convert what has been done to date to use the FreeType2 support now available in Ultibo and then continue with providing the other missing elements.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1003
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby Gavinmc42 » Sun May 21, 2017 4:01 am

Broadly speaking the AggPas classes are all functional in Ultibo and the work to allow them to output to the framebuffer is completed
:D

GraphicsWindowDrawLine only does vertical/horizontal lines.
Could an aggpas class do the AA on circle and diagonal lines?

Extending it to circles and polygons and GraphicWindowsDraw???.... could do most of what I have done with Python/Pygame .
It also looks like there is SVG in the Aggpas stuff, including an Agg_svg_parsher.

SVG would be my preferred graphics design image format because it is scalable for any screen and is useful for HTML stuff.
It would be interesting to see how fast that svg_parsher is, could it do rendering in real time?

One day OpenVG but until then still lots to do with the stuff that already works ;)

What is AA? Anti Aliasing, smooths the jagged edges on lines.
GraphicsWindowDrawLine draws to the framebuffer direct?
Ideally when drawing a line it checks adjacent pixels and anti aliases the transitions.
It could be done when drawing the shapes or after bitmap buffer for coping to framebuffer is assembled.

Is it needed? Check by modifying GraphicsWindowDrawLine to draw any angle line?
The real code is in this?
FramebufferConsoleDrawLine
pjde
Posts: 252
Joined: Tue Feb 09, 2016 6:21 am
Location: Sydney, Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby pjde » Sun May 21, 2017 4:25 am

I have started down the SVG path (was to be combined with the PNG support so could have both vector and raster) but have not proceeded far.

Regards

Paul
Gavinmc42
Posts: 1003
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby Gavinmc42 » Sun May 21, 2017 7:50 am

if you want to be inspired or depressed, check what you can do with 64KB of code.
http://archive.assembly.org/2011/demo/u ... t-alcatraz
This was 6 years ago :o

How about 4KB and that includes the music :o
http://archive.assembly.org/2011/4k-intro

1K?

Wonder if any of the Bitboys have heard of Ultibo?
http://www.virelabs.com/
http://siru.fi/about.html
Finnish Designed GPU in next Pi?

Those Finns must dream and talk in assembler.
Wonder what the Finns can do with Pi's? Google time.
pik33
Posts: 576
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Vamphye, 2D AA + Terrain rendering

Postby pik33 » Sun May 21, 2017 8:25 am

Gavinmc42
Posts: 1003
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Vamphye, 2D AA + Terrain rendering

Postby Gavinmc42 » Thu Sep 28, 2017 10:30 am

Going back on old posts and seeing what can now be possible with U2.
There are still some things missing which is why none of the AggPas demos currently work but that is to do mostly with not having a window type concept for them to output text and graphics to


Looking at Dispmanx, it seems to be just rectangles that you put stuff in, ie windows :D
So any for any canvas type stuff use dispmanx?

Of interest is the SVG parser in aggpas, which could be used in a browser or Ui ap ;)
Add Ultibo to the src/platform folder?

Return to “Graphics”

Who is online

Users browsing this forum: No registered users and 1 guest