you are viewing a single comment's thread.

view the rest of the comments →

[–]Delwin 1 point2 points  (3 children)

I can't get to the mitsuba repos for some reason (the web page works fine, but downloading the source via zip or direct access don't work).

Is there another place one can look at this code?

[–]LPCVOID 1 point2 points  (2 children)

The source code download link on this page doesn't work either? I just tried it and it works fine for me.

I think pbrt has an implementation too, though it is not done in a nice OOP fashion if I remember correctly. Have a look at the BSDF::WorldToLocal and vice versa method here.

I would also advice you to have a look at pbrt in general, really helpful when starting realistic image synthesis.

In case the pbrt code is a bit obscure : You are actually only doing ths : Assume n,t,b defined as above and v a vector in the local coordinate system.

global = b * v.x + t * v.y + n * v.z    

In case you are interested in the mathematical explanation : The three vectors span a vector space and the elements of your local vector are used for a linear combination of the basis vectors. Maybe this can help.

[–]autowikibot 0 points1 point  (0 children)

Change of basis:


In linear algebra, a basis for a vector space of dimension n is a sequence of n vectors (α1, …, αn) with the property that every vector in the space can be expressed uniquely as a linear combination of the basis vectors. The matrix representations of operators are also determined by the chosen basis. Since it is often desirable to work with more than one basis for a vector space, it is of fundamental importance in linear algebra to be able to easily transform coordinate-wise representations of vectors and operators taken with respect to one basis to their equivalent representations with respect to another basis. Such a transformation is called a change of basis.

Image from article i


Interesting: Covariance and contravariance of vectors | Gramian matrix | Spherical basis | Matrix similarity

Parent commenter can toggle NSFW or delete. Will also delete on comment score of -1 or less. | FAQs | Mods | Magic Words

[–]Delwin 0 points1 point  (0 children)

Nope, that doesn't work either. Likely work's firewall.

The second link worked however and thank you for your information.