Draw isometric tile on quad-mesh

Hi there, and thanks again for your help, in advance.

Now this may be an simply issue, but for some reason I cant get my head around it. Even after consulting the wiki.

I have some isometric tile-textures, like these ones here: http://flarerpg.org/tutorials/isometric_intro/tile_sizes.png

I all want to do is to draw one of these images on a quad (which I assume has to be rotated by 45 degree). But, I don’t want a rectangle texture to be shown (the texture+the transparent edges), I only want to draw the visible tile.

In my head, the solution is to rotate the quad by 45 degrees, attach the texture on it without rotation (or -45), and scale it by a specific factor so that the visible image has the size of the quad. But for some reasons I cant get it to work.

Can you give me some hints for this problem?

Hey @Marija,

I see 2 options how to do what you want.

  1. Make your quad in blender, assign the texture to it and export it to jme. You need to add an alpha channel to your texture so that only the gray part is visible.

  2. Create the quad and all other stuff in code. To do so have a look at the following wiki entry:
    https://jmonkeyengine.github.io/wiki/jme3/advanced/custom_meshes.html
    It will explain how to do what you want. After creating the quad, you have to crate a material, either lightning or unshaded, it depends on what you want to in the end. Anyway in both cases you need to set the blend mode to Alpha, so that only the important part is visible. The following wiki entry provides you enough information to make you happy :slight_smile:
    https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_material.html

If you still have questions feel free to ask !

Greetings,
Domenic

2 Likes

Thank you very much.

I forgot to change the texture coordinates in my custom mesh. Now it works like a charm :slight_smile:

1 Like

I am glad it works :grinning: