Jump to content

Change render settings


photo

Recommended Posts

Posted

Hi there

 

I'm looking for a possibility to change the render settings, such as scattering from C++. I've seen the scripting functions, such as

engine.render.setScatteringTurbidity

But I couldn't found a approach to do this from c++...

 

Thanks in advance,

Renato

Posted

Hi Renato,

Currently most of render methods are absent in c++ api unfortunatelly. You can create a script world function and call it from c++ with engine.runWorldFunction.

// script 
void setScatteringTurbidity(float val) {    
   engine.render.setScatteringTurbidity(val);
}

// c++ 
engine->runWorldFunction(Variable("setScatteringTurbidity"),Variable(1.0f));

More info in this article https://developer.unigine.com/en/docs/1.0/cpp_api/usage/callbacks

Posted

Hi Maxim

 

Thanks a lot for the reply. Does Unigine plan to provide those methods in a future release?

 

Kind regards,

Renato

Posted

Hi Renato,

 

Does Unigine plan to provide those methods in a future release?

 

Not in the nearest one, I'm afraid. We'll prioritize it and try to expose these missing API parts over the next 1-3 months.

 
Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...