Author Topic: 3d animation to movie?  (Read 5005 times)

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
3d animation to movie?
« on: January 30, 2007, 06:26:48 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
3d animation to movie?
« Reply #1 on: January 30, 2007, 07:07:16 pm »
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.

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
3d animation to movie?
« Reply #2 on: January 30, 2007, 07:29:31 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
3d animation to movie?
« Reply #3 on: January 30, 2007, 08:25:38 pm »
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.

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
3d animation to movie?
« Reply #4 on: January 30, 2007, 08:50:54 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
3d animation to movie?
« Reply #5 on: January 30, 2007, 10:59:20 pm »
OpenGL or software renderer?

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
3d animation to movie?
« Reply #6 on: January 30, 2007, 11:07:00 pm »
now, it is hardware render(OpenGL), should I change it?

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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
3d animation to movie?
« Reply #7 on: January 30, 2007, 11:09:34 pm »
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.

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
3d animation to movie?
« Reply #8 on: January 30, 2007, 11:14:44 pm »
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?

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
3d animation to movie?
« Reply #9 on: January 31, 2007, 12:39:50 pm »
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

Offline qjvictor

  • int
  • **
  • Posts: 77
    • View Profile
3d animation to movie?
« Reply #10 on: January 31, 2007, 05:41:13 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
3d animation to movie?
« Reply #11 on: January 31, 2007, 05:56:09 pm »
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....).

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
3d animation to movie?
« Reply #12 on: January 31, 2007, 08:27:06 pm »
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