Radiosity Mesh Baking : Camera Up vectors

Started by
3 comments, last by MJP 12 years, 7 months ago
Hi ,

I am using hemicubes to compute incident light ( form factors ) in my radiosity renderer.
So my renderer requires `up` vectors ( for creating view matrices for cameras per patch)
along with `normal` vectors per surface.

Considering model files ( x,3ds,obj etc) which ones supply those `up` vectors ?
Or if they not , how can I calculate an up vector by using center of a patch
(averaging 3 vertices of a polygon-patch) and the polygon normal ?

thanks

Advertisement
I don't know which model formats specifically allow to store this, but I guess you could use the tangent vector as an up direction for the camera. If you don't have access to the tangent from the model, you can calculate it yourself, using a method like this.
I am curious btw how important the choice of up vector is in this scenario, because it seems like it should not matter as long the camera is pointing in the right direction.
If you really need a consistent frame of reference you can use the tangent frame, but typically you only need this if you're baking to a basis that's oriented about a hemisphere (like H-basis, or HL2 basis). For most cases you can just generate an up vector by picking a direction perpendicular to the normal.

If you really need a consistent frame of reference you can use the tangent frame, but typically you only need this if you're baking to a basis that's oriented about a hemisphere (like H-basis, or HL2 basis). For most cases you can just generate an up vector by picking a direction perpendicular to the normal.


Yes I see , as long as `up` vector is perpendicular to the normal it will be ok

but now then my question is how can I calculate those perpendicular vectors ?
http://www.gamedev.net/topic/445164-how-to-get-a-direction-vector-perpendicular-to-a-direction-vector-/

This topic is closed to new replies.

Advertisement