b3d Node - Alpha problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

b3d Node - Alpha problem

Post 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.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post 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.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post 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…
Last edited by Luke on Sun Dec 10, 2006 2:41 pm, edited 1 time in total.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

Looking nicer:


Image

Image
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Post 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.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post 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)
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Post 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.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post 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.
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Post 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
Lee Zhi Eng
Posts: 34
Joined: Tue Aug 22, 2006 2:48 pm
Location: Malaysia

Post by Lee Zhi Eng »

cool, cant wait for the next release. :)
rimbou
Posts: 20
Joined: Fri Nov 24, 2006 12:09 pm

Post 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
Last edited by rimbou on Fri Feb 18, 2011 6:08 pm, edited 1 time in total.
rimbou
Posts: 20
Joined: Fri Nov 24, 2006 12:09 pm

Post 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
Last edited by rimbou on Fri Feb 18, 2011 6:08 pm, edited 1 time in total.
sober
Posts: 21
Joined: Tue Nov 29, 2005 9:23 am

Post by sober »

I think the fixes from Luke are still not in the downloadable version or the svn, so you will have to wait.
rimbou
Posts: 20
Joined: Fri Nov 24, 2006 12:09 pm

Post 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
Last edited by rimbou on Sat Feb 19, 2011 3:48 am, edited 1 time in total.
TheC
Posts: 93
Joined: Fri May 05, 2006 7:50 am

Post 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 :/
Post Reply