-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Rendering transparent/translucent objects in DepthPerspective #3055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue has been automatically marked as stale because it has not had activity from the community in the last year. It will be closed if no further activity occurs within 20 days. |
bro do you have any solutions? I want to get the translucents' depth and seg , but i do not konw how to get it |
Uh oh!
There was an error while loading. Please reload this page.
For training data generation purposes, I would need to render transparent or translucent objects such as glasses, windows, etc. so that they would show up in the DepthPerspective and SurfaceNormals image channels of AirSim.
Unfortunately, since transparent materials do not render in the SceneDepth buffer, they will not show up by default in the DepthPerspective image (a simple check is obtained by switching the visualisation mode to the SceneDepth buffer in the visualisation). The root cause seems to be that transparent materials are not rendered with the standard rendering pass, but handled separately by UE4.
A possible workaround would be to use the CustomDepth buffer. Indeed, by ticking the appropriate material setting one can see a CustomDepth buffer with, e.g., windows showing up in depth.
The next step then would be to replace Z in the XYZ coordinates obtained in the DepthPerspectiveMaterialFunction. Since we take the length from the camera view, we would have to join (X,Y) with Z from the CustomDepth buffer as obtained from the SceneTexture widget. I was not able to do that successfully.
For now I managed to only modify the the standard DepthPerspectiveMaterialFunction with the SceneTexture:CustomDepth (scaled to meters). However, this is not a DepthPerspective (and I really needed that). I thought of dividing that by the camera unit ray's z coordinate to obtain the appropriate scaling. I was not able to do that successfully.
Did anyone look into the issue before and has tips/solutions so that AirSim can return translucent objects as mentioned above?
The text was updated successfully, but these errors were encountered: