noob problem loadMesh
BlitzMax Forums/MiniB3D Module/noob problem loadMesh
| ||
why is this program not equal to the miniB3d version?Graphics3D 800, 600 a = LoadMesh("media/albero.b3d") camera = CreateCamera() PositionEntity camera, 0, 10, -20 While Not KeyDown(1) RenderWorld Flip Wend End BlitzMax version import sidesign.minib3d graphics3d 800, 600 camera= createCamera() positionentity camera, 0, 10, -20 a=LoadMesh( "media/albero.b3d" ) while not keyhit(key_esc) renderworld flip wend end the second program (minib3d) when executed give "Unhandled Exception:Attemp to access field or method of Null object" did i mistake something? |
| ||
Does 'albero.b3d' exist? I just tested your example with the media that comes with 0.5 version (cactus2.b3d) and it works as expected. |
| ||
yes it exists... b3d version shows it correctly |
| ||
Example works here fine with klepto.minib3d. Does your Blitzmax Version shows up a grey cube if the .b3d file does not exitst or nothing? |
| ||
only a black screen and a pop up with the Exception. I'll try with other .b3ds bmax v1.28 minib3d v0.5 windows XP the mesh is exported by TreeD [url=http://www.blitzbasic.com/Community/posts.php?topic=77339][/url] |
| ||
Edit: Just noticed the TreeD part.. oops - the below might not work because, AFAIK, TreeD only works with textures that Blitz already works with! The only place I've encountered the error you mention is with the texture issue described below - perhaps it isn't writing out the B3D files correctly? (ie, it might be slightly malformed in a way that still works in B3D but not in MINIB3Ds strict B3D loading?) ...... Your B3D file is using textures not supported by BlitzMax. Try replacing all the textures in the modeller making the B3D with PNG versions, then export, and it should work fine. For instance, if you're using 3D World Studio, your textures will be .SRT files - these aren't supported and will cause the crash-out you describe. Copy your own PNG textures (or screenshot their textures and save them as PNG files in a graphics ediot) into the materials folder and replace the textures in your B3D. See if that fixes it! |