HDRP Render ObjectIDs to Texture for Dataset
Hi Everyone,
I am trying to create a dataset with ground-truth by rendering ObjectIDs(actually labels, depth, local pos & more) to RenderTextures. This was no big deal in the old forward pipeline, replacement shaders and per-renderer data.
Obviously HDRP is post-processing everything that is not set to render in the "After post-process" render path (set in the material). But somehow the ZTest does not seem to work then.
I actually did enable "ZTest for After PostProcess" which seems to work in the Editor view, but doesn't when rendered on a game camera.
Can i assume that this is a bug in the HDRP (6.9.1 macOS)?
Is there another approach to solve this?
Have you had any luck finding an answer to this? I'm also looking into creating ObjectID Textures in order to create training data for a DeepLearning project.
Unfortunately not. I didn't continue working on this topic. I didn't touch Unity in half a year now so I am a bit rusty but what you could do is rendering all the frames with HDRP, then deactivating it and rerendering them with replacement shaders.
Also it is possible to collect the Albedo values as done in the AOV-Recorder package. You would just have to manually change all materials between rendering passes and keep the camera steady. I used the AOV-Recorder to read out geometry data half a year ago. I hope not too much changed.
I hope this was of any help.
Your answer
![](https://koobas.hobune.stream/wayback/20220612211655im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Are Unity's lighting modes only useful for its built in shaders ? 0 Answers
CommandBuffer draw renderer to render texture in specific place and with light 0 Answers
(HDRP) Camera.Render() renders black, but only if Scene View is not visible 0 Answers
Capture Screenshot on Linux Headless Machine 3 Answers
RenderTexture not showing UI elements 2 Answers