Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two volume terrain issues #6

Open
Belsnickle opened this issue Feb 16, 2019 · 4 comments
Open

Two volume terrain issues #6

Belsnickle opened this issue Feb 16, 2019 · 4 comments

Comments

@Belsnickle
Copy link

In my project I am using the Volume component of Ogre. I ran into two issues with Caelum.

  1. Fog color of Caelum is grey.

  2. At night the sky color is the same blue sky as daytime. Also the starfield never shows up. I traced this to the following code:

mShaderGenerator->invalidateScheme(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);
mViewport->setMaterialScheme(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);

Removing these lines gives me a night time experience like in the CaelumDemo, however the terrain is without texture.

No fog isn't a game breaker. No texture on my terrain is. I know Caelum was developed with the legacy terrain system in mind. I would like to add support for the Volume component of Ogre. Any advice would be greatly appreciated.

@Belsnickle
Copy link
Author

https://forums.ogre3d.org/viewtopic.php?f=22&t=79793

I just read that you can invalidate schemes based on name. What would I enter for the volume terrain material generated by RTSS? I theorize invalidating only this material instead of the entire rtss default will allow for integration of Caelum and the volume terrain.

@Belsnickle
Copy link
Author

Using setRTSSWriteShadersToDisk(true); before I call

mShaderGenerator->invalidateScheme(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);
mViewport->setMaterialScheme(Ogre::RTShader::ShaderGenerator::DEFAULT_SCHEME_NAME);

gives me several KB more data than if I call the code above. Something is getting thrown away that Caelum needs.

Note that the code above gets called before any Caelum and volume terrain code. Without it my volume terrain is untextured. With it Caelum sky colour never changes.

@paroj
Copy link
Member

paroj commented Feb 20, 2019

I theorize invalidating only this material instead of the entire rtss default will allow for integration of Caelum and the volume terrain.

unfortunately the RTSS is all or nothing currently as the schemes are set per viewport.

Note that the code above gets called before any Caelum and volume terrain code. Without it my volume terrain is untextured. With it Caelum sky colour never changes.

this is an insightful finding. Probably Caelum does not account for RTSS generated techniques and just always uses technique 0 instead of calling getBestTechnique().

@Belsnickle
Copy link
Author

I tried changing all instances of getTechnique(0) to getBestTechnique() to no avail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants