• Advertisement

Radiosity Mesh Baking : Camera Up vectors

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

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

Share this post

Share on other sites
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.

Share this post

Share on other sites
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.

Share this post

Share on other sites

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 ?

Share this post

Share on other sites

• Advertisement
• Advertisement
• Popular Tags

• Advertisement
• Popular Now

• 13
• 11
• 22
• 11
• 15
• Advertisement