Width Macro

I’m going to start posting some of my responses to QC questions from the mailing list. History and justification below, but first let’s get started!

Q: How do I ensure a Billboard patch does not get clipped with the aspect ratio changes?

Answer: Compute the width of the billboard as if the height were always 2. We know that the Aspect Ratio is given by (imageX/imageY) so multiply that by the (Rendering Destination Y) and you get (Rendering Destination X). This isn’t perfect, it will now be TOO wide if the rendering destination is tall and skinny. So make sure the width is never more than 2 by clamping the value using the Range patch. The end result is:

I’ve been having trouble figuring out what to do with my blog. Originally, it was to post my photoshop work or websites but I don’t have time for that any more. Most of what I do at work is confidential so I can’t post that. I can’t write about what I do outside of work because I live a boring life and it wouldn’t attract many readers 😉 So this seems like a good alternative. Keep in mind that I am doing this entirely on my own time so this has no offical capacity what-so-ever. I just find mailing list threads very difficult to traverse and would like to have a place to refer people to my well thought out answers.

One Comment

  1. Hey Troy,Do you track stats on your site? I am interested in seeing how many people find the post. I did a tech-support post on my blog a little while ago and its gotten ~7 hits so far.

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s