I have a white cube, and I want to
- put texture on one of its sides,
- another texture on other side,
- move first texture on another side
- remove second texture
how can this be done in irrlicht? without shaders.
I only know for node->setMaterialTexture(0,texture);
set texture to specific cube side
I thought there might be some way to specify vertex UV mapping dynamically.
I have another issue: I have simple square plane, loaded as 3ds mesh. no textures. When I try to set texture to this node with
node->setMaterialTexture(0,driver->getTexture("media/terrain/texture.jpg"));
whole scene node gets the color of the first texture pixel. I had problems with this before, what is this issue? Why square texture is not spread on simple square 1 on 1.
I have another issue: I have simple square plane, loaded as 3ds mesh. no textures. When I try to set texture to this node with
node->setMaterialTexture(0,driver->getTexture("media/terrain/texture.jpg"));
whole scene node gets the color of the first texture pixel. I had problems with this before, what is this issue? Why square texture is not spread on simple square 1 on 1.
That sounds like the plane doesn't have any UV coordinates, so it's sampling textel (0, 0) the entire time.pera wrote:I have another issue: I have simple square plane, loaded as 3ds mesh. no textures. When I try to set texture to this node with
node->setMaterialTexture(0,driver->getTexture("media/terrain/texture.jpg"));
whole scene node gets the color of the first texture pixel. I had problems with this before, what is this issue? Why square texture is not spread on simple square 1 on 1.
First you must unwrap it. While in edit mode just hit 'U'. Personally I find "smart projections" and "reset" the most useful.pera wrote:Right, it seems like its problem with this plane I made in blender. Its just plane I exported to 3ds, but it seems like I have to bark something with materials first.