custom model format?
Blitz3D Forums/Blitz3D Beginners Area/custom model format?
| ||
if it possbule to create my own custom 3d model format in blitz3d that it can use the 3d entitys? |
| ||
Yes ! You need to determine what you really need to store in your file (surfaces, vertices, triangles, materials properties, textures names, bones, influences) and then decide how to structure your file. And then you will be able to save your mesh (write the file) and to load your mesh (read the file). For non skinned mesh it is easy since you can recreate the mesh inside Blitz3d with the existing functions. For skinned meshes (with bones and influences of some bones over some vertices), you will need this : http://www.blitzbasic.com/Community/posts.php?topic=105408 Good luck ! |
| ||
Yes. In fact you could go one better and write an importer for a format that your modeling software uses. I tried with .xsi files when I used to use softimage - it's quite challenging work if you don't actually have the spec in front of you but quite rewarding. from Matt |
| ||
For non skinned mesh it is easy since you can recreate the mesh inside Blitz3d with the existing functions. Actually, blitz3D (without tweaking) does not return any material properties. Then, if you write a model format, you won't be able to export the brushes and textures properties (unless you manually store a copy of all the properties you need in a structur [type/bank/stream/whatever...]). You'll need an external dll to enable the full access to the brushes/textures "getters" in blitz3d (there are some in the code archive -> userlibs). (of course if you just export the geometry only without any knid of material, it won't be a problem) |
| ||
To get material properties (if the brush properties correspond to the material properties) : http://www.blitzbasic.com/Community/posts.php?topic=75711 |