.b3d from Maplet won't load...

Blitz3D Forums/Blitz3D Beginners Area/.b3d from Maplet won't load...

OwlEpicurus(Posted 2009) [#1]
I've created a level in Maplet, exported it as a .b3d file, and tried to load it with LoadMesh(). However, when I test to see if the mesh loaded correctly, I find that it does not exist.

To try to locate the source of the problem, I created a simple map in Maplet consisting of a small rectangle and exported it as both .b3d and .x. I loaded both into the same bit of code with LoadMesh(), and, while the .x file worked, the .b3d file did not.

What is causing this? Am I forgetting to do something or using the wrong function, or is there a bug with the software?


AJ00200(Posted 2009) [#2]
Are the program and the .b3d file in the same folder?


OwlEpicurus(Posted 2009) [#3]
Yes, they are in the same folder.


AJ00200(Posted 2009) [#4]
Does it say entity does not exist?


OwlEpicurus(Posted 2009) [#5]
I originally had the code set up to assign a collision type to the map, and then, yes, it generated an error message saying the entity did not exist. I also typed a bit of code right after loading the mesh to print something to the debug log if the handle equaled 0.


josk(Posted 2009) [#6]
Can you post the code?


OwlEpicurus(Posted 2009) [#7]
There's not much to post, but here it is...

Graphics3D 1440,900
SetBuffer BackBuffer()

Global camera = CreateCamera()
Global map = LoadMesh("test.b3d")

If map = 0
	DebugLog "check"
EndIf

Const C_PLAYER = 0, C_MAP = 1

Collisions C_PLAYER,C_MAP,2,3

EntityType camera,C_PLAYER
EntityType map,C_MAP


Keep in mind that this much of it seems to work when the .b3d is changed to .x .


_PJ_(Posted 2009) [#8]
Seems like there's something wrong with the b3d export. That code looks fine to me.

(Assuming the DebugLog comes up with the "Check" message)


Charrua(Posted 2009) [#9]
i supose that you have no problem with the "testa.b3d" that cames with maplet.

here it is: http://odriozola.juanignacio.googlepages.com/testa.zip

verify the current directory ( debuglog currentdir() ) is the directory where your files are, otherwise LoadMesh will return a 0.

Juan


OwlEpicurus(Posted 2009) [#10]
Malice:
Yes, the DebugLog does come up with the message.

Charrua:
The "testA.b3d" doesn't work either...
I know it's looking in the right directory, for, when I try to load another image in the same directory, it loads just fine.


Charrua(Posted 2009) [#11]
so your problem isn't maplet or your level or the .b3d files.

tell me, some of the samples demos (i.e. Castle Demo) has some problem to load the .b3d?

Juan


OwlEpicurus(Posted 2009) [#12]
Sorry it took so long to respond. The internet was down.

The samples seem to load just fine, but I can't find one that was included with Blitz3D that uses .b3d.


Charrua(Posted 2009) [#13]
sorry but seems that no sample has a .b3d (i didn't know that)
did you try the testa.b3d that i posted? it should load properly,
if it didn't work, i really don't know what hapen to you!

wich version of blitz are you using? but i supose that any should work ok with .b3d.

Juan


_PJ_(Posted 2009) [#14]
This is a real ling shot.. but have you considered changing the graphics resolution / mode?


AJ00200(Posted 2009) [#15]
Maybe try reinstalling Maplet.


OwlEpicurus(Posted 2009) [#16]
Charrua:
The sample you posted didn't work.
I'm using V1.64.

AJ00200:
Reinstalling Maplet didn't help. It was a good idea, though.

Malice:
I changed it to Graphics3D 640,480,16,2 , but it did not have any effect.


Thanks for all the help. Sorry that I can't give you any more information about the problem.

Also, I've noticed that Maplet crashes when you try to export a larger map to .x. Is there a way to get around this (other than breaking the map into smaller bits, of course)?


josk(Posted 2009) [#17]
I would update to the lateset version of Blitz just incase its that.


OwlEpicurus(Posted 2009) [#18]
I updated Blitz3D to the newest version, and it now loads .b3d files. I thought it would end up being something simple.

Thanks!


jfk EO-11110(Posted 2009) [#19]
B3D support - well, the birth of the format itself - was added long time after Version 1.64.