Save .b3d

Blitz3D Forums/Blitz3D Programming/Save .b3d

Ross C(Posted 2006) [#1]
Anyone have a save .b3d function, that will save multiple textures on a mesh, and have multiple meshes?

I will explain more :o)

Say i had a mesh, textured it. Then parented some meshes to it, textured them. I would like to save that out as a .b3d. Mainly for loading into Gile[s] and lightmapping. That's the main thing. I'm using my own editor, to position and set up things in the world.

Then when it's lightmapped, i can load the .b3d file in, do findchild on the main mesh/pivot, to get the meshes back.

(Oh, and i've searched the archives and found save .b3d code.) Mostly only works for single surface/single mesh and one texture.


jfk EO-11110(Posted 2006) [#2]
the saveb3d code from the archives works well with multiple surfaces and textures. Fact is it works only with one mesh that may contain a numnber of surfaces. you can addmesh several meshes together to one mesh then save it.

When using LoadMesh you will always get only one Mesh and no children. you need to use LoadAnimMesh to be able to parse a hierarchy with children.


Ross C(Posted 2006) [#3]
jfk, could you look at my other post? I'm trying to save multiple entities, in one .b3d file. I'm using yours and marks code, but when i put two NODE's together, for two seperate entities, it saves fine, but loads with an error. I can load it in UU, and it does what i need it to do, but loading into blitz causes some fatal errors. Any ideas?


Ross C(Posted 2006) [#4]
Don't matter anymore, sorted it :o) Thanks for the help jfk.