Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKryzon

Posted 08 May 2013 - 12:57 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

 

 

EDIT: On Hodgman's suggestion, there's code to calculate the UVs of a point on a sphere based on a normalized direction (i.e: a radius connecting the center of the sphere to the point where you want to find the UVs). It's from the wikipedia article on UV Mapping:

 

761ef477fca2de40aed0cbbae3cbf9ca.png

ad415e568bc911ec29c8233d7c26bef2.png

 

So I could take the vector from [center of eye] to [object being looked at], normalize it and use that as d.


#3Kryzon

Posted 08 May 2013 - 12:56 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

 

 

EDIT: On Hodgman's suggestion, there's code to calculate the UVs of a point on a sphere based on a normalized direction (i.e: a radius connecting the center of the sphere to the point where you want to find the UVs). It's from the wikipedia article on UV Mapping:

 

761ef477fca2de40aed0cbbae3cbf9ca.png

ad415e568bc911ec29c8233d7c26bef2.png

 

So I could take the vector from [center of eye] to [object being looked at] and use that as d.


#2Kryzon

Posted 08 May 2013 - 12:56 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?

 

 

EDIT: On Hodgman's suggestion, there's code to calculate the UVs of a point on a sphere based on a normalized direction (i.e: a radius connecting the center of the sphere to the point where you want to find the UVs). It's from the wikipedia article on UV Mapping:

 

761ef477fca2de40aed0cbbae3cbf9ca.png

ad415e568bc911ec29c8233d7c26bef2.png

 

So I could take the vector from [center of eye] to [object being looked at] and use that as d.

 


#1Kryzon

Posted 08 May 2013 - 12:25 PM

You can use a tangent function to compute the offset in the head's space.

Could you elaborate on this?

What would you be comparing to get the tangent?


PARTNERS