If you build a lot you will found almost impossible to align those damn textures when you resize or move your pieces.
Surely you can try offset and repeats per face parameters, but how to do that in a "safe" and exact way?
So I rezzed up a 10x10x.5 box and tried to get the magical numbers you must use when aligning textures.
I call SizeX the size on X and ShrinkX the coefficient of shrinking on X, so that .1 means you shrinked th box on the X axis to be 1 m only.
So almost obviously the RepeatPerFace x must be multiplied by ShrinkX.
OffsetX depends on where you moved you piece, but if you want to put at the higher X you should apply the following formula:
OffsetX=( 1 - ShrinkX) / 2
For example:
if you shrinkX by .1, you have to
- offsetX add .45
- changeX by .45*LX=4.5
If you have a strange size box, say 3.5 x 3.5 and you want to put it to 3 x 3.5, than shrinkX is
3 / 3.5 = .857,
offset will be (1-.857)/2=.0715
and changeX will be .715*3.5=.250
:)
NB: if instead of aligning the box exactly to other boxes you are further offsetting of a small amount, you just have to offset the textures of the further/originalsize so that it will fully aligned.
Tuesday, August 21, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment