Atom Posted April 4, 2015 Share Posted April 4, 2015 Hi All, I ran across this page where Ryan Hurd uses a custom VEX shader to accomplish cross hatch shading. http://hurdfx.blogspot.fr/2005/05/vex-toon-cross-hatch.html I am trying to replicate this effect but I can't seem to figure it out. The above website describes the technique but leaves out a step-by-step which noobies like me still need. Can someone take a look at my HIP file and tell me what I have done wrong or still need to do to create this render effect? I am not sure if it is a shading issue, lighting or both? I have re-constructed the shader as best possible, it is located in the SHOP network. ap_vex_cartoon_hatch_marks.hipnc Quote Link to comment Share on other sites More sharing options...
iamyog Posted April 6, 2015 Share Posted April 6, 2015 (edited) Lot of problem in your file: - In your shader, make sure your input bind nodes are matching what they should bring in: both uv and Cd are set as float while they should be vector.- Default Cd is set as 0 (black) and there is no Cd attribute on your geo.That means you nullify all your shader output on multiply1 by this black value (anything times 0 will be 0 = black)--> Add some colours on your geo or change the Vector default on bind2- Change your Tube and Sphere from Primitives to Polygon if you want to have the wireframe effect.- Your ramp2 (wire) is set as a RGB ramp while you want a Spline Ramp (float) as it is meant to reshape your incoming value (luminance) to control the wire width.- The Outline curve should be reversed as you want white inside and black outside. If not you are facing the same issue that earlier: you multiply everything by black except the outlines. To debug, just plug the output Cf to anywhere in the network and see what render, it'll make more sense. Edited April 6, 2015 by iamyog Quote Link to comment Share on other sites More sharing options...
Atom Posted April 10, 2015 Author Share Posted April 10, 2015 Thanks for the breakdown on my scene. I made the suggested changes but I still don't get any wireframe effect like posted in the Ryan's image. I'm not sure what to adjust or change next? ap_vex_cartoon_hatch_marks.hipnc Quote Link to comment Share on other sites More sharing options...
iamyog Posted April 13, 2015 Share Posted April 13, 2015 I just opened your scene and reduced the wire ramp values. This is what renders : (H14.0.132) Not sure what's missing in yours. Plug the output of wireframe1 into Cf and play with your ramp values until you see something maybe? Check your Normals/uv values as they are needed for wireframe1 to work. If you dive inside it, you'll see that a boxesSOP is responsible for the wireframe effect so make sure it is feeded with proper things. Quote Link to comment Share on other sites More sharing options...
Atom Posted April 16, 2015 Author Share Posted April 16, 2015 Thanks for the feedback. I think I was expecting to see it in the viewport. Now that I have switched to the Render view I can see that it is working. Quote Link to comment Share on other sites More sharing options...
yesyes Posted April 17, 2015 Share Posted April 17, 2015 here is slightly different approach. I inserted stripes in the dark areas only of the shader(made them white so they are easier to spot) but what I can't get to work is how to rotate the stripes? they run from top to bottom or bottom to top of sphere. is there anyway by which they are angled at 45 degrees on sphere? stripes_shader.hip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.