Scripted multipass render to add outlines?

13»

Comments

  • zigraphixzigraphix Posts: 2,768
    edited December 1969

    Well, I feel silly, I didn't even try to see if it would work. I'll try that when I'm back at my development system tonight.

    Thanks!

  • zigraphixzigraphix Posts: 2,768
    edited December 1969

    No error? I'm not sure what you need, but you can use Rob's trick to look for the functions in DzRenderer in DS4:

    for ( var o in oRENDERER ) {
    print ( o );
    }

    No error. Yes, it's the functions I meant I needed to iterate through, not the properties. I learned to code before OOP, and I've never managed to get the new terminology into my head.

    If Renpatsu is right, it may work anyway, but I'll probably try this as well.

    It's a pity I can't directly update the documentation when I find answers to these sorts of questions, but whatever....

  • zigraphixzigraphix Posts: 2,768
    edited December 1969

    Ok. Renpatsu was right and the script as written does select the right render script, though the options don't display and can't be adjusted. I'll continue to try to tweak that.

    Meanwhile, I have one last issue I'm trying to work through. There are three methods of generating outlines: z-difference, normals, and color ID. I've been using colorID, which has the advantage that it handles transparency, but only between different objects (or I can set it to put lines between different mat zones, but that doesn't always improve matters). Normal-calculated outlines work better for "internal" lines, e.g. the nose on someone's face, gaps in hair, etc. Examples are below-- a color render with ColorID outlines, then the generated outline files for ColorID and Normal outlines. (The depth-based outlines don't work well enough for my purposes, but I've included one so you can see how dark they tend to come out, and they also don't take transparency into account.)

    Does anyone know of a way to have the renderer incorporate transparency (i.e. alpha) into the normal outline render? I think that would be ideal for my purposes, if I could figure out how to do it.

    Outline_Frm0_Depth.png
    500 x 650 - 1M
    Outline_Frm0_ColorID.png
    500 x 650 - 1M
    Outline_Frm0_Normal.png
    500 x 650 - 1M
    shigi_hair_colorid.png
    500 x 650 - 552K
  • zigraphixzigraphix Posts: 2,768
    edited December 1969

    Figured it out... I think. How do you folks think this looks? This is using ColorID and opacity.

    shigi_hair_Ci_Oi.png
    500 x 650 - 590K
  • RenpatsuRenpatsu Posts: 792
    edited March 2013

    Quite like how it looks :) From my own experience I know that transparency can do some very ugly things to toon style renders (well texture maps in general can look odd).

    As far as the missing UI goes, perhaps you can build your own UI before triggering the scripted render(s) via a script, but there might be other means. I didn't look much into scripted renders myself apart from triggering these automatically. I got a "one script solution" for myself to adjust all quality related settings (pwSurface2 materials, uber Environment and uberArea lights, and render options) and trigger either 3Delight standard or point-based occlusion then in one go.

    Post edited by Renpatsu on
  • zigraphixzigraphix Posts: 2,768
    edited December 1969

    What do you folks think... worth pursuing as a commercial product? I'll be calling for beta testers soon, if so.

    DS default render vs. tooncam scripted render, no shader adjustments to surfaces, one distant light + UE at 20%. No postwork.

    miko-toon.jpg
    500 x 650 - 266K
    miko-default.jpg
    500 x 650 - 230K
  • RenpatsuRenpatsu Posts: 792
    edited December 1969

    This looks very good right out of the box and it appears to handle textured surfaces quite well really :)

    With my current "toon" render approaches I have to fiddle quite a bit with the materials to get it right - e.g. using the pwToon presets from Crescent or similar. You did get my attention certainly with your approach, but you might have already figured that out, so perhaps good if others chime in as well :)

  • zigraphixzigraphix Posts: 2,768
    edited December 1969

    I finally got this all working well enough to submit as a product. Thanks, everyone, for all the help! :)

    http://www.daz3d.com/forums/discussion/36728/

    BotGenesis.png
    500 x 650 - 501K
Sign In or Register to comment.
Rocket Fuel