Isleofgough 4 Posted June 13, 2018 I have looked at various ways of rendering just the visible edges in Houdini, and it seems like I have to use Flipbook. To add the lines on top of an existing texture, I have to do a double render and composite them. Is there a shader that basically just adds lines (multiplying an image of the edges on top of a constant or principled shader? Share this post Link to post Share on other sites
davpe 183 Posted June 13, 2018 unfortunately no, there is no dedicated wireframe shader in Mantra. but there is a pretty easy geometry based workaround that gives decent results. check the file in attachment, hope that helps. cheers, D. wireframe.hiplc Share this post Link to post Share on other sites
Isleofgough 4 Posted June 13, 2018 That is a clever solution. Thanks! Share this post Link to post Share on other sites
Isleofgough 4 Posted June 15, 2018 (edited) I still think there must be a way of doing this all in a shader. (since many other 3D programs DO have a built in cell shader). I know absolutely nothing about what I'm doing in shader editing, but I tried to at least get a start with this. If I could remap the greyscale with some sort of ramp to pure white and pure black, I would be very close. I'm guessing this wouldn't work if actual UVs were applied: FakeCellShader.hiplc Edited June 15, 2018 by Isleofgough Share this post Link to post Share on other sites
toadstorm 298 Posted June 15, 2018 you're almost there, just need to compute abs(0.5 - s) and see if it's less than your chosen edge threshold value. granted, this still is going to render the edge width as a percentage of the parametric UVs instead of a constant world space width, which is why i like the Convert Line method better. FakeCellShader_ts.hipnc 1 Share this post Link to post Share on other sites
Isleofgough 4 Posted June 15, 2018 ... almost as in ~20%, but thank you. I see what you mean about the Convert Line method too. Share this post Link to post Share on other sites
thx1138 8 Posted November 13, 2018 You could measure world distance from P to edge (primuv(0, "P", primnum, {0,1,0}) and remap the result to 0-1. In that way edge width maintain in world space units. Here is example file. wireframe_shader.hip 3 Share this post Link to post Share on other sites