Page 1 of 1

B3D plugin

PostPosted: Sat Jan 17, 2009 2:15 am
by Aaron
Hi Everyone,

I've finished my first draft of a B3D plugin for L3DT to work with Blitz3D, Real Crafter, and the like.

You can download it from:

http://www.bundysoft.com/wiki/doku.php?id=plugins:fileio:L3DTio_B3D

[please note: the plugin required L3DT v2.7 beta or later.]

This plugin is considered 'beta' quality, and needs more testing. I wrote the plugin based on the B3D spec, but other than checking the output looks correct in Notepad++, I've not done any proper validation of the output in 3D (being neither a Blitz3D user, nor a Realm Crafter user).

Thus, I would appreciate it greatly if people knowledgeable in the ways and uses of B3D could test the plugin for me, or test this example output file:

http://www.bundysoft.com/L3DT/downloads/examples/L3DT_to_B3D_test.zip

For reference, the heightfield in the B3D should look something like this:

Image

Cheerio,
Aaron.

PostPosted: Mon Jan 19, 2009 4:17 am
by Brightag
Hello Aaron,

I tried to view the mesh in Blitz3D, but the program couldn't load it. I would also receive an "Entity doesn't exist" error when I try to load the mesh while using a Blitz3D command like "PositionEntity" which would allow me to place the mesh at a specific X, Y, Z position. I'm not very knowledgeable about the B3D spec, but I usually would only see this error when I had a problem in my mesh.

Sorry that I'm not able to provide any additional information.

PostPosted: Mon Jan 19, 2009 9:30 am
by Aaron
Hi Brightag,

Thanks for the feedback. I've found an example file, a hex editor and the 'official' format specification, so I should have this sorted out shortly. Please stay tuned...

Cheers,
Aaron.

PostPosted: Mon Jan 19, 2009 10:04 am
by Aaron
Hi Brightag,

Do you have any better luck loading this file?

http://www.bundysoft.com/L3DT/downloads/examples/L3DT_to_B3D_test.zip

Best regards,
Aaron.

PostPosted: Mon Jan 19, 2009 4:10 pm
by Brightag
Hi Aaron,

Yes I did. I was also able to use the "PositionEntity" command without any problems. Awesome job.

PostPosted: Tue Jan 20, 2009 11:34 am
by Dreamora
One important part of the B3D specs, that is nowhere mentioned, as it is implicitely given through DX7, is:

A B3D mesh (sum over all meshes in the whole b3d file) can not have more than 65536 triangles & 65536 vertices, as they are short indexed.

If it has more the behavior is undefined.
at best it does not render / partially not render, but commonly it will not load (entity not found). At worst all seems fine until the rendering is meant to happen and then the application just crashes with a memory access violation.

PostPosted: Tue Jan 20, 2009 12:14 pm
by Aaron
Thanks Dreamora!

I'll add a 64k triangle/vertex check to the release version of the plugin.

Best regards,
Aaron.