How to open .b3d files?

Blitz3D Forums/Blitz3D Beginners Area/How to open .b3d files?

AlphaHedge_YT(Posted 2015) [#1]
It's my understanding that Blitz3D opens .b3d files. How do I do that? I can't seem to find an option to open b3d files.


Matty(Posted 2015) [#2]
Have you got the latest blitz3d (account->product updates) ... the original default version 1.64 (very, very old) doesn't open them.

To open them simply use "loadmesh" or "loadanimmesh".....


AlphaHedge_YT(Posted 2015) [#3]
How do I do "loadmesh"? Is it a code?


Matty(Posted 2015) [#4]
Yes.

loadmesh and loadanimmesh are standard blitz3d functions.

eg:

graphics3d 800,600,0,2
camera = createcamera()
cameraclscolor camera,48,48,64

mesh = loadmesh("mymeshfile.b3d") ;also supports .3ds, .x

if(mesh=0) then runtimeerror("could not load mesh file")


moveentity camera,0,0,-10
repeat
cls

;play around with these commands.....
moveentity camera,0,0,-0.01
turnentity mesh,0.1,0.05,0.075

pointentity camera,mesh



renderworld
text 0,0,"Tris:"+trisrendered() 
flip

until keyhit(1)

freeentity mesh
freeentity camera
endgraphics

end




AlphaHedge_YT(Posted 2015) [#5]
I tried running it and it says "Error writing flie to C:\Program Files (x86)\Blitz3D\tmp\tmp.bb


Matty(Posted 2015) [#6]
Check the folder exists, and that you have write permissions to it.


xlsior(Posted 2015) [#7]
The new windows security model by default prevents programs from writing to c:\program files and c:\program files (x86) after install-time.

Easiest work-around is to install in a different location, e.g. c:\Blitz3D


Matty(Posted 2015) [#8]
In addition to what xlsior says...ive found on a few win7 machines blitz doesn't create the tmp folder on installing regardless of the install location and the simple fix is to create the folder yourself.


AlphaHedge_YT(Posted 2015) [#9]
I got it working, but it says "Error loading mesh file". I replaced the name with my b3d file, but it still says it. Do I have to put the file location?


Matty(Posted 2015) [#10]
When opening a file you need to specify the path to the file - which can either be the absolute path or a relative path.

I prefer to use relative paths.


AlphaHedge_YT(Posted 2015) [#11]
I loaded the mesh file succesfully. I have one last question: how can I edit it?


Matty(Posted 2015) [#12]
Depending on what you mean you can use the surface commands (addvertex, addtriangle etc) or you can use a purpose built tool to edit meshes.


Kryzon(Posted 2015) [#13]
Hello. I'm curious about how you discovered Blitz3D, and what made you decide to use it instead of other game engines.


AlphaHedge_YT(Posted 2015) [#14]
@Kryzon not sure that it's related, but I discovered it while viewing the files of Sonic World 5.

@Matty
Like I want to edit the animation that comes with the character.


RemiD(Posted 2015) [#15]
@AlphaHedge>>To edit the animations, or to delete some, or to create others, you can use Fragmotion. I believe that there is a trial version.