Game Development Community

Texturing an Isosceles Trapezoid Face

by Jason Parker · in Constructor · 01/21/2009 (8:54 am) · 2 replies

I have a face in the shape of an isosceles trapezoid which I need to adjust the texture where the top corners of the texture line up with the top corners of the isosceles trapezoid and the bottom corners of the texture line up with the bottom corners of the isosceles trapezoid.

Obviously, this can't be accomplished with the scale, and position fields. Is this something that can be done with the UV axes? If so, where can I find more information on how the advanced controls work? The TDN pages for Constructor don't cover the UV controls.

#1
01/21/2009 (10:44 am)
This is impossible to do manually in Constructor. It is actually a limitation of the .MAP format and the way it handles texture coordinate generation. You can only map faces by scaling, translating, rotating, or skewing the texture. Since these are linear operations from texture space to world space, it is impossible to achieve the non-linear mapping you've described.

To get the texture the way you want, you'd have to make at least the part that is a trapezoid as a DTS. It should be simple to obtain the correct mapping in any mesh-based modeling package (e.g. Blender, Maya, 3dsmax). You then have several ways to get it into Torque, but I'd suggest baking that DTS into your DIF through Constructor.
#2
01/21/2009 (10:51 am)
Since the faces in question are on the outside of the DIF, baking a DTS shouldn't be a problem. (As I understand it, DTS baked into a DIF are rendered no matter if they're in an inactive portal zone or not...)

I kind of figured it was going to be a limitation of the format, but had to ask since I haven't really done any serious map editing since Quake... Dabbled a bit in Doom 3, but didn't have the same problems, with it having the built-in simple mesh editing. Where solids didn't quite cut it, I would create a detail mesh instead.

What I'm making is a tower. It has 20 sides, and is obviously hollow inside. This means the inside faces are a bit smaller than the outside faces. When it comes to texturing the solid, and the top face, getting the texture on the top face to line up with the outside *and* inside face would require the non-linear mapping...