Is there a way to interpolate textures between vertices?
(I mean I have a scene node, and I have two textures. The scene node draws terrain. The vertices have red color where I want the first texture, and where my second texture's supposed to be, the vertices are blue. And when I draw a polygon between red and blue vertices, the polygon has interpolated colors. Is it possible to do something like that with textures?)
[Solved] Is texture interpolation possible?
[Solved] Is texture interpolation possible?
Last edited by TechX12 on Tue Aug 20, 2013 2:07 pm, edited 2 times in total.
Re: Is texture interpolation possible?
It should be possible with shaders, if model gets vertex color information too.
It might be easier using texture splatting, like
http://irrlicht.sourceforge.net/forum/v ... hp?t=26702
It might be easier using texture splatting, like
http://irrlicht.sourceforge.net/forum/v ... hp?t=26702
Re: Is texture interpolation possible?
Thank you, but my problem is different. I want to make a very large noise terrain, where the texturing depends only on height information. The topic what you referred to says, texture splatting will require alpha maps which are textures. In fact I'm quite new to Irrlicht, and I don't have much knowledge on shaders too.
Last edited by TechX12 on Tue Aug 20, 2013 2:09 pm, edited 1 time in total.
Re: Is texture interpolation possible?
Solved! :D
Yesterday I experimented with materials, and I found that a Solid2Layer type material's first texture will always have it's original alpha, but the second one will work as a TransparentVertexAlpha material's first texture, so it will use the vertices' alpha as opacity.
So, result with Solid2Layer (don't get confused, the alpha is randomly generated, and that hole is there on purpose too :)

Then I simply draw the same model with a TransparentVertexAlpha material with different texture, and vertex alpha values. (well, not the best way, but it works :)

Now it will need a little modification, and it will do what I need.
Yesterday I experimented with materials, and I found that a Solid2Layer type material's first texture will always have it's original alpha, but the second one will work as a TransparentVertexAlpha material's first texture, so it will use the vertices' alpha as opacity.
So, result with Solid2Layer (don't get confused, the alpha is randomly generated, and that hole is there on purpose too :)

Then I simply draw the same model with a TransparentVertexAlpha material with different texture, and vertex alpha values. (well, not the best way, but it works :)

Now it will need a little modification, and it will do what I need.