Game Development Community

T3D 1.1 Beta 3 - Material texture rotation: erroneous pivot offset - LOGGED

by Konrad Kiss · in Torque 3D Professional · 11/29/2010 (10:29 pm) · 2 replies

T3D 1.1 b3

Using:
Vista 64

Target:
Materials - Texture Animations - Rotation

Issue:
The offset given for texture rotation is a pseudo uv. It does not handle the case when the 0 and 1 coordinates on either axes are switched.

Ie.: Can't put fans on opposite walls with text printed on the frame. The whole thing is one material. The fans are rotated on stage 0 and the frame is overlaid on stage 1. It has text on it and is mapped so the text is readable. Only one fan will rotate as expected, the other will have its rotation messed up.

Repeat:
Create a box with with 2 arrows (left and right sides) pointing in the same world space direction (forward). The arrow should be a single image, and the sides should be textured using uvs such as (0-1,0-1) (1-0,0-1). Start rotating the arrows around -0.5 -0.5 and observe the difference. This is because when the texture offset is set up initially, it assumes that the uv coords advance in the positive direction.

Suggest:
Perhaps shader should handle creating the transform as it has access to the correct uv coords. If there was a way to alter the way the transform is passed (ie. multiply coords by -1 if the uv is turned around) then I guess that would be easier to do, but it would require doing the transformation separately for each face I think.


#1
01/07/2011 (11:34 pm)
Logged as THREED-1308.
#2
01/08/2011 (12:33 am)
Awesome. :) Thanks Ray.