ibotatar Posted August 16, 2017 Share Posted August 16, 2017 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. Quote Link to comment Share on other sites More sharing options...
ikoon Posted August 16, 2017 Share Posted August 16, 2017 I had similar effect in my last project, attached is my solution. I just added the point inside camera and read it in the VOP. Subtract P.y (camera-point) and ramp the resulting float to color. camera.hiplc Quote Link to comment Share on other sites More sharing options...
ibotatar Posted August 16, 2017 Author Share Posted August 16, 2017 Thanks for your responsiveness Jiri. Thats really cool idea. But I think this method won't work in my case, cause I'm reading my geo as packed disk primitive. And I would like to solve this during shading. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.