Jump to content

Cell Shader


Isleofgough

Recommended Posts

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?

CellShader.jpg

Link to comment
Share on other sites

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

FakeCellShader.jpg

Edited by Isleofgough
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

  • 4 months 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...