Silhouette-style outline?

Is there a way, be it script or shader set, to render a model with an 'outer-outline'?  An outline that only appears on the outer-edges of the model, but not where model overlaps itself.  I know that's not the best description, so I've attached a very primitive example of what I'm talking about.  I can do this in any image-editing program, but since this is going to be something done to hundreds upon hundreds of renders, I'd like to find ways to save time wherever I can in the process.

Comments

  • L'AdairL'Adair Posts: 9,479

    For 3Delight, there is pwToon. For Iray, there is LineRender9000.

    To be honest, I'm not sure either one will give you a true silhoutte outline.

  • SixDsSixDs Posts: 2,384

    Yeah, that's a tricky one. The only way that I can think of that might work, would be to use a plain white surface for everything on the figure, add an ambient light to the scene to give you an even illumination and use 3Delight to render, as that will allow you to turn shadows off in the light parameters, so there will be no internal edges created by shadows on the figure. That will possibly result in a white silouette. If it is an outline that you are looking for, I'm not certain the options that L'Adair suggested will ignore the internal geometry entirely or not. You may still end up having to pull the images into a photo editing program and trace the silouette if that is what you are after.

  • L'AdairL'Adair Posts: 9,479
    SixDs said:

    Yeah, that's a tricky one. The only way that I can think of that might work, would be to use a plain white surface for everything on the figure, add an ambient light to the scene to give you an even illumination and use 3Delight to render, as that will allow you to turn shadows off in the light parameters, so there will be no internal edges created by shadows on the figure. That will possibly result in a white silouette. If it is an outline that you are looking for, I'm not certain the options that L'Adair suggested will ignore the internal geometry entirely or not. You may still end up having to pull the images into a photo editing program and trace the silouette if that is what you are after.

    I think it's a lot less work to get a silhouette in Iray, but that still leaves the OP with the need to create the lines in a graphics editor, which is what s/he was hoping to avoid.


    For any who are interested, this is the easy way to get that silhouette in Iray:

    1. In Render Settings:
      • Set Environment Mode to Dome Only, (This will negate any lights you have in the scene, except for mesh lights. You'll have to hide those specifically.)
      • Set Draw Dome to Off
      • Set Draw Ground to Off
    2. Hide everything else:
    3. In the Scene tab, select all the items that need to be hidden.
    4. In the Parameters tab, left column, select all the items listed.
    5. In the right column, type visible in the filter field at the top.
    6. Locate the Visible option and set that to Off. (Everything selected should now disappear from the viewport.)
    7. Note: You can do more than one object at a time, as long as nothing is overlapping.
    8. Leave those items selected and click on the Render button.
    9. Stop (Cancel) the render at anytime after the scene shows in the Render Window. (Long renders are not necessary.)
    10. In the Parameters tab, set the Visible option to on. (If you left everything selected, this should make all of those things visible again, without a lot of extra work.
  • If I learned some scripting, I could possibly set up a couple cameras to do two separate renders. One that handles the regular rendering, and one that has the focal distance set *ever-so-slightly* lower.  I know LR9K does some script trickery to replace all of a scene's materials with solid color ones for some of its cameras, so if I did that with solid black diffuse material, that could create a full silhouette.  I'd have to overlap the original render and the silhouette version, but it'd work.

    Something tells me this project's going to involve a lot of scripting regardless, just for 2D image processing.  I should probably stop trying to do it in DAZ, but I thought the two-camera method would be an interesting approach.

  • LenioTGLenioTG Posts: 2,118

    I've never done something like that, but maybe you could turn off the lights and not render the dome. That way you'll just have a black silhouette, and then you can do whatever you want with it.

  • L'AdairL'Adair Posts: 9,479
    LenioTG said:

    I've never done something like that, but maybe you could turn off the lights and not render the dome. That way you'll just have a black silhouette, and then you can do whatever you want with it.

    Yes. That works. It's something I do any time I need a mask for an object. See this post above for specific steps.

    However, the OP wanted to avoid adding the outlines in a graphics editor because of the need to do "hundreds upon hundreds of renders."

  • And I wasn't exaggerating.  Some behind-the-scenes stuff: I'm creating sprites for a project I'm currently in the pre-production phases of.  I wanted to see if rendering 3D objects to create 2D assets was a viable path, since my eyesight precludes me from doing pixel art (at an acceptable pace).  But there was one big roadblock getting in the way: the soft outer edges.  I could turn pixel-filtering and sample numbers down to make the edges all-or-none in the alpha channel, but it created an unacceptable level of noise both on the model, and on around the edges of smaller details such as buckles.  My thought was, 'if I can create a solid black outline that starts from the model and goes OUT, rather than going inward, that would be an acceptable compromise to the scattered opacity around the edges of the model'.

    Well, the good news is, it turns out that the transparencies do not cause problems for the normal-map generation in the program I use.  Through what I could only describe as (divine or dumb) luck, I don't have to beat my head against a wall on this issue anymore.  Although, if I DID want to automate the process of creating a silhouette outline, I think using the 2x camera trick and compositing the renders would have been the way to go.  LR9K uses multiple renders and compositing in one go, so it seems entirely possible.  But now I can breathe a sigh of relief, that I won't have to worry about learning all the ins and outs of Daz's scripting.

  • L'AdairL'Adair Posts: 9,479

    I'm glad to hear you figured out something that works. Best of luck on the project.

Sign In or Register to comment.