Missing mesh

Blitz3D Forums/Blitz3D Beginners Area/Missing mesh

Grovesy(Posted 2005) [#1]
Hi all. I have created my first mesh (basic.x) but cannot see it!! any ideas?? Heres my code.

Graphics3D 800,600
SetBuffer BackBuffer()

camera=CreateCamera()
RotateEntity camera,90,0,0
PositionEntity camera,10,20,10

light=CreateLight(1)
RotateEntity light,45,0,0

; This cube appears
cube = CreateCube()
PositionEntity cube,10,0,0

;But this mesh does not!!! :(
test = LoadMesh("Models/Basic.x")
PositionMesh test,0,0,0

While Not KeyDown( 1 )

;PositionEntity camera,0,20,0

If KeyDown( 205 )=True Then TurnEntity camera,0,-1,0
If KeyDown( 203 )=True Then TurnEntity camera,0,1,0
If KeyDown( 208 )=True Then MoveEntity camera,0,0,-0.05
If KeyDown( 200 )=True Then MoveEntity camera,0,0,0.05

RenderWorld

Flip

Wend

End


cheers all


Shambler(Posted 2005) [#2]
Try scaling your mesh up or down, it may be too small or large to be seen.

Scaleentity test,.1,.1,.1 for example to make it 10 times smaller.


jhocking(Posted 2005) [#3]
Yeah, that's usually the case when you're starting out. Each gridline in your modeling tool is 1 unit, so in most modeling tools one tends to make the model really huge when not paying attention to scale. So try scaling down, or move the camera further out. Ultimately though you'll want to get the scale correct in your modeling tool, so really you'll want to scale the model down there and export again.


Grovesy(Posted 2005) [#4]
Cheers guys that was the problem.

But im now having problems displaying more than 1 of my meshes i have simply duplicated the code:

test = LoadMesh("Models/Basic.x")
PositionMesh test,0,0,0
ScaleEntity test,.0075,.0075,.0075

But have changed the instance name and changed the location so there not on top of each other, but the second mesh does not appear!!! Any ideas?

Cheers


GitTech(Posted 2005) [#5]
Try PositionEntity() instead of PositionMesh().