24th October 2003, 09:00 PM | #1 |
Junior Member
Advanced member
Join Date: Oct 2003
Posts: 27
|
HOW to EXPORT AC3D 3D-Models to 2D-ANIMATED-SPRITES
Hi I need some help to convert AC3D 3D models in 2D animated sprites!
In General: Suppose you have made a 3D model of a plane. How do you build 2D animated sprites (GIF) out of the 3D model? Here is a representative example: Say you want a 2D animated sprite of a plane to put in a game. Drawing a top, side, front view of a 2D plane is not that difficult. However, when you want to draw multiple image representing the plane tilting to the right (motion executed by the plane turning or "banking" to the right) from a top view, for example, it is alway difficult to draw. By using AC3D, I can build a plane with texture mapping. I know how to use the 3D view a little, but how to say to AC3D: - to give me the top view - to tilt the plane right by say 15 degrees - take a "snapshot" of the view - tilt the plane by another 15 degrees - take a "snapshot" of the new view - etc - until the plane is tilted say by 90 degrees to the right (at this postion we see the left side view of the plane) ... and we end-up with a GIF animated file that contains the 7 sprites that when view in succession show a plane that bank to right from a top view (camera view). I only show a sample of 4 planes in the following picture. First, doing this sample picture manually is very long and tedious and it is not very precise. As you can imagine, I must use [Print / Scrn] key to copy the complete piture of my desktop showing the plane in 3D view in AC3D. Paste it in a paint program. Crop the picture. Rotate the picture by 270 degrees (so it show pointing north). Paste the picture in a new window in the paint program that will receive also the other plane pictures. Tilt the plane to the right a little (by eye!) and repeat the process again until I get the four pictures. Finally, I must resize the complete picture - that contain the four planes - at a lower resolution... Also notice that if I place the plane pointing the nose west or est in AC3D, it is because its the only way to make it bank up or down. By rotating each of the picture by 270 degrees. I get the wanted result... that is a plane banking right. I HAVE NOT FOUND A WAY OF DOING THIS BY SIMPLY POINTING THE NOSE PLANe TO THE NORTH (top screen). Since when it is in this positon, i dont see how I can make the plane bank left or right in the 3D view of AC3D! Therefore, How do I proceed to do that automatically? (tilting of the plane to the right by step of 15 degrees for 6 steps, starting with the plane in a top view - to finally get 7 GIF pictures showing the animation of the plane tilting to the right. So I can export it and use it as a sprite image for a game) Do I need any other tools to be able to do this? Does anyone have done this before? Thanks very much Steven P.S. The 4-planes picture above are made with an AC3D model called "falcon.ac", provided as an example with AC3D. Very nice plane model! |
25th October 2003, 02:42 AM | #2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: HOW to EXPORT AC3D 3D-Models to 2D-ANIMATED-SPRITES
If you are using windows, just use Edit->copy-3d-win-to-clipboard and paste the image into a gif editor.
You can use the current png plugin to make stuff like this: AC3D saves a series of png images, which you load into a gif animator to create the animated gif file. The png plugin adds a command which is like this: Code:
ac3d save_win_3d_image_png <filename> e.g. you could put this in tcl/patch.tcl Code:
toplevel .pngwin button .pngwin.b -text "save image" -command "ac3d save_win_3d_image_png c:/file.png" pack .pngwin.b Andy |
25th October 2003, 11:46 AM | #3 |
Junior Member
Advanced member
Join Date: Oct 2003
Posts: 27
|
Re: HOW to EXPORT AC3D 3D-Models to 2D-ANIMATED-SPRITES
NICE DEMO ANDY!
Effectively the command "copy-3d-win-to-clipboard" works much better! I admit I have not remark this command that would have made my demo picture much more easier... mea culpea! From what I understand in the following explanation, is that: 1) We can create patch using a language called TCI/TK 2) We place the patch code that we have program in the "\TCL" directory where we install AC3D. (in my case it would be C:\Program Files\AC3D\TCL) 3) We can call it "patch.tcl" or is it mandatory to call it "patch"? Am I right ? Whenever I want to create a patch, it must be place in a file named "patch.tcl" and if I want to create other patches, I must append them to "patch.tcl" ??? I must say that I know nothing about TCI/TK, but I look at some *.TCL files in the TCL directory and I was suprise to see that it is a text (ascii) type of file. Not binary! That is the language is not compiled! Does this mean that if I know how to program in TCI/TK that I could write some code in a text file and add some functionnality to AC3D? For example to completely automate the 3D model to 2D sprites, I just need to write a patch file (say called "3Dmodel-to-2DspritesAnm") and place it in a AC3D\TCL or AC3D\LIB directory to get a new function in AC3D... Is it the way it works? Thanks very much Steven |
6th November 2006, 06:06 AM | #4 |
Junior Member
Junior member
Join Date: Nov 2006
Posts: 1
|
Re: HOW to EXPORT AC3D 3D-Models to 2D-ANIMATED-SPRITES
I use this program, seems to do the job well, even adds outlines if u want:
http://www.d-grafix.com/?page=spriteforge Last edited by DanMan; 6th November 2006 at 06:10 AM. |
|
|