ScaleEntity & AnimMesh
BlitzMax Forums/MiniB3D Module/ScaleEntity & AnimMesh| 
 | ||
| Hi, When I use ScaleEntity on an Animated Mesh (LoadAnimMesh the mesh becomes unrecognizable :P Any easy way to fix that? :) | 
| 
 | ||
| Should work fine. Post the mesh and I'll take a look. | 
| 
 | ||
| Here you go :) http://filebeam.com/cc8097066ec99c8eb82f67254c693d5a Load the Main.b3d as an AnimMesh and try and scale it ^^ | 
| 
 | ||
| I understand if you're busy with holday festivites etc, but have you had a look at it yet simonh? :) | 
| 
 | ||
| Same Problem, here. With the Ninja Model from psionic If it is not Animated, it is shown well. But if I do ScaleEntity hero,0.08,0.08,0.08 or Scalemesh hero,0.08,0.08,0.08 the Animation is corrupted. With zombie.b3d, the same problem. It looks like, the bones stay on the same position It looks this like: Import "../minib3d.bmx"
Strict
Local width=640,height=480,depth=32,mode=2
Graphics3D width,height,depth,mode,0
Local cam:TCamera=CreateCamera()
PositionEntity cam,0,10,-15
Local light:TLight=CreateLight()
Local ent:TMesh=LoadAnimMesh("media/zombie.b3d")
ScaleMesh ent,0.1,0.1,0.1
Local anim_time#=0
' used by fps code
Local old_ms=MilliSecs()
Local renders=0
Local fps=0
While Not KeyDown(KEY_ESCAPE)		
	If KeyHit(KEY_ENTER) Then DebugStop
	' control camera
	MoveEntity cam,KeyDown(KEY_D)-KeyDown(KEY_A),0,KeyDown(KEY_W)-KeyDown(KEY_S)
	TurnEntity cam,KeyDown(KEY_DOWN)-KeyDown(KEY_UP),KeyDown(KEY_LEFT)-KeyDown(KEY_RIGHT),0
	If KeyDown(KEY_MINUS) Then anim_time#=anim_time#-0.1
	If KeyDown(KEY_EQUALS) Then anim_time#=anim_time#+0.1
	
	SetAnimTime(ent,anim_time#)
	RenderWorld
	renders=renders+1
	
	' calculate fps
	If MilliSecs()-old_ms>=1000
		old_ms=MilliSecs()
		fps=renders
		renders=0
	EndIf
	
	Text 0,0,"FPS: "+fps
	Text 0,20,"+/- to animate"
	Text 0,40,"anim_time#: "+AnimTime(ent)
	Flip
	
Wend
End | 
| 
 | ||
| Jan_ - that program works OK here - are you using the latest version (V0.52)? ScaleMesh won't work with boned meshes, but ScaleEntity should. Hule - sorry for not taking a look sooner - there does appear to be an issue there. What program did you use to export it? | 
| 
 | ||
| Hule - here's a working file if you need one - importing and exporting from Unwrap 3D did the trick: http://www.si-design.co.uk/Main2.b3d | 
| 
 | ||
| simonh, Hi finally :) I'm using 3D Studio Max (It's my schools license) to export my models. Oh okey, I'll check out Unwrap 3D, Thanks :) (Would be nice though if you took a closer look at the issue, I have tried several programs to export with and I got the same result each time.) |