Jump to content
  • Advertisement
Sign in to follow this  
keyofrassilon

OpenGL Reading an ASE file

This topic is 5122 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sorry to ask again but I really need to know whats going on here...How do I convert the following data into something OpenGL can read as vertices? When I take the data below and parse it straight as is into a float and dump it into a vertex array all I get is one triangle...nothing else so I assume that I am doing it wrong or the ASE exporter in 3d studio max 6 is wrong... Heres the ASE:
*3DSMAX_ASCIIEXPORT	200
*COMMENT "AsciiExport Version  2.00 - Sun Oct 10 22:54:43 2004"
*SCENE {
	*SCENE_FILENAME ""
	*SCENE_FIRSTFRAME 0
	*SCENE_LASTFRAME 100
	*SCENE_FRAMESPEED 30
	*SCENE_TICKSPERFRAME 160
	*SCENE_BACKGROUND_STATIC 0.0000	0.0000	0.0000
	*SCENE_AMBIENT_STATIC 0.0000	0.0000	0.0000
}
*GEOMOBJECT {
	*NODE_NAME "Box01"
	*NODE_TM {
		*NODE_NAME "Box01"
		*INHERIT_POS 0 0 0
		*INHERIT_ROT 0 0 0
		*INHERIT_SCL 0 0 0
		*TM_ROW0 1.0000	0.0000	0.0000
		*TM_ROW1 0.0000	1.0000	0.0000
		*TM_ROW2 0.0000	0.0000	1.0000
		*TM_ROW3 0.0000	0.0000	0.0000
		*TM_POS 0.0000	0.0000	0.0000
		*TM_ROTAXIS 0.0000	0.0000	0.0000
		*TM_ROTANGLE 0.0000
		*TM_SCALE 1.0000	1.0000	1.0000
		*TM_SCALEAXIS 0.0000	0.0000	0.0000
		*TM_SCALEAXISANG 0.0000
	}
	*MESH {
		*TIMEVALUE 0
		*MESH_NUMVERTEX 26
		*MESH_NUMFACES 48
		*MESH_VERTEX_LIST {
			*MESH_VERTEX    0	-5.0000	-5.0000	0.0000
			*MESH_VERTEX    1	0.0000	-5.0000	0.0000
			*MESH_VERTEX    2	5.0000	-5.0000	0.0000
			*MESH_VERTEX    3	-5.0000	0.0000	0.0000
			*MESH_VERTEX    4	0.0000	0.0000	0.0000
			*MESH_VERTEX    5	5.0000	0.0000	0.0000
			*MESH_VERTEX    6	-5.0000	5.0000	0.0000
			*MESH_VERTEX    7	0.0000	5.0000	0.0000
			*MESH_VERTEX    8	5.0000	5.0000	0.0000
			*MESH_VERTEX    9	-5.0000	-5.0000	10.0000
			*MESH_VERTEX   10	0.0000	-5.0000	10.0000
			*MESH_VERTEX   11	5.0000	-5.0000	10.0000
			*MESH_VERTEX   12	-5.0000	0.0000	10.0000
			*MESH_VERTEX   13	0.0000	0.0000	10.0000
			*MESH_VERTEX   14	5.0000	0.0000	10.0000
			*MESH_VERTEX   15	-5.0000	5.0000	10.0000
			*MESH_VERTEX   16	0.0000	5.0000	10.0000
			*MESH_VERTEX   17	5.0000	5.0000	10.0000
			*MESH_VERTEX   18	-5.0000	-5.0000	5.0000
			*MESH_VERTEX   19	0.0000	-5.0000	5.0000
			*MESH_VERTEX   20	5.0000	-5.0000	5.0000
			*MESH_VERTEX   21	5.0000	0.0000	5.0000
			*MESH_VERTEX   22	5.0000	5.0000	5.0000
			*MESH_VERTEX   23	0.0000	5.0000	5.0000
			*MESH_VERTEX   24	-5.0000	5.0000	5.0000
			*MESH_VERTEX   25	-5.0000	0.0000	5.0000
		}
		*MESH_FACE_LIST {
			*MESH_FACE    0:    A:    0 B:    3 C:    4 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    1:    A:    4 B:    1 C:    0 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    2:    A:    1 B:    4 C:    5 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    3:    A:    5 B:    2 C:    1 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    4:    A:    3 B:    6 C:    7 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    5:    A:    7 B:    4 C:    3 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    6:    A:    4 B:    7 C:    8 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    7:    A:    8 B:    5 C:    4 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 2 	*MESH_MTLID 1
			*MESH_FACE    8:    A:    9 B:   10 C:   13 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE    9:    A:   13 B:   12 C:    9 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE   10:    A:   10 B:   11 C:   14 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE   11:    A:   14 B:   13 C:   10 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE   12:    A:   12 B:   13 C:   16 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE   13:    A:   16 B:   15 C:   12 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE   14:    A:   13 B:   14 C:   17 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE   15:    A:   17 B:   16 C:   13 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
			*MESH_FACE   16:    A:    0 B:    1 C:   19 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   17:    A:   19 B:   18 C:    0 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   18:    A:    1 B:    2 C:   20 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   19:    A:   20 B:   19 C:    1 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   20:    A:   18 B:   19 C:   10 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   21:    A:   10 B:    9 C:   18 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   22:    A:   19 B:   20 C:   11 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   23:    A:   11 B:   10 C:   19 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 4 	*MESH_MTLID 4
			*MESH_FACE   24:    A:    2 B:    5 C:   21 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   25:    A:   21 B:   20 C:    2 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   26:    A:    5 B:    8 C:   22 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   27:    A:   22 B:   21 C:    5 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   28:    A:   20 B:   21 C:   14 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   29:    A:   14 B:   11 C:   20 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   30:    A:   21 B:   22 C:   17 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   31:    A:   17 B:   14 C:   21 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 5 	*MESH_MTLID 3
			*MESH_FACE   32:    A:    8 B:    7 C:   23 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   33:    A:   23 B:   22 C:    8 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   34:    A:    7 B:    6 C:   24 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   35:    A:   24 B:   23 C:    7 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   36:    A:   22 B:   23 C:   16 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   37:    A:   16 B:   17 C:   22 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   38:    A:   23 B:   24 C:   15 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   39:    A:   15 B:   16 C:   23 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 6 	*MESH_MTLID 5
			*MESH_FACE   40:    A:    6 B:    3 C:   25 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
			*MESH_FACE   41:    A:   25 B:   24 C:    6 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
			*MESH_FACE   42:    A:    3 B:    0 C:   18 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
			*MESH_FACE   43:    A:   18 B:   25 C:    3 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
			*MESH_FACE   44:    A:   24 B:   25 C:   12 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
			*MESH_FACE   45:    A:   12 B:   15 C:   24 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
			*MESH_FACE   46:    A:   25 B:   18 C:    9 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
			*MESH_FACE   47:    A:    9 B:   12 C:   25 AB:    1 BC:    1 CA:    0	 *MESH_SMOOTHING 7 	*MESH_MTLID 2
		}
		*MESH_NORMALS {
			*MESH_FACENORMAL 0	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 0	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 3	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 4	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 1	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 4	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 1	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 0	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 2	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 1	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 4	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 5	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 3	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 5	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 2	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 1	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 4	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 3	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 6	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 7	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 5	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 7	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 4	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 3	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 6	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 4	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 7	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 8	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 7	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 8	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 5	0.0000	0.0000	-1.0000
				*MESH_VERTEXNORMAL 4	0.0000	0.0000	-1.0000
			*MESH_FACENORMAL 8	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 9	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 10	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 13	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 9	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 13	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 12	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 9	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 10	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 10	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 11	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 14	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 11	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 14	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 13	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 10	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 12	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 12	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 13	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 16	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 13	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 16	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 15	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 12	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 14	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 13	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 14	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 17	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 15	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 17	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 16	0.0000	0.0000	1.0000
				*MESH_VERTEXNORMAL 13	0.0000	0.0000	1.0000
			*MESH_FACENORMAL 16	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 0	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 1	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 19	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 17	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 19	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 18	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 0	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 18	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 1	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 2	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 20	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 19	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 20	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 19	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 1	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 20	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 18	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 19	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 10	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 21	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 10	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 9	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 18	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 22	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 19	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 20	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 11	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 23	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 11	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 10	0.0000	-1.0000	0.0000
				*MESH_VERTEXNORMAL 19	0.0000	-1.0000	0.0000
			*MESH_FACENORMAL 24	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 2	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 5	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 21	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 25	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 21	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 20	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 2	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 26	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 5	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 8	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 22	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 27	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 22	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 21	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 5	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 28	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 20	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 21	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 14	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 29	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 14	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 11	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 20	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 30	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 21	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 22	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 17	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 31	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 17	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 14	1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 21	1.0000	0.0000	0.0000
			*MESH_FACENORMAL 32	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 8	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 7	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 23	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 33	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 23	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 22	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 8	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 34	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 7	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 6	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 24	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 35	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 24	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 23	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 7	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 36	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 22	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 23	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 16	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 37	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 16	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 17	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 22	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 38	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 23	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 24	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 15	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 39	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 15	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 16	0.0000	1.0000	0.0000
				*MESH_VERTEXNORMAL 23	0.0000	1.0000	0.0000
			*MESH_FACENORMAL 40	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 6	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 3	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 25	-1.0000	0.0000	0.0000
			*MESH_FACENORMAL 41	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 25	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 24	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 6	-1.0000	0.0000	0.0000
			*MESH_FACENORMAL 42	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 3	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 0	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 18	-1.0000	0.0000	0.0000
			*MESH_FACENORMAL 43	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 18	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 25	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 3	-1.0000	0.0000	0.0000
			*MESH_FACENORMAL 44	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 24	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 25	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 12	-1.0000	0.0000	0.0000
			*MESH_FACENORMAL 45	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 12	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 15	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 24	-1.0000	0.0000	0.0000
			*MESH_FACENORMAL 46	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 25	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 18	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 9	-1.0000	0.0000	0.0000
			*MESH_FACENORMAL 47	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 9	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 12	-1.0000	0.0000	0.0000
				*MESH_VERTEXNORMAL 25	-1.0000	0.0000	0.0000
		}
	}
	*PROP_MOTIONBLUR 0
	*PROP_CASTSHADOW 1
	*PROP_RECVSHADOW 1
}


Heres the code I use:
float box[26][3] = {-5.0000,	-5.0000,	0.0000,
					0.0000,	-5.0000,	0.0000,
					5.0000,	-5.0000,	0.0000,
					-5.0000,	0.0000,	0.0000,
					0.0000,	0.0000,	0.0000,
					5.0000,	0.0000,	0.0000,
					-5.0000,	5.0000,	0.0000,
					0.0000,	5.0000,	0.0000,
					5.0000,	5.0000,	0.0000,
					-5.0000,	-5.0000,	10.0000,
					0.0000,	-5.0000,	10.0000,
					5.0000,	-5.0000,	10.0000,
					-5.0000,	0.0000,	10.0000,
					0.0000,	0.0000,	10.0000,
					5.0000,	0.0000,	10.0000,
					-5.0000,	5.0000,	10.0000,
					0.0000,	5.0000,	10.0000,
					5.0000,	5.0000,	10.0000,
					-5.0000,	-5.0000,	5.0000,
					0.0000,	-5.0000,	5.0000,
					5.0000,	-5.0000,	5.0000,
					5.0000,	0.0000,	5.0000,
					5.0000,	5.0000,	5.0000,
					0.0000,	5.0000,	5.0000,
					-5.0000,	5.0000,	5.0000,
					-5.0000,	0.0000,	5.0000};

	glPushMatrix();
	glTranslated(x,y,z);
	glEnableClientState (GL_VERTEX_ARRAY);
	glVertexPointer (3, GL_FLOAT, 0, box);
	glDrawArrays(GL_TRIANGLES, 0, 26);
	glDisableClientState (GL_VERTEX_ARRAY);
	glPopMatrix();

All I need to know is do I read in the data JUST as its shown or do I reverse them add another vertex do some behind the scenes math? Because I read it in as is it doesnt produce what I created in 3d studio max...Ive looked at the code on gametutorials.com and it states that I just read them in as is I am guessing...He doesnt go into detail well enough for me unfortunately...
//	*MESH {								// This tells us an objects data is next
//		*TIMEVALUE 0					
//		*MESH_NUMVERTEX 8				// This holds the number of vertices for this object
//		*MESH_NUMFACES 12				// This is the number of faces in this object
//		*MESH_VERTEX_LIST {				// The tag for the start of the vertex list
//			*MESH_VERTEX    0	-1.5000	-1.5000	0.0000	// These next 8 are the vertices.
//			*MESH_VERTEX    1	1.5000	-1.5000	0.0000	// The first number is the index
//			*MESH_VERTEX    2	-1.5000	1.5000	0.0000  // and the next 3 are the (X, Y, Z)
//			*MESH_VERTEX    3	1.5000	1.5000	0.0000  // ...
//			*MESH_VERTEX    4	-1.5000	-1.5000	3.0000
//			*MESH_VERTEX    5	1.5000	-1.5000	3.0000
//			*MESH_VERTEX    6	-1.5000	1.5000	3.0000
//			*MESH_VERTEX    7	1.5000	1.5000	3.0000


Anything and everything will help at this point...

Share this post


Link to post
Share on other sites
Advertisement
There is an ASE reading tutorials on gametutorials.com

The key is rendering from your MESH_FACE list. That tells you the order that your verts need to be drawn in.

So in MESH_FACE 0 you draw vert 0, 3 and 4 to create that face and so on.




Share this post


Link to post
Share on other sites
Thak you thats what I was overlooking...Ill have to write a parser to extract the data...ASE files are too big unfortunately to use a loader...I would rather just convert it to opengl code and insert it into my engine...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!