Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Lighting & Rendering (https://simplymaya.com/forum/forumdisplay.php?f=17)
-   -   custom shader (https://simplymaya.com/forum/showthread.php?t=8854)

nspiratn 08-11-2003 04:54 PM

custom shader
 
I was messing with shaders earlier. I connected the facing ratio attribute of a samplerInfo node to the reflectivity of a blinn shader. Now I want to invert the reflectivity i.e. when the facing ratio is 1 I want reflectivity to be 0 and viceversa.

I know I probably have to use the graph editor for this. But I'm not sure how to do it.

Can you please help me out?

Thanks.

NitroLiq 08-11-2003 05:57 PM

Have you tried experimetning with throwing a reverse and condition node into the mix?

nspiratn 08-11-2003 08:07 PM

Umm nope. :)

But Instead of adding more nodes in the network, wouldnt it just be easier to do it the way I mentioned in my previous post?

I saw a gnomon workshop video once where the guy did what I'm trying to do, I just don't have access to that video anymore so I can refer to it. So I've been wondering if anyone here knows how to do it.

nspiratn 08-11-2003 08:22 PM

NitroLiq, I don't think I can connect the output of either the reverse node or the condition node to the reflectivity attribute of my shader because its a single value attribute as opposed to the outputs of reverse and condition which are triple value.

Right?

mtmckinley 08-11-2003 08:22 PM

There's lots of ways to do anything. Don't dismiss one person's way just because you've seen it done another. :) It might work better!

nspiratn 08-11-2003 08:23 PM

Hehe I didnt dismiss it. :)

Read my post above.


:D

mtmckinley 08-11-2003 08:24 PM

ah, posted at same time. ;) I'll keep my comment around for future use. lol

nspiratn 08-11-2003 08:26 PM

Hehe.

But you were totally right, there :) Point taken.

NitroLiq 09-11-2003 03:58 PM

After doing a little reading, I'm not entirely sure a condition node would work anyway as I believe it's directly related to outcolor. Ive used it to create a double-sided shader before and was thinking along the lines that you could use it to make a condition that if facing ratio is 1, make the blinn's reflectivity 0 and if not, reverse it with the reverse node. What gnomon video were you originally referring to? If I have it, I might be able to look it up for you.

nspiratn 09-11-2003 06:28 PM

Oh. I'm pretty sure it was one of the polygon modeling videos where he builds a car.

He puts a reddish shader on the car. Thats when he does the thing witht he graph editor I think.

Thanks.

NitroLiq 09-11-2003 09:07 PM

Hmmm....I have the first two polygon modeling dvds and they're all modeling, no shading whatsoever (including the car). It wouldn't happen to be one of their video lectures on surface normals affecting reflectivity, would it?

nspiratn 09-11-2003 09:20 PM

Hmm Dunno. maybe its the nurbs modeling one then. Because I remember now that he starts with a sphere and then uses patches and detaches surfaces.

Its a cool looking futuristic car that he builds too.

NitroLiq 10-11-2003 04:36 AM

Not sure, Nir. I have the nurbs race car video as well and it doesn't really go into texturing. The only shader they have on the car is a metallic blue layered shader comprised of a blinn and anisotropic for reflective, clearcoat gloss. Wish I could help you further with this but I'm at a loss. Maybe if you explain, exactly what type of end result you're looking for (i.e how you want the shader to interact with light), someone can help you with an alternative way.

mtmckinley 10-11-2003 04:58 AM

Oh, yeah, didn't think of that. What is most likely going on is a layered shader as Nitro mentions. The top layer is a reflective blinn or whatever with a sampler info connected to a blend color node (facing ratio > blender) which is then connected to the blinn's transparancy. The layer beneath could be the same blinn but with reflectivity turned off. If you make the two colors in the blend color black and white, you'll have the reflective material transparant in the center and opaque on the edges, thus giving you refletivity only on the outer edges.

Duh! Should've thought of that earlier. :)


All times are GMT. The time now is 01:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018