[Gtkradiant] shift/scale/rotate to BP translation

Shamus jlhamm at acm.org
Sun Mar 5 00:53:27 CST 2006

> The algorithm you need is Q3_to_BP() here:
> https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk/radiant/brush_primit.cpp

This *almost* works, but not quite. Using the same example I gave you 
causes the texture to come out tiled twice in the x-(or is it t?)axis 
and half as tall in the y-axis of the brush face. It completely misses 
the axis flip as well.

I'm passing the Q3_to_BP function the width and height of the texture 
for the face under consideration as well as the unitized normal of said 
face in addition to the face texdef, so I'm not sure exactly what's 
causing things to go wrong.

An interesting side-effect of this process is that when you load the map 
into GtkRadiant and plug in the scale values (x for y and vice-versa) 
from the shift/scale/rotate version of the map into the BP converted 
map, the scaling comes out correct for the example brush I gave in my 
previous email. It's probably a fluke, but interesting nonetheless. :-)

I guess I'll have to do some more digging...

-- Shamus

More information about the Gtkradiant mailing list