Hello,
I am pretty new to Urho3D. As a side project, I’ve decided to make a simple rubik’s cube game. Everything works fine, except that I can’t get the texturing right. Basically, what I want to achieve is to have just one model, which will represent a single cubie which will be colored differently based on to which cube face it belongs. My problem is that, I don’t know where to start. The documentation of materials tells me nothing. The one interesting thing I found was Cubemap, which to my understanding, will provide me with the ability to set different texture to different faces of the model. But, when using cubemap (I set all cubemap faces to be red), my whole cube went completely black.
To sum up:
- I want to have just one model.
- I want to set different colors to different cube faces.
And I completely don’t know how to do that, or even search for info/examples on how to do it. Do you guys know how to do it? Do you have any examples of something like this working?
What I’ve done is this
material - rubiks.xml
[code]
[/code]
texture - rubiks.xml
<cubemap>
<face name="red.png" />
<face name="red.png" />
<face name="red.png" />
<face name="red.png" />
<face name="red.png" />
<face name="red.png" />
<quality low="0" />
</cubemap>
Where red.png is just 16x16 png image.
Thanks,
Kacper