Jump to content
  • Advertisement
Sign in to follow this  

How to counteract transform manipulators 'fov' artifacts

This topic is 2558 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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:

World-space axis (reference): gizmofov2.png
Screens-space rotation trackball: gizmofov.png
World-space axis (reference): gizmofov4.png
Screens-space rotation trackball: gizmofov3.png

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?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!