Multi-layer rendering in 3Delight
![dvyd](https://secure.gravatar.com/avatar/cd50ba6a13cc978f0107c07bd007bbe7?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2Fcd50ba6a13cc978f0107c07bd007bbe7_100.png)
Could anyone point me to documentation or post an example about writing a script to render multiple layers in 3Delight? These are the layers I'm interested in:
1) RGB
2) z-depth
3) RGB for distinct, finely detailed objects (e.g. eye lashes)
4) Object outlines (is there anything like Blender's Freestyle ?)
Thank you,
-d. vyd
Comments
You should look at Mood Master by Dreamlight and there is also the Expansion, these were developed for earlier versions of DS (3.x) and I haven't tried them out in ds4 yet. Or possibly Mood Master 2. I haven't seen anything like these updated lately and I have no idea if they still work.
For the outlines you should look at the variety of toon shaders/cams available. There are even several available on sharecg.
Edit: In browsing through Dreamlight's store it looks like Light Dome PRO - R might give you what you are looking for and does support DS4+
I have worked extensively with rendering multiple render passes via script in DS/3DL. This page should prove helpful in getting you started with scripting rendering:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/rendering/render_to_viewport/start
I've also written many of my own custom shaders for 3DL in DS using Shader Mixer (z-depth, etc.):
http://zigraphix.com/dazdocs/shader_mixer_brick_docs.pdf
Some of this info is old, but should still apply.
Hope this helps get you started.
- Greg
ETA: As always, google is your friend, and the best way to search these forums.
Thank you greymouser69 & algovincian.greymouser69, I'll look at some of the toon shaders on sharecg before branching out to commercial addons. Algovincian, I appreciate the links to appropriate documentation.
Maybe you can use the exsisting batch render script: https://www.daz3d.com/batch-render-for-daz-studio-4-and-rib
To get the outline render, there are some products in the shop. Take a look at the promos of the following products, maybe you can achieve more of what you want with one of those:
https://www.daz3d.com/manga-style-shaders
https://www.daz3d.com/camera-magic-toonycam-pro
https://www.daz3d.com/linerender9000
There is a Z-Depth Camera in this product: https://www.daz3d.com/atmospheric-effects-cameras-for-daz-studio
Take a look at the documentation: http://www.ageofarmour.com/3d/tutorials/AoA_atmospheric_cameras_help.html#Depth_Camera
But there is a ongoing controversy in this forum if these atmospheric cameras produce correct results in DAZ Studio 4.8 and higher. Try for yourself, you can return the product within 30 days if you are not satisfied.
Maybe this is helpful too: https://www.daz3d.com/mask-and-multipass-toolbox
4) For object outlines, check out the "Outline" example script coming with DS. It's what Zigraphix´s product here and LR9K were based on - but that example has issues in there that the author of LR9K had to fix. So if you don't want to reinvent the wheel, then it's your best bet to invest in it.
Not sure what you mean in 3) - you want the renderer to recognise those automatically, or do you want to be able to specify a display subset and render out only those? You'll need a rendertime script on your surface shader in the latter case. Not 100% sure ATM that you can tell 3Delight to render out subsets through the DS scripting, but it's easy enough to export to RIB and add the command manually (see p.155 of the 3Delight PDF doc for example RIB commands - and pp.31-32 for more display-related syntax).
Z-depth, you've been given links about making zdepth shaders. You could also try rendering to the zfile display (p.176-177).
This code will give you usable RIB files out of the box when you replace Renderer.doDefaultDisplay with this in your render script. Displays can be stacked (but make sure you give the files different names!)
PS The scripting docs for DS3.x are somewhat more complete that the 4.x wiki ATM and they come in a zip file:
http://docs.daz3d.com/doku.php/public/software/dazstudio/3/start
In terms of scripted rendering and rendertime scripts, not much has changed.