How to generate a complicated model mesh using OpenGL?
Goodday.
I am now in the middle of confusion about "How to generate a complicated model mesh using OpenGL in C++". I had a bit of experience in OpenGL few years back for a project but getting rusty with the skill.
Anyone can help me in figuring out how to generate those vertices / polygon mesh in OpenGL? I do know about people drawing the mesh in 3DMax or Maya and later export it into OpenGL, but how exactly the exported file format should be? Is it exporting the mesh to list of vertices and I should write some code in C++ to model the mesh out?
Thanks in advance.
I am now in the middle of confusion about "How to generate a complicated model mesh using OpenGL in C++". I had a bit of experience in OpenGL few years back for a project but getting rusty with the skill.
Anyone can help me in figuring out how to generate those vertices / polygon mesh in OpenGL? I do know about people drawing the mesh in 3DMax or Maya and later export it into OpenGL, but how exactly the exported file format should be? Is it exporting the mesh to list of vertices and I should write some code in C++ to model the mesh out?
Thanks in advance.
^^^That guy^^^ Wrote:3DMax or Maya and later export it into OpenGL, but how exactly the exported file format should be?
Well,
It all depends on what you want....
A simple 2D game, you don't need any file format just OpenGL gl Functions

If you want advanced charicter animation use something like .aoi (skeletel support)
Quote: Anyone can help me in figuring out how to generate those vertices / polygon mesh in OpenGL?
Read the Red book...
or Nehe
You use glBegin and then end with glEnd();
Global warming is caused by hobos and mooses
Quote:You use glBegin and then end with glEnd();BinarySpike, your posts are becoming less and less helpful; please only reply if you believe you have something relevant and helpful to say...
huihuisakura, there is no "OpenGL file format" (i.e. you must code your own model loader, or borrow somebody else's.)
Depending on your level of skill, which you don't state, I'd suggest you first look at the file format of models produced by Meshwork, a very simple modelling tool; just by comparing files containing different "primitives" of a model you'll be able to decode the format – Meshwork's files contain merely a list of vertex coordinates, a list of the lines between numbered vertices, and a list of numbered vertices which form triangles (oh, and material properties, but I've never bothered with Meshwork's handling of those, or texture coordinates.)
Other model file formats, notably 3DSMax or Maya, will have their own peculiar features (and I'm not even sure if the documentation of those formats is publicly available
– but I'm pretty sure somebody else on this forum has mentioned coding export scripts before...)
Mark Bishop
Thanks both for the advice.
I am sorry for not stating my condition and question properly.
I would take myself as a beginner in OpenGL, to make the problem easier.
Basically, I will have to model a 3D mesh which can be as complicated as a human face. Yet, I am at a loss on how to GENERATE all those vertices that the polygon mesh composes of? I need these vertices so that I can manipulate the changes on the polygon in OpenGL later.
So I just wonder whether Maya exports files as the list of vertices? I am totally new to Maya, so I am not sure what the types of exported fiels can be. Can anyone enlighten me in this?
Thanks.
I am sorry for not stating my condition and question properly.
I would take myself as a beginner in OpenGL, to make the problem easier.
Basically, I will have to model a 3D mesh which can be as complicated as a human face. Yet, I am at a loss on how to GENERATE all those vertices that the polygon mesh composes of? I need these vertices so that I can manipulate the changes on the polygon in OpenGL later.
So I just wonder whether Maya exports files as the list of vertices? I am totally new to Maya, so I am not sure what the types of exported fiels can be. Can anyone enlighten me in this?
Thanks.
Check out some tutorials on the web:
http://www.codecolony.de/opengl.htm
http://astronomy.swin.edu.au/~pbourke/geomformats/obj/
http://nehe.gamedev.net/
http://www.codecolony.de/opengl.htm
http://astronomy.swin.edu.au/~pbourke/geomformats/obj/
http://nehe.gamedev.net/
I use maya's '.obj' format. Its really easy and intuitive to parse through. If youd like i could post my model loading code although its very simplified... Im not sure it could handle a face but its probably a good start.
There was a long silence...
'I claim them all,' said the Savage at last.
hangt5 Wrote:I use maya's '.obj' format. Its really easy and intuitive to parse through. If youd like i could post my model loading code although its very simplified... Im not sure it could handle a face but its probably a good start.
Actually, .obj is one of the most popular file formats (due to wavefronts push to make a common file format) and is supported across a broad range of 3D modeling apps.
One thing to consider with .obj is it lacks any animation support.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Best way to generate png files | kalamantina | 2 | 4,610 |
Dec 7, 2010 02:15 PM Last Post: SethWillits |
|
| how to create a grid / 2D mesh | bfarah | 1 | 3,212 |
Oct 20, 2010 02:22 AM Last Post: iamflimflam1 |
|
| Boolean Mesh Operations and Mesh-Based CSG | Oddity007 | 2 | 4,853 |
Feb 13, 2010 03:42 PM Last Post: Oddity007 |
|
| OpenGL ES creating a 2D mesh | soulstorm | 0 | 2,477 |
May 20, 2009 02:37 AM Last Post: soulstorm |
|
| Spherical Mesh. | dave05 | 8 | 4,828 |
Oct 29, 2008 02:53 PM Last Post: mholg |
|

