Texture Change on Angle View

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 10 October 2012   #1
Texture Change on Angle View

It looks like Iím going to be provided a number (12-36) shots of a car 360į (think along the lines of the car rotations you get on automotive websites). I need to create an animation (which for these flat type graphics I usually use Motion/After Effects), of the cars driving around for about 5 seconds.

First up, size wise, these are to be displayed on football perimeter boards, so resolution is usually about 1024x56px high, so, detail isnít the thing, just getting the rotation looking as smooth as possible - and automatically changing textures, no keyframing ideally...

My first brain fart was somehow mapping an elongated cube with a camera mapped texture that changes depending on the angle of said cube.

Just wondered if this was a good start, whether a bit of Xpresso was in order, or if anyone had done something similar and could point me in the right direction - even if itís - been there, done that, didnít work.

Many thanks in advance for your thoughts.
Old 10 October 2012   #2
Well you could calculate the rotation of the plane in respect to the cameras rotation and pic your image from that. Xpresso can control the file path of a bitmap shader so you could simply use a range mapper to map the rotation you got to the filesequence framenumber of your texture file and feed that to the bitmap shader.
Old 10 October 2012   #3
another solution would be:
get the dot product of viewing vector and the face-normal (dont forget to clamp it to positive values only), and rangemap that to the texture sequence framenumber (as matthias said).
good luck.
Old 10 October 2012   #4
Cheers both, looks like Iíll be n this Monday so Iíll try and put something together over the weekend.

What do you mean by "get the dot product of viewing vector"?

Would a plane work for when the car rotates to, and past 180į, where the plane would be edge on?

Thanks again for the thoughts.

Old 10 October 2012   #5
Originally Posted by Tehuti: Cheers both, looks like Iíll be n this Monday so Iíll try and put something together over the weekend.

What do you mean by "get the dot product of viewing vector"?


you need two vectors to calculate the dot product.
the viewing vector is the vector from the camera to the polygon.
the second (in this case) is the polygon normal.
the dot product of these two outputs a scalar value telling you how "similar" they are.
hope this helps.
good luck
Old 10 October 2012   #6
Right, got that, although after viewing a Wolfram Mathworld explanation of dot product, Iím almost certain this is out of my technical expertise in math AND/OR Xpresso.

I think Iíll put it up as a job req.

Many thanks for the input.

Old 10 October 2012   #7
alright. if you never used XP, maybe a little hard to grasp.
Old 10 October 2012   #8
I have a basic grounding in Xpresso, so I might just take a look and see if I can string something together, not getting any bites at c4dcafe for the job.

Old 10 October 2012   #9
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 04:52 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.