Jump to content

I vector dot product problem


Recommended Posts

Hi, community.

Let's say I have an object in my scene and I want to change it's color in render depending on camera height (view direction). For example :  when i'm looking from above to that object I want to color it orange, otherwise to color it blue.

The first idea I had was to compute dot product in shopnet between I(vector) and another manually created up(vector) pointing up. But the result did not make me happy.

For some reason on the rendering image it separetes an object and colors it from the center of an image. And it does't matter from which angle I'm looking at it. The separation line is always at the center.

Did anyone confront with this kind of problem? Will be grateful if Anyone colud hepl me with that.

Also, attached a rendered image.

vector_I.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...