lin.xianming Posted February 9, 2017 Share Posted February 9, 2017 1> There is a method "getD3D11Texture()" in Unigine::Texture , and we are able to get ID3D11Texture2D* then access the GPU Memory directly.But I can't find a similar method in Unigine::ObjectMeshDynamic to let me get ID3D11Buffer*. if it's available, then will be handier. 2> I added a billboard into a complex scene, which includes some objects and lights. I want the texture of the billboard looked just like the original image, which wouldn't be interfered by the lights in the enviroment. How can I reach this effect? Thanks David Link to comment
silent Posted February 10, 2017 Share Posted February 10, 2017 lin.xianming Regarding material that will not be affected by scene lightning - it can be done following way: Enable Emission state for the billboards material; Assing whiite albedo texture to the Emission slot; Set the Albedo / Diffuse color multiplier in Parameters to black; Set the Specular value to 0; Set the Gloss value to 0. Set the Microfiber value to 1; Change emission color to desired. Or you can just assign colored texture to the emission slot and use white emission color in parameteres. About the first question - I'm afraid there is no such feature currently available, sorry. 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
lin.xianming Posted February 11, 2017 Author Share Posted February 11, 2017 Regarding material that will not be affected by scene lightning - it can be done following way: Enable Emission state for the billboards material; Assing whiite albedo texture to the Emission slot; Set the Albedo / Diffuse color multiplier in Parameters to black; Set the Specular value to 0; Set the Gloss value to 0. Set the Microfiber value to 1; Change emission color to desired. Or you can just assign colored texture to the emission slot and use white emission color in parameteres. It seems a bit sophisticated. could you please give me some demo codes to illustrate the routine? Thanks in advance. Link to comment
lin.xianming Posted February 14, 2017 Author Share Posted February 14, 2017 The steps that you mentioned above meant some opperations in UnigineEditor instead of C++ Codes, didn't you? In order to achieve the goal, Do I need to write some shaders to cooperate with that material? Thanks! Link to comment
silent Posted February 14, 2017 Share Posted February 14, 2017 lin.xianming, You can create inherit from billboards_base material via C++ and modify any material parameter on fly via C++ API as well. You can check inside editor if result that you get is exact the same that you want. If so you can implement C++ logic. See Material: https://developer.unigine.com/en/docs/2.4/api/library/rendering/class.material (for single material edit) and Materials (for material libraries): https://developer.unigine.com/en/docs/2.4/api/library/rendering/class.materials 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
Recommended Posts