texuring a cube
Blitz3D Forums/Blitz3D Programming/texuring a cube
If i have a 64x64 texture and want to apply this same texture to each individual face of a cube created with createcube() how do i go about this easily from within blitz.
In the past I have just used a 3d package for this but dont own one now.
Thanks in advance
Entitytexture Cube, texture will apply the same texture to each face ... unless you mean something else?
Stevie
Ah right, I was under the impression that it would wrap the 64x64 texture around the whole cube. If thats the case, thats fine an easy fix. I dont usually use the blitz mesh commands, so please excuse my ignorance.
Thanks for the help.
You need to set UV coordinates.
UV coordinates dictate which parts of your texture will be painted onto which triangles. By default, every face of a cube has the same UV coordinates. Look into VertexTexCoords.
Er, octo, if all he wants to do is apply say a 'crate' texture to a cube then Entitytexture Cube, texture will work fine.
Chevron, UV coords are only necessary if you need to rotate etc the texture on particular faces.
Thanks a lot for the info guys, working fine.
UV coords are only necessary if you need to rotate etc the texture on particular faces.
Incorrect. By far, a more common usage of UV coords is to select parts of one big texture so you don't end up with a lot of tiny textures (e.g. for eyes and ears.)