Isleofgough Posted June 13, 2018 Share 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? Quote Link to comment Share on other sites More sharing options...
davpe Posted June 13, 2018 Share 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 Quote Link to comment Share on other sites More sharing options...
Isleofgough Posted June 13, 2018 Author Share Posted June 13, 2018 That is a clever solution. Thanks! Quote Link to comment Share on other sites More sharing options...
Isleofgough Posted June 15, 2018 Author Share 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 Quote Link to comment Share on other sites More sharing options...
toadstorm Posted June 15, 2018 Share 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 Quote Link to comment Share on other sites More sharing options...
Isleofgough Posted June 15, 2018 Author Share Posted June 15, 2018 ... almost as in ~20%, but thank you. I see what you mean about the Convert Line method too. Quote Link to comment Share on other sites More sharing options...
thx1138 Posted November 13, 2018 Share 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 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.