So I have a level with trees in it that I made in tree[d] (from within gile[s]), and if I use masking or alpha testing the leaves look perfectly fine in gile[s], but when I export the level to a .b3d file, the transparent portion of the trees is opaque (they look like squares). The leaf texture is a .png.
I found this thread which would seem to suggest that there shouldn't be a problem, so I'm really at a loss for what to do.
Thanks a lot.
Alpha/masking transparency does nothing in .b3d from gile[s]
-
- Posts: 19
- Joined: Fri Nov 18, 2005 4:14 pm
-
- Posts: 19
- Joined: Fri Nov 18, 2005 4:14 pm
Just as an update, I tried the my3d exporter that came with Irrlicht and the result was this:
As you can see, the UV coordinates of the base texture and the lightmap are switched for some reason.
This is how it looks in gile[s] (how it's supposed to look)
but this is how it ends up looking when I export it as a .b3d and import it into Irrlicht (the original problem)
Again, any help would be deeply appreciated.
As you can see, the UV coordinates of the base texture and the lightmap are switched for some reason.
This is how it looks in gile[s] (how it's supposed to look)
but this is how it ends up looking when I export it as a .b3d and import it into Irrlicht (the original problem)
Again, any help would be deeply appreciated.
cowsarenotevil:
Hi,
I have giles now so I should be able to look at the problem better.
But it may just be that you are using a blend mode that I couldn't get in irrlicht.
do the .png leaf textures have an alpha layer, you can get irrlicht to use this (I forgot exactly which blend mode it is )
I can fix it up for you if you, post/ send me the .giles mesh (I won't steal it)
Hi,
I have giles now so I should be able to look at the problem better.
But it may just be that you are using a blend mode that I couldn't get in irrlicht.
do the .png leaf textures have an alpha layer, you can get irrlicht to use this (I forgot exactly which blend mode it is )
I can fix it up for you if you, post/ send me the .giles mesh (I won't steal it)
-
- Posts: 19
- Joined: Fri Nov 18, 2005 4:14 pm
I was using both alpha testing (from the .png's alpha layer) and masking, but I tried it with just alpha testing as well (I don't think having both at once really does anything). I did try it setting the whole mesh (in Irrlicht) to EMT_TRANSPARENT_ALPHA_CHANNEL and the alpha testing worked, but the light maps didn't. I will send you the gile[s] mesh as soon as I can. Should I put it and all of the texture maps in a .zip file? I'm not totally sure what things I need to pack into the .gls file for it to work for you. I really appreciate your time.Luke wrote:cowsarenotevil:
Hi,
I have giles now so I should be able to look at the problem better.
But it may just be that you are using a blend mode that I couldn't get in irrlicht.
do the .png leaf textures have an alpha layer, you can get irrlicht to use this (I forgot exactly which blend mode it is )
I can fix it up for you if you, post/ send me the .giles mesh (I won't steal it)
This is just a silly n00b question, but it's another thing I was curious about: if I set the whole mesh to, say EMT_LIGHTMAP_M2 to make the lightmaps brighter, then it would set the entire mesh to that type, overriding any individual materials in the mesh, yes? If so, is there any way around this? Right now I'm not setting the material type in irrlicht at all (except when I set it to EMT_TRANSPARENT_ALPHA_CHANNEL and it apparently did override the lightmapping) for this reason.
Thanks again for your help.
That should be fine.Should I put it and all of the texture maps in a .zip file? I'm not totally sure what things I need to pack into the .gls file for it to work for you.
Yes it would overwrite the all individual materials in that mesh,This is just a silly n00b question, but it's another thing I was curious about: if I set the whole mesh to, say EMT_LIGHTMAP_M2 to make the lightmaps brighter, then it would set the entire mesh to that type, overriding any individual materials in the mesh, yes?
I think there is a setting in b3d files I use to get EMT_LIGHTMAP_M2, if not you can always loop though the materials on the mesh, and check if it is EMT_LIGHTMAP before setting it to EMT_LIGHTMAP_M2.
-
- Posts: 19
- Joined: Fri Nov 18, 2005 4:14 pm
See, that's a clever idea that I'd never have thought of on my own (mainly because I didn't know that ISceneNode->getMaterial(s32 num) even existed until I found it just now). I could probably use that to loop through all of the materials until I get to the leaves and set them to EMT_TRANSPARENT_ALPHA_CHANNEL, too, couldn't I (although the lightmaps on the leaves wouldn't work)?Luke wrote:I think there is a setting in b3d files I use to get EMT_LIGHTMAP_M2, if not you can always loop though the materials on the mesh, and check if it is EMT_LIGHTMAP before setting it to EMT_LIGHTMAP_M2.
I'm uploading the map right now. Thanks again for your help.