Skip to main content
Bounty Awarded with 50 reputation awarded by Kevin Evans
give preference to vertical split
Source Link
sam hocevar
  • 24k
  • 2
  • 65
  • 95

It is not possible to apply an affine transformation to the tile and get the result you want, because affine transformations preserve coplanarity, whereas the shape you need is not flat in the 3D world. Even if you got the outline to match (which can be done), the texturing would be all wrong and cause seams at the junctions.

I suggest splitting the tile in two triangles, either way you want first. There are two ways to do so, and project/render these triangles separatelybut the first one (vertical split) will probably be easier later on:

split quad into triangles

The good thing is that it can be done without any additional calculations. You just need to render twice and put transparency in the unused part of the images. You can then reuse exactly the same transformation as for your light green tiles:

transparency

It is not possible to apply an affine transformation to the tile and get the result you want, because affine transformations preserve coplanarity, whereas the shape you need is not flat in the 3D world. Even if you got the outline to match (which can be done), the texturing would be all wrong and cause seams at the junctions.

I suggest splitting the tile in two triangles, either way you want, and project/render these triangles separately:

split quad into triangles

The good thing is that it can be done without any additional calculations. You just need to render twice and put transparency in the unused part of the images. You can then reuse exactly the same transformation as for your light green tiles:

transparency

It is not possible to apply an affine transformation to the tile and get the result you want, because affine transformations preserve coplanarity, whereas the shape you need is not flat in the 3D world. Even if you got the outline to match (which can be done), the texturing would be all wrong and cause seams at the junctions.

I suggest splitting the tile in two triangles first. There are two ways to do so, but the first one (vertical split) will probably be easier later on:

split quad into triangles

The good thing is that it can be done without any additional calculations. You just need to render twice and put transparency in the unused part of the images. You can then reuse exactly the same transformation as for your light green tiles:

transparency

Source Link
sam hocevar
  • 24k
  • 2
  • 65
  • 95

It is not possible to apply an affine transformation to the tile and get the result you want, because affine transformations preserve coplanarity, whereas the shape you need is not flat in the 3D world. Even if you got the outline to match (which can be done), the texturing would be all wrong and cause seams at the junctions.

I suggest splitting the tile in two triangles, either way you want, and project/render these triangles separately:

split quad into triangles

The good thing is that it can be done without any additional calculations. You just need to render twice and put transparency in the unused part of the images. You can then reuse exactly the same transformation as for your light green tiles:

transparency