Jump to content

[SOLVED] Export depth buffer


photo

Recommended Posts

For our project will be useful being able giving access at other applications to the depth buffer, saving it together with the final result in a Tracker Sequence using Video Grabber, or accessing it in realtime trough API.

In the Editor it's possible to visualize the Scene depth that I suppose show the depth buffer, can't find it in the Tracker accessible variables, there is any available solution for that?

Edited by davide445
Link to comment

Hi Davide,

For that use case you need to write your own video grabber tool that will grab final image and in addition a depth buffer. You can take a look at the GBufferRead sample in SDK Browser: Samples -> C++ API -> Render -> GBufferRead to get an idea how to get access to the internal buffers.

Another solution would be to write a custom post-processing effect that will display the depth buffer and grab sequence from the Video Grabber tool twice (don't forget to assign this kind of material first to the required player). There are some debug materials already exposed to the post effects (material started with with debug_ prefix), but not the depth buffer:

image.png

Thanks!

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

This material need to be assigned to every object in the scene?

Just to understand in scenes such as this one is meaning we need to assign it both to landscape but also trees (every component), grass, crane, scaffolding, every element of the construction, to obtain the depth buffer info?

image.thumb.png.f1dc1e46718588d3f0f2b843232590e2.png

image.thumb.png.9e16b0249b9d916b2508b3da42d09e28.png

Link to comment

Enabling SS Debug Materials I didn't find post_deferred_depth_decode  in my list, is this available also in the Entertainment license? Need I to install any addon?

image.png.eca84eb9f29546af7ee6c2bf1c50db79.png

image.png.95d85fc202d09e2ef87fd6ab15bb1f12.png

Link to comment

You also can assign post_deferred_opacity_depth built-in material(no need to copy any files from samples) to the player and grab an image with Video grabber. You will get following results:

image.png

This material is hidden and would not appear in autocomplete or in material list.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

I didn't find a render directory nor a post_deferred_depth_decode.mat  material using search in Samples project

image.png.067026310c4c3a111e0c89cfbf3c7507.png

Also if post_deferred_opacity_depth it's hidden how can I expose it :-)?

Edited by davide445
Link to comment

Got it was in F:\users\its\Unigine SDK Browser\sdks\entertainment_windows_2.8.0.1\data\samples\render\common\render

Is working as supposed and the Video Grabber correctly save this specific view.

Thanks!

Link to comment
×
×
  • Create New...