Reasons for using 4x4 matrices instead of VQS?

84 views
Skip to first unread message

Phaino

unread,
Mar 31, 2017, 11:52:03 AM3/31/17
to pbrt
I've begun reading PBRT, but I've noticed that transforms are being represented via 4x4 matrices instead of with a VQS representation. I wanted to know what the reasoning behind this was. I'd imagine that using VQS would have a lower memory foot print as one no longer needs to store an inverse because it is fairly easy to calculate. 

However, VQS can not represent non-linear transformations. This is the usual reason for not using them with a rasterizer pipeline as the perspective transformation is non-linear; however, we don't use perspective transformations with ray/path tracers. Are there any other non-linear transformations that I'm not taking into account here or perhaps there are other factors that I have overlooked?

Thanks!

Matt Pharr

unread,
Apr 2, 2017, 4:43:42 PM4/2/17
to pbrt
We never really considered it. (Also, I had to google what the VQS representation is :-). In my experience I've never really seen that used in practice.)

I guess the reasons were:

- Memory savings isn't really an issue; not much memory is used for transforms
- Regular old 4x4s are more efficient to apply than dealing with quaternions and the like
- The transformations that come in with scene descriptions are often provided as 4x4s (e.g. when exported by modeling transformations)

So I don't think any possible benefits outweigh the costs.

Thanks,
Matt


--
You received this message because you are subscribed to the Google Groups "pbrt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pbrt+unsubscribe@googlegroups.com.
To post to this group, send email to pb...@googlegroups.com.
Visit this group at https://groups.google.com/group/pbrt.
For more options, visit https://groups.google.com/d/optout.

Wenzel Jakob

unread,
Apr 2, 2017, 4:53:04 PM4/2/17
to pb...@googlegroups.com
A few more arguments:

- there are parts of the system where nonuniform transformations are permitted.
- not currently done, but also a point for the future: 4x4 matrix multiplication is easily mapped to SIMD operations, hence scalar operation count is not the best metric to estimate computation time.

Best,
Wenzel

To unsubscribe from this group and stop receiving emails from it, send an email to pbrt+uns...@googlegroups.com.

dcy665 .

unread,
Apr 2, 2017, 4:59:14 PM4/2/17
to pb...@googlegroups.com
This is a 'like' response to Matt and Wenzel as there is no like button on email.

Also, does it matter significantly to you where I pickup V3?
Retirement means making smaller decisions.

Matt Pharr

unread,
Apr 2, 2017, 9:19:21 PM4/2/17
to pbrt
It doesn't matter much to us where you pick up V3 (that we have another reader is all we could ask for!)

That said, buying through the amazon link on pbrt.org helps fund the costs of running the website and serving the example scenes, so all things being equal that's a fine choice. :-)

Thanks,
Matt

dcy665 .

unread,
Apr 2, 2017, 10:02:16 PM4/2/17
to pb...@googlegroups.com
Good to know.
Reply all
Reply to author
Forward
0 new messages