Create a depthmap

KeironKeiron Posts: 413
edited August 2016 in Daz Studio Discussion

Hi

Is it possible to create a depth map from an object using Daz Studio?

I have mood master 1 and just bought mood master 2 but they don't worrk in daz studio 4.9

I can do it from a stereo image

 

 

Post edited by Keiron on
«1

Comments

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,206
    edited August 2016

    well you can in Octane not much help

    I do not know much about the iray canvases options

    http://www.daz3d.com/forums/discussion/73745/canvases-and-post-processing

    a bit about it here

    Post edited by WendyLuvsCatz on
  • You can do a Depth Map pass using the Canvasses feature in Iray - go to the Advanced tab of Render Settings, under that the Canvasses tab, and enable the check box. Click the + button to add a layer and, using the Type button under ythe Canvas list, set it to Depth. Render and when you save you will get a folder containing the Canvas images, using the same name as the image you rendered.

  • KeironKeiron Posts: 413
    edited August 2016

    Hi Sad

    I can get reasonable results with hg2img.exe

    This converts the rendered image into a hg2 file directly it's used in map making

    I wanted to make a Terrain out of the Daz Scene, using the software above work's reasonably well

    I've tried adding a light directly above the object and rendered it then converted the result in PSP ie making it black and white on the assumption the lighter area's are at the top

    and inverted the colours this gives a maps either in a valley or a mountain but some parts are incorrect like the eyes due to the black pupil in the eye

    Mood master used to create this ok, but I cant get that to work in 4.9

    Thank you for your help not sure about canvases

     

     

     

     

     

    Post edited by Keiron on
  • KeironKeiron Posts: 413
    edited August 2016

    Hi Richard

    I set it to Iray

    allowed Canvas

    Selected Depth

    Pressed render Nvidia Iray

    I seem to be getting a white screen?

     

    Post edited by Keiron on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,206
    edited August 2016
    Keiron said:

    Hi Richard

    I set it to Iray

    allowed Canvas

    Selected Depth

    Pressed render Nvidia Iray

    I seem to be getting a white screen?

     

    so did I BTW, I tried it too after reading link

    I normally use octane

    Post edited by WendyLuvsCatz on
  • You need to work with the EXR file in the Cnavasses folder, not the actual render - and, at least in Photoshop CS6, you will need to fiddle with the HDR Toning command (I think using something like AutoDesk Composite or Black magic Fusion, both of which are free, will be better but they are on my list of things to learn at some point).

    Iray depth canvas.JPG
    556 x 549 - 19K
  • KeironKeiron Posts: 413
    edited August 2016
    Keiron said:

    Hi Richard

    I set it to Iray

    allowed Canvasas

    Selected Depth

    Pressed render Nvidia Iray

    I seem to be getting a white screen?

     

    Hi I checked in the folder but it's empty?

     

    Post edited by Keiron on
  • KeironKeiron Posts: 413

    more info on a exr file

    A file with the EXR file extension is an OpenEXR Bitmap file. It's an open source HDR image file format created by the Industrial Light & Magic visual effects company.

    EXR files can be comprised of lossless or lossy compression and support multiple layers.

    More information on this format can be seen at the official OpenEXR website.

    How To Open an EXR File

    EXR files can be opened with Adobe Photoshop, Adobe After Effects, and Adobe SpeedGrade, but they may require the fnord ProEXR plugin.

    MacPhus ColorStrokes and advanced imaging programs like Serif's PhotoPlus should also be able to open EXR files, as can Autodesk's 3ds Max.

    Note: If you can't get your EXR file to open in the programs I just mentioned, make sure you're reading the file extension correctly. Some files look like EXR files even though they really aren't related at all, like EXE, EX4, and EXD.

    If you find that an application on your PC does try to open the EXR file but it's the wrong application or if you would rather have another installed program open EXR files, see my How To Change the Default Program for a Specific File Extension guide for making that change in Windows.

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,206
    edited August 2016

    EXR I hate them with a passion,

    I accidently render octane image series to them sometimes and no video editor/compositor I have opens them except Fusion which I cannot figure out for trying.

    Plenty apps onen one frame only image magic batch converts but the bat files never work for me either grrrrrr

    Post edited by WendyLuvsCatz on
  • KeironKeiron Posts: 413
    edited August 2016

    You would think this would be easy LOL!!!

    This program "hg2img.exe" converts an image to hg2 very quickly

    on more complex images its not the best solution

    so a basic shape with basic colours, no textures works OK

    all I need it the black and white image that Hg2img.exe can convert correctly

    Post edited by Keiron on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,206

    you need Carrara

    Doc3.jpg
    1920 x 1080 - 284K
    Doc3_Depth.jpg
    1920 x 1080 - 66K
    Untitled.png
    1908 x 1038 - 609K
  • KeironKeiron Posts: 413

    I've Carrara, ill check it out thank you

  • KeironKeiron Posts: 413
    edited August 2016

    Hi

    Tried it in carrara that worked ok

    Also exported posed obj from Daz Studio and imported into Bryce

    Set render to distance and then altitude both worked ok 

    i used neg in PSP to invert the colours worked great

     

    test1.jpg
    512 x 512 - 14K
    test2.jpg
    512 x 512 - 10K
    test3.jpg
    512 x 512 - 9K
    Post edited by Keiron on
  • KeironKeiron Posts: 413
    edited August 2016

    Thank you 

    Post edited by Keiron on
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,206

    YW

    and iray should do it, is a bug IMO

  • PtropePtrope Posts: 682

    Why an EXR file? A grayscale PNG was "too Poser," or what? Why does DAZ always seem to make things more difficult? For those of us who use Corel Photopaint, this is an unusable file format - the Z-depth masks in Poser worked perfectly for years, and now, nuthin'.

  • Richard HaseltineRichard Haseltine Posts: 100,836
    Ptrope said:

    Why an EXR file? A grayscale PNG was "too Poser," or what? Why does DAZ always seem to make things more difficult? For those of us who use Corel Photopaint, this is an unusable file format - the Z-depth masks in Poser worked perfectly for years, and now, nuthin'.

    Because, as far as I know, that is what Iray uses for its canvasses. PNG, in the standard form, wouldn't support the same bit-depth as EXR as far as I know (which matters for their intended use in compositing) while EXR is the standard format for this work.

  • mindsongmindsong Posts: 1,701

    I still prefer greymaps for my usual stuff and wish DS would set that as an option, but I believe EXR files are the 'right' answer over the long-term if you plan in integrating workflows with other tools. progress, sigh.

    I believe GIMP can load EXRs. Can Blender do depth-maps, and to any format?

    FWIW, Bryce does depth from the closest item edge in the scene to the furthest, and that can get in the way of our goals sometimes (e.g. doesn't really work with any of the cool lens sets...) With a range-limited point light right at the camera, I think you could get around this and do things like spherical depth-maps and the like through lenses, and specify your areas of interest with light-range bracketting, regardless the contents in the scene.

    Carrara may be able to do something like this too.

    Report back if you learn more!

    --ms

  • PtropePtrope Posts: 682
    edited March 2018
    Ptrope said:

    Why an EXR file? A grayscale PNG was "too Poser," or what? Why does DAZ always seem to make things more difficult? For those of us who use Corel Photopaint, this is an unusable file format - the Z-depth masks in Poser worked perfectly for years, and now, nuthin'.

    Because, as far as I know, that is what Iray uses for its canvasses. PNG, in the standard form, wouldn't support the same bit-depth as EXR as far as I know (which matters for their intended use in compositing) while EXR is the standard format for this work.

    Whether IRay uses EXR for its canvasses is immaterial - as long as it can export an image file in whatever format the user chooses, it should also offer that same choice for depth maps. Really, the market for Studio is primarily consumer- level, not professional - most of us are not running Pixar-level pipelines and workflows and can operate just fine on 'common' file formats.

    Post edited by Ptrope on
  • Richard HaseltineRichard Haseltine Posts: 100,836
    Ptrope said:
    Ptrope said:

    Why an EXR file? A grayscale PNG was "too Poser," or what? Why does DAZ always seem to make things more difficult? For those of us who use Corel Photopaint, this is an unusable file format - the Z-depth masks in Poser worked perfectly for years, and now, nuthin'.

    Because, as far as I know, that is what Iray uses for its canvasses. PNG, in the standard form, wouldn't support the same bit-depth as EXR as far as I know (which matters for their intended use in compositing) while EXR is the standard format for this work.

    Whether IRay uses EXR for its canvasses is immaterial - as long as it can export an image file in whatever format the user chooses, it should also offer that same choice for depth maps. Really, the market for Studio is primarily consumer- level, not professional - most of us are not running Pixar-level pipelines and workflows and can operate just fine on 'common' file formats.

    Affinity Photo is cheap and will read .exr, I think GIMP will read .exr and it is free, I think there's still a free version of Black Magic Fusion and that AutoDesk may still have a free version of their composite application. You don't need Pixar level tools to handle .exrs. Still, DS can apparently handle the .exr format so you can always make a feature request for an option to export the depth map (or canvasses genrally) in another format.

  • cough cough
  • Richard HaseltineRichard Haseltine Posts: 100,836

    You look to be getting some strong posterisation there (note the spikes in the levels dialogue). That's because you are performing a strong tonal adjustment in a relatively low bit depth image - I think you will find that doing it in the .exr before dragging it across will give a smoother result.

  • agent unawaresagent unawares Posts: 3,513
    edited March 2018

    You look to be getting some strong posterisation there (note the spikes in the levels dialogue). That's because you are performing a strong tonal adjustment in a relatively low bit depth image - I think you will find that doing it in the .exr before dragging it across will give a smoother result.

    This is actually basically impossible to get smooth steps the way Iray renders z-depth images. It wastes so much of the color range on distances that don't exist in the scene that the actual data that exists is very posterized, to the point I genuinely doubt converting to an 8-bit image before hitting levels will make a difference as long as you make sure to include the whole scene from near to far within your black to white range when tonemapping. And there's no way to tell Iray to render depth from some point to another point to get good transitions. It's incredibly frustrating.

    I played for a while with scaling the whole scene to try to trick Iray into rendering something more usable, but ultimately I found it far, far easier just to use a simple custom 3DL shader. There is less posterization and it actually handles transparency correctly, which is another thing that Iray z-depth (and a couple of the other canvases) fails at.

    wrt the video, Local Adaptation is not the method that should be used for toning depth exrs. This adds edge glow and other nonsense information to the image. The better option is Exposure and Gamma. (I wouldn't use Local Adaptation on beauty renders, either, but it's less completely wrong.)

    Post edited by agent unawares on
  • DarkEdgeDesignDarkEdgeDesign Posts: 489
    edited March 2018

    You look to be getting some strong posterisation there (note the spikes in the levels dialogue). That's because you are performing a strong tonal adjustment in a relatively low bit depth image - I think you will find that doing it in the .exr before dragging it across will give a smoother result.

    Oh yes you're absolutely right! In case some were still confused I thought I would provide a visual example as well as your excellent written example.

    Post edited by DarkEdgeDesign on
  • I figured it out... the EXR files are 32-bit images, so they appear to be blank white images because the values are beyond the visible 8-bit range.

    So in order to have the depth map visible, in Photoshop you have to convert to 8-bit and it automatically gives you the HDR toning dialogue--I found the "equalize histogram" preset to accurately squeeze down the values into the normal 8-bit range... Then just invert the result, and boom! Usable depth map.

    Cheers,

    - Jesse

  • vadimtvadimt Posts: 33

    Sorry to resurrect this thread. Facebook now allows to post 3d photos by uploading just file.jpg and file_depth.jpg. Then they automatically combine them into one "3d" photo. Check https://www.oculus.com/blog/introducing-new-features-for-3d-photos-on-facebook/?locale=en_US . I followed Jesse's recommendation, and it seemed to create the depth image which looks quite like the examples they supposedly use. Facebook tries to create 3D Photo, but then reports "Failed to create your 3D Photo". Have anybody here tried to do this? What would be the trick?

     

    Annotation 2019-04-23 003032.png
    900 x 637 - 414K
  • WendyLuvsCatzWendyLuvsCatz Posts: 38,206

    https://www.facebook.com/wendy5/posts/10217542978040325

    I have with Carrara native render and Octane render which need inverted depth map images

    and the d in depth to be lowercase

    I have never had any luck getting a depth map out of iray as nothing supports its weird format as profesionals apparently don't use png or jpg 

    and I don't own Photoshop

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,206
    edited April 2019

    https://www.facebook.com/wendy5/posts/10217549557004795

    you can do it manually like I did for this photo in Gimp using selection masking

    and you can help yourself by rendering out a second  greyscale or mat coloured 3D content image you can easily fill

    Lynx.jpg
    804 x 797 - 241K
    Lynx_depth.jpg
    804 x 797 - 25K
    Post edited by WendyLuvsCatz on
  • Leo ChenLeo Chen Posts: 697

    I got all white screen too .

    How come?
     

    Keiron said:

    Hi Richard

    I set it to Iray

    allowed Canvas

    Selected Depth

    Pressed render Nvidia Iray

    I seem to be getting a white screen?

     

     

  • Analog-X64Analog-X64 Posts: 110
    vadimt said:

    Sorry to resurrect this thread. Facebook now allows to post 3d photos by uploading just file.jpg and file_depth.jpg. Then they automatically combine them into one "3d" photo. Check https://www.oculus.com/blog/introducing-new-features-for-3d-photos-on-facebook/?locale=en_US . I followed Jesse's recommendation, and it seemed to create the depth image which looks quite like the examples they supposedly use. Facebook tries to create 3D Photo, but then reports "Failed to create your 3D Photo". Have anybody here tried to do this? What would be the trick?

     

    I found this thread looking for the same thing.  I took one of my previously rendered Carrara scenes and followed Wendy_Carrara's screenshots and added "Depth" under Multi-Pass.  I then used Photoshop to Invert the image_depth.jpg file and it worked like a charm.  The other issue was  when I uploaded the image.jpg and image_Depth.jpg  and same as Wendy I found I had to rename the D in Depth to lower case depth for it to work.

Sign In or Register to comment.