- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Autodesk dev support and everyone else interested in render overrides,
We've been encountering problems with MSceneRender when rendering transparent objects to multiple render targets.
- When rendering to two targets, object depth sorting of both opaque and transparent objects work.
- When rendering to three or more targets, object depth sorting works for opaque objects, but transparent objects' depth sorting stops working.
I understand this is a complex behavior to reproduce, so we've made the effort and developed a test plugin (following devkit conventions) to make it easier. You may find the plugin source and instructions in this repo: https://github.com/artineering-io/viewOverride.
The MSceneRender in the plugin renders to 3 targets (color, depth, normals) showing the object sorting issues with transparent objects [see attached screencast] (open TransparencyTest.ma file to observe the problem on different transparent materials using the View Override plugin).
When you change line 51 in viewRenderOperations.cpp to render to 2 targets instead of 3, recompile and reload the plugin, object sorting works well again.
We need to render to multiple render targets in our NPR engine and our clients are beginning to experience transparency issues when having multiple transparent objects in the scene. We've tried solving this issue on our own with the existing API, but it seems to be out of our control. Is there something that we missed out that we can fix?
We could create our own scene renderer for transparent objects, but we are hoping for a more straightforward solution.
We'd appreciate your ideas and support and are happy to help troubleshoot and test this in any way we can.
Solved! Go to Solution.