sebastian.vesenmayer Posted January 11, 2019 Share Posted January 11, 2019 Hi, I just port our project from 2.7.2 to 2.7.3 and discovered that the auxiliary buffer is doing a depth test now. My material is set to disable depth test and depth mask to prevent depth testing and writing so I can write all pixel in the auxiliary buffer to do the outlining with a sobel later. It worked without problems in 2.7.2.. Is there a workarround without offsetting the geometry from the ground plane? Sample code and video is in the attachement. Thanks, Sebastian source.zip UNIGINE Engine 11.01.2019 11_34_19.mp4 Link to comment
morbid Posted January 11, 2019 Share Posted January 11, 2019 Hello Sebastian, This was made for proper work of alfa test materials with auxiliary buffer. We need some time to investigate possible ways of fixing this. How urgent is this for you? Thank you. 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
sebastian.vesenmayer Posted January 11, 2019 Author Share Posted January 11, 2019 Hi morbid, it would be ok to have a solution in the next 2 weeks. Thank you Link to comment
thomalex Posted January 14, 2019 Share Posted January 14, 2019 Hello @sebastian.vesenmayer, Consider using the Geometry Inflation feature as a possible workaround. Yes, it inflates the geometry, but the offset is not so perceptible on small values and the pivot point is not moved. Just add a couple of lines to your init function: ... objMeshStatic->setMaterialParameter("auxiliary_color", Unigine::Math::vec4(1.f, 0.f, 0.f, 0.f), 0); // enable the Geometry Inflation objMeshStatic->setMaterialState("geometry_inflation", 1, 0); objMeshStatic->setMaterialParameter("vertex_balloon", Unigine::Math::vec4(0.01f, 0.f, 0.f, 0.f), 0); // 0.01f is pretty enough return 1; } ... It works like a charm in your sample project. If it is not acceptable for your logic, we'll come up with other ways. Thank you! Link to comment
morbid Posted January 14, 2019 Share Posted January 14, 2019 Another temporary workaround could be Polygon offset. You can try setting it for the material with auxiliary buffer. Please, let us know if one of the options will work for you. 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
sebastian.vesenmayer Posted January 16, 2019 Author Share Posted January 16, 2019 On 1/14/2019 at 5:46 AM, thomalex said: Hello @sebastian.vesenmayer, Consider using the Geometry Inflation feature as a possible workaround. Yes, it inflates the geometry, but the offset is not so perceptible on small values and the pivot point is not moved. Just add a couple of lines to your init function: ... objMeshStatic->setMaterialParameter("auxiliary_color", Unigine::Math::vec4(1.f, 0.f, 0.f, 0.f), 0); // enable the Geometry Inflation objMeshStatic->setMaterialState("geometry_inflation", 1, 0); objMeshStatic->setMaterialParameter("vertex_balloon", Unigine::Math::vec4(0.01f, 0.f, 0.f, 0.f), 0); // 0.01f is pretty enough return 1; } ... It works like a charm in your sample project. If it is not acceptable for your logic, we'll come up with other ways. Thank you! As you can see on your picture the outline is now generated arround the Ball. If something would block the sight, the outlining will vanish. Polygon offset is not working for us. We did render it without depth test to make sure that fine height differences won't affect it on the zero ground. We cannot exactly say what the height is, since every scenery is different. Best practise may be to define the same blending functions in auxiliary as in deferred and forward rendering procedure. Link to comment
morbid Posted January 16, 2019 Share Posted January 16, 2019 Hello Sebastian, we fixed this issue and will send you the patch by friday. 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
sebastian.vesenmayer Posted January 17, 2019 Author Share Posted January 17, 2019 Thank you very much :) Link to comment
morbid Posted January 17, 2019 Share Posted January 17, 2019 @sebastian.vesenmayer, I've just sent you the link on email you've used for your forum account. Thank you. 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
sebastian.vesenmayer Posted January 25, 2019 Author Share Posted January 25, 2019 Hi, sorry for the late reply. The version you sent me works. :) Thank you for your help. Topic can be closed. Link to comment
morbid Posted January 25, 2019 Share Posted January 25, 2019 It's okay, we're glad to help! 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
Recommended Posts