I need to create something like this with PHP and GD:
The three visible faces will be three parts of the same image, of which I know the coordinates.
I suppose that this can be done with image transformations and some maths.
The rotation of the cube will be always the same.
I don't need "stroke" edges and face lighting like in that picture, I just need a "shadeless" cube.
Finally, the result should be an alpha-transparent PNG.
P.S. I only have GD on my host, I don't have access to ImageMagick.
Starting from kraysak's answer, do the following:
In order to use images instead of colors, please replace these lines:
and
With something like this (this example is only for one of the three faces):
For PNG:
Instead of:
You will use:
And instead of:
You will use:
Source: http://php.net/manual/en/book.image.php
On the above link, you can find details regarding gif/jpeg images. My demonstration is for png images.
you are searching for something like this?
image result:
i can´t let that this problem defeat me... (also i want to help you, but not that much :P) so, i made this litle code that resolve almost 70% of your problem:
and, the result: at right is the image made by previous code.