Multitexturing & Materials

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.
Post Reply
AltSoftLab
Posts: 15
Joined: Thu May 01, 2014 5:53 pm
Contact:

Multitexturing & Materials

Post by AltSoftLab »

Hi Irrlicht community!

I'm developer of AltSoftLab Team
http://www.AltSoftLab.com

We presented Irrlicht HW Render Backend of our AltSketch .NET Vector Graphics Library here on forum thread http://irrlicht.sourceforge.net/forum/v ... =6&t=49917

After the work on Irrlicht integration we have some troubles and need your help.

1. First of all we need multitexturing with different texture coords for each texture. Our render operation can has 3 textures with 3 TextCoords. Is it possible to create Material without shaders to process this?

2. We need texture alpha multiply with vertices color alpha. When we use MaterialType.TransparentAlphaChannel the only texture alpha used without multiplication with vertices alpha – only RGB color of vertices processed. Is it possible to multiply texture alpha with vertices alpha without shaders?

Thanks forward!

Evgeny,
AltSoftLab Team
AltSoftLab Team
Be Individuality - Choose Alternative ©
http://www.AltSoftLab.com/
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Multitexturing & Materials

Post by hybrid »

Please do not cross post if you get no answers. Instead, try to improve your questions.
Basically, both approaches are valid. FixedFunction also supports multi texcoords. Question is if you really want to say with the limited operations which would be possible there, esp. for multi-texturing.
Second is probably possible with OneTextureBlend material. But I'm not exactly sure if I got you fully correct.
AltSoftLab
Posts: 15
Joined: Thu May 01, 2014 5:53 pm
Contact:

Re: Multitexturing & Materials

Post by AltSoftLab »

hybrid wrote:Please do not cross post if you get no answers. Instead, try to improve your questions.
Basically, both approaches are valid. FixedFunction also supports multi texcoords. Question is if you really want to say with the limited operations which would be possible there, esp. for multi-texturing.
Second is probably possible with OneTextureBlend material. But I'm not exactly sure if I got you fully correct.
I'm also din't understand all what you said also I think you din't understand all what I said :)

Ok:

1. I have 2 or 3 textures with different Texture Coords. But only 2 structures to set vertex data is S3DVertex and S3DVertex2TCoords. For the fist I can set only 1 texture coords, for the second - 2, but S3DVertex2TCoords didn't work in my app (I don't know why).

We working on OGRE integration also. There I can set any Texture Coords and set FPP blending params. Without working with shaders. HOW I can do such things in Irrlicht? How to set vertex data with multiple texture coords (2-3) and push it to render queue? And how to set Material properties to process this data?

2. OneTextureBlend didn't work in my app. The result is black polygons :(
TransparentAlphaChannel working good, but it blend only texture ColorAlpha and vertex Color (without vertex Alpha)
AltSoftLab Team
Be Individuality - Choose Alternative ©
http://www.AltSoftLab.com/
Foaly
Posts: 142
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Re: Multitexturing & Materials

Post by Foaly »

2. As far as I know, for OneTextureBlend you need to set the MaterialTypeParam to a value from Material.PackTextureBlendFunc(...).
It is not yet in the IrrlichtLime release so you'll have to download the sourcecode here: http://sourceforge.net/p/irrlichtlime/code/HEAD/tree/.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Multitexturing & Materials

Post by hybrid »

For using fixed function pipeline materials with more texture coords (2 are often supported, but not more) you have to implement the materials on your own. Meaning programming the modes in OpenGL and/or D3D on your own.
AltSoftLab
Posts: 15
Joined: Thu May 01, 2014 5:53 pm
Contact:

Re: Multitexturing & Materials

Post by AltSoftLab »

hybrid wrote:For using fixed function pipeline materials with more texture coords (2 are often supported, but not more) you have to implement the materials on your own. Meaning programming the modes in OpenGL and/or D3D on your own.
Can you give me a little code example of using 2 texture coords?
AltSoftLab Team
Be Individuality - Choose Alternative ©
http://www.AltSoftLab.com/
AltSoftLab
Posts: 15
Joined: Thu May 01, 2014 5:53 pm
Contact:

Re: Multitexturing & Materials

Post by AltSoftLab »

Foaly wrote:2. As far as I know, for OneTextureBlend you need to set the MaterialTypeParam to a value from Material.PackTextureBlendFunc(...).
It is not yet in the IrrlichtLime release so you'll have to download the sourcecode here: http://sourceforge.net/p/irrlichtlime/code/HEAD/tree/.
Hi, Thanks! What parameter? Can you give me some example?
AltSoftLab Team
Be Individuality - Choose Alternative ©
http://www.AltSoftLab.com/
Post Reply