3d animation to movie?

Started by qjvictor, January 30, 2007, 06:26:48 PM

Previous topic - Next topic

qjvictor

is there a simple way to convert 3d animation to a movie?
I mean with Jpct, I've already developed a nice java 3d game, but it depends on the client's local hardware to show well, so I am wonderring that is it possible to convert the 3d game to a movie?

EgonOlsen

You may try fraps (google for it). It's able to grab the screen at a fixed rate (let's say at 25fps) and make a movie from it. You still have to convert the result into another, smaller format, but it works fine. I once made a short Paradroidz-movie with it.

qjvictor

Thanks for reply.
I notice that in FrameBuffer class, there is a method called getOutputBuffer()
it will return an image. So is it possible to solve the problem using following way:
  1. in server side,  always create image files using getOutputBuffer()  method.
  2. in client side, always download the image files, and use JMF to render the image with media player.

with fraps, because there is no screen running at server side, how could it create a movie?

EgonOlsen

Well, i wasn't aware that the movie has to be created on a sever. I thought that it was just for demonstration purposes. Anyway, doing it the way you described should work but will be dog slow IMHO. If this isn't a problem, then go for it.

qjvictor

I just found that when I call FrameBuffer.getOutputBuffer() to get an image, there has to a screen to be created on the server.
Is it possible to get the image with a backend program.  I mean I needn't show the screen.

EgonOlsen

OpenGL or software renderer?

qjvictor

now, it is hardware render(OpenGL), should I change it?

But if using software render, the performace is not good.

EgonOlsen

You can't render using OpenGL without an OpenGL context, i.e. without a display. Running in headless mode, this should be possible when using the software renderer...but...are you REALLY sure that creating a video on the server (which is a damn heavy task) is the right way?

Edit: The performance when creating a movie out of the rendered frames will be incredibly bad anyway. Even if you manage to run the OpenGL renderer on the server, grabbing the image from the framebuffer is slow (as stated in the docs). I really don't think that this is a good idea either way.

qjvictor

thanks for reply.
I have to use OpenGL, so this way can't be the right solution.

could you give me some suggestion about this issue?

cyberkilla

what do you need this for?

if its a game, then i suggest you dont do it.
if its like some way to view a virtual world without actually being there,
its still bad.

the clients have pc's, you should be distributing the processing to them.

Perhaps he is making a render farm?
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

qjvictor

I need to convert the 3d game to movie because of following reasons:
 1) every client should have the same view experience of this game.
     but if I use webstart or applet, this will depend on the client's pc, such as what kind of graphic card he uses.
 2) It is a horse race game, so the time is top important, if running in a slower pc, the horses look like slower and floating when racing.

 on word, the game should depend on the client hardware. So I think if I can convert the 3d game to a movie constantly, that will be great.

EgonOlsen

If the speed of the horses depend on the machine's speed on which the game is running, you should check your timing instead of making a movie out of the game.
I don't see any solution rather than relying on the clients hardware and make the timing and the display initialization as robust as possible. Plus i suggest to offer different versions to download, i.e. one via webstart for people with Java installed and the Mac-OSX- and Linux-folks and one with a bundled VM for Windows for those, who don't care about the bigger download but about installing the runtime.
Distributing a game as a movie is, apart from the fact that i consider this to be hardly doable in a pleasing way,...quite...well...absurd (no offense...  :wink: ). And even if it would work reasonable well, you'll run into other problems (caching problems, download problems, client problems with the video codec/card, bandwidth problems etc....).

cyberkilla

Yeh, you'll suffer more from modem bandwidths than from the clients graphics hardware:)
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG