I'm looking for a 3D graphics library for a Java web app. Could use some recommendations - only open source, though.
Edit: I don't really care how the graphics are output - Javascript/applets/canvas/flash but I want to write the graphics logic in Java.
JMonkeyEngine is very good.
Have a look at the The Lightweight Java Game Library. It provided developers access to crossplatform libraries such as openGl. And can run in the browser.
http://lwjgl.org
Here are a few demos:
http://lwjgl.org/applet/
http://fabiensanglard.net/Prototyp/index.php
http://www.cokeandcode.com/info/tut2d-4.html
People are doing awesome projects with this library:
http://lwjgl.org/projects.php
Here's an article that describes how to use jmonkeyengine in an applet.
http://www.streamhead.com/tutorial-jmonkeyengine-applet-hardware-3d-in-the-browser/
(JMonkeyEngine is a rather nice 3d-engine)
Related
Im about to start a small project using OpenGL and Java. Looking through this website and google it seems to be unclear what implenetation of OpenGL is best to be used within Java.
I've obtained this list from: Open GL
The JOGL Java/OpenGL bindings
Java 3D (SUN's retained mode library layered on OpenGL)
OpenGL for Java (GL4Java)
YAJOGLB (Yet Another Java OpenGL Binding)
jGL: a 3D graphics library for the Java
What would use recommend in terms of the amount of resources aviabale to learn it and simpleness of implementing a simple either car,helicopter or flight simulator in?
I'm just a beginner with OpenGL but I've been using LWJGL (http://www.lwjgl.org/), which Minecraft uses.
If you want something more high level, try an engine like jMonkeyEngine (http://jmonkeyengine.com/).
I would advise to look into LibGDX if I were you. LWJGL and JOGL are targeted towards PC games. LibGDX on the other hand targets computers with the help of LWJGL, but also Android and iOS; to top it off it supports "HTML 5" with the help of Google Web Toolkit (GWT) - all through a generic API.
I have these two images
this
and this
With OpenGl I want to be a result as following
How can I do that with Blackberry or Android
Thanks a lot
If you like there is a library that might help you, its called min3d
http://code.google.com/p/min3d/
its very handy, has a lot of examples, and saves a lot of work
Reflections are typically done using a stencil buffer. Here is a tutorial on how the technique works. You won't be able to use the code though, as it is written for a deprecated version of OpenGL which doesn't match OpenGLES, so you'll need to write your own rendering code. Google provides a basic tutorial on how to use OpenGL ES, here.
If you are actually looking for a 3D engine, jMonkeyEngine is a scene graph based OpenGL engine with powerful features and good community support. It is platform independent and also supports Android >=2.2
I'm looking to do a couple basic features with images and Java...
image resizing and cropping
possibly making composite images
What java library would be the easiest to use for that purpose?
thanks
Java Advanced Imaging API
http://java.sun.com/products/java-media/jai/forDevelopers/jaifaq.html
Have a look at the standard Java 2D graphics API first; it can do all the things you mention (resizing, cropping, compositing) without the need for exernal libraries such as Java Advanced Imaging.
See 2D Graphics in The Java Tutorials for an introduction.
Java Advanced Imaging (here is an FAQ for it).
See also this article.
Apache also has an implementation which aims to be a more portable than other frameworks (and is slower). See the sanselan page.
Catalano Framework. You can use the same code in Android too, contains several algorithm in parallel.
Project: https://code.google.com/p/catalano-framework/
Article: http://www.codeproject.com/Articles/656059/Catalano-Framework
Is there any library out there to create graphics without using AWT?
What I need is simple drawing functions (like to draw a line) and text drawing functions to create graphics in memory for a Google app engine application. App engine does not support AWT.
Thanks!
Not unless you want to implement your own image class (say, a bitmap) and rendering algorithms for lines, shapes, images.
If you have experience with computer graphics and rasterization, this may not be very hard, but otherwise it will be more than you want to bite off.
You might also try the appengine-awt project, though it's a bit experimental.
You might try using SenseLan. In the requirements section, it says they don't use awt or ImageIO. Of course, there is the Images api but it seems fairly limited in what it offers.
Edit:
It looks like there are a couple of Python possibilities that could offer you some limited drawing capabilities. You could probably write appropriate image functionality as python web services, and keep the rest of the app in Java:
Replacing Functionality of PIL (ImageDraw) in Google App Engine (GAE)
http://denislaprise.com/2008/08/21/drawing-images-on-google-app-engine/
Use Batik for GAE which is available as a dependency of FOP on GAE.
You can also track the issue further on the Google app engine bug tracker where others have shared other ideas in the comments.
'The Java 2D API is a set of classes for advanced 2D graphics and imaging, encompassing line art, text, and images'
http://java.sun.com/products/java-media/2D/index.jsp
Here's another possibility: org.eclipse.draw2d It probably relies on eclipse SWT.
TinyLine provides vector graphics support on the Google App Engine server side, and also provides SVG rendering support. See the SVG Thumbnail images demo.
Google Web Toolkit contains a nice graphics library designed for interfacing with the Google app engine.
edit to clarify: Google App Engine is designed for hosting applications on the web. You need to design graphics that can run in the browser. To do this, you need to write code in a web language, Javascript, for example. Google Web Toolkit contains a Java graphics library which compiles down to Javascript, saving you the effort of writing the Javascript yourself.
I hesitate to mention PJA, which appears to work if the AWT classes are present, but the security manager prevents you from using them.
If you can use Python on GAE instead of Java, then there's pybmp.
Is there an easy way to use DirectX in Java? In particular, DirectX's video APIs.
I know that C# might be a more natural choice, but I have my devious reasons for wanting to do something so perverse.
I don't know about easy, but you could always use JNI to load the DirectX libs and invoke the methods.
Using something like Swig you could auto-generate a lot of the code.
Not sure how workable something like that would be though.
There seems to be a standard API about dealing with 3D inside Java.
It probably uses some kind of accelerating technology, may be even DirectX.
But I'm not sure about direct video support in this framework.
I create a library using BridJ (https://bridj.googlecode.com) that wrap DirectX classes, so you can use almost the same code than C++ examples.
You can find the library in https://bitbucket.org/fourthskyinteractive/directx-for-java.
Please, let me know about projects you develop.
There is a set of Direct3D bindings for Java available at http://java-direct3d.sourceforge.net/ but it seems that developement stopped in 2006 with DirectX 9.
Otherwise, there are OpenGL binding for java called JOGL.
The package that you want to investigate is the Java Media Framework (JMF). The core of it is pure Java, and per-platform "performance packs" provide acceleration via native libraries. It currently supports A/V capture and playback in a wide variety of data types as well as streaming via RTP and RTSP.
Sun's JMF home page
JMF SW/HW requirements
Minecraft is coded in Java with LWJGL, but Messiah Andrew's Renderer Wrapper converts the OpenGL to DirectX by using a modified version of the LWJGL libraries. Using these libraries, you should be able to code in LWJGL and have the game be running DirectX.
It seems that most are forgetting that JavaFX and Java3D support both DirectX and OpenGL using the best context for the machine you are on... well actually if you are on windows it attempts to load DirectX if it is newer than your OpenGL version.
I am not telling anyone to use either Java3D or JavaFX, but if you look at the source you can see how it is done.
GrepCode "good for looking for how things are implemented"
Open JavaFX "Open JavaFX project home" source
I should note that you want to look at the com.sun.prism package.
Java3D "Java3D project home" sources
I have been LEARNING development, LOL, for 20 years. Professionally for about 8 possible has never been the question, but how long, and/or is it worth it... Those are the questions.
Good luck my friend!
If you need any help I would be interested in creating a DirectX wrapper for java so
GIVE ME A SHOUT!