I'm currently using a custom scenenode right now and wondering if it's possible to set a texture for each side (some sort of rectangle).
Now I know that it would be to UV Map it but the thing is I want each side to be a custom image file (ex: Side 1: "Brickwall.png", Side 2: "WoodlogWall.png" and so on)
Is this possible?
Different textures for each side of Scenenode?
-
- Posts: 6
- Joined: Tue Mar 21, 2017 12:05 am
Re: Different textures for each side of Scenenode?
Probably not - at least not easy (or fast). It might be possible with shaders.
Easiest solution is probably to have different polygons for the different sides (shouldn't cause any z-buffer problems as one side is always clipped). And then assign different materials to those polygons so you have 2 meshbuffers for them.
Easiest solution is probably to have different polygons for the different sides (shouldn't cause any z-buffer problems as one side is always clipped). And then assign different materials to those polygons so you have 2 meshbuffers for them.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 6
- Joined: Tue Mar 21, 2017 12:05 am
Re: Different textures for each side of Scenenode?
Oh I see.CuteAlien wrote:Probably not - at least not easy (or fast). It might be possible with shaders.
Easiest solution is probably to have different polygons for the different sides (shouldn't cause any z-buffer problems as one side is always clipped). And then assign different materials to those polygons so you have 2 meshbuffers for them.
-
- Competition winner
- Posts: 189
- Joined: Tue Oct 16, 2007 3:53 am
- Location: Indonesia
- Contact:
Re: Different textures for each side of Scenenode?
if the custom scene node is not a must, you can comfortably use mesh files such as .b3d, .x, .obj exported from your favorite 3d modeling software. they have multiple materials. it means, different textures for each materials, or even further, different material settings and shaders. the hard work is already done.
Re: Different textures for each side of Scenenode?
You can if you provide a mesh with a meshbuffer for each side:
pro: you can use all the textures and mapping coordinates you want
con: you will issue a draw call for each of them.
pro: you can use all the textures and mapping coordinates you want
con: you will issue a draw call for each of them.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt