Sign in to follow this  
Kreative

Where to start learning vector graphics programming?

Recommended Posts

Hello,

I am new to game and graphics programming, I know java well and I've experimented with JFrame to make a small game. I only plan to use vector graphics for any game programming that I do, so if anyone is kind enough to suggest where I can begin learning graphics programming, perhaps some articles, online tutorials, videos and not preferably books, please do so. I've looked at batik and got it for my eclipse project but can barely find any tutorials.

Kind Regards,
Kreative

Share this post


Link to post
Share on other sites

Batik is fine if you want to do SVG rendering, so long as you don't plan on fully interactive framerates. It draws to canvas pretty fast, but it's a real CPU hog when re-applying constraints after modifying your scene. I've used it for drawing large, complex diagrams that needed elements at multiple layers to be visually interactive at low update rates (in my case, I only needed about 4 Hz on sub-gigahertz PCs).

 

For a small game? I'd suggest sticking to the Java Shapes API and Graphics2D drawing classes for AWT drawing. It's quite capable, and has all the big problems solved for you already (like antialiasing, text rendering, fill algorithms, blending, etc). Set up double-buffering and go nuts.

 

If you want to start aiming your code to lower levels and doing more complex graphics work? Maybe set up LWJGL and work your way towards reproducing things like this: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch25.html , an article that explores how to set up a pixel shader to rasterize one antialiased bezier curve per triangle, and use it to rasterize complex vector graphics in 3D.

Share this post


Link to post
Share on other sites

Would you know of a tutorial course or any tutorials for starting out and then advancing with batik, I mean all I really want to accomplish is to load SVG files from a folder, transform them if necessary, like color effects, rotation, cropping or even editing of the image within code, and then convert to BufferedImage to draw onto a JPanel.

Kind Regards,
Kreative

Share this post


Link to post
Share on other sites

http://stackoverflow.com/questions/1558852/learning-resources-and-tutorials-for-using-the-java-batik-library

 

http://www.svgopen.org/2002/papers/kormann__developing_svg_apps_with_batik/

 

 

 

Disclaimer: IIRC I used the latter article above as my own jumping-off point when I was learning Batik for the aforementioned venture, but my coworkers and I had to do a lot of experimentation on our own to get it to a usable state. I cannot share any of the code we did develop for it, as it is no longer owned exclusively by our employer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this