Hi guys
i've a problem here...hope u can help..
i've the following data extracted from a 3d model.
how do i display the model in opengl???
Vertex 1 -0.00423 0.78933 4.45589 {normal=(-0.00266 0.267 0.966)}
Vertex 2 -0.4276 1.862 3.8984 {normal=(-0.01221 0.4969 0.8681)}
Vertex 3 -0.81184 2.1162 3.12242 {normal=(-0.0444 0.6719 0.74012)}
Vertex 4 -1.13479 3.3543 2.4625 {normal=(-0.09215 0.7945 0.60084)}
Face 1 - vertex 1 vertex 7 and vertex 2
Face 2 - vertex 2 vertex 8 and vertex 3
Face 3 - vertex 3 vertex 9 and vertex 4
nex
open a 3dmodel in opengl
Started by nexusssz, Aug 23 2006 04:40 PM
6 replies to this topic
#1
Posted 23 August 2006 - 04:40 PM
#2
Posted 23 August 2006 - 10:33 PM
What model format is this?
Have you tried to google for code that loads and renders that model format?
Have you tried to google for code that loads and renders that model format?
#3
Posted 24 August 2006 - 01:42 AM
hi Grolsch,
yup, tried to get sample codes from the net...but cant seems to find it. the extension of the file is .m
looking for ways to load the model using GL. Hope anyone here can help.. Thanks heap.
nex
yup, tried to get sample codes from the net...but cant seems to find it. the extension of the file is .m
looking for ways to load the model using GL. Hope anyone here can help.. Thanks heap.
nex
#4
Posted 24 August 2006 - 01:56 AM
Didn't find the .m file format on wotsit.org. What program did you use to make the model? Or where did you find it?
#5
Posted 24 August 2006 - 02:25 AM
can i email it to u...?
#6
Posted 24 August 2006 - 10:33 AM
I would not be able to get much use out of it. Why don't you pick a more common 3D format?
#7
Posted 24 August 2006 - 01:41 PM
easy.
first, you must parse the 3d data file and allocate the geometric informations into arrays(or struct, whatever suits your needs).
second, read data from the array and render it as usual.
actually, i see no problem here.
most likely, this is an assignment and you a just a beginning student. dont bother searching the net for loader, as this is custom made for your class. nobody even bother to make loader to this kind of data(ASCII, too many unnecessary words). there are other tips for optimization, but ill leave it for later, if you prove you can do the simple way.
first, you must parse the 3d data file and allocate the geometric informations into arrays(or struct, whatever suits your needs).
second, read data from the array and render it as usual.
actually, i see no problem here.
most likely, this is an assignment and you a just a beginning student. dont bother searching the net for loader, as this is custom made for your class. nobody even bother to make loader to this kind of data(ASCII, too many unnecessary words). there are other tips for optimization, but ill leave it for later, if you prove you can do the simple way.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











