Jump to content

can I get ID3D11Buffer* from ObjectMeshDynamic?


photo

Recommended Posts

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

lin.xianming

 

Regarding material that will not be affected by scene lightning - it can be done following way:

  1. Enable Emission state for the billboards material;
  2. Assing whiite albedo texture to the Emission slot;
  3. Set the Albedo / Diffuse color multiplier in Parameters to black;
  4. Set the Specular value to 0;
  5. Set the Gloss value to 0.
  6. Set the Microfiber value to 1;
  7. 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:

Link to comment

 

Regarding material that will not be affected by scene lightning - it can be done following way:

  1. Enable Emission state for the billboards material;
  2. Assing whiite albedo texture to the Emission slot;
  3. Set the Albedo / Diffuse color multiplier in Parameters to black;
  4. Set the Specular value to 0;
  5. Set the Gloss value to 0.
  6. Set the Microfiber value to 1;
  7. 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

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

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:

Link to comment
×
×
  • Create New...