Create the Wall

Dear all,

I want to create a wall by Box instance. Then, I apply the texture to the wall but I have 2 problem:

  1. I cannot apply 2 textures to the Box: brick texture for the side face and stone texture for the up face of wall.
  2. I want to apply texture as Mirror. Because I apply the texture as normal, the texture is scale along the wall. I want the texture should be duplicated automatically and apply to the wall without scaling.

    I already tried to create a wall with 3 boxes (not 1 box): 2 boxes for the side face of wall and 1 box for the up face of wall but it looks not professional

    Please help me. Thanks in advanced!!

You should check this thread:

Dear Duenez,

First of all, thank you so much. However, it seem not what I want. I tried with the link you send to me but not fulfill my question:

For example, I have a texture with the picture is 1 brick. But I want to apply to the whole wall, it means the wall will display many many brick as "Tile" or Mirror texture. Could you help me? I try with box.getBatch(0).scaleTextureCoordinates() but I cannot apply to whole box, it just apply for 2 or 4 faces of box

Maybe create a quick model with two different textures?

I would be happy to wipe it up for you.

Dear guy,

I apply successfully 2 textures for 1 Box. But, what I want is to create a wall with:

Up side : the stone texture that is applied as tiling or mirror (don't scale the texture)

Front and Back side: the brick texture that is applied as tiling also (not scaled)

What you might want is to WRAP the texture:

textureState.getTexture().setWrap( Texture.WM_WRAP_S_WRAP_T );

textureState.getTexture().setScale( new Vector3f( x, 1, y ) );

(Where X and Y are the number of repeats desired)

I hope I am not being to helpful here, there is definitely merit in the suffer for a little bit and try to figure it out approach that seems to be prevalent here at the jME forums.

The thread mentioned by dunez finally led to a new shape "MultiFaceBox", which takes a texture with height=8xwidth and maps the first six squares to the sides of the box. Of course you have to generate that very special texture for your wall. Or you could take it as an example how to manipulate the texture coordinates of a box according to your needs.

If this is not acceptable, use quads and scale/wrap each side individually.

If this is still not acceptable, use Blender and etc and generate a model…

I wanted to create a wall using a skybox and only had the texture for one brick and stumbled upon this thread and using basixs technique managed to use the one brick texture to create a good looking wall. I know it will be obvious for most users but hopefully this could help other noobs.