3D modelling
When I try to export a 3D model as a text file I often get only 4 vertex coördinates. When you create a model (a quad in this case) you need a whole lot more vertex coördinates. Does anyone know how to get atound this problem? Maybe there''s a (free) visual c++ modelling program on the web that''s easy to use with visual c++ to create simple models? I''m really having a hard time to figure out those coördinates so plz help me....
thanx!
____ __ __/ _` / / /_ _ ___ _ ___ /_/_ /___ __/___ __ L /__/ _//__/ _/ ____/ _ _ /___/ /_/ /_/rulez
quote:
only 4 vertex coördinates. When you create a model (a quad in this case) you need a whole lot more vertex coördinates
a quad only has 4 vertices,
u might wanna have a look at milkshake or blender
http://members.xoom.com/myBollux
Yes I know that! But maybe you didn''t understand: I meant a 3D quad, you know a cube.
It looks like this:
glBegin(GL_QUADS); // Draw A Quad
glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Top)
glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Top)
glVertex3f(-1.0f, 1.0f, 1.0f); // Bottom Left Of The Quad (Top)
glVertex3f( 1.0f, 1.0f, 1.0f); // Bottom Right Of The Quad (Top)
glVertex3f( 1.0f,-1.0f, 1.0f); // Top Right Of The Quad (Bottom)
glVertex3f(-1.0f,-1.0f, 1.0f); // Top Left Of The Quad (Bottom)
glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Bottom)
glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Bottom)
glVertex3f( 1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Front)
glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Front)
glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Front)
glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Front)
etc. etc... That''s more than 4 vertices!
It looks like this:
glBegin(GL_QUADS); // Draw A Quad
glVertex3f( 1.0f, 1.0f,-1.0f); // Top Right Of The Quad (Top)
glVertex3f(-1.0f, 1.0f,-1.0f); // Top Left Of The Quad (Top)
glVertex3f(-1.0f, 1.0f, 1.0f); // Bottom Left Of The Quad (Top)
glVertex3f( 1.0f, 1.0f, 1.0f); // Bottom Right Of The Quad (Top)
glVertex3f( 1.0f,-1.0f, 1.0f); // Top Right Of The Quad (Bottom)
glVertex3f(-1.0f,-1.0f, 1.0f); // Top Left Of The Quad (Bottom)
glVertex3f(-1.0f,-1.0f,-1.0f); // Bottom Left Of The Quad (Bottom)
glVertex3f( 1.0f,-1.0f,-1.0f); // Bottom Right Of The Quad (Bottom)
glVertex3f( 1.0f, 1.0f, 1.0f); // Top Right Of The Quad (Front)
glVertex3f(-1.0f, 1.0f, 1.0f); // Top Left Of The Quad (Front)
glVertex3f(-1.0f,-1.0f, 1.0f); // Bottom Left Of The Quad (Front)
glVertex3f( 1.0f,-1.0f, 1.0f); // Bottom Right Of The Quad (Front)
etc. etc... That''s more than 4 vertices!
____ __ __/ _` / / /_ _ ___ _ ___ /_/_ /___ __/___ __ L /__/ _//__/ _/ ____/ _ _ /___/ /_/ /_/rulez
November 02, 2000 04:41 PM
J-W, try checking out http://www.xdsoft.com/explorer/ it''s a program that will open up diffrent 3d models, one feature that is pretty cool is the ability to export these models to opengl code. I used it for a bit, but for me I was better off writing a quake 2 .md2 loader, which I''m doing right now..
hope that helps..
-Serun
hope that helps..
-Serun
hi J-W
listen... check my 26th tutorial on Nehe''s page.
see how files are organized ( objects )... now see how I load them . Ok you don''t have to write all that stuff ( glVertex ) for each vertex... I know you scream "I know that !" right now.
What I try to tell you is that eg. 3explorer, Anonymous ( Serun ?) mentioned, handles ascii and binary files. ascii files are cool cause you can write your own handler/converter to your own format ( that''s not that hard, you ave to spec. your object structure, again check tutorial 26 )
and usual ascii file looks something like :
VertexList
x:1.34353 y:3.3545 z:5.4566 u: v:
x:0.35463 y:5.4353 z:-5.224 u: v:
...
FaceList
a:0 b:1 c:2
a:1 b:2 c:3
a:5 b:7 c:4
a:7 b:9 c:4
and so on... what means you load list of verts ( xyz ) to some data struct and then you create object from face list ( you can load I too )
first face is made of vertex no. 0, 1 and 2
second one : vertex 1 , 2 and 3
third : 5th , 7th and 4th
so now forget about writting glVertex !!!
maybe it is not what were you asking about but what the hell ...
I hope I answered your quwstion...
good luck
Pet
listen... check my 26th tutorial on Nehe''s page.
see how files are organized ( objects )... now see how I load them . Ok you don''t have to write all that stuff ( glVertex ) for each vertex... I know you scream "I know that !" right now.
What I try to tell you is that eg. 3explorer, Anonymous ( Serun ?) mentioned, handles ascii and binary files. ascii files are cool cause you can write your own handler/converter to your own format ( that''s not that hard, you ave to spec. your object structure, again check tutorial 26 )
and usual ascii file looks something like :
VertexList
x:1.34353 y:3.3545 z:5.4566 u: v:
x:0.35463 y:5.4353 z:-5.224 u: v:
...
FaceList
a:0 b:1 c:2
a:1 b:2 c:3
a:5 b:7 c:4
a:7 b:9 c:4
and so on... what means you load list of verts ( xyz ) to some data struct and then you create object from face list ( you can load I too )
first face is made of vertex no. 0, 1 and 2
second one : vertex 1 , 2 and 3
third : 5th , 7th and 4th
so now forget about writting glVertex !!!
maybe it is not what were you asking about but what the hell ...
I hope I answered your quwstion...
good luck
Pet
Pet
There''s a free program at anim8or.com that allows you to model/animate/render 3d files that exports to C, 3ds, obj, and vtx files. Then I use 3D exploration (www.xdsoft.com) to convert it to whatever file type I want.
It''s kind of a roundabout way of doing it--but it''s completly free so I can make professional looking 3d models without spending a cent!!
Open mouth, insert foot
It''s kind of a roundabout way of doing it--but it''s completly free so I can make professional looking 3d models without spending a cent!!
![](http://www.geocities.com/him_voxdei/image/hapfac01.gif)
Open mouth, insert foot
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement