PDA

View Full Version : EnvBall shader question


Art-Machine
01-12-2008, 04:37 PM
Hey guys, hope someone here is good enough with this kind of thing to help me out!

Ok so the EnvBall in maya takes an image of a reflective chrome ball and applies it to an object surface in a way that simulates reflecting that sampled environment. I got that working fine and easy.

The part I'm getting stuck at is that I would like this effect to always be facing the camera, so no matter which way you spin around the model, the effect of EnvBall keeps simulating that I'm face-on to the chrome ball image.

So far unless i'm looking at the object from the front, the effect will start to distort like a glass refraction. I assume this will involve plugging some of the camera's position info into the shader's orientation/inclination slots? Anyway i have no idea where to start on that.

Hope i explained the problem well, Once again I'm just trying to make the EnvBall effect be "always facing camera".

Thanks!

djx
01-13-2008, 03:56 AM
You could aim constrain the place3dTexture node to always point at the camera.
However if you are using a single ball image, this would have the effect of the reflection sliding across the object as the camera animated, which would not look very realistic.

Or are you looking for some way of using a sequence of ball images?

-- David

Art-Machine
01-13-2008, 04:23 AM
Hah actually I was just fooling around and realized that there's already an option to accomplish what i was looking for, right in the shader. It's the checkbox called "Eye space". I turned it on while trying to do what you suggested above and realized that it keeps the image aligned to the cam :)

Thanks for helping, in a strange way it was your solution that led me to find the other one :)

CGTalk Moderation
01-13-2008, 04:23 AM
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.