Problems with B3d model

BlitzMax Modules Forums/MiniB3D/Problems with B3d model

Very simple code + B3d model created with Tree Magik. The equivalent Blitz3D code displays the model without problems. BlitzMax + MiniB3d does not display the textures.

Can anyone help? Have I overlooked something obvious?

EDIT: Removed dead link.

Hi, no clue why it doesnt load. Maybe its an old .b3d file format or something is wrong with the path?

Anyway, until you found a clean solution you could load textures that way:

Import "MiniB3D.bmx"

Graphics3D 800, 600

Camera = CreateCamera()
PositionEntity Camera, 0.0, 0.0, -5.0

mesh = LoadMesh("tree01.b3d\tree01.b3d")

BrushA=loadBrush("tree01.b3d\artifact2.jpg")
BrushB=loadBrush("tree01.b3d\eeeeeee.png",2)
SurfA=getsurface(mesh,1)
SurfB=getsurface(mesh,2)
paintsurface SurfA,BrushA
paintsurface SurfB,BrushB

ScaleEntity mesh, 0.1, 0.1, 0.1

While Not KeyHit(KEY_ESCAPE)

RenderWorld

Flip
Wend
End


There is a second problem.
MB3D cant read your .jpg format and you have to convert "artifact2.jpg".
You could load it in Gimp and then save it again (i tried 100 quality) as .jpg

I fixed it by loading it into Ultimate Unwrap 3D, assigning the artifact.jpg bitmap and saving as .b3d. both (low and high poly) work fine after doing that)

not sure why?

Thanks guys. I'll investigate a little further and see if I can find out why.

Your b3d files contain two TEXS nodes and two BRUS nodes (typicaly should be one node TEXS and one node BRUS). This can affect LoadMesh function.

Ahhh, okay. Thanks Mikele.

I guess I'll use Takuan's workaround, then, since Tree Magik does not export to any other MiniB3d compatible formats. And I don't own Unwrap 3D. And I don't know enough about MiniB3d's internals to modify Simon's loader code.

@Takuan: I had no problems loading the jpg file as is. Have you ‘synchronised modules’ recently?

Ah, yes. I just did a syncmod and now it loads that .jpg;)

Fixed in 0.42

Thanks.

Fixed in 0.42

great! I hope that this time my .b3D will imported with correct materials and texture :D

Send me a file and I'll try it out.