Page 1 of 1

How to use texture filturing combined with Draw2DImage

Posted: Sat Oct 04, 2008 9:02 am
by KeldorKatarn
Hi,

I'm running into my first problems right at the beginning of using Irrlicht.
I'm trying to prt a game to C# and I'm right now testing out Irrlicht as the 3d engine.
Well, I'm so far just trying to display the background image of the game's main menu by using Draw2DImage. But it looks worse than the original simply because Anisotrophic Filturing isn't used and the image has to be scaled up to my widescreen resolution, so artifacts show.
Is there any way to activate the filturing for this or is this only possible for materials used by meshes?

Posted: Sat Oct 04, 2008 10:53 am
by hybrid
Yes, the GUI methods (including the basic draw2D* methods) currently ignore smaterial stuff. This might change in Irrlicht 1.7 (at least that's the version I'd expect it to be in ATM). However, you can simply render a 3d quad at some distance (and with zbuffer disabled) to render a fullscreen background with filtering etc.

Posted: Sat Oct 04, 2008 2:46 pm
by KeldorKatarn
Which is quite some time away I'd guess, considering we're talking 1.4 now.

Well.. Can you give me a short code snippet on how to create such a quad? Do I need to create it as a mesh and put in on a node or...

Posted: Sat Oct 04, 2008 6:11 pm
by hessiess
hares how I created a background image.

create a custom scene node that,s just 1 quad
use trial and error to position it (control the scale with the keyboard, display the dimensions in an xterm, or the title bar)
map the image to the plain.

Posted: Sat Oct 04, 2008 6:19 pm
by KeldorKatarn
Eh? You mean it is impossible to create a 3d quad with already transformed vertices?
I'm sure as hell not going to put something 2d in a real 3d world and go on trying to position the camera right so it looks 2d.. gee.. ok.. dying .NET support, no .DDS file support and now no ability to draw filtured textures on a transformed 2d shape for a simple background...

well... that's been Irrlicht for me I guess.. those are all things I desperately need for my project. COuld live without one of them I guess but certainly not all...

Posted: Sat Oct 04, 2008 6:50 pm
by hybrid
If you'd search a little more, or would bring some more enthusiasm, you could easily find several solutions which work without necessary calculations etc, just think of proper ortho projections...
However, I guess you understand that I'm not willing to help some unmotivated come-along just for fun. There's no such thing as a free lunch, so you cannot expect to get all things without any work on your side. E.g. try a search for "fullscreen AND quad" or something related. The postproc addons all use this thing. The stencil shadow does as well, so the code is already on your system.

Posted: Sat Oct 04, 2008 9:27 pm
by rogerborg
^^^

Funny, I don't remember posting that, but it looks like me.