# How to counteract transform manipulators 'fov' artifacts

## Recommended Posts

phr34k9    155
For a while I've been rendering Gizmo's in world-space which works fine for say scale/translation manipulators but for rotation manipulators (arc-trackball style) it's blown out of proportions. Now in essence I'm looking for a way to render the manipulators in a way the cameras field of view doesn't cause the geometry to 'blow up'. I've seen a couple of forum posts where people recommend drawing the manipulators with an orthogonal matrix, but there's little information about the subject besides that.

I have implemented rendering semi-successfully. But I'm not really convinced if I solved the problem correctly. For the code see the attachment ( [attachment=4263:gizmo-code.zip] ). One major problem I had in the implementation was figuring out what the rotation matrix was that I needed to align the orthogonal projected geometry with the orientation as we perceive the world. In a nutshell I did this by projecting the cardinal axis from orthogonal world-space into three vectors into perspective world-space, and obtain the normalized directions of those axes to convert them into a rotation matrix. This seems to work reasonable for most viewpoints. However from some viewpoints, it's hard to explain but the rotation feels slightly off.

Here's some visual stimulant:

[i]World-space axis (reference): [/i] [url="http://imageshack.us/photo/my-images/225/gizmofov2.png/"][img]http://img225.imageshack.us/img225/4448/gizmofov2.png[/img][/url]
[i]Screens-space rotation trackball:[/i] [url="http://imageshack.us/photo/my-images/5/gizmofov.png/"][img]http://img5.imageshack.us/img5/417/gizmofov.png[/img][/url]
[i]World-space axis (reference):[/i] [url="http://imageshack.us/photo/my-images/39/gizmofov4.png/"][img]http://img39.imageshack.us/img39/9866/gizmofov4.png[/img][/url]
[i]Screens-space rotation trackball:[/i] [url="http://imageshack.us/photo/my-images/43/gizmofov3.png/"][img]http://img43.imageshack.us/img43/8029/gizmofov3.png[/img][/url]

I would like to get rid of viewpoints where it doesn't look so convincing but at this point I'm pretty clueless what I can try/should do. How have others dealt with this orientation alignment? Am I overlooking something that should be part of the mapping process? Is my approach completely wrong? If my approach is invalid what would the recommended solution be?