How to load a simple 3d image with java3d - java

I want know how to load an image and move it on screen. I know that I can use textureloader() to load an image, but I don't know how to display it on the screen.
Can anyone provide some code or a link that can display a texture on the screen?

Mehdi, take a look at these articles as they will show you what you need to do.
Specifically: http://java.sun.com/developer/onlineTraining/java3d/
This will give you all the tutorials you will need for Java3d
For loading a basic texture and putting it in a scene, look at this tutorial:
http://java.sun.com/developer/onlineTraining/java3d/j3d_tutorial_ch7.pdf
Specifically, go to section 7.2 and it should explain how to do all of that.
Good luck,

Related

Android app running in the background which can interact and edit pictures on the main user screen

I am working on an android app as explained by the title.
I have figured out the background part but i have found no information regarding the second part.
The main goal is to be able to change the facial features (in my case, the eyes) of any pictures that are projected in the main screen.
I am familiar with facial feature swapping given a root image from which the facial features will be extracted and then swapped to another inputed image, but i am searching for a way to swap those features from the root image to any face that appears in the main screen.
I am still in the theory phase regarding the second part.
I have considered manipulating cached photos but this wont be a complete solution.
I have considered changing the features of the faces that get detected in the main screen by drawing the features from the root image, but it wont do because it would be a simple drawing on the screen without affecting the underlying image.
I have no other ideas. I cant think of any way. It seems that it is impossible?
Any ideas?
Thanks in advance.

Best way to display scalable graphics as icons in JavaFX?

I am making a desktop app using JavaFX as the GUI Framework. I wan't my app to scale at any DPI, so I want sharp icons whether the app is run on a 1024x768 or 4K screen. In HTML achieving this is pretty easy with SVG, however I have not found a way to display scalable graphics directly in JavaFX.
What is the best way to achieve this? The app will obviously contain many icons, so I need it to be light and fast. Frankly, I haven't found anything close to what I want searching Google.
Thanks for your help!
Here is a library that you might want to have a look at:
JavaFXSVG
In addition to mipa's answer, I have similarly solved my problem using svg2fxml, available here: https://tomsondev.bestsolution.at/2012/08/22/svg-to-fxml-converter-as-commandline-util/

JavaFX tile/flow pane animation

I'm just playing around with JavaFX 2 and developing a little application for my own amusement.
From what I've seen so far, I like it, and now I'd like to play about with some of the animation and effect properties.
The app I'm designing uses a lot of images to display info, and I'd like to design a animated GUI to display the images. The idea I've got is something like this:
http://www.youtube.com/watch?v=LK3B7cpZlGM
Could anyone provide any information on how to achieve something similar to this? I'm guessing the layout is the flowpane, but I've no idea about how the animation works. Is there some kind of sort algorithm in play?
Any advice or info would be greatly appreciated.
Thanks!!
There are several articles about animation in JavaFX:
Video: http://medianetwork.oracle.com/video/player/1193110454001
Tutorial: http://docs.oracle.com/javafx/2/animations/jfxpub-animations.htm
Ensemble sample has several examples in Animation section, and "Display Shelf" example which do a simple version of animation in video.

Place and retrieve images Java 3d

I have no working experience of Java3d what so ever so I needed a quick information
where should I place images that I want to use in my project like the background of the panel
like we have Drawable folder in android.
and also I have seen that the background need the image as ImageComponent2d how to convert that retrieved image to that format
searched for it all around but no good tutorial was available
Any help is appreciated thanks in advace
Put the images on the run-time class path of the application (is the quick answer).

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.

Categories