Page 1 of 2

b3d Node - Alpha problem

Posted: Fri Nov 24, 2006 8:40 pm
by sober
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...

Thats what I have:
Image

what i want are nice splatted textures.

Posted: Sat Nov 25, 2006 1:40 am
by Luke
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:
Image

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.

Posted: Sat Nov 25, 2006 3:35 pm
by Luke
Ok, I played around with the b3d loader,

And made some progress, (Edit: by the way the method turns out to be not that hacky)

Image
(behold my artistic skills! :) )

I had to fix a bug in the Irrlicht’s OpenGL driver to get that to work :lol:, (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…

Posted: Sun Nov 26, 2006 8:03 am
by Luke
Looking nicer:


Image

Image

Posted: Mon Nov 27, 2006 9:50 pm
by sober
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.

Posted: Tue Nov 28, 2006 1:12 am
by Luke
Your mesh would be useful to test, so yeah upload it.

Well if you know how to compile irrlicht, I can give you a patch to make it work.

If not, it might be in the next release (depending to how soon it is)

Posted: Tue Nov 28, 2006 6:54 am
by sober
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.

Posted: Tue Nov 28, 2006 7:38 am
by Luke
Seems to work fine,

Image

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.
Have a look here: http://www.blitzbasic.com/toolbox/toolbox.php?cat=7
Sorry I don’t know of any Linux ones.

Posted: Tue Nov 28, 2006 7:41 am
by sober
Luke wrote:Seems to work fine,
Yeah, great work!
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?
I am currently using the downloadable zipfile but wouldnt make a big difference to use the svn version instead.

Thanks again for your great work

Posted: Tue Nov 28, 2006 10:17 am
by Lee Zhi Eng
cool, cant wait for the next release. :)

Posted: Sat Dec 16, 2006 4:52 pm
by rimbou
Could someone explain me how to get this to work? Do I need a patch? Are the changes at SVN? Do I need to load the mesh in a specific way?

I have a terrain .b3d but when I load it I just see one texture over all the terrain.
________
Yamaha Mdr-1

Posted: Sat Dec 16, 2006 6:21 pm
by rimbou
Screenshot of the terrain in the editor:
Image

Screenshot of the terrain in irrlicht DX9 renderer
Image

Screenshot of the terrain in irrlicht OGL renderer
Image


To load the mesh I did:

Code: Select all

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);
So any idea of what I'm doing wrong?

Thanks.
________
DRUG TESTS

Posted: Sat Dec 16, 2006 6:33 pm
by sober
I think the fixes from Luke are still not in the downloadable version or the svn, so you will have to wait.

Posted: Sat Dec 16, 2006 6:36 pm
by rimbou
sober wrote:I think the fixes from Luke are still not in the downloadable version or the svn, so you will have to wait.
Oh ok thanks. I guess I'll have to be more patient :D
________
Stranger Originated Life Insurance Forums

Posted: Tue Dec 19, 2006 8:57 am
by TheC
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 :/