TIGSource Forums

Developer => Art => Topic started by: squidkid on July 23, 2009, 06:46:54 PM



Title: Planet Animation
Post by: squidkid on July 23, 2009, 06:46:54 PM
Hey, I've had trouble animating a planet. I'm trying to get it to rotate, but I feel there should be some kind of shortcut in figuring this out. I'm using EasyToon to animate. When I give the sprites to the programmer I just color the sprites and put them on a sheet, is there a better program that I can use to make gifs?
(http://img189.imageshack.us/img189/6461/workwithplanet.gif)

(http://img24.imageshack.us/img24/4315/newearth.png)


Title: Re: Planet Animation
Post by: Lazycow on July 24, 2009, 11:54:46 AM
What exactly is your problem? Creating the animation frames of the rotating planet? Or creating an animated gif out of a sprite sheet? Or creating a sprite sheet out of single animation frames?

...you could use "gifsicle" to build an animated gif out of frames:
(http://img529.imageshack.us/img529/81/moon.gif)

...or "montage" from the imagemagik package to build a sprite sheet out of frames, like this:
(http://img529.imageshack.us/img529/7185/moonsheet.png)


Title: Re: Planet Animation
Post by: squidkid on July 24, 2009, 05:00:08 PM
What exactly is your problem? Creating the animation frames of the rotating planet? Or creating an animated gif out of a sprite sheet? Or creating a sprite sheet out of single animation frames?

It was more creating the animation, but I was also wondering if there was a better program I could use.

I tried making the animation at first by using this kind of flat globe and having each frame as a different position of that map. Then I would add the negative space around the planet so it would cut off the rest of the map. Two things were wrong with this.

First, it kind of looked like the planet was scrolling behind a frame.
Second, the version of EasyToon I was using doesn't make the white color "clear" so I couldn't just paste the negative space, I'd have to draw it each time and it became very tedious.


Title: Re: Planet Animation
Post by: Lazycow on July 24, 2009, 11:35:05 PM
It was more creating the animation, but I was also wondering if there was a better program I could use.

Yes, you should use a 3D program. Here's an example how to do this with povray:

(http://img43.imageshack.us/img43/8593/newearthanim.gif)

That's your modified texture
(http://img43.imageshack.us/img43/4582/newearth.gif)

and the povray source:
Code:
global_settings{ assumed_gamma 1.5 }

camera { location <5,5,-5> look_at  <0,0,0> }

sphere{ <0,0,0>, 1
texture{
pigment { image_map { gif "newearth.gif" map_type 1 once } }
finish { ambient 1.0 }
}
rotate y*clock*360
}


Title: Re: Planet Animation
Post by: squidkid on July 25, 2009, 03:32:33 PM
Oh, wow, thanks. I really got to try and look into more of this POV-Ray stuff. Thanks!


Title: Re: Planet Animation
Post by: squidkid on July 25, 2009, 03:33:46 PM
Also, is that how you made that one animation?


Title: Re: Planet Animation
Post by: Lazycow on July 25, 2009, 10:14:50 PM
Also, is that how you made that one animation?

Here's how I called it from the command line... (povray is complicated, if you continue using it, you will have to read the manual, I guess) There is also several helpful stuff out there in the net. My favourite site is... http://www.f-lohmueller.de/pov_tut/pov__eng.htm (http://www.f-lohmueller.de/pov_tut/pov__eng.htm)
Code:
povray +Inewearth.pov +UV +UL +FP -D +W320 +H240 +KFF64 +KC +Oframe.ppm
"+FP" to create .ppm files, "+FN" for .png files
"+KFF64" creates 64 animation frames
"+W320 +H240" for the resolution
(look at the manual for more parameters)
after that you can use "montage" from the imagemagik package to build a spritesheet (as mentioned above)
good luck! :)


Title: Re: Planet Animation
Post by: squidkid on July 27, 2009, 05:00:54 PM
Thanks, I was looking for tutorials for this too. Even though I am mostly a 2D type of guy and I only planned on using this for one thing (making planets), I can imagine this is really useful for making 2D sprites easier.


Title: Re: Planet Animation
Post by: Jrsquee on July 27, 2009, 07:43:45 PM
First, it kind of looked like the planet was scrolling behind a frame.
Second, the version of EasyToon I was using doesn't make the white color "clear" so I couldn't just paste the negative space, I'd have to draw it each time and it became very tedious.

the thing is:
it doesn't just rotate round and round like that
the shape of the earth will distort the landforms as they go towards the left/right horizons
they get more squished, from perspective