I Exportet a Terrain as .b3d file to load in irrlicht.
I used T.ED for the export and enabled Vertex Alpha
I played around alittle bit with setMaterialStuff, already implemented a function to set the MaterialType to one Texture and not to all, but it didn't help.
Now I don't know if the .b3d file is broken, or if irrlicht doesn't support, what I want...
Ok, so I’m guessing what you want are the different textures to blend, making the change between textures look nice, and realistic.
Like this:
I’d say irrlicht doesn’t support it, it lacks a lot of features with material types. But I can think of one hacky method to get this to work (which involves a lot of work, for me…)
Could you send me a copy of that mesh, I have other tools like it but I don’t have T.ED.
I’ll have a look at what I can do but I’m not making any promises, and I’ve got some bigger problems with b3d to fix first.
And made some progress, (Edit: by the way the method turns out to be not that hacky)
(behold my artistic skills! )
I had to fix a bug in the Irrlicht’s OpenGL driver to get that to work , (At least I think I did...) And the texture shouldn’t look that bad (Its probably from my openGL “fix”, I’ll look in to fixing it better)
I really should be fixing other problems with b3d first…
Last edited by Luke on Sun Dec 10, 2006 2:41 pm, edited 1 time in total.
wow, thats exactly, what I wanted the result to be. may you tell me, what I have to do, to get the same result?
if you still need my .b3d file to check if the file may be corrupt, I will zip and upload the mesh for you.
A patch would be realy nice, if you can provide it.
I think Irrlicht is one of the easiest to compile library I have seen til now. And as far as I remember, the only one, that doesn't throws warnings around.
A patch would be realy nice, if you can provide it.
first I’ll see if bitplane can fix that bug in openGL.
He was going to look at it today.
Are you using the SVN?
From your pm:
T.ED stores the texutres in full paths (C:\...) and point to the location the textures were, when the mesh was created, so I use setTexture to overwrite the layers.
I know some programs do this, don’t worry the b3d loader strips the paths and only tries to loads the texture from the same folder the mesh is in. (Just put your textures in the same folder as the mesh)
What programm have you used for the terrain on the screens.
LevelMesh=smgr->getMesh("test.b3d");
LevelNode=smgr->addAnimatedMeshSceneNode(LevelMesh, DummyNode);
// I tried with the vertex alpha and without it
LevelNode->setMaterialType(EMT_TRANSPARENT_VERTEX_ALPHA);
I have a vertex alpha'd terrain in the D3D driver, and it will not display correctly.
I've been trying to check the mesh loader, but the values returned seem to be correct. If I force the alpha to 0.5 when loading, I can see all the textures on all the layers :/