Jump to content

render_haze creating a problem


photo

Recommended Posts

We have integrated 2.4.1 SDK in our application. I am using following code to render unigine rendering onto texture and then use that texture in our application.

Unigine::Render *render = Render::get();
PlayerPtr playerCam = Game::get()->getPlayer();
m_pCamera = Camera::create();
if( playerCam.get() )
{
	m_pCamera->setModelview(playerCam->getCamera()->getModelview());
	m_pCamera->setProjection(playerCam->getProjection());
	
	if( !m_pTextureRender->isEnabled() )
		m_pTextureRender->enable();
			
	m_pTextureRender->setColorTexture(0, m_pTexture);
	m_pTextureRender->setDepthTexture(m_pTextureDS);

	m_pViewPort->render(m_pCamera);

	m_pTextureRender->flush();
	m_pTextureRender->disable();
}

Everything works perfect. But when I have edited the worlds to add few objects; I had black rendering. After debugging and after comparisons, we have figured out that the world saves render_haze  = 2. Then on load it renders black and updates cgf and all worlds loaded after that renders black.

 

render_haze (scattering)  has seriously some issues associated with Texture Render and viewport.

 

Please advise.

 

Rohit

Link to comment

Hi Rohit,

 

Not sure what the real problem is? You can manually edit .world file and replace render_haze 2 to 0 if you don't need any atmospheric effects. Is that solution will solve your current issue?

Also, is there any small test scene of more detailed step-by-step guide how to reproduce black screen rendering?"

Thanks!

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

Link to comment

Silent,

I did the same and things are working for me with above scene capturing onto a texture.

 

Just enabled the render_haze settings in environment settings and the render to texture it.

 

It will be black. Currently we are busy with demo. So I will surely send test app later. But it is very easy to reproduce.

 

Rohit

Link to comment

Hi Rohit,

 

Thanks for the info. I've created bug in our internal bug tracker regarding this issue. We will surely inform you in case of any updates.

Thanks Silent.

 

But this is a problem I see.

Link to comment
×
×
  • Create New...