3ds to md2
Blitz3D Forums/Blitz3D Beginners Area/3ds to md2
| ||
Hey everyone. I need to create an animated character in 3ds max 8 and import it into b3d. how do i got about this? does b3d support .3ds or .obj files? im really stuck on this one. its a university project and im the designated programmer! i can use b+ but have minimal experience with b3d. thank you neil |
| ||
Blitz definitely supports .3ds. Here is the text from the B3D Help: 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. Example ; 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 Also, Blitz supports md2: LoadMD2 ( md2_file$[,parent] ) Parameters md2_file$ - filename of md2 parent (optional) - parent entity of md2 Description Loads an md2 entity and returns its handle. An md2's texture has to be loaded and applied to the md2 separately, otherwise the md2 will appear untextured. Md2's have their own set of animation commands, and will not work with normal animation commands. The optional parent parameter allows you to specify a parent entity for the md2 so that when the parent is moved the child md2 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 md2 being created at position 0,0,0 rather than at the parent entity's position. Example ; LoadMD2 Example ; --------------- Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() light=CreateLight() RotateEntity light,90,0,0 ; Load md2 gargoyle=LoadMD2( "media/gargoyle/gargoyle.md2" ) ; Load md2 texture garg_tex=LoadTexture( "media/gargoyle/gargoyle.bmp" ) ; Apply md2 texture to md2 EntityTexture gargoyle,garg_tex PositionEntity gargoyle,0,-45,100 RotateEntity gargoyle,0,180,0 While Not KeyDown( 1 ) RenderWorld Flip Wend End Index |
| ||
cheers gak, ive got an animated cube sort of moving around with textures and everything. think i'll be okay now! yay! neil |
| ||
You might find the b3dpipeline very useful. For b3d files only of course. |