Crustedink Posted December 5, 2017 Share Posted December 5, 2017 Hello, i am trying to render a wireframe of the topology straight from mantra. Feely a bit stupid, but it seems way more complicated then i thought. I read about wren or creating a "wireframe-geo", but in my case, i need it from mantra as an additional image plane (via bind export). Trying to create a mantra beauty render of an asset as kind of Model QC, so besides the wireframe it would be great to also include the uv distortion (as in maya) in my render, to see if the uvs are strechted or compressed. most important is the wireframe, would be great, if somebody could point me in the right direction. Cheers, Daniel Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted December 5, 2017 Share Posted December 5, 2017 Hi Daniel, you could create a wireframe shader based on the s and t values in /mat VOPs, which stand for each primitives individual UVs. wireframe_shader.hipnc Quote Link to comment Share on other sites More sharing options...
Crustedink Posted December 6, 2017 Author Share Posted December 6, 2017 perfect, looks good as a start, thank. only proplem of this approach is the inconsistent thickness of the lines. but should work for now! Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted August 26, 2019 Share Posted August 26, 2019 For a wireframe shader with consistent line widths, first create a primitive attribute that contains all point positions. Then inside a shader choose point pairs for ptlined() to determine the shortest distance to your shading position to check against a custom wire width. // primitive attribute with point positions int pts_prim[] = primpoints(0, @primnum); v[]@pos = {}; foreach(int pt; pts_prim){ vector p = point(0, 'P', pt); append(@pos, p); } // shader snippet feeding point positions into ptlined() // determining shortest distance to check against wire width. int num = len(pos); float dist = 1e6; for(int i = 0; i < num; i++){ vector pos_0 = pos[i]; vector pos_1 = pos[(i + 1) % num]; float dist_curr = ptlined(pos_0, pos_1, P); if(dist_curr < dist){ dist = dist_curr; } } stroke = dist <= stroke; wireframe.hipnc 5 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted December 17, 2019 Share Posted December 17, 2019 I have recorded a short tutorial explaining this method a little: 4 Quote Link to comment Share on other sites More sharing options...
primzahl Posted December 22, 2019 Share Posted December 22, 2019 (edited) fantastisch... thank you very much. there is a lack off shader building tuts for npr rendering. do you know how to get the edges of the geometry to get more an artistic look? Edited December 22, 2019 by primzahl Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted December 23, 2019 Share Posted December 23, 2019 Hi Helmut, do you mean artistic wireframe edges or the outer rim of the entire mesh? Either way, if you are talking about turning the wireframe into something more complex you could always color ramp the distance values and/or distort them with some noise: wireframe_art.hipnc In case you meant the entire mesh, you can color ramp a lambert shader like this: Also, a more painterly look can be achieved by using images to control gradient thresholds: https://www.sidefx.com/forum/topic/68331/ Quote Link to comment Share on other sites More sharing options...
primzahl Posted January 12, 2020 Share Posted January 12, 2020 (edited) Hallo Konstantin, thank you for the files and the link. I will have a closer look. I was thinking about something like Cinema4D sketch and toon shader. because I'm current on my final animation project and would like to have the look of a painting like Pissarro or Sisley etc. but brush strokes rendering seems more complicated than I naively thought and in deep shader creation and writing was not part of the school - so every tips and tricks are highly appreciated. Edited January 20, 2020 by primzahl typos Quote Link to comment Share on other sites More sharing options...
Librarian Posted January 12, 2020 Share Posted January 12, 2020 combine this + find on Ddforce Shader each day topic and vex shader code Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted January 12, 2020 Share Posted January 12, 2020 Hi Helmut, I got fairly good results by distorting colorful circles on top of images/renderings like so: https://forums.odforce.net/topic/44391-na/?tab=comments#comment-208974 To get closer to certain artists' way of painting though you would need to breakdown their visual style first. There won't be the one uber-cartoon shader that covers it all. Hirai Toyokazu also used to present his cartoon shading workflows on CMIVFX. Maybe you can get hold of this: https://web.archive.org/web/20180827020108/https://cmivfx.com/houdini-cartoon-effect Quote Link to comment Share on other sites More sharing options...
primzahl Posted January 20, 2020 Share Posted January 20, 2020 thank you both for your input and links, I will have a look at it and if I have further questions, Iwill post in an own thread, . But I guess, I have to change the look to something much simpler, since I have to be done by the end of May. Unfortunately, CMIVFX seems down and there seems no way to get the content. 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.