OpenVG Support through Amanith?

Started by Onno, December 01, 2006, 11:17:41

Previous topic - Next topic

Onno

Hi guys,

I'm new to LWJGL (and game development). So far I like what I see very much.
Since there is already support for OpenGL and OpenAL, I was wondering if OpenVG support was being planned for a future version as well? Vector graphics may come in handy during 2D game development.

I noticed the Amanith Framework is Open Sourced. It provides an OpenGL accellerated OpenVG implementation so it will work on todays graphics cards.
It is written in C++ and already seems to have a Python binding available, but I couldn't find any Java bindings. I think it would fit in well with LWJGL.

Matzon

I have personally looked at it before (when it wasn't open sourced), however I'm not sure if there is a general interest in it?

Fool Running

Looks like it would be nice to have a Java binding.  8)
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

elias4444

I wouldn't complain if it was added (as I really like vector graphics, and would love to use them if possible). The possibility of turning vector graphics into openGL textures seems kind of interesting.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

Onno

Quote from: "Matzon"I have personally looked at it before (when it wasn't open sourced), however I'm not sure if there is a general interest in it?
I think there would be quite a few types of 2D games that could benefit from it. Point and Click adventures like Monkey Island 3 would be good candidates, but it would also give you high quality sprites and backgrounds to target a large range of screen resolutions in comic-style arcade games.

Matzon

Quote from: "Onno"
Quote from: "Matzon"I have personally looked at it before (when it wasn't open sourced), however I'm not sure if there is a general interest in it?
I think there would be quite a few types of 2D games that could benefit from it. Point and Click adventures like Monkey Island 3 would be good candidates, but it would also give you high quality sprites and backgrounds to target a large range of screen resolutions in comic-style arcade games.
just use slick for that - http://slick.cokeandcode.com

kevglass

Vector graphics generally would be a good add.

Kev

Onno

Quote from: "Matzon"just use slick for that - http://slick.cokeandcode.com
I am using that :P
But it uses LWJGL under the hood and thus doesn't support vector graphics. Everything is still bitmapped.
If you simply use OpenGL for your sprites/backgrounds, the bitmaps get scaled. That works okay for most situations, but scaling small sprites to high resolutions looks ugly. Vector Graphics would fix that and allow you to zoom into game-levels endlessly.
But there are many more practical uses for vector graphics (keeping graphics size down for example or animating 2D models the way you would normally animate 3D models using coordinates).

kevglass

It'd be nice to have a light weight implementation of SVG Tiny or SVG Basic that could render to LWJGL. Maybe thats doable pretty quickly, anyone got any examples of some simple compliant SVGs?

Kev

Onno

Quote from: "kevglass"It'd be nice to have a light weight implementation of SVG Tiny or SVG Basic that could render to LWJGL. Maybe thats doable pretty quickly, anyone got any examples of some simple compliant SVGs?
This was my first Google result.

I doubt that it will be quick to implement without using existing libraries though, even SVG Tiny is quite a big specification.
I just clicked on the Tilitilation link in your signature by the way: a great game! Reminds me a bit of a 3D version of Bob's Bad Day (old Amiga Game).

spasi

Quote from: "kevglass"It'd be nice to have a light weight implementation of SVG Tiny or SVG Basic that could render to LWJGL. Maybe thats doable pretty quickly, anyone got any examples of some simple compliant SVGs?
It should be a lot of work, but if you've got the time (and courage? :lol:), you can have a look at zShapes. The code is yours to refactor in any way you like. I'd love to see it become a full SVG rendering library, and I'd do it myself under better circumstances. I'm available to answer any questions you may have.

Btw, what I don't like about Amanith is that it's based on dynamic triangulation. This has implications on CPU performance and requires multisampling for antialiasing. Also, anyone knows what's the deal with AmanithVG? Why is that a commercial lib and how does it differ from Amanith Framework?

spasi

Quote from: "kevglass"anyone got any examples of some simple compliant SVGs?

You can find everything you need in Open Clip Art Library.

Onno

Quote from: spasi on December 03, 2006, 15:30:16
It should be a lot of work, but if you've got the time (and courage? :lol:), you can have a look at zShapes. The code is yours to refactor in any way you like. I'd love to see it become a full SVG rendering library, and I'd do it myself under better circumstances. I'm available to answer any questions you may have.

Wow.. that's a very  interesting library you have there.
Although it currently only handles shapes, which is not enough for actual rendering of SVG alike vector graphics, it still looks very useful.

spasi

Quote from: Onno on December 03, 2006, 23:31:24Although it currently only handles shapes, which is not enough for actual rendering of SVG alike vector graphics, it still looks very useful.

Yes, it could work like this:

- Parse an .svg(z) with Batik.
- Retrieve a list of Java2D shapes using the Batik node tree.
- Convert everything to triangles with zShapes.
- Implement SVG rendering
     That's the difficult part. Batik does this already with Java2D, but we need OpenGL rendering. It should be easy for fills and gradients, but it gets
     complicated if you need scissoring, different blend modes, etc.
- At runtime, go through each shape node (would probably be a GL display list), apply the appropriate rendering state and you're done. ;D