Author Topic: Texture a 3D Cube (Box) equally?  (Read 1072 times)

Offline xNaXDy

  • byte
  • *
  • Posts: 7
    • View Profile
Texture a 3D Cube (Box) equally?
« on: May 26, 2012, 07:54:33 pm »
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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Texture a 3D Cube (Box) equally?
« Reply #1 on: May 26, 2012, 09:39:51 pm »
Which kind of box? One created by the Primitives class? And what exactly do use mean by 'project'?

Offline xNaXDy

  • byte
  • *
  • Posts: 7
    • View Profile
Re: Texture a 3D Cube (Box) equally?
« Reply #2 on: May 27, 2012, 10:52:58 pm »
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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Texture a 3D Cube (Box) equally?
« Reply #3 on: May 28, 2012, 08:53:09 pm »
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.

Offline xNaXDy

  • byte
  • *
  • Posts: 7
    • View Profile
Re: Texture a 3D Cube (Box) equally?
« Reply #4 on: May 30, 2012, 12:26:43 am »
Ah alright, thanks!