I'm new in Irrlicht an also in 3D- engine using in general. I need help to create an image, that's able to changing the alpha channel. First i followed the 2D- Tutorial and do it with driver.draw2DImage. So far the tutorials are helpful, but have to positionate this image freely into the 3D space. In the tutorial has been written:
In this example, we are just
doing 2d graphics, but it would be no problem to mix them with 3d graphics.
Just try it out, and draw some 3d vertices or set up a scene with the scene
manager and draw it.
And so I tried hopefully the hole night do combine a Image (as Texture and so on) with 3D Vertices or 3D Positions. It might be possible with an untransparent image, but also with alpha?
maybe I'm looking for a BillBoard, but not in the documentation, nor the intellisense gives me any function or parameter, that allows me to add an image or texture to a BillBoard or an other SceneNode. How can I do this?
Ok but this recognation doesnt help me with that problem...
but in general it's true, how to combine the SceneManager, Nodes, Meshes and so on are not really clear to me, and I doesnt found a discription of it.
But can you tell me how to create this image in the 3D space? I need it, all others are not so important atm.
You could use billboards. (IBillboardSceneNode)
Billboards are good if you want the picture to be in your scene, thus positioned in 3d space, and always facing the camera. This way, they are never deformed by perspective. This is commonly called a sprite.
Or you could create / load a plane, made of 2 triangles and 4 vertices. (IMeshSceneNode)
This is the same as billboards, but the picture won't always face the camera. So your picture will be "really" (so to speak) in 3d.
As far as I know, the original alpha channel of your picture is reduced down to 1 bit once displayed by Irrlicht: the pixel is either transparent or not. (EMT_TRANSPARENT_ALPHA_CHANNEL and EMT_TRANSPARENT_ALPHA_CHANNEL_REF)
ok I set a texture on a BillBoardScene (I got that before, but I lost it, sry I tried too much), then I load a Texture in it and set the MaterialType, but I dont find the way to set the AlphaChannel. The documentations says i should use the SMaterial::MaterialTypeParam to manipulate it. But I havent found that parameter. Maybe it depends in the .NET Irrlicht wrapper (I use C#). I knew that they have an own forum but i thought its an independent problem of my unexperience. If it's so I change the forum. In C++ i should found it here?:
The doc says irr::video::SMaterial::MaterialTypeParam is mostly ignored.
Normally, if you set the material type to EMT_TRANSPARENT_ALPHA_CHANNEL or EMT_TRANSPARENT_ALPHA_CHANNEL_REF, your alpha channel should be taken into account.
Are you sure your image has got an alpha channel (.png or .tga) and has got transparent pixels?
in prior irrlichtversions u ha to turn of lightning as well otherwise the billboards don't look right.(thats only true if the billboard is supposed to be a light/shiny thing)
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.