www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: xNaXDy on May 26, 2012, 07:54:33 pm

Title: Texture a 3D Cube (Box) equally?
Post by: xNaXDy 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?
Title: Re: Texture a 3D Cube (Box) equally?
Post by: EgonOlsen 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'?
Title: Re: Texture a 3D Cube (Box) equally?
Post by: xNaXDy 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.
Title: Re: Texture a 3D Cube (Box) equally?
Post by: EgonOlsen 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.
Title: Re: Texture a 3D Cube (Box) equally?
Post by: xNaXDy on May 30, 2012, 12:26:43 am
Ah alright, thanks!