To create a cube like the native version you need 24 vertices. Notice that using updatenormals on a normal cube screws it up as the command averages the normals of the vertices which share the same space.
EDIT ... as per Big10p!
Anyway, this is a bottomless box lit as you want ..
Should help.
EDIT ... as per Big10p!
Anyway, this is a bottomless box lit as you want ..
Graphics3D 640,480,16,0 Pivot = CreatePivot() Camera = CreateCamera( Pivot ) PositionEntity camera, 0, 10,-10 AmbientLight 120,120,120 light1=CreateLight() LightColor light1,40,100,255 TurnEntity light1,45,-205,0 light2=CreateLight() LightColor light2,255,230,180 TurnEntity light2,45,35,0 pivot=CreatePivot() camera=CreateCamera(pivot) PositionEntity camera,0,5,-10 PointEntity camera,pivot Cube = CreateBottomlessCube() While Not KeyDown(1) If KeyDown(205) TurnEntity pivot,0,1.0,0 ElseIf KeyDown(203) TurnEntity pivot,0,-1.0,0 EndIf If KeyDown(200) TurnEntity pivot,1.0,0,0 ElseIf KeyDown(208) TurnEntity pivot,-1.0,0,0 EndIf RenderWorld() Flip Wend ;===================================================== ;===================================================== ;===================================================== Function CreateBottomLessCube() temp = CreateCube() ts = GetSurface( temp, 1 ) mesh = CreateMesh() s = CreateSurface( mesh ) For v = 0 To 19 Nv = AddVertex( s , VertexX( ts, v ) , VertexY( ts, v ) , VertexZ( ts, v ) ) VertexNormal s , Nv , VertexNX( ts, v ) , VertexNY( ts, v ) , VertexNZ( ts, v ) Next For t = 0 To 9 v0 = TriangleVertex( ts , t , 0) v1 = TriangleVertex( ts , t , 1) v2 = TriangleVertex( ts, t , 2 ) AddTriangle s, v0, v1, v2 Next FreeEntity temp Return Mesh End Function
Should help.