Hi,
hope you can help me ^^ I want to draw a texture at an object, but don't want to see the whole picture.
for example:
I want to see only the tree and not the black background. Is it possible to realize this? Or should I create a model with Blender or Milkshape?
--- zyclop
Don't draw full texture
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Since you have a black background here you can simply use EMT_TRANSPARENT_ADD_COLOR as material type. You will have to use a billboard, though, and not draw the texture with draw2dimage or something like that. Otherwise you have to create an alpha channel (either in e.g. gimp, or by using the makeKeyColorTexture method from Irrlicht) and draw using the alpha channel.
Please check the examples provided in Irrlicht, they use these kinds of transparency quite often.
Please check the examples provided in Irrlicht, they use these kinds of transparency quite often.
I was going to suggest TRANSPARENCY_ADD_COLOR but that would make the tree slightly transparent too wouldn't it? As it makes the image transparent based on the colour so black is completely transparent and white is completely opaque. The fairly dark green of the tree would therefore be fairly transparent right?