Blitz3D Docs -> 3D - A-Z -> L -> LoadAnimMesh
LoadAnimMesh( Filename$, [Parent] )
Parameters:Filename$ - Name of the file containing the model to load.
Parent (optional) - Specify an entity to act as a Parent to the loaded mesh.
Description:LoadAnimMesh, similar to LoadMesh, Loads a mesh from an .X, .3DS or .B3D file and returns a mesh handle.
The difference between LoadMesh and LoadAnimMesh is that any hierarchy and animation information present in the file is retained. You can then either activate the animation by using the Animate command or find child entities within the hierarchy by using the FindChild(), GetChild() functions.
The optional parent parameter allows you to specify a parent entity for the mesh so that when the parent is moved the child mesh will move with it. However, this relationship is one way; applying movement commands to the child will not affect the parent.
Specifying a parent entity will still result in the mesh being created at position 0,0,0 rather than at the parent entity's position.
See also: LoadMesh, MeshCullBox, FindChild, GetChild, CountChildren, Animate.
; LoadAnimMesh Example ; -------------------- ; In this example we will demonstrate the use of the LoadAnimMesh command. ; Quite simply, we will load an anim mesh from file, animate it, and then view it. Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,20,-100 ; position camera so that robot will be in view when loaded light=CreateLight() RotateEntity light,90,0,0 ; Load anim mesh robot=LoadAnimMesh("media/makbot/mak_robotic.3ds") ; Animate mesh - this will begin an animation sequence which is updated when UpdateWorld is called Animate robot,2 While Not KeyDown(1) UpdateWorld ; Update anim - without this our anim mesh will freeze RenderWorld ; Render everything Flip ; Show everything Wend End
| I made an object with Lightwave, and exported it to an .x-file.|
In an X-file-runner the object was normal but in my Blitz-program, the bones were ignored!
| blitsytze - in future please post on the forum, not in the docs area.|
Blitz3D doesn't support boned X files, only boned B3D files.
| Stupid question, My version of Blitz3d is missing pratically everything that the book reffers to for objects, is there a "special version" that comes with the book that has all of this media?|
Or is there a "special version" of blitz3d that I need to download that currently is not in my account?
My account only goes from 185 to v 198, and it says to only install the latest, so do I need to download them all and install them all to get all the media I am supposed to have?
| The updates are media-less, all they do is update the blitz3d compiler. |
All the media comes with the original 1.64 version when you buy blitz3d.
The path shown in this sample is a partial path related to where the "LoadAnimMesh.bb" file is found.
The full path to that media file is: "blitz3d\help\commands\3d_examples\media\makbot\mak_robotic.3ds".
| Hey, look at an easteregg! read the "See Also" command list right after the LoadAnimMesh description...There's a "MeshCullBox" command. God, does anybody know what it would do? :D |
| See here. |
| LoadAnimMesh requires texture files (PNG/BMP/JPG) to be in the same folder as the B3D/X/3DS files that require them. |
Blitz3D Manual Forum
BlitzPlus Equivalent Command