Diffuse Color in Viewport

   1779   2   0
User Avatar
Member
26 posts
Joined: Sept. 2017
Offline
Hi all,
so I already know that in order to display a color parameter in the viewport, you have to put the ogl tag. But this is limiting because you can display only one color and if you do some compositing inside a material network this is evaluated only during render time, right?

This is displaying only one of the parameters.
Also I digged inside the Hair Shader, because I noticed it is capable of displaying the mix between Tip and root color. And as far as I know this is not possible to do only with the ogl tags, is this correct?


As you can see, inside the hair shader, on the parameter for color, there isn't any ogl tag.
So I am wondering how did Side FX make this shader to show the mix between colors in viewport properly, without even using any Ogl tags.
Any hints would be much appreciated, thanks!
Edited by Kaloyan - Feb. 18, 2019 15:31:37

Attachments:
Capture1.PNG (344.4 KB)
Capture2.PNG (919.6 KB)
Capture3.PNG (914.0 KB)

User Avatar
Member
9417 posts
Joined: July 2007
Offline
it is using old school way of assigning OlenGL shader by adding Material Options Render Properties in this case OpenGL Hair tab
which will allow you to link the parameters of Hair OGL shader to the material parameters

so in other words it's a special GLSL shader used for hair
you can make your own GLSL shader using File/New Asset…/VOPs/GLSL Shader
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
26 posts
Joined: Sept. 2017
Offline
tamte
it is using old school way of assigning OlenGL shader by adding Material Options Render Properties in this case OpenGL Hair tab
which will allow you to link the parameters of Hair OGL shader to the material parameters

so in other words it's a special GLSL shader used for hair
you can make your own GLSL shader using File/New Asset…/VOPs/GLSL Shader
Thanks for the clarification tamte!
So there is no way to display any kind of compositing I do inside a material builder in the viewport? I guess I am still not fully acustomed to the idea that in Houdini you actually have two completely separated shaders - one for the viewport and one for Mantra, and you have to create both of them if you are creating a custom shader.
Thanks again!
  • Quick Links