{"id":22295,"date":"2023-12-13T00:37:33","date_gmt":"2023-12-13T00:37:33","guid":{"rendered":"https:\/\/jurn.link\/dazposer\/?p=22295"},"modified":"2025-05-27T13:31:16","modified_gmt":"2025-05-27T13:31:16","slug":"how-to-make-a-quick-real-time-z-depth-depth-cued-render-from-poser","status":"publish","type":"post","link":"https:\/\/jurn.link\/dazposer\/index.php\/2023\/12\/13\/how-to-make-a-quick-real-time-z-depth-depth-cued-render-from-poser\/","title":{"rendered":"How to make a quick real-time z-depth (&#8220;depth cued&#8221;) render from Poser"},"content":{"rendered":"<p>How to make a quick real-time z-depth (&#8220;depth cued&#8221;) render from Poser.<\/p>\n<p>The result:<\/p>\n<p><a href=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender.jpg\" alt=\"\" width=\"640\" height=\"640\" class=\"aligncenter size-large wp-image-22299\" srcset=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender.jpg 2048w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender-300x300.jpg 300w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender-1024x1024.jpg 1024w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender-150x150.jpg 150w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender-768x768.jpg 768w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcuerender-1536x1536.jpg 1536w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<hr>\n<p>How it&#8217;s done:<\/p>\n<p><strong>1.<\/strong> Save the Poser scene file you&#8217;re working on.<\/p>\n<p><strong>2.<\/strong> Turn on the Smooth Shaded display.<\/p>\n<p><a href=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/smoothshaded.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/smoothshaded.jpg\" alt=\"\" width=\"465\" height=\"88\" class=\"aligncenter size-full wp-image-22297\" srcset=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/smoothshaded.jpg 465w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/smoothshaded-300x57.jpg 300w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/a><\/p>\n<p><strong>3.<\/strong> Turn on the Depth Cueing.<\/p>\n<p><a href=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcued.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcued.jpg\" alt=\"\" width=\"325\" height=\"313\" class=\"aligncenter size-full wp-image-22296\" srcset=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcued.jpg 325w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/depthcued-300x289.jpg 300w\" sizes=\"auto, (max-width: 325px) 100vw, 325px\" \/><\/a><\/p>\n<p><strong>4.<\/strong> Delete all lights from the scene.<\/p>\n<p><a href=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/deletelightsposer.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/deletelightsposer.jpg\" alt=\"\" width=\"433\" height=\"123\" class=\"aligncenter size-full wp-image-22298\" srcset=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/deletelightsposer.jpg 433w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/deletelightsposer-300x85.jpg 300w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/a><\/p>\n<p><strong>5.<\/strong> Make the background white.<\/p>\n<p><a href=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/backcolwhite.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/backcolwhite.jpg\" alt=\"\" width=\"320\" height=\"472\" class=\"aligncenter size-full wp-image-22300\" srcset=\"https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/backcolwhite.jpg 320w, https:\/\/jurn.link\/dazposer\/wp-content\/uploads\/2023\/12\/backcolwhite-203x300.jpg 203w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n<p><strong>6.<\/strong> Make a real-time Preview render, save it as a .JPG file.<\/p>\n<p><strong>7.<\/strong> Revert to the last saved file, undoing the changes.<\/p>\n<hr>\n<p>Ok, that probably doesn&#8217;t sound all that quick. But here&#8217;s my Python script that automates all this grunt-work.<\/p>\n<p>You need to make a one-time edit to the file path, in the script. Just indicate where you want rendered images to be saved. Make this simple change, save as a .PY file and then add to the <em>C:\\Program Files\\Poser Software\\Poser 13\\Runtime\\Python\\poserScripts\\ScriptsMenu<\/em> folder. Restart Poser, and you&#8217;re ready for real-time depth map renders of your scene.<\/p>\n<pre class=\"lang:python decode:true \" title=\"Quickie depth map auto-render for Poser\" ># Make a quick depth-qued auto-render from Poser.\r\n# Version 1.0 - December 2023.  Tested in Poser 11 and 13.\r\n# With thanks to bwldrd for the 'SetBackgroundColor' tip.\r\n\r\n# From a saved Poser scene, auto render a quick real-time depth-map\r\n# as a .JPG on white, then revert the scene to the last saved scene file.\r\n\r\n# NOTE: The user will needs to change the output directory 'dirPath=' to their chosen path.\r\n\r\nimport poser\r\nimport datetime\r\n\r\n# Set up the saving and timestamp parameters. Change the save directory to suit your needs.\r\n# Remember that the \\\\ double slashes are vital!! This is for Windows. Mac paths may be different?\r\ndirPath=\"C:\\\\Users\\\\WINDOWS_USER_NAME\\\\FOLDER_NAME\\\\\"\r\next=\"JPG\"\r\ncurrent_date = datetime.datetime.now().strftime (\"%a-%d-%b-%Y-%H-%M-%S\")\r\n\r\n# Are we dealing with a Poser scene?\r\nscene = poser.Scene()\r\n\r\n# First, we make the Ground invisible. Thus, no ground shadows or grid.\r\n# Comment out these two lines with #'s if you dont want this to happen.\r\nscene.SelectActor(scene.Actor(\"GROUND\"))\r\nscene.Actor(\"GROUND\").SetVisible(0)\r\n\r\n# Now we make sure the render is set to use a DPI of 300.\r\n# And switch the render engine to real-time PREVIEW mode.\r\n# This assumes the user has already set their preferred render size.\r\nscene.SetResolution(300, 0)\r\nscene.SetCurrentRenderEngine(poser.kRenderEngineCodePREVIEW)\r\n\r\n# Now delete all lights in the scene. Then redraw the Poser scene.\r\nlights = scene.Lights()\r\nfor light in lights:\r\n    light.Delete()\r\nscene.Draw()\r\n\r\n# Now turn on the 'Smooth Shaded' display mode.\r\nposer.ProcessCommand(1083)\r\nscene.Draw()\r\n\r\n# Now Toggle 'Depth Cue' display mode on.\r\nposer.ProcessCommand(1044)\r\nscene.Draw()\r\n\r\n# Figure style is now set to use document style, in case it wasn't for some reason.\r\nposer.ProcessCommand(1438)\r\nscene.Draw()\r\n\r\n# Set the scene's background color to white.\r\nscene.SetBackgroundColor (1.0,1.0,1.0)\r\nscene.Draw()\r\n\r\n# Now we render the scene in Preview at 300dpi and save to a .JPG file.\r\n# It must be .JPG otherwise we get a .PNG cutout with alpha and fringing.\r\n# The file is timestamped and saved into the user's preferred directory.\r\nscene.Render()\r\nscene.SaveImage(ext, dirPath + current_date)\r\n\r\n# Done. Now we revert the entire scene, to its last saved state. This means\r\n# that it doesn't matter that we changed the display modes and deleted lights.\r\nposer.ProcessCommand(7)<\/pre>\n<p>Why do all this? Because AI image making can use depth-maps to recreate 3D scenes, in combination with the descriptive text prompt. AI + Poser&#8217;s content = accurate AI visuals of anything Poser has in its Library.<\/p>\n<hr>\n<p>In DAZ Studio, the paid utility &#8216;Atmospheric Effects Cameras for DAZ Studio&#8217; can do this, via its depth camera.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to make a quick real-time z-depth (&#8220;depth cued&#8221;) render from Poser. The result: How it&#8217;s done: 1. Save the Poser scene file you&#8217;re working on. 2. Turn on the Smooth Shaded display. 3. Turn on the Depth Cueing. 4. Delete all lights from the scene. 5. Make the background white. 6. Make a real-time [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,9,3],"tags":[],"class_list":["post-22295","post","type-post","status-publish","format-standard","hentry","category-automation","category-freebies","category-poser"],"_links":{"self":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/22295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/comments?post=22295"}],"version-history":[{"count":8,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/22295\/revisions"}],"predecessor-version":[{"id":23317,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/posts\/22295\/revisions\/23317"}],"wp:attachment":[{"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/media?parent=22295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/categories?post=22295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jurn.link\/dazposer\/index.php\/wp-json\/wp\/v2\/tags?post=22295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}