Jump to content
  • Advertisement
Sign in to follow this  

transforming a hemisphere

This topic is 2918 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


i have problem trying to transform my hemisphere based on the vertex normal. so what im trying to do is to build a hemiospehre of each vertex with radius 1. the hemisphere looks like this:


where the up value is the normal of each vertex. so for example if my vertex normal is (0, 1, 0) (y is the up value) i can simply use the normal hemisphere formula that can be found in here


(with few changes considering y is the up).

now the problem is when i have the normal not pointing up, eg :

normal = normalize(1, 1, 0)

how can i transform the hemisphere so it follows the normal of the vertex? so for example if i know all the point to build a hemisphere for normal (0, 1, 0), how can i find the coordinate for a hemispehre for normal normalize(1,1,0)?

thanks in advance

Share this post

Link to post
Share on other sites
Sounds like you are just needing a rotation.
You could for example get the cosinus of the rotation-angle by the dot-product of
(0,1,0) and normalize new_normal
Now you can get the rotation-axis by the cross-product of these two vectors.
That is all information you need for rotating the hemisphere right in place.

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!