How to render good quality image from 3d scene in java/c++ - java

i need to develop simple 3d application ( i don't know if its going to be java or c++ )
now how to use 3d engine i know , but in the end i need to produce rendered image or movie
out of the 3d scene.
who should i do it in application ?

If you need an image with really good quality I think you should use a 3D engine with ray tracing.
Implementing a raytracer might not be a easy task, so my recommendation is to use an existing one, like for example POV-Ray. I think it's possible to embed it in other applications. Raytracing stills takes some time, so the rendering will not be in real time.
In Java you can use Java3D but you will need some work.

Java 3D API
http://java.sun.com/developer/onlineTraining/java3d/

At
http://www.javalobby.org/articles/ultimate-image/#4
you'll find a description on how to render images to an Image instance, and how to save that to a file in Java

Related

Libgdx handle SVG

I want to know if there is a possibility to use svg graphics with libgdx. I know that Libgdx itself can not handle svgs but is there a possibility with an extension or a method which pre creates PNG's/JPG's out of the SVG's and pass them to Libgdx?
No, currently not supported.
For simple shape rendering you can use ShapeRenderer. You can't parse .svg file because of cross platform support.
For android you can use https://github.com/pents90/svg-android
Also check this thread, It may be helpful.

Rendering 2D Text in OpenGL in the modern pipeline

I've been searching the internet for quite some time and I have not been able to find satisfying content, I am using Java/LWJGL/OpenGL to create a 3D application.
I am running it on 3.3 on the core profile, because I want to have absolutely nothing to do with legacy OpenGL.
However I cannot find any small jar that allows me to render 2D text.
If I need to do it all by myself, then well... Fine. But I was not intending to invest so much time in something so trivial as printing some 2D text on the screen.
What I have come accross so far:
Slick-Util library for Java, relies on the legacy OpenGL.
Some proprietary class called TextRender that has somethign to do with Java2D, seems quite sketchy and almost sounds to me like it will create it's own OpenGL context and I want to manage those things.
What else is there out there to render 2D text? Do I really need to make something myself for something such trivial?
I just wanted to output the frames per second.

Drawing API for java?

I want to be able to draw and erase on an image in java (NOT javascript). Are there any APIs for that? Bonus points if i can also draw vectors, but it's not necessary. I want to use it in my program, so I'm not looking for a stand alone program. Thank you!
Why not use the graphics classes built into java? There is a simple tutorial for this here. You really just need to get a graphics context and then you can draw whatever you like on the image.
Another option would be to use Processing
diagrams and images can be drawn using an API that can produce SVG images. I can remember two API's that are capable of this. One of them is Batik and the other is SVG Salamander.

3ds animation on android

I'm struggling to find a way to load a 3d model/animation on Android.
I know min3d framework and I would like to create a sample 3d animation, like a level, and running it on android.
Min3D is supporting really well the md2 files but I don't know really how to edit md2s.
Is there any way to load 3ds animations even not using min3d? if not, is there an alternative way?
thanks
Here is a free library that should get you started:
http://www.jpct.net/jpct-ae/index.html

Suggested framework for generic 3D demo software

My company has decided that we need a "generic" demo infrastructure for our technology demos, given that I can write this using JOGL or OpenGL and create my own framework, I'd hate to reinvent the wheel. But there are so many 3D gfx engines out there and so many OpenGL wrappers!
Basically, we want to use 3D graphics to render some terrain and put simple models on it.
Their requirements are for it to look great and be cross-platform.
Basically, I am free to decide the scope and paradigm this would follow but I was thinking:
- Be able to load 3D models and render them in full-screen or windowed mode.
- Be able to control the camera(s) to "fly" through the resulting scene.
- Be able to show/hide billboard messages on top of everything, i.e. 2D text and images that are fixed on the screen and always face the camera.
- Be able to change simple things about parts of the scene, such as making object appear/disappear, change highlight color (like paint in red), and such.
- I am optionally looking to write or use an existing scripting language to inject event handling and pre-programmed animations.
Sample use case:
- Someone at our company prepares a 3D model of terrain with some buildings, essentially generating an XML-like file describing the scene and its objects.
- He then proceeds to use my program to fly through the terrain and record a few camera positions "of interest".
- Then, he binds some of those positions to keyboard keys and/or existing GUI buttons.
- He adds some pieces of floating text.
- He presents a demo using my program, loads his 3D model file and script file and can start "flying" with the audience from one of his selected camera poses to the next, the floating text fades in and out as he arrives and leaves the camera positions... some buildings on the terrain highlight in red when he clicks a button... etc.
I have some OpenGL and JOGL, as well as XNA Game Studio experience.
I'd rather use Java so it can be as platform-independent as possible.
What should I do?
I'd recommend you take a look at OpenSceneGraph or Ogre. Both are cross platform (C++), feature rich graphics engines. Furthermore, they are commercially friendly licenses and are very mature and actively maintained engines.
I know that out of the box, OpenSceneGraph supports the loading of several model formats with one or two lines of code and there are several OSG libraries that already do a great job at managing and rendering terrain.
Otherwise, you'll be spending 95% of your time writing a niche engine rather than developing your visualization capability.
It's not Java, but otherwise what you describe sounds extremely close to the Open Source Virtual Terrain Project. You may well be better using that add contributing additional facilities you develop than starting from a more basic scenegraph level.
I advise you to use Ardor3D or JMonkeyEngine 3. Ardor3D has an excellent support of JOGL, it supports the Collada format, terrains, heightmaps, it is used by the NASA and in GIS applications, it is not a niche engine. Ardor3D even works on Android, it is one of the most cross-platform 3D engine.
I advise you to look at this demo showing a procedural terrain in Ardor3D:
http://www.youtube.com/watch?v=bkXFkxrYtLY

Categories