Texture a 3D Cube (Box) equally?

Started by xNaXDy, May 26, 2012, 07:54:33 PM

Previous topic - Next topic

xNaXDy

I am trying to project a texture (32 x 32) to a Box, so on every side it shows the scaled up texture, but either it spans the texture across the WHOLE box, or it doesn't show anything.

Got solutions for that?

EgonOlsen

Which kind of box? One created by the Primitives class? And what exactly do use mean by 'project'?

xNaXDy

By 'project' I mean simply texturing the block, and I was talking about the primitive class.

I found myself a solution by texturing the block in blender and then loading a block model into the game. However I'd like to know if this was also possible by using the primitive class.

EgonOlsen

Possible yes, but not really feasible. The Primitives' objects have no proper texture coordinates (as stated in the documentation). They are meant as quick-and-dirty placeholders, not for "real" work. You can always assign proper coordinates in your code, but that's too complicated IMHO.

xNaXDy