PDA

View Full Version : object visibility greyscale shader



ogdgs
November 2nd, 2008, 10:44
Hi

I’m trying to create a shader that looks at an objects visibility track and created a greyscale map of that value. I then plan to use this as a blend map, or cutout map, in order to get Mental Ray to obey visibility of objects.

I am a new Mental Ray user. I have been using scan line (3ds max) for years to create complex mechanical visualizations. I recently decided that I should investigate Mental Ray. I have been very impressed so far. However I was very shocked to find out that there is no way for Mental Ray to recognize the visibility track of an object. Yes, yes, I know that you can: use blend material or cut-out map etc….. However this introduces a huge problem: I need a material for every object I need visibility for! I regularly fade in and out hundreds of parts, at different times, in different selection sets, at different visibilities. There is only one practical way of doing this, the visibility track.

So after spending days trawling the internet and finding that no one has come up with a satisfactory workaround (render passes, blend materials, cut-outs, are all unacceptable), I have decided that I might try to solve the problem myself. So I ended up here at Mental Mill. Problem is that I have no idea what I am doing!

So two questions:

Is it theoretically possible to create a texture shader that looks at an objects visibility track and creates a greyscale representation of it?

If so, where would I start trying to create it? I have no programming experience and no Mental Mill experience.

I also have a deadline at the end of next week and I will have to go back to scanline if I cant find a solution.

I (and a huge number of other new mental ray users) would greatly appreciate any help.

Thanks

Oliver