Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12th January 2004, 11:17 PM   #1
orion_squall
Junior Member
Junior member
 
Join Date: Jan 2004
Posts: 2
Default what are the step for converting a 3D picture to C++ OpenGL

hi,

sorry, I am very very new to this subject...

sorry for my stupidity...

I have the ability to use AC3D to draw 3D pictures (without moving part), but now in a class project have the chance to program 3D games...

I wonder if someone can guide me step by step from exporting a AC3D graphic to C++ OpenGL coode and animate them using game controller...any guidline will be appreciated.


thanks you all
orion_squall is offline   Reply With Quote
Old 13th January 2004, 01:50 AM   #2
LiveWire
Senior Member
Professional user
 
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
Default Re: what are the step for converting a 3D picture to C++ Ope

Hi Orin,

The request you have made isnt an easy one, i can't write a tutorial on it right now, but i can give you some information on where to start.

You can download the source code for an AC3D file loader/viewer at:

http://ac3d.org/ac3d/download/AC3Dloader1.1.zip

This is a great good place to start, although i have writtin my own AC3D file Loader that i think is less compilcated(but it is also not complete) than the source you can download, if you want i might be able to send you a modify copy of it.

Im a currently starting an game project(very early stage) similer to a Star Fox game, and i use my AC3D loader to load all the ship models i make in AC3D into the game.

acculy i did not learn AC3D file loading form looking at the downloadble source, i learned it from looking at AC3D files them selves(although this is not such a good idea for begginners, because ac3d files arent always constant, depending on Object Location, Texture, ect...) you can open an .ac file like a text document, this might help if you realy want to know what the format of a .ac file is.

this might also help:

http://ac3d.org/ac3d/man/ac3dfileformat.html

its a discription of the format of an .ac file type.

As far as Animating your models, well from what i hear AC3D is going to support Animations soon, but not yet. therfor to do animation you will probly have to export your models as a common file type(.3ds or .obj for example) and then import them into another 3D modeling program that does suport animation, then save the animations as a seperate Bones file. then load that file into your game, along with your model file, and use that as your animation.

an alternative way to do this is to write your own animation tool, where it would load a .ac file an then you could set up some of your own Bones for animation, and then save as your own bones file type. which you could impliment into your game. although that would require a good understanding of matrix's and 3d space.

well, sorry i couldnt be of more use. i hope that i helped you a little.
again, if you need a little more detailed info, or would like to ask me a quesiton you think i could help you with, just e-mail, or reply to this post.

email: witte2008@hotmail.com
AIM SN: PJW2008

id realy enjoy talking to a person who shares the same interest in game programing.

Philip

Some Useful Links:
http://www.cyberloonies.com/animation.htm(at the bottom of the site there is some openGL Animation tutorials + demos)
http://www.insanesoftware.de/(great charater animation program)
www.gametutorials.com(great openGL site, look under tutorials>openGL>page 4 & 5 for some animation tuts)
http://www.3dlinks.com/links.cfm?cat...ubcategoryid=2
LiveWire is offline   Reply With Quote
Old 13th January 2004, 02:35 AM   #3
orion_squall
Junior Member
Junior member
 
Join Date: Jan 2004
Posts: 2
Default Re: what are the step for converting a 3D picture to C++ Ope

thank you very much



on the nehe site, there is one tutorial talking about loading "milkshape" 3D model to OpenGL...

Do you think Milkshape is a better 3D modeller?

Also, It is possible to animate an AC3D model from OpenGL instead of some other 3D modeller as you mentioned?

thanks
orion_squall is offline   Reply With Quote
Old 13th January 2004, 08:00 PM   #4
LiveWire
Senior Member
Professional user
 
Join Date: Nov 2003
Location: Eugene OR, USA
Posts: 212
Default Re: what are the step for converting a 3D picture to C++ Ope

Personaly, i much prefer AC3D over milkShape 3D, much faster, and easyer. you could try using ac3d for modeling, and milkShape for animating(if you download the AC3D plugin pack, it support milkShape 3D file Impoting/Exporting), Have you looked at the CharaterFX animation tool link in my post ubove? CharaterFX is a great program, (and cheaper than milkShape 3D) you might want to look into that.

Yes it is possible to animate models in openGL using your own 3d animating tool but this would take a while to write, have to be fairly user frendly, and would need a good understanding of matrix math. ill give you a simple idea of hows its done(forgive if im being to basic)

First a model, as you know, is made up of an array of 3d vertexs(points),
To animate the model you have to move/rotate its vertexs along a set path. you can do this by asigning each vertex to a matrix(commonly nown as a bone) that you create in you animation tool,
there can be several diferent matrixs(bones) in a model(one for the left arm, one for the head, one for the right leg, ect...).
the models vertexs will always be transformed by its matrix, therefor, when you rotate the matrix, you rotate the vertexs assigned to it.
In you animation tool you make Key Frames(different set locations/rotations of each matrix in the model) you can then smothly animate(move/rotate) each matrix to its next keyframe state

youd want your animation tool have features somthing like this:

-Open AC3D files
-Create and Edit Bones(modifyed matrixs, with kids/parents, name, and reference of vertexs)
-Be able to select each vertex/group of vertexs, and assign it to a bone
-Create KeyFrames out of the bones
-Save the KeyFrames, into a seperate file

youd want your game to:

-Load AC3D files, and Load your Animation tools files(keyframes, ect..)
-smoothly animate your models vertexs, form one keyframe to the next

thats a very basic overview of the way it works, again sorry if i have been to basic(you said you where very very new to this)

if you need any more help, please ask.
thanks

Philip
LiveWire is offline   Reply With Quote
Old 14th January 2004, 07:17 AM   #5
titchStewart
Member
Advanced member
 
Join Date: Jan 2004
Location: London
Posts: 34
Default Re: what are the step for converting a 3D picture to C++ Ope

Can you import CharacterFX 'creations' into AC3D?

Cheers,

Titch
titchStewart is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 08:08 AM.


AC3D Forum
(C) Inivis Limited 2020