Jump to content

how to Tspace N maps with Per light Illumloops?


kensonuken

Recommended Posts

In your HIP the tangent space normals were plugged into the illum loop subnet, but you never provided them to the proper functions inside the subnet. Specifically diffuse + specular shadeops must be provided with Normals or they base their computations off the default Normal instead of your custom tangent space normals.

If you right-click on Peter's Asset you can view his code in the Type Properties window. Houdini's default VOP nodes also behave this way.

vector $myN = $isconnected_nfN != 0 ? $nfN : normalize(frontface(N,I));

I've re-attached your HIP by itself. It looks like you also may have accidentally forgot to "promote parameters" on the SHOP Material since it was rendering with Mandril.pic instead of your tangent map.

Alan

perlightIllum_normal_maps.zip

Link to comment
Share on other sites

hi alan its working great but with strange artifacts on specular the render consists of couple of chopped specular values. I am just expecting that the Normal values are not getting evaluated well in spec can u please have a look on it..

I don't think there's anything in the code itself that could account for that. It's probably the normal map, or seams from the UV's.

Link to comment
Share on other sites

  • 2 weeks later...

I have been integrating this normal map shader into our pipeline, I found that large portions of the shading would have inverted normals when the shader is used to supply normals to an occlusion shader (or anything else other than a simple lighting model). The artefact pattern would change based on the layout of the uv... the solution is to plug the output of the shader into the N input of "Front Face" VOP (no need to plug "I") before plugging into anything else.

I made another mod to it to allow use of a bump map at the same time:

- Plug the bumped normal into a null, and change the var name to something unique.

- Plug this into the second input (the white thing) of the inline Vop

- Change the "normalize(N)" portion of the code to "normalize($nameofyournullvop)"

Cheers

S

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...