Digital Art Zone

 
   
4 of 5
4
Scripted multipass render to add outlines?
Posted: 20 November 2012 06:16 AM   [ Ignore ]   [ # 47 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25

I got a backdrop specified in the camera to work, so I’m going with that for now. But I’ll look at Rob’s examples again—I did read through them a couple of weeks ago, but I understand more about scripting now than I did then….

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 27 January 2013 11:51 PM   [ Ignore ]   [ # 48 ]
Member
Rank
Total Posts:  121
Joined  2004-10-23

Curious did you ever finish this little project?

Profile
 
 
Posted: 29 January 2013 06:08 AM   [ Ignore ]   [ # 49 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25
Tugpsx - 27 January 2013 11:51 PM

Curious did you ever finish this little project?

Still working on it. The render works, but there are still too many manual steps to set it up. If you’d like to take a look, pm me.

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 01 March 2013 06:19 PM   [ Ignore ]   [ # 50 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25

When I use the “Save render settings” utility with my Scripted 3Delight settings, it doesn’t capture the render engine information. The file that is created has this info:

"scene" {
  
"extra" [
   {
    
"type" "studio_render_settings",
    
"render_options" {
     
"aspect_ratio" [ 1013 ],
     
"startTime" 0,
     
"endTime" 1,
     
"renderMovToId" "ImageSeries",
     
"renderViewport" false,
     
"isAspectConstrained" true,
     
"imageSize" [ 500650 ],
     
"renderType" "Software",
     
"renderStyle" "Normal",
     
"rayTraceDepth" 1,
     
"openGLPasses" 1,
     
"useGLSL" false,
     
"isCurrentFrameRender" true,
     
"useMotionBlur" false,
     
"motionBlurPct" 100,
     
"motionBlurSamples" 2,
     
"xPixelSamples" 4,
     
"yPixelSamples" 4,
     
"shadowSamples" 10,
     
"shadingRate" 2,
     
"doubleSided" true,
     
"gain" 1,
     
"gamma" 1,
     
"pixelFilter" "Sinc",
     
"xFilterWidth" 6,
     
"yFilterWidth" 6
    }
   }
  ]
 } 

I think I need to change “renderType” to something other than “Software,” but what? Then I’ll also need to select the appropriate script, so I’ll need to figure out what that option is called. There’s no context help for either of these options. Does anyone know how to refer to them in a render preset script?

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 01 March 2013 11:39 PM   [ Ignore ]   [ # 51 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25

I found an old script someone shared with me two years ago, and was able to get the setting renderType to scripted renderer to work. However, I’m still having trouble setting the render script. The log doesn’t show any errors, but if I try to include the variable that should have the path to the script in a messagebox, there’s nothing there.

This sets the path to my render script:

var sRENDER_SCRIPT "support/DAZ/ScriptedRenderer/Outline Compositor/OutlineCompositorRenderScript.dsa"

The list of available scripts works after this is run, but I still can’t figure out how to set it….

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 04 March 2013 08:50 PM   [ Ignore ]   [ # 52 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25

Does anyone know how I can determine the name of a widget from strings files or anything like that? I need to know how to refer to the script selector widget.

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 05 March 2013 08:29 AM   [ Ignore ]   [ # 53 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13925
Joined  2003-10-09

What do you mean by widget?

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 05 March 2013 09:37 AM   [ Ignore ]   [ # 54 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25

In scripting terms, I mean property. I have a variable set to the path to the script I want to use, but I don’t know the name of the property to set to that variable.

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 05 March 2013 02:20 PM   [ Ignore ]   [ # 55 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13925
Joined  2003-10-09

A DzProperty derivative has a getLabel() function and a name member - both strings.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 05 March 2013 03:04 PM   [ Ignore ]   [ # 56 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25

Ok, I’ll see if I can iterate through the children of the parent property and find it that way—thanks for the reminder.

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 05 March 2013 04:35 PM   [ Ignore ]   [ # 57 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13925
Joined  2003-10-09

DzProperties don’t have children, so I’m wondering if we are talking about different things.

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 05 March 2013 08:28 PM   [ Ignore ]   [ # 58 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
Joined  2007-12-25

Probably not. I have a terrible time knowing what to call things in this scripting language.

I have set these variables:

var oRENDER_MANAGER App.getRenderMgr();
var 
oRENDERER oRENDER_MANAGER.findRenderer("DzScriptedRenderer");
var 
sRENDER_SCRIPT "support/DAZ/ScriptedRenderer/Outline Compositor/OutlineCompositorRenderScript.dsa"

and then I want to use them here:

oRENDERER.setRenderScriptsRENDER_SCRIPT ); 

but it doesn’t work—the value of the script referenced in the Render Settings panel doesn’t change. I suspect the name of the thingy I’m trying to set has changed. ( Where “thingy” here refers to “oRENDERER.setRenderScript()”.)

 Signature 

Shop Zigraphix @ DAZ3D

Profile
 
 
Posted: 06 March 2013 10:14 AM   [ Ignore ]   [ # 59 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13925
Joined  2003-10-09

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 );
}

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 06 March 2013 10:37 AM   [ Ignore ]   [ # 60 ]
Active Member
RankRank
Total Posts:  691
Joined  2010-03-13
zigraphix - 05 March 2013 08:28 PM

Probably not. I have a terrible time knowing what to call things in this scripting language.

I have set these variables:

var oRENDER_MANAGER App.getRenderMgr();
var 
oRENDERER oRENDER_MANAGER.findRenderer("DzScriptedRenderer");
var 
sRENDER_SCRIPT "support/DAZ/ScriptedRenderer/Outline Compositor/OutlineCompositorRenderScript.dsa"

and then I want to use them here:

oRENDERER.setRenderScriptsRENDER_SCRIPT ); 

but it doesn’t work—the value of the script referenced in the Render Settings panel doesn’t change. I suspect the name of the thingy I’m trying to set has changed. ( Where “thingy” here refers to “oRENDERER.setRenderScript()”.)

Despite the UI of the render options not changing, it seems “internally” it is working. Via the following script I can invoke the “Point-based occlusion” render without having it selected beforehand:

var oRenderMgr App.getRenderMgr();
var 
oRenderer oRenderMgr.findRenderer("DzScriptedRenderer");
oRenderMgr.setActiveRendereroRenderer );
oRenderer.setRenderScript"support/DAZ/ScriptedRenderer/Point-Based Occlusion/PointBasedOcclusionRenderScript.dsa" );
oRenderMgr.doRender(); 
Profile
 
 
Posted: 06 March 2013 12:06 PM   [ Ignore ]   [ # 61 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2800
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
 
 
   
4 of 5
4