davide445 Posted October 16, 2019 Share Posted October 16, 2019 (edited) 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 October 17, 2019 by davide445 Link to comment
silent Posted October 16, 2019 Share Posted October 16, 2019 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: Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
davide445 Posted October 16, 2019 Author Share Posted October 16, 2019 (edited) Thanks will look what can be the fastest solution, I suppose the second one. Edited October 16, 2019 by davide445 Link to comment
silent Posted October 16, 2019 Share Posted October 16, 2019 You can try to use post_deferred_depth_decode material to get the following look: 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
davide445 Posted October 16, 2019 Author Share Posted October 16, 2019 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? Link to comment
silent Posted October 16, 2019 Share Posted October 16, 2019 It's a simple post effect, you need to assign it to the player that will be used in Video Grabbe to save the image sequence. Please, check the previous message: 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
davide445 Posted October 16, 2019 Author Share Posted October 16, 2019 Ok, sorry never used them so was in doubt about the procedure. Link to comment
davide445 Posted October 16, 2019 Author Share Posted October 16, 2019 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? Link to comment
silent Posted October 16, 2019 Share Posted October 16, 2019 It may be hidden, just start typing it's name in the material field (in Player settings). How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
davide445 Posted October 16, 2019 Author Share Posted October 16, 2019 Already tried, appear to be not hidden either Link to comment
morbid Posted October 16, 2019 Share Posted October 16, 2019 post_deferred_depth_decode is available in the SDK samples. Just find it and copy to your project. <sdk>\data\samples\render\common\render\post_deferred_depth_decode.mat 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
silent Posted October 16, 2019 Share Posted October 16, 2019 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: 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
davide445 Posted October 16, 2019 Author Share Posted October 16, 2019 (edited) I didn't find a render directory nor a post_deferred_depth_decode.mat material using search in Samples project Also if post_deferred_opacity_depth it's hidden how can I expose it :-)? Edited October 16, 2019 by davide445 Link to comment
morbid Posted October 17, 2019 Share Posted October 17, 2019 Davide, please, take a look at the path I wrote: <unigine_sdk_folder>\data\samples\render\common\render\post_deferred_depth_decode.mat Just copy this file to your project. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
davide445 Posted October 17, 2019 Author Share Posted October 17, 2019 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
Recommended Posts