Framing 3d objects

Jul 21, 2009 21:58

Today I ran into some code in Spore that has to do with framing pictures of creations. The problem is this: given some object created by the user, come up with a camera which takes a picture of that object ( Read more... )

Leave a comment

Comments 2

zqfmbg July 22 2009, 07:09:27 UTC
From an aesthetic point of view I'd guess you'd want to take the minimum distances and push them out a little bit so that you get a border around the object. I also wonder how well fitting a bounding box into the frustum would work? Probably not all that well, come to think of it.

I wonder how slow the original code was. I guess it doesn't matter that much; after all, once you have your framing done, you don't have to do anything further. But the optimization nut in me is a bit surprised the game went out that way. (The engineer in me isn't, though.)

Reply

ryani July 22 2009, 07:59:32 UTC
I'm actually not going to be using the vertex data directly, but rather the bounding boxes of the model and/or the model parts. So I'm going to get some amount of framing due to conservative bounds already. Also, if the bounding box is aligned to the frustum you can skip some of the corners.

Reply


Leave a comment

Up