← All ideas
  • Published 11 Feb 2020

phong_ramp as a native shader

hi!

a few days ago i was wondering if there was holographic materials in blender and i didn't found anything. most people refer to iridiscent materials (that changes color depending on the angle of viewing) as holographic (that changes color depending on the amount of light that the material gets), but i could not find any real holographic materials. i found tricks depending of light viewpoints for npr shaders that worked but they were very complicated and just worked on a fixed amount of light sources.

but i found that in OSL there is a shader called phong_ramp, that does exactly that, create a ramp depending on the amount of light that a surface gets, and does it in cycles, and with unlimited amount of light sources. but i was not able to find any documentation on that, just examples of use.

why there is no implementation of this phong_ramp in blender as a cycles shader? cycles can handle it, it appears, so i think it would be great if we could use it as a native shader, or even better, as a input node or something like that, because i think the osl shader only outputs as a shader (that is another question, anyone knows if is there a way to use that phong_ramp as a factor output? or as any other thing, because working it as a shader is very clumsy, i would love to do a lot of things with it).

i think this would come very handy for the npr shaders community and the trippy visuals community (and many other communities) because in my research i've seen a lot of people finding workarounds of this aparent cycles limitation and their results are very cool. i think that without the workarounds it would be much easier for everyone.

i don't know how complicated is to implement this in blender as a native shader but i think that there is enough people that would love this, and i think that is one of those things that right now is very visualy appealing and engines like octane handle very well, so i think cycles can do it.

phong_ramp1.PNG

100%

Development Status: Open

Upvote 14 Downvote 0
intton
11 Feb 2020

8 Comments

Josephbburg

This looks pretty useful for NPR. Let's hope it can be supported natively, so it can run on GPUs, too.

2
intton Author

* @Josephbburg * yes, this, and the ability to work with hdri without gettin stuck

simonstoschu

This would be solved by having Eevee's "Shader to RGB" Node working in Cycles. In Eevee you can just convert a Diffuse Shader to RGB and apply a Ramp afterwards. ramp

1
intton Author

* @Simon Storl-Schulke * you are totally right! i hope that can be added

daniellapalme

Forgive me if I'm wrong, but can't you just use a fresnel node and a color ramp with all those colors to create the same effect?

cvaxxbull

* @daniellapalme * the effect is based on the amount of light received, not how close a face is to being perpendicular to the camera

1
intton Author

* @daniellapalme * fresnel and layer weight are cool but this is the main confusion between holographic and iridiscent materials. what you are describing is an iridiscent material, that changes color based on the viewing angle, but this phong_ramp shader changes the color depending of the amount of light a surface gets, so no matter the angle, the surface changes to a ramp of colors, and if you move the light source, the surface keeps changing color.

daniellapalme

* @intton * Gotcha