MDL bricks normal -> single value?

How would I go about converting Normal output (which, I believe, is a float3 value) to a single value for comparison purposes in shader?

Comments

  • hphoenixhphoenix Posts: 1,335

    That depends on what kind of single value you want FROM the normal.  The magnitude (which will always be 1.0, since the values are normalized), a given axial component (just access that particular value), the average (not sure why you'd want that), what?

    There are bricks and functions in MDL to do most all of this (though they can take some tracking down.)  Just need to know more of what you are trying to accomplish here.....

     

  • Oso3DOso3D Posts: 15,042

    I figured it out. I was trying to extract, essentially, the 'curve on top' for filtering shaders on sides vs. tops.

    Now I just have to figure out how to get rid of this weird shadow effect.

    (Normal -> Float3 [I] )

     

  • hphoenixhphoenix Posts: 1,335

    Hmm....not sure you need to use Normal->Float3[I].....not sure exactly how the I parameter influences the result.  The Normal->Float3GetY should do what you want.

     

Sign In or Register to comment.