Mcronin Posted March 15, 2006 Share Posted March 15, 2006 I wrote a toon shader and an edge dectector COP. Here's a test. It's some enemy from a game called Dragon Quest. It's very simple; I'm working on a much more complicated model. I just needed to make something quick to test with. I'll post something better down the road. The shader started out being based on the one in the Advanced Renderman book, but I quickly figured out I didn't like the way it worked, so I wrote one that doesn't do edge detection, supports textures, uses a constant base layer and adds ink layers on top of that (up to 3), and outputs some AOVs for the edge detector. The edge dectector does detect interior edges pretty well using normals and surface IDs, I can control the line width so I can get thin pencil lines or variable width marker style lines. I can use brushes on the lines though they don't really seem to make much difference unless the lines are really fat. I can also control the line color. The one drawback is I have to render gigantic control images, so it's pretty much useless in Apprentice. Here's the pic. More coming eventually. Quote Link to comment Share on other sites More sharing options...
Andz Posted March 15, 2006 Share Posted March 15, 2006 Here's the pic. More coming eventually. 25659[/snapback] That looks really clean! Congratulations. Quote Link to comment Share on other sites More sharing options...
peliosis Posted March 15, 2006 Share Posted March 15, 2006 I'm interested in achieving this:katsu in houdini. Very nice toon shader, how does it render a cube? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted March 15, 2006 Share Posted March 15, 2006 I'm interested in achieving this:katsu 25669[/snapback] That's not a surface shader, and therefore not a "toon" shader in the usual sense. It's an imager shader. Imager shaders are not supported directly in Mantra, but they can be implemented as VEX COPs. But more importantly, the *reason* why he wrote it as an imager shader is that the entire scene is defined inside the shader itself -- meaning that you could port the whole thing into COPs, but then you could ever only "render" a box and a dresser... This is also how he can extend the lines and so on -- because the geometry being rendered is inside the shader itself. P.S: Looking good, Mike! Quote Link to comment Share on other sites More sharing options...
peliosis Posted March 16, 2006 Share Posted March 16, 2006 I haven't studied this shader, but do you think we are able to use some information from geometry and rendered data to add edge length in cops? Quote Link to comment Share on other sites More sharing options...
Mcronin Posted March 16, 2006 Author Share Posted March 16, 2006 You should be able to pull this off. I haven't done much with COPs besides this edge detector but I don't see how it wouldn't be possible to do something like that in COPs. You can find and color any pixel in COPs. When you get down to it, that's all you really need to do anything; find a pixel and color it. So, it's just a matter of figuring out how to find the "right" pixels and how to color them with the "right" colors. Quote Link to comment Share on other sites More sharing options...
peliosis Posted March 17, 2006 Share Posted March 17, 2006 You should be able to pull this off. I haven't done much with COPs besides this edge detector but I don't see how it wouldn't be possible to do something like that in COPs. You can find and color any pixel in COPs. When you get down to it, that's all you really need to do anything; find a pixel and color it. So, it's just a matter of figuring out how to find the "right" pixels and how to color them with the "right" colors. 25692[/snapback] Hey that's nice, you just nailed down the solution to every problem of image synthesis Quote Link to comment Share on other sites More sharing options...
Mcronin Posted March 17, 2006 Author Share Posted March 17, 2006 Hey that's nice, you just nailed down the solution to every problem of image synthesis 25694[/snapback] Why do I feel like you are having a go at me? I'm sorry, I'm a very simple minded person. Quote Link to comment Share on other sites More sharing options...
peliosis Posted March 17, 2006 Share Posted March 17, 2006 Why do I feel like you are having a go at me? No way, to be honest I really thought about visuals this way. It's a bit awkward but interesting, all we see are just right colours put into right places. 15 years ago I had a friend who copied enlarged figures from amiga action mag. covers pixel by pixel using deluxe paint software. 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.