Digital Art Zone

 
   
5 of 5
5
Scripted multipass render to add outlines?
Posted: 06 March 2013 12:06 PM   [ Ignore ]   [ # 61 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2763
Joined  2007-12-25

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!

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 06 March 2013 12:09 PM   [ Ignore ]   [ # 62 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2763
Joined  2007-12-25
Richard Haseltine - 06 March 2013 10:14 AM

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….

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 08 March 2013 09:13 PM   [ Ignore ]   [ # 63 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2763
Joined  2007-12-25

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.

Image Attachments
shigi_hair_colorid.pngOutline_Frm0_Normal.pngOutline_Frm0_ColorID.pngOutline_Frm0_Depth.png
 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 09 March 2013 04:06 AM   [ Ignore ]   [ # 64 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2763
Joined  2007-12-25

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

Image Attachments
shigi_hair_Ci_Oi.png
 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 09 March 2013 05:19 AM   [ Ignore ]   [ # 65 ]
Active Member
RankRank
Total Posts:  682
Joined  2010-03-13

Quite like how it looks smile 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.

Profile
 
 
Posted: 10 March 2013 10:29 PM   [ Ignore ]   [ # 66 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2763
Joined  2007-12-25

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.

Image Attachments
miko-default.jpgmiko-toon.jpg
 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 11 March 2013 11:14 AM   [ Ignore ]   [ # 67 ]
Active Member
RankRank
Total Posts:  682
Joined  2010-03-13

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

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 smile

Profile
 
 
Posted: 07 February 2014 12:37 PM   [ Ignore ]   [ # 68 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2763
Joined  2007-12-25

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

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

Image Attachments
BotGenesis.png
 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
   
5 of 5
5