This is frustrating.
Here’s where I am now. Through much trial and error (and abuse of the MessageBox class) I have determined that the property I need to aim the refresh at is this one:
Camera.getProperty(35).getMapValue().refresh();
(I can’t for the life of me figure out how to access this by the name instead of the number, but whatever.)
And, sure enough, in the log I see “Loaded image Outline_Frm0_Normal.jpg” between the first pass and second pass renders.
Ran tdlmake on image C:/Users/zigraphix/Documents/daz content/Projects_content/Projects/sketch/nov1/Outline_Frm0_Normal.jpg
Loaded image Outline_Frm0_Normal.jpg
Loaded image Outline_Frm0_Normal.jpg
Rendering image
3Delight message #145 (Severity 1): S2073: 'Min' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
3Delight message #145 (Severity 1): S2073: 'Max' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
3Delight message #145 (Severity 1): S2073: 'SceneMin' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
3Delight message #145 (Severity 1): S2073: 'SceneMax' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
Loaded image Outline_Frm0_Normal.jpg
3Delight message #145 (Severity 1): S2073: 'Min' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
3Delight message #145 (Severity 1): S2073: 'Max' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
3Delight message #145 (Severity 1): S2073: 'SceneMin' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
3Delight message #145 (Severity 1): S2073: 'SceneMax' is not a parameter of shader 'brickyard/{cba2c4ea-0574-4e3a-9407-f98b0707092e}/shader_Imager'
Saved image: C:\Users\zigraphix\AppData\Roaming\DAZ 3D\Studio4\temp\render\r.png
Finished Rendering
Total Rendering Time: 4.54 seconds
Loaded image r.png
Saved image: C:\Users\zigraphix\AppData\Roaming\DAZ 3D\Studio4\temp\RenderAlbumTmp\Render 2.jpg
Yay!
Except… the image that is being composited is still the old image. Boo. The improvement is that every time I render, the outline image from the previous render gets used, which is better than before, when the outline image NEVER got updated… but still not good enough.
I’ve tried putting the refresh call as early as possible. If I put it before riBegin, it renders black and throws an error. Right now I have it right before riWorldBegin. I also tried forcing tdlmake by adding this line right after the refresh:
Renderer.prepareImage(Camera.getProperty(35).getMapValue(), Camera.getProperty(35).getMapValue().getFilename());
Now in the log I get:
Ran tdlmake on image C:/Users/zigraphix/Documents/daz content/Projects_content/Projects/sketch/nov1/Outline_Frm0_Normal.jpg
WARNING: images\dzimagemgr.cpp(596): Image C:/Users/zigraphix/Documents/daz content/Projects_content/Projects/sketch/nov1/Outline_Frm0_Normal.jpg not found in the list in DzImageMgr::imagePrepared()
It doesn’t matter if I put the refresh call before or after the prepareImage call.
Argh.
I’m going to go have some chocolate and maybe I’ll look at this again tomorrow. :(