Print at Dec 21, 2025, 3:56:26 AM

Posted by tibihan at Mar 9, 2010, 6:56:44 PM
A plug-in for creating a 3D video
Hi,

1-As a teacher, I participate to a project with young students and I would like to have a tool to produce videos.
I have started writing a plug-in. Although I am a newbie in Java, I have got a first encouraging result.
Then, I have just seen your project " Creating 3D videos" on your blog. It would be probably perfect for us. But unfortunately, we don't have much time and I would like to go further quickly. Perhaps you can help me on some points.

2- I have developed a tool – an Open Office Spreadsheet – to help building a list of all the necessaries characteristics of the camera for each image then produce a text-file. My plug-in reads this file and moves the observer in the plan. The visit is shown in the 3D-view.

3- There are three difficulties left:

a) A first option enables to follow the movements image by image, displaying a message.
But the instruction:
JOptionPane.showMessageDialog(null, "");
centers the message. I don't know how to choose a better position.

b) A second option enables to chain the movements without displaying a message. But the intermediate positions are not shown. I suppose that I should send a message to a listener of the 3D view to say that something has changed; but I don't know how to do it.

c) Most important, I would like that a third option create and save the images as the "Render Tool" does. Here is my code. It does not work.

PhotoRenderer.Quality qual = PhotoRenderer.Quality.LOW;
BufferedImage image = new BufferedImage(400, 300, BufferedImage.TYPE_3BYTE_BGR );
PhotoRenderer photRenderer = null;
try {
photRenderer = new PhotoRenderer(getHome(), qual);
} catch (IOException e) {
JOptionPane.showMessageDialog(null, String.format("%s ","exception: " + e.getMessage()));

e.printStackTrace();
}
ImageObserver observer = null;
photRenderer.render(image, getHome().getObserverCamera(), observer);

File output = new File("c:/Im1.png");
try {
ImageIO.write(image, "PNG", output);
} catch (IOException e) {
JOptionPane.showMessageDialog(null, String.format("%s ","exception: " + e.printStackTrace();
}

I hope that there are not much changes to do. And I thank you in advance for your help.