Hello Guest

OpenVG Support through Amanith?

  • 13 Replies
  • 19639 Views
OpenVG Support through Amanith?
« on: December 01, 2006, 11:17:41 »
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.

*

Offline Matzon

  • *****
  • 2242
OpenVG Support through Amanith?
« Reply #1 on: December 01, 2006, 12:42:32 »
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?

hmmmmmmmm...
« Reply #2 on: December 01, 2006, 14:34:01 »
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

OpenVG Support through Amanith?
« Reply #3 on: December 01, 2006, 16:15:30 »
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

OpenVG Support through Amanith?
« Reply #4 on: December 01, 2006, 19:02:49 »
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.

*

Offline Matzon

  • *****
  • 2242
OpenVG Support through Amanith?
« Reply #5 on: December 01, 2006, 21:08:32 »
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

OpenVG Support through Amanith?
« Reply #6 on: December 01, 2006, 21:17:56 »
Vector graphics generally would be a good add.

Kev

OpenVG Support through Amanith?
« Reply #7 on: December 01, 2006, 21:27:11 »
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

OpenVG Support through Amanith?
« Reply #8 on: December 01, 2006, 21:37:01 »
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

OpenVG Support through Amanith?
« Reply #9 on: December 01, 2006, 21:41:07 »
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).

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
OpenVG Support through Amanith?
« Reply #10 on: December 03, 2006, 15:30:16 »
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?

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
OpenVG Support through Amanith?
« Reply #11 on: December 03, 2006, 15:52:04 »
Quote from: "kevglass"
anyone got any examples of some simple compliant SVGs?


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

Re: OpenVG Support through Amanith?
« Reply #12 on: December 03, 2006, 23:31:24 »
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.

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: OpenVG Support through Amanith?
« Reply #13 on: December 04, 2006, 11:50:22 »
Although 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