How are you guys loading models (aka Just Shoot Me

BlitzMax Forums/BlitzMax Beginners Area/How are you guys loading models (aka Just Shoot Me

Ok I see a lot of people doing normal stuff in BMax like we did in Blitz3D. How are you guys loading models, terrains, and controlling the camera.

1. Is there a standardized .3ds or .b3d model loader that everyone is using?

2. How do I access and control the camera?

I can put a triangle on the screen and color each vertice a different color but that isn't very fun lol.

Please don't be harsh... :p

theres a milkshape loader in one of the nehe examples in
the showcase, theres also a 3ds loader floating about
that birdie did I think...

1) Dunno, but there is a MD2 loader in the codearchive.
2) By using glRotate/glTranslate or gluLookAt under OpenGL. I have no idea what to do under DirectX. But here is my camera type:
Type Tcamera 
    Field rotx:Float
    Field roty:Float
	Field ex:Float, ey:Float, ez:Float
	Field fx:Float, fy:Float, fz:Float
	Field ux:Float, uy:Float, uz:Float
	
	Field vx:Float, vy:Float, vz:Float
	Field nx:Float, ny:Float, nz:Float
	
	Function create:Tcamera()
		Local c:Tcamera = New Tcamera
		
		c.ex = 0
		c.ey = 5
		c.ez = 0
		
		c.fx = 0
		c.fy = 5
		c.fz = 0
		
		c.ux = 0.0
		c.uy = 1.0
		c.uz = 0.0
		
		c.rotx = 0
		c.roty = 0
		
		c.calculate_normal()
		
		Return c
	EndFunction

	Method calculate_normal()

		' Determine viewing vector
		vX = fX - eX
		vY = fY - eY
		vZ = fZ - eZ

		' Calculate the cross product of the view And up vectors
		nX = (vY * uZ) - (uY * vZ)
		nY = (vZ * uX) - (uZ * vX)
		nZ = (vX * uY) - (uX * vY)

		' Set To be a unit normal
		Local magnitude:Double = Sqr(nX * nX + nY * nY + nZ * nZ)
		nX :/ magnitude
		nY :/ magnitude
		nZ :/ magnitude	

	EndMethod

	Method Render()
		gluLookat(ex,ey,ez, fx,fy,fz, ux,uy,uz )
	EndMethod

	Method Place( x:Float,y:Float,z:Float )
		ex = x
		ey = y
		ez = z
		calculate_normal()
	EndMethod
	
	Method LookAt( x:Float, y:Float, z:Float )
		fx = x
		fy = y
		fz = z
		calculate_normal()
	EndMethod

	
	Method turn( dx:Float, dy:Float )

		Local rotate:Double[16]
		Local newUpX:Float, newUpY:Float, newUpZ:Float
		Local newSceneX:Float, newSceneY:Float, newSceneZ:Float
    	Local newSceneX1:Float, newSceneY1:Float, newSceneZ1:Float

		rotx :+ dx
		roty :+ dy

	
		' Rotate about the Up/Down Plane
		glMatrixMode(GL_MODELVIEW)
		glPushMatrix()

    	glLoadIdentity()
		glRotated(dy, nX, nY, nZ)
		glGetDoublev(GL_MODELVIEW_MATRIX, rotate)


		' We now need To calculate a New up direction
		newUpX = (rotate[0]*uX + rotate[1]*uY + rotate[2]*uZ  + rotate[3])
		newUpY = (rotate[4]*uX + rotate[5]*uY + rotate[6]*uZ  + rotate[7])
		newUpZ = (rotate[8]*uX + rotate[9]*uY + rotate[10]*uZ + rotate[11])

		uX = newUpX;
		uY = newUpY;
		uZ = newUpZ;

		newSceneX = (rotate[0]*vX + rotate[1]*vY + rotate[2]*vZ  + rotate[3])
		newSceneY = (rotate[4]*vX + rotate[5]*vY + rotate[6]*vZ  + rotate[7])
		newSceneZ = (rotate[8]*vX + rotate[9]*vY + rotate[10]*vZ + rotate[11])

	    glLoadIdentity();
		glRotated(dx, uX, uY, uZ);
		glGetDoublev(GL_MODELVIEW_MATRIX, rotate);
		glPopMatrix();

	 	newSceneX1 = (rotate[0]*newSceneX + rotate[1]*newSceneY + rotate[2]*newSceneZ  + rotate[3]);
		newSceneY1 = (rotate[4]*newSceneX + rotate[5]*newSceneY + rotate[6]*newSceneZ  + rotate[7]);
   		newSceneZ1 = (rotate[8]*newSceneX + rotate[9]*newSceneY + rotate[10]*newSceneZ + rotate[11]);
		
		fX = eX + newSceneX1;
		fY = eY + newSceneY1;
		fZ = eZ + newSceneZ1;

		' Make sure the vectors are up To date
		calculate_normal();
	
	EndMethod			
	
	
	
	' Left And Right are along the normal vector To the camera - normals
	' only change under a rotation.
	Method moveLeft(dist:Float)
		eX = eX + (nX * -dist)
		eY = eY + (nY * -dist)
		eZ = eZ + (nZ * -dist)
	
		fX = fX + (nX * -dist)
		fY = fY + (nY * -dist)
		fZ = fZ + (nZ * -dist)
	EndMethod

	Method moveRight(dist:Float)
		eX = eX + (nX * dist)
		eY = eY + (nY * dist)
		eZ = eZ + (nZ * dist)
	
		fX = fX + (nX * dist)
		fY = fY + (nY * dist)
		fZ = fZ + (nZ * dist)
	EndMethod

	' Up And down are along the camera's up and down vector
	Method moveUp(dist:Float)
		eX = eX + (uX * dist)
		eY = eY + (uY * dist)
		eZ = eZ + (uZ * dist)
	
		fX = fX + (uX * dist)
		fY = fY + (uY * dist)
		fZ = fZ + (uZ * dist)
	EndMethod

	Method moveDown(dist:Float)
		eX = eX + (uX * -dist)
		eY = eY + (uY * -dist)
		eZ = eZ + (uZ * -dist)
	
		fX = fX + (uX * -dist)
		fY = fY + (uY * -dist)
		fZ = fZ + (uZ * -dist)
	EndMethod

	' Forward And back are along the viewing vector
	Method moveForward(dist:Float)
		eX = eX + (vX * dist)
		eY = eY + (vY * dist)
		eZ = eZ + (vZ * dist)
	
		fX = fX + (vX * dist)
		fY = fY + (vY * dist)
		fZ = fZ + (vZ * dist)
	EndMethod

	Method moveBackward(dist:Float)
		eX = eX + (vX * -dist)
		eY = eY + (vY * -dist)
		eZ = eZ + (vZ * -dist)
	
		fX = fX + (vX * -dist)
		fY = fY + (vY * -dist)
		fZ = fZ + (vZ * -dist)
	EndMethod	
	
End Type

Quite big and ugly and nowhere near perfection, but it works for me.
Local cam:Tcamera = Tcamera.create()
cam.Place( 20,20,20 )
cam.LookAt( 20,0,-20 )
while mainloop
    cam.LookAt( l1.x_pos,l1.y_pos,l1.z_pos )
    cam.Render()
wend


Noooooo!! lol

I'll have a crack at making a camera system that imitates the camera in Blitz3D and adding it to the archives.